diff --git a/.buildkite/scripts/build_kibana.sh b/.buildkite/scripts/build_kibana.sh index 7a9878b5bcd13..e26d7790215f3 100755 --- a/.buildkite/scripts/build_kibana.sh +++ b/.buildkite/scripts/build_kibana.sh @@ -5,7 +5,11 @@ set -euo pipefail export KBN_NP_PLUGINS_BUILT=true echo "--- Build Kibana Distribution" -node scripts/build --debug +if [[ "${GITHUB_PR_LABELS:-}" == *"ci:build-all-platforms"* ]]; then + node scripts/build --all-platforms --skip-os-packages +else + node scripts/build +fi echo "--- Archive Kibana Distribution" linuxBuild="$(find "$KIBANA_DIR/target" -name 'kibana-*-linux-x86_64.tar.gz')" diff --git a/.buildkite/scripts/common/persist_bazel_cache.sh b/.buildkite/scripts/common/persist_bazel_cache.sh new file mode 100755 index 0000000000000..357805c11acec --- /dev/null +++ b/.buildkite/scripts/common/persist_bazel_cache.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +source .buildkite/scripts/common/util.sh + +KIBANA_BUILDBUDDY_CI_API_KEY=$(retry 5 5 vault read -field=value secret/kibana-issues/dev/kibana-buildbuddy-ci-api-key) +export KIBANA_BUILDBUDDY_CI_API_KEY + +# overwrites the file checkout .bazelrc file with the one intended for CI env +cp "$KIBANA_DIR/src/dev/ci_setup/.bazelrc-ci" "$KIBANA_DIR/.bazelrc" + +### +### append auth token to buildbuddy into "$KIBANA_DIR/.bazelrc"; +### +echo "# Appended by .buildkite/scripts/persist_bazel_cache.sh" >> "$KIBANA_DIR/.bazelrc" +echo "build --remote_header=x-buildbuddy-api-key=$KIBANA_BUILDBUDDY_CI_API_KEY" >> "$KIBANA_DIR/.bazelrc" diff --git a/.buildkite/scripts/common/setup_bazel.sh b/.buildkite/scripts/common/setup_bazel.sh deleted file mode 100755 index bbd1c58497172..0000000000000 --- a/.buildkite/scripts/common/setup_bazel.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash - -source .buildkite/scripts/common/util.sh - -KIBANA_BUILDBUDDY_CI_API_KEY=$(retry 5 5 vault read -field=value secret/kibana-issues/dev/kibana-buildbuddy-ci-api-key) -export KIBANA_BUILDBUDDY_CI_API_KEY - -cp "$KIBANA_DIR/src/dev/ci_setup/.bazelrc-ci" "$HOME/.bazelrc" - -### -### append auth token to buildbuddy into "$HOME/.bazelrc"; -### -echo "# Appended by .buildkite/scripts/setup_bazel.sh" >> "$HOME/.bazelrc" -echo "build --remote_header=x-buildbuddy-api-key=$KIBANA_BUILDBUDDY_CI_API_KEY" >> "$HOME/.bazelrc" - -### -### remove write permissions on buildbuddy remote cache for prs -### -if [[ "${BUILDKITE_PULL_REQUEST:-}" && "$BUILDKITE_PULL_REQUEST" != "false" ]] ; then - { - echo "# Uploads logs & artifacts without writing to cache" - echo "build --noremote_upload_local_results" - } >> "$HOME/.bazelrc" -fi diff --git a/.buildkite/scripts/pipelines/pull_request/pipeline.js b/.buildkite/scripts/pipelines/pull_request/pipeline.js index 068de9917c213..78dc6e1b29b6d 100644 --- a/.buildkite/scripts/pipelines/pull_request/pipeline.js +++ b/.buildkite/scripts/pipelines/pull_request/pipeline.js @@ -60,7 +60,7 @@ const uploadPipeline = (pipelineContent) => { /^x-pack\/test\/security_solution_cypress/, /^x-pack\/plugins\/triggers_actions_ui\/public\/application\/sections\/action_connector_form/, /^x-pack\/plugins\/triggers_actions_ui\/public\/application\/context\/actions_connectors_context\.tsx/, - ]) + ]) || process.env.GITHUB_PR_LABELS.includes('ci:all-cypress-suites') ) { pipeline.push(getPipeline('.buildkite/pipelines/pull_request/security_solution.yml')); } @@ -69,7 +69,7 @@ const uploadPipeline = (pipelineContent) => { // if ( // await doAnyChangesMatch([ // /^x-pack\/plugins\/apm/, - // ]) + // ]) || process.env.GITHUB_PR_LABELS.includes('ci:all-cypress-suites') // ) { // pipeline.push(getPipeline('.buildkite/pipelines/pull_request/apm_cypress.yml')); // } diff --git a/.buildkite/scripts/post_build_kibana.sh b/.buildkite/scripts/post_build_kibana.sh index 2194414dd22d3..5f26c80ddb6b6 100755 --- a/.buildkite/scripts/post_build_kibana.sh +++ b/.buildkite/scripts/post_build_kibana.sh @@ -12,7 +12,6 @@ fi echo "--- Upload Build Artifacts" # Moving to `target/` first will keep `buildkite-agent` from including directories in the artifact name cd "$KIBANA_DIR/target" -mv kibana-*-linux-x86_64.tar.gz kibana-default.tar.gz -buildkite-agent artifact upload kibana-default.tar.gz -buildkite-agent artifact upload kibana-default-plugins.tar.gz +cp kibana-*-linux-x86_64.tar.gz kibana-default.tar.gz +buildkite-agent artifact upload "./*.tar.gz;./*.zip" cd - diff --git a/.buildkite/scripts/steps/es_snapshots/build.sh b/.buildkite/scripts/steps/es_snapshots/build.sh index 91b5004594a6d..975d5944da883 100755 --- a/.buildkite/scripts/steps/es_snapshots/build.sh +++ b/.buildkite/scripts/steps/es_snapshots/build.sh @@ -61,7 +61,14 @@ export DOCKER_TLS_CERTDIR="$CERTS_DIR" export DOCKER_HOST=localhost:2377 echo "--- Build Elasticsearch" -./gradlew -Dbuild.docker=true assemble --parallel +./gradlew \ + :distribution:archives:darwin-aarch64-tar:assemble \ + :distribution:archives:darwin-tar:assemble \ + :distribution:docker:docker-export:assemble \ + :distribution:archives:linux-aarch64-tar:assemble \ + :distribution:archives:linux-tar:assemble \ + :distribution:archives:windows-zip:assemble \ + --parallel echo "--- Create distribution archives" find distribution -type f \( -name 'elasticsearch-*-*-*-*.tar.gz' -o -name 'elasticsearch-*-*-*-*.zip' \) -not -path '*no-jdk*' -not -path '*build-context*' -exec cp {} "$destination" \; diff --git a/.buildkite/scripts/steps/on_merge_build_and_metrics.sh b/.buildkite/scripts/steps/on_merge_build_and_metrics.sh index b24e585e70735..315ba08f8719b 100755 --- a/.buildkite/scripts/steps/on_merge_build_and_metrics.sh +++ b/.buildkite/scripts/steps/on_merge_build_and_metrics.sh @@ -3,7 +3,7 @@ set -euo pipefail # Write Bazel cache for Linux -.buildkite/scripts/common/setup_bazel.sh +.buildkite/scripts/common/persist_bazel_cache.sh .buildkite/scripts/bootstrap.sh .buildkite/scripts/build_kibana.sh diff --git a/.eslintrc.js b/.eslintrc.js index 7d96316e41a99..6f62f953c9a4c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -902,7 +902,12 @@ module.exports = { }, /** - * Security Solution overrides + * Security Solution overrides. These rules below are maintained and owned by + * the people within the security-solution-platform team. Please see ping them + * or check with them if you are encountering issues, have suggestions, or would + * like to add, change, or remove any particular rule. Linters, Typescript, and rules + * evolve and change over time just like coding styles, so please do not hesitate to + * reach out. */ { // front end and common typescript and javascript files only @@ -925,6 +930,22 @@ module.exports = { ], }, }, + { + // typescript only for front and back end, but excludes the test files. + // We use this section to add rules in which we do not want to apply to test files. + // This should be a very small set as most linter rules are useful for tests as well. + files: [ + 'x-pack/plugins/security_solution/**/*.{ts,tsx}', + 'x-pack/plugins/timelines/**/*.{ts,tsx}', + ], + excludedFiles: [ + 'x-pack/plugins/security_solution/**/*.{test,mock,test_helper}.{ts,tsx}', + 'x-pack/plugins/timelines/**/*.{test,mock,test_helper}.{ts,tsx}', + ], + rules: { + '@typescript-eslint/no-non-null-assertion': 'error', + }, + }, { // typescript only for front and back end files: [ @@ -1043,7 +1064,12 @@ module.exports = { }, /** - * Lists overrides + * Lists overrides. These rules below are maintained and owned by + * the people within the security-solution-platform team. Please see ping them + * or check with them if you are encountering issues, have suggestions, or would + * like to add, change, or remove any particular rule. Linters, Typescript, and rules + * evolve and change over time just like coding styles, so please do not hesitate to + * reach out. */ { // front end and common typescript and javascript files only @@ -1218,8 +1244,14 @@ module.exports = { ], }, }, + /** - * Metrics entities overrides + * Metrics entities overrides. These rules below are maintained and owned by + * the people within the security-solution-platform team. Please see ping them + * or check with them if you are encountering issues, have suggestions, or would + * like to add, change, or remove any particular rule. Linters, Typescript, and rules + * evolve and change over time just like coding styles, so please do not hesitate to + * reach out. */ { // front end and common typescript and javascript files only diff --git a/api_docs/actions.json b/api_docs/actions.json index 42014a4546a01..c08cef012db28 100644 --- a/api_docs/actions.json +++ b/api_docs/actions.json @@ -695,7 +695,7 @@ "label": "ActionParamsType", "description": [], "signature": [ - "{ readonly source?: string | undefined; readonly summary?: string | undefined; readonly timestamp?: string | undefined; readonly eventAction?: \"resolve\" | \"trigger\" | \"acknowledge\" | undefined; readonly dedupKey?: string | undefined; readonly severity?: \"warning\" | \"error\" | \"info\" | \"critical\" | undefined; readonly component?: string | undefined; readonly group?: string | undefined; readonly class?: string | undefined; }" + "{ readonly source?: string | undefined; readonly summary?: string | undefined; readonly timestamp?: string | undefined; readonly eventAction?: \"resolve\" | \"trigger\" | \"acknowledge\" | undefined; readonly dedupKey?: string | undefined; readonly severity?: \"error\" | \"info\" | \"warning\" | \"critical\" | undefined; readonly component?: string | undefined; readonly group?: string | undefined; readonly class?: string | undefined; }" ], "path": "x-pack/plugins/actions/server/builtin_action_types/pagerduty.ts", "deprecated": false, @@ -751,7 +751,7 @@ "label": "ActionParamsType", "description": [], "signature": [ - "Readonly<{} & { subAction: \"getFields\"; subActionParams: Readonly<{} & {}>; }> | Readonly<{} & { subAction: \"getIncident\"; subActionParams: Readonly<{} & { externalId: string; }>; }> | Readonly<{} & { subAction: \"handshake\"; subActionParams: Readonly<{} & {}>; }> | Readonly<{} & { subAction: \"pushToService\"; subActionParams: Readonly<{} & { incident: Readonly<{} & { description: string | null; category: string | null; severity: string | null; externalId: string | null; urgency: string | null; impact: string | null; short_description: string; subcategory: string | null; }>; comments: Readonly<{} & { comment: string; commentId: string; }>[] | null; }>; }> | Readonly<{} & { subAction: \"getChoices\"; subActionParams: Readonly<{} & { fields: string[]; }>; }> | Readonly<{} & { subAction: \"getFields\"; subActionParams: Readonly<{} & {}>; }> | Readonly<{} & { subAction: \"getIncident\"; subActionParams: Readonly<{} & { externalId: string; }>; }> | Readonly<{} & { subAction: \"handshake\"; subActionParams: Readonly<{} & {}>; }> | Readonly<{} & { subAction: \"pushToService\"; subActionParams: Readonly<{} & { incident: Readonly<{} & { description: string | null; category: string | null; externalId: string | null; short_description: string; subcategory: string | null; dest_ip: string | null; malware_hash: string | null; malware_url: string | null; source_ip: string | null; priority: string | null; }>; comments: Readonly<{} & { comment: string; commentId: string; }>[] | null; }>; }> | Readonly<{} & { subAction: \"getChoices\"; subActionParams: Readonly<{} & { fields: string[]; }>; }>" + "Readonly<{} & { subAction: \"getFields\"; subActionParams: Readonly<{} & {}>; }> | Readonly<{} & { subAction: \"getIncident\"; subActionParams: Readonly<{} & { externalId: string; }>; }> | Readonly<{} & { subAction: \"handshake\"; subActionParams: Readonly<{} & {}>; }> | Readonly<{} & { subAction: \"pushToService\"; subActionParams: Readonly<{} & { incident: Readonly<{} & { description: string | null; category: string | null; severity: string | null; externalId: string | null; urgency: string | null; impact: string | null; short_description: string; subcategory: string | null; correlation_id: string | null; correlation_display: string | null; }>; comments: Readonly<{} & { comment: string; commentId: string; }>[] | null; }>; }> | Readonly<{} & { subAction: \"getChoices\"; subActionParams: Readonly<{} & { fields: string[]; }>; }> | Readonly<{} & { subAction: \"getFields\"; subActionParams: Readonly<{} & {}>; }> | Readonly<{} & { subAction: \"getIncident\"; subActionParams: Readonly<{} & { externalId: string; }>; }> | Readonly<{} & { subAction: \"handshake\"; subActionParams: Readonly<{} & {}>; }> | Readonly<{} & { subAction: \"pushToService\"; subActionParams: Readonly<{} & { incident: Readonly<{} & { description: string | null; category: string | null; externalId: string | null; short_description: string; subcategory: string | null; correlation_id: string | null; correlation_display: string | null; dest_ip: string | string[] | null; malware_hash: string | string[] | null; malware_url: string | string[] | null; source_ip: string | string[] | null; priority: string | null; }>; comments: Readonly<{} & { comment: string; commentId: string; }>[] | null; }>; }> | Readonly<{} & { subAction: \"getChoices\"; subActionParams: Readonly<{} & { fields: string[]; }>; }>" ], "path": "x-pack/plugins/actions/server/builtin_action_types/servicenow/index.ts", "deprecated": false, @@ -821,7 +821,9 @@ "label": "ActionsClient", "description": [], "signature": [ - "{ get: ({ id }: { id: string; }) => Promise<", + "{ create: ({ action: { actionTypeId, name, config, secrets }, }: ", + "CreateOptions", + ") => Promise<", { "pluginId": "actions", "scope": "server", @@ -829,9 +831,7 @@ "section": "def-server.ActionResult", "text": "ActionResult" }, - ">>; delete: ({ id }: { id: string; }) => Promise<{}>; create: ({ action: { actionTypeId, name, config, secrets }, }: ", - "CreateOptions", - ") => Promise<", + ">>; delete: ({ id }: { id: string; }) => Promise<{}>; get: ({ id }: { id: string; }) => Promise<", { "pluginId": "actions", "scope": "server", @@ -1031,7 +1031,7 @@ "signature": [ "\".servicenow\"" ], - "path": "x-pack/plugins/actions/server/builtin_action_types/servicenow/index.ts", + "path": "x-pack/plugins/actions/server/builtin_action_types/servicenow/config.ts", "deprecated": false, "initialIsOpen": false }, @@ -1045,7 +1045,7 @@ "signature": [ "\".servicenow-sir\"" ], - "path": "x-pack/plugins/actions/server/builtin_action_types/servicenow/index.ts", + "path": "x-pack/plugins/actions/server/builtin_action_types/servicenow/config.ts", "deprecated": false, "initialIsOpen": false } @@ -1292,7 +1292,7 @@ "section": "def-server.ActionsClient", "text": "ActionsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"update\" | \"execute\" | \"getAll\" | \"getBulk\" | \"enqueueExecution\" | \"ephemeralEnqueuedExecution\" | \"listTypes\" | \"isActionTypeEnabled\" | \"isPreconfigured\">>" + ", \"create\" | \"delete\" | \"get\" | \"update\" | \"execute\" | \"getAll\" | \"getBulk\" | \"enqueueExecution\" | \"ephemeralEnqueuedExecution\" | \"listTypes\" | \"isActionTypeEnabled\" | \"isPreconfigured\">>" ], "path": "x-pack/plugins/actions/server/plugin.ts", "deprecated": false, diff --git a/api_docs/alerting.json b/api_docs/alerting.json index 214fdb685f616..dbff623cdac15 100644 --- a/api_docs/alerting.json +++ b/api_docs/alerting.json @@ -24,7 +24,7 @@ "section": "def-common.Alert", "text": "Alert" }, - ", \"enabled\" | \"id\" | \"name\" | \"tags\" | \"params\" | \"actions\" | \"throttle\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">) => string | ", + ", \"id\" | \"name\" | \"tags\" | \"enabled\" | \"params\" | \"actions\" | \"throttle\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">) => string | ", { "pluginId": "@kbn/utility-types", "scope": "server", @@ -47,7 +47,7 @@ "label": "alert", "description": [], "signature": [ - "{ enabled: boolean; id: string; name: string; tags: string[]; params: never; actions: ", + "{ id: string; name: string; tags: string[]; enabled: boolean; params: never; actions: ", { "pluginId": "alerting", "scope": "common", @@ -1038,7 +1038,7 @@ "section": "def-common.Alert", "text": "Alert" }, - ", \"enabled\" | \"id\" | \"name\" | \"tags\" | \"params\" | \"actions\" | \"throttle\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">, \"enabled\" | \"name\" | \"tags\" | \"actions\" | \"throttle\" | \"consumer\" | \"schedule\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"notifyWhen\"> & { producer: string; ruleTypeId: string; ruleTypeName: string; }" + ", \"id\" | \"name\" | \"tags\" | \"enabled\" | \"params\" | \"actions\" | \"throttle\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">, \"name\" | \"tags\" | \"enabled\" | \"actions\" | \"throttle\" | \"consumer\" | \"schedule\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"notifyWhen\"> & { producer: string; ruleTypeId: string; ruleTypeName: string; }" ], "path": "x-pack/plugins/alerting/server/types.ts", "deprecated": false @@ -1568,6 +1568,32 @@ "path": "x-pack/plugins/alerting/server/types.ts", "deprecated": false }, + { + "parentPluginId": "alerting", + "id": "def-server.AlertType.defaultScheduleInterval", + "type": "string", + "tags": [], + "label": "defaultScheduleInterval", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/alerting/server/types.ts", + "deprecated": false + }, + { + "parentPluginId": "alerting", + "id": "def-server.AlertType.minimumScheduleInterval", + "type": "string", + "tags": [], + "label": "minimumScheduleInterval", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/alerting/server/types.ts", + "deprecated": false + }, { "parentPluginId": "alerting", "id": "def-server.AlertType.ruleTaskTimeout", @@ -1650,7 +1676,7 @@ "section": "def-common.Alert", "text": "Alert" }, - ", \"enabled\" | \"id\" | \"name\" | \"tags\" | \"params\" | \"actions\" | \"throttle\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">[]" + ", \"id\" | \"name\" | \"tags\" | \"enabled\" | \"params\" | \"actions\" | \"throttle\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">[]" ], "path": "x-pack/plugins/alerting/server/rules_client/rules_client.ts", "deprecated": false @@ -1767,7 +1793,7 @@ "section": "def-server.RulesClient", "text": "RulesClient" }, - ", \"get\" | \"delete\" | \"create\" | \"find\" | \"resolve\" | \"update\" | \"aggregate\" | \"enable\" | \"disable\" | \"muteAll\" | \"getAlertState\" | \"getAlertInstanceSummary\" | \"updateApiKey\" | \"unmuteAll\" | \"muteInstance\" | \"unmuteInstance\" | \"listAlertTypes\" | \"getSpaceId\">" + ", \"create\" | \"delete\" | \"find\" | \"get\" | \"resolve\" | \"update\" | \"aggregate\" | \"enable\" | \"disable\" | \"muteAll\" | \"getAlertState\" | \"getAlertInstanceSummary\" | \"updateApiKey\" | \"unmuteAll\" | \"muteInstance\" | \"unmuteInstance\" | \"listAlertTypes\" | \"getSpaceId\">" ], "path": "x-pack/plugins/alerting/server/plugin.ts", "deprecated": false, @@ -2111,7 +2137,7 @@ "section": "def-common.Alert", "text": "Alert" }, - ", \"enabled\" | \"name\" | \"tags\" | \"params\" | \"actions\" | \"throttle\" | \"apiKey\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">>" + ", \"name\" | \"tags\" | \"enabled\" | \"params\" | \"actions\" | \"throttle\" | \"apiKey\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">>" ], "path": "x-pack/plugins/alerting/server/types.ts", "deprecated": false, @@ -2145,15 +2171,7 @@ "label": "RulesClient", "description": [], "signature": [ - "{ get: = never>({ id, }: { id: string; }) => Promise, \"enabled\" | \"id\" | \"name\" | \"tags\" | \"params\" | \"actions\" | \"throttle\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">>; delete: ({ id }: { id: string; }) => Promise<{}>; create: = never>({ data, options, }: ", + "{ create: = never>({ data, options, }: ", "CreateOptions", ") => Promise, \"enabled\" | \"id\" | \"name\" | \"tags\" | \"params\" | \"actions\" | \"throttle\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">>; find: = never>({ options: { fields, ...options }, }?: { options?: ", + ", \"id\" | \"name\" | \"tags\" | \"enabled\" | \"params\" | \"actions\" | \"throttle\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">>; delete: ({ id }: { id: string; }) => Promise<{}>; find: = never>({ options: { fields, ...options }, }?: { options?: ", "FindOptions", " | undefined; }) => Promise<", { @@ -2173,7 +2191,15 @@ "section": "def-server.FindResult", "text": "FindResult" }, - ">; resolve: = never>({ id, }: { id: string; }) => Promise<", + ">; get: = never>({ id, }: { id: string; }) => Promise, \"id\" | \"name\" | \"tags\" | \"enabled\" | \"params\" | \"actions\" | \"throttle\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">>; resolve: = never>({ id, }: { id: string; }) => Promise<", { "pluginId": "alerting", "scope": "common", @@ -2223,6 +2249,37 @@ "common": { "classes": [], "functions": [ + { + "parentPluginId": "alerting", + "id": "def-common.formatDuration", + "type": "Function", + "tags": [], + "label": "formatDuration", + "description": [], + "signature": [ + "(duration: string) => string" + ], + "path": "x-pack/plugins/alerting/common/parse_duration.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "alerting", + "id": "def-common.formatDuration.$1", + "type": "string", + "tags": [], + "label": "duration", + "description": [], + "signature": [ + "string" + ], + "path": "x-pack/plugins/alerting/common/parse_duration.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "alerting", "id": "def-common.getBuiltinActionGroups", @@ -3007,6 +3064,19 @@ "path": "x-pack/plugins/alerting/common/alert.ts", "deprecated": false }, + { + "parentPluginId": "alerting", + "id": "def-common.AlertExecutionStatus.lastDuration", + "type": "number", + "tags": [], + "label": "lastDuration", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "x-pack/plugins/alerting/common/alert.ts", + "deprecated": false + }, { "parentPluginId": "alerting", "id": "def-common.AlertExecutionStatus.error", @@ -3583,6 +3653,45 @@ "description": [], "path": "x-pack/plugins/alerting/common/alert_type.ts", "deprecated": false + }, + { + "parentPluginId": "alerting", + "id": "def-common.AlertType.ruleTaskTimeout", + "type": "string", + "tags": [], + "label": "ruleTaskTimeout", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/alerting/common/alert_type.ts", + "deprecated": false + }, + { + "parentPluginId": "alerting", + "id": "def-common.AlertType.defaultScheduleInterval", + "type": "string", + "tags": [], + "label": "defaultScheduleInterval", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/alerting/common/alert_type.ts", + "deprecated": false + }, + { + "parentPluginId": "alerting", + "id": "def-common.AlertType.minimumScheduleInterval", + "type": "string", + "tags": [], + "label": "minimumScheduleInterval", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/alerting/common/alert_type.ts", + "deprecated": false } ], "initialIsOpen": false @@ -4042,7 +4151,7 @@ "section": "def-common.Alert", "text": "Alert" }, - ", \"enabled\" | \"id\" | \"name\" | \"tags\" | \"params\" | \"actions\" | \"throttle\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\"> & Pick<", + ", \"id\" | \"name\" | \"tags\" | \"enabled\" | \"params\" | \"actions\" | \"throttle\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\"> & Pick<", { "pluginId": "core", "scope": "server", @@ -4064,7 +4173,7 @@ "label": "SanitizedAlert", "description": [], "signature": [ - "{ enabled: boolean; id: string; name: string; tags: string[]; params: Params; actions: ", + "{ id: string; name: string; tags: string[]; enabled: boolean; params: Params; actions: ", { "pluginId": "alerting", "scope": "common", @@ -4110,7 +4219,7 @@ "section": "def-common.Alert", "text": "Alert" }, - ", \"enabled\" | \"id\" | \"name\" | \"tags\" | \"params\" | \"actions\" | \"throttle\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">, \"enabled\" | \"name\" | \"tags\" | \"actions\" | \"throttle\" | \"consumer\" | \"schedule\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"notifyWhen\"> & { producer: string; ruleTypeId: string; ruleTypeName: string; }" + ", \"id\" | \"name\" | \"tags\" | \"enabled\" | \"params\" | \"actions\" | \"throttle\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">, \"name\" | \"tags\" | \"enabled\" | \"actions\" | \"throttle\" | \"consumer\" | \"schedule\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"notifyWhen\"> & { producer: string; ruleTypeId: string; ruleTypeName: string; }" ], "path": "x-pack/plugins/alerting/common/alert.ts", "deprecated": false, diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index 3233144d4eac6..663fee9903c7e 100644 --- a/api_docs/alerting.mdx +++ b/api_docs/alerting.mdx @@ -18,7 +18,7 @@ Contact [Kibana Alerting](https://github.com/orgs/elastic/teams/kibana-alerting- | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 249 | 0 | 241 | 16 | +| 257 | 0 | 249 | 16 | ## Client diff --git a/api_docs/apm.json b/api_docs/apm.json index bcd09f6ae5c97..22d6d5b78c27f 100644 --- a/api_docs/apm.json +++ b/api_docs/apm.json @@ -184,11 +184,11 @@ "APMPluginStartDependencies", ", unknown>, plugins: Pick<", "APMPluginSetupDependencies", - ", \"data\" | \"cloud\" | \"security\" | \"home\" | \"features\" | \"fleet\" | \"ml\" | \"actions\" | \"usageCollection\" | \"apmOss\" | \"licensing\" | \"observability\" | \"ruleRegistry\" | \"spaces\" | \"taskManager\" | \"alerting\">) => { config$: ", + ", \"data\" | \"cloud\" | \"security\" | \"home\" | \"features\" | \"fleet\" | \"ml\" | \"spaces\" | \"actions\" | \"usageCollection\" | \"licensing\" | \"observability\" | \"ruleRegistry\" | \"taskManager\" | \"alerting\">) => { config$: ", "Observable", - "<{ 'apm_oss.transactionIndices': string; 'apm_oss.spanIndices': string; 'apm_oss.errorIndices': string; 'apm_oss.metricsIndices': string; 'apm_oss.sourcemapIndices': string; 'apm_oss.onboardingIndices': string; 'xpack.apm.serviceMapEnabled': boolean; 'xpack.apm.serviceMapFingerprintBucketSize': number; 'xpack.apm.serviceMapTraceIdBucketSize': number; 'xpack.apm.serviceMapFingerprintGlobalBucketSize': number; 'xpack.apm.serviceMapTraceIdGlobalBucketSize': number; 'xpack.apm.serviceMapMaxTracesPerRequest': number; 'xpack.apm.ui.enabled': boolean; 'xpack.apm.ui.maxTraceItems': number; 'xpack.apm.ui.transactionGroupBucketSize': number; 'xpack.apm.autocreateApmIndexPattern': boolean; 'xpack.apm.telemetryCollectionEnabled': boolean; 'xpack.apm.searchAggregatedTransactions': ", + "; serviceMapEnabled: boolean; serviceMapFingerprintBucketSize: number; serviceMapTraceIdBucketSize: number; serviceMapFingerprintGlobalBucketSize: number; serviceMapTraceIdGlobalBucketSize: number; serviceMapMaxTracesPerRequest: number; autocreateApmIndexPattern: boolean; ui: Readonly<{} & { enabled: boolean; transactionGroupBucketSize: number; maxTraceItems: number; }>; searchAggregatedTransactions: ", "SearchAggregatedTransactionSetting", - "; 'xpack.apm.metricsInterval': number; 'xpack.apm.agent.migrations.enabled': boolean; }>; getApmIndices: () => Promise<", + "; telemetryCollectionEnabled: boolean; metricsInterval: number; profilingEnabled: boolean; agent: Readonly<{} & { migrations: Readonly<{} & { enabled: boolean; }>; }>; }>>; getApmIndices: () => Promise<", "ApmIndicesConfig", ">; createApmEventClient: ({ request, context, debug, }: { debug?: boolean | undefined; request: ", { @@ -248,7 +248,7 @@ "signature": [ "Pick<", "APMPluginSetupDependencies", - ", \"data\" | \"cloud\" | \"security\" | \"home\" | \"features\" | \"fleet\" | \"ml\" | \"actions\" | \"usageCollection\" | \"apmOss\" | \"licensing\" | \"observability\" | \"ruleRegistry\" | \"spaces\" | \"taskManager\" | \"alerting\">" + ", \"data\" | \"cloud\" | \"security\" | \"home\" | \"features\" | \"fleet\" | \"ml\" | \"spaces\" | \"actions\" | \"usageCollection\" | \"licensing\" | \"observability\" | \"ruleRegistry\" | \"taskManager\" | \"alerting\">" ], "path": "x-pack/plugins/apm/server/plugin.ts", "deprecated": false, @@ -320,59 +320,7 @@ "initialIsOpen": false } ], - "functions": [ - { - "parentPluginId": "apm", - "id": "def-server.mergeConfigs", - "type": "Function", - "tags": [], - "label": "mergeConfigs", - "description": [], - "signature": [ - "(apmOssConfig: Readonly<{} & { enabled: boolean; transactionIndices: string; spanIndices: string; errorIndices: string; metricsIndices: string; sourcemapIndices: string; onboardingIndices: string; indexPattern: string; fleetMode: boolean; }>, apmConfig: Readonly<{} & { enabled: boolean; serviceMapEnabled: boolean; serviceMapFingerprintBucketSize: number; serviceMapTraceIdBucketSize: number; serviceMapFingerprintGlobalBucketSize: number; serviceMapTraceIdGlobalBucketSize: number; serviceMapMaxTracesPerRequest: number; autocreateApmIndexPattern: boolean; ui: Readonly<{} & { enabled: boolean; transactionGroupBucketSize: number; maxTraceItems: number; }>; searchAggregatedTransactions: ", - "SearchAggregatedTransactionSetting", - "; telemetryCollectionEnabled: boolean; metricsInterval: number; profilingEnabled: boolean; agent: Readonly<{} & { migrations: Readonly<{} & { enabled: boolean; }>; }>; }>) => { 'apm_oss.transactionIndices': string; 'apm_oss.spanIndices': string; 'apm_oss.errorIndices': string; 'apm_oss.metricsIndices': string; 'apm_oss.sourcemapIndices': string; 'apm_oss.onboardingIndices': string; 'xpack.apm.serviceMapEnabled': boolean; 'xpack.apm.serviceMapFingerprintBucketSize': number; 'xpack.apm.serviceMapTraceIdBucketSize': number; 'xpack.apm.serviceMapFingerprintGlobalBucketSize': number; 'xpack.apm.serviceMapTraceIdGlobalBucketSize': number; 'xpack.apm.serviceMapMaxTracesPerRequest': number; 'xpack.apm.ui.enabled': boolean; 'xpack.apm.ui.maxTraceItems': number; 'xpack.apm.ui.transactionGroupBucketSize': number; 'xpack.apm.autocreateApmIndexPattern': boolean; 'xpack.apm.telemetryCollectionEnabled': boolean; 'xpack.apm.searchAggregatedTransactions': ", - "SearchAggregatedTransactionSetting", - "; 'xpack.apm.metricsInterval': number; 'xpack.apm.agent.migrations.enabled': boolean; }" - ], - "path": "x-pack/plugins/apm/server/index.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "apm", - "id": "def-server.mergeConfigs.$1", - "type": "Object", - "tags": [], - "label": "apmOssConfig", - "description": [], - "signature": [ - "Readonly<{} & { enabled: boolean; transactionIndices: string; spanIndices: string; errorIndices: string; metricsIndices: string; sourcemapIndices: string; onboardingIndices: string; indexPattern: string; fleetMode: boolean; }>" - ], - "path": "x-pack/plugins/apm/server/index.ts", - "deprecated": false, - "isRequired": true - }, - { - "parentPluginId": "apm", - "id": "def-server.mergeConfigs.$2", - "type": "Object", - "tags": [], - "label": "apmConfig", - "description": [], - "signature": [ - "Readonly<{} & { enabled: boolean; serviceMapEnabled: boolean; serviceMapFingerprintBucketSize: number; serviceMapTraceIdBucketSize: number; serviceMapFingerprintGlobalBucketSize: number; serviceMapTraceIdGlobalBucketSize: number; serviceMapMaxTracesPerRequest: number; autocreateApmIndexPattern: boolean; ui: Readonly<{} & { enabled: boolean; transactionGroupBucketSize: number; maxTraceItems: number; }>; searchAggregatedTransactions: ", - "SearchAggregatedTransactionSetting", - "; telemetryCollectionEnabled: boolean; metricsInterval: number; profilingEnabled: boolean; agent: Readonly<{} & { migrations: Readonly<{} & { enabled: boolean; }>; }>; }>" - ], - "path": "x-pack/plugins/apm/server/index.ts", - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - } - ], + "functions": [], "interfaces": [ { "parentPluginId": "apm", @@ -440,9 +388,9 @@ "label": "config", "description": [], "signature": [ - "{ 'apm_oss.transactionIndices': string; 'apm_oss.spanIndices': string; 'apm_oss.errorIndices': string; 'apm_oss.metricsIndices': string; 'apm_oss.sourcemapIndices': string; 'apm_oss.onboardingIndices': string; 'xpack.apm.serviceMapEnabled': boolean; 'xpack.apm.serviceMapFingerprintBucketSize': number; 'xpack.apm.serviceMapTraceIdBucketSize': number; 'xpack.apm.serviceMapFingerprintGlobalBucketSize': number; 'xpack.apm.serviceMapTraceIdGlobalBucketSize': number; 'xpack.apm.serviceMapMaxTracesPerRequest': number; 'xpack.apm.ui.enabled': boolean; 'xpack.apm.ui.maxTraceItems': number; 'xpack.apm.ui.transactionGroupBucketSize': number; 'xpack.apm.autocreateApmIndexPattern': boolean; 'xpack.apm.telemetryCollectionEnabled': boolean; 'xpack.apm.searchAggregatedTransactions': ", + "{ readonly enabled: boolean; readonly indices: Readonly<{} & { error: string; metric: string; span: string; transaction: string; sourcemap: string; onboarding: string; }>; readonly serviceMapEnabled: boolean; readonly serviceMapFingerprintBucketSize: number; readonly serviceMapTraceIdBucketSize: number; readonly serviceMapFingerprintGlobalBucketSize: number; readonly serviceMapTraceIdGlobalBucketSize: number; readonly serviceMapMaxTracesPerRequest: number; readonly autocreateApmIndexPattern: boolean; readonly ui: Readonly<{} & { enabled: boolean; transactionGroupBucketSize: number; maxTraceItems: number; }>; readonly searchAggregatedTransactions: ", "SearchAggregatedTransactionSetting", - "; 'xpack.apm.metricsInterval': number; 'xpack.apm.agent.migrations.enabled': boolean; }" + "; readonly telemetryCollectionEnabled: boolean; readonly metricsInterval: number; readonly profilingEnabled: boolean; readonly agent: Readonly<{} & { migrations: Readonly<{} & { enabled: boolean; }>; }>; }" ], "path": "x-pack/plugins/apm/server/routes/typings.ts", "deprecated": false @@ -535,15 +483,7 @@ "section": "def-server.PluginStartContract", "text": "PluginStartContract" }, - ">; }; apmOss: { setup: ", - { - "pluginId": "apmOss", - "scope": "server", - "docId": "kibApmOssPluginApi", - "section": "def-server.APMOSSPluginSetup", - "text": "APMOSSPluginSetup" - }, - "; start: () => Promise; }; licensing: { setup: ", + ">; }; licensing: { setup: ", { "pluginId": "licensing", "scope": "server", @@ -655,7 +595,23 @@ }, ">; } | undefined; ml?: { setup: ", "SharedServices", - "; start: () => Promise; } | undefined; actions?: { setup: ", + "; start: () => Promise; } | undefined; spaces?: { setup: ", + { + "pluginId": "spaces", + "scope": "server", + "docId": "kibSpacesPluginApi", + "section": "def-server.SpacesPluginSetup", + "text": "SpacesPluginSetup" + }, + "; start: () => Promise<", + { + "pluginId": "spaces", + "scope": "server", + "docId": "kibSpacesPluginApi", + "section": "def-server.SpacesPluginStart", + "text": "SpacesPluginStart" + }, + ">; } | undefined; actions?: { setup: ", { "pluginId": "actions", "scope": "server", @@ -679,23 +635,7 @@ "section": "def-server.UsageCollectionSetup", "text": "UsageCollectionSetup" }, - "; start: () => Promise; } | undefined; spaces?: { setup: ", - { - "pluginId": "spaces", - "scope": "server", - "docId": "kibSpacesPluginApi", - "section": "def-server.SpacesPluginSetup", - "text": "SpacesPluginSetup" - }, - "; start: () => Promise<", - { - "pluginId": "spaces", - "scope": "server", - "docId": "kibSpacesPluginApi", - "section": "def-server.SpacesPluginStart", - "text": "SpacesPluginStart" - }, - ">; } | undefined; taskManager?: { setup: ", + "; start: () => Promise; } | undefined; taskManager?: { setup: ", { "pluginId": "taskManager", "scope": "server", @@ -797,7 +737,7 @@ "label": "APIEndpoint", "description": [], "signature": [ - "\"POST /api/apm/index_pattern/static\" | \"GET /api/apm/index_pattern/dynamic\" | \"GET /api/apm/environments\" | \"GET /api/apm/services/{serviceName}/errors\" | \"GET /api/apm/services/{serviceName}/errors/{groupId}\" | \"GET /api/apm/services/{serviceName}/errors/distribution\" | \"GET /api/apm/services/{serviceName}/metrics/charts\" | \"GET /api/apm/observability_overview\" | \"GET /api/apm/observability_overview/has_data\" | \"GET /api/apm/rum/client-metrics\" | \"GET /api/apm/rum-client/page-load-distribution\" | \"GET /api/apm/rum-client/page-load-distribution/breakdown\" | \"GET /api/apm/rum-client/page-view-trends\" | \"GET /api/apm/rum-client/services\" | \"GET /api/apm/rum-client/visitor-breakdown\" | \"GET /api/apm/rum-client/web-core-vitals\" | \"GET /api/apm/rum-client/long-task-metrics\" | \"GET /api/apm/rum-client/url-search\" | \"GET /api/apm/rum-client/js-errors\" | \"GET /api/apm/observability_overview/has_rum_data\" | \"GET /api/apm/service-map\" | \"GET /api/apm/service-map/service/{serviceName}\" | \"GET /api/apm/service-map/backend/{backendName}\" | \"GET /api/apm/services/{serviceName}/serviceNodes\" | \"GET /api/apm/services\" | \"GET /api/apm/services/detailed_statistics\" | \"GET /api/apm/services/{serviceName}/metadata/details\" | \"GET /api/apm/services/{serviceName}/metadata/icons\" | \"GET /api/apm/services/{serviceName}/agent\" | \"GET /api/apm/services/{serviceName}/transaction_types\" | \"GET /api/apm/services/{serviceName}/node/{serviceNodeName}/metadata\" | \"GET /api/apm/services/{serviceName}/annotation/search\" | \"POST /api/apm/services/{serviceName}/annotation\" | \"GET /api/apm/services/{serviceName}/error_groups/main_statistics\" | \"GET /api/apm/services/{serviceName}/error_groups/detailed_statistics\" | \"GET /api/apm/services/{serviceName}/service_overview_instances/details/{serviceNodeName}\" | \"GET /api/apm/services/{serviceName}/throughput\" | \"GET /api/apm/services/{serviceName}/service_overview_instances/main_statistics\" | \"GET /api/apm/services/{serviceName}/service_overview_instances/detailed_statistics\" | \"GET /api/apm/services/{serviceName}/dependencies\" | \"GET /api/apm/services/{serviceName}/dependencies/breakdown\" | \"GET /api/apm/services/{serviceName}/profiling/timeline\" | \"GET /api/apm/services/{serviceName}/profiling/statistics\" | \"GET /api/apm/services/{serviceName}/alerts\" | \"GET /api/apm/services/{serviceName}/infrastructure\" | \"GET /internal/apm/suggestions\" | \"GET /api/apm/traces/{traceId}\" | \"GET /api/apm/traces\" | \"GET /api/apm/traces/{traceId}/root_transaction\" | \"GET /api/apm/transactions/{transactionId}\" | \"GET /api/apm/services/{serviceName}/transactions/groups/main_statistics\" | \"GET /api/apm/services/{serviceName}/transactions/groups/detailed_statistics\" | \"GET /api/apm/services/{serviceName}/transactions/charts/latency\" | \"GET /api/apm/services/{serviceName}/transactions/traces/samples\" | \"GET /api/apm/services/{serviceName}/transaction/charts/breakdown\" | \"GET /api/apm/services/{serviceName}/transactions/charts/error_rate\" | \"GET /api/apm/alerts/chart_preview/transaction_error_rate\" | \"GET /api/apm/alerts/chart_preview/transaction_duration\" | \"GET /api/apm/alerts/chart_preview/transaction_error_count\" | \"GET /api/apm/settings/agent-configuration\" | \"GET /api/apm/settings/agent-configuration/view\" | \"DELETE /api/apm/settings/agent-configuration\" | \"PUT /api/apm/settings/agent-configuration\" | \"POST /api/apm/settings/agent-configuration/search\" | \"GET /api/apm/settings/agent-configuration/services\" | \"GET /api/apm/settings/agent-configuration/environments\" | \"GET /api/apm/settings/agent-configuration/agent_name\" | \"GET /api/apm/settings/anomaly-detection/jobs\" | \"POST /api/apm/settings/anomaly-detection/jobs\" | \"GET /api/apm/settings/anomaly-detection/environments\" | \"GET /api/apm/settings/apm-index-settings\" | \"GET /api/apm/settings/apm-indices\" | \"POST /api/apm/settings/apm-indices/save\" | \"GET /api/apm/settings/custom_links/transaction\" | \"GET /api/apm/settings/custom_links\" | \"POST /api/apm/settings/custom_links\" | \"PUT /api/apm/settings/custom_links/{id}\" | \"DELETE /api/apm/settings/custom_links/{id}\" | \"GET /api/apm/sourcemaps\" | \"POST /api/apm/sourcemaps\" | \"DELETE /api/apm/sourcemaps/{id}\" | \"GET /api/apm/fleet/has_data\" | \"GET /api/apm/fleet/agents\" | \"POST /api/apm/fleet/apm_server_schema\" | \"GET /api/apm/fleet/apm_server_schema/unsupported\" | \"GET /api/apm/fleet/migration_check\" | \"POST /api/apm/fleet/cloud_apm_package_policy\" | \"GET /api/apm/backends/top_backends\" | \"GET /api/apm/backends/{backendName}/upstream_services\" | \"GET /api/apm/backends/{backendName}/metadata\" | \"GET /api/apm/backends/{backendName}/charts/latency\" | \"GET /api/apm/backends/{backendName}/charts/throughput\" | \"GET /api/apm/backends/{backendName}/charts/error_rate\" | \"GET /api/apm/fallback_to_transactions\" | \"GET /api/apm/has_data\"" + "\"POST /internal/apm/index_pattern/static\" | \"GET /internal/apm/index_pattern/dynamic\" | \"GET /internal/apm/environments\" | \"GET /internal/apm/services/{serviceName}/errors\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}\" | \"GET /internal/apm/services/{serviceName}/errors/distribution\" | \"GET /internal/apm/services/{serviceName}/metrics/charts\" | \"GET /internal/apm/observability_overview\" | \"GET /internal/apm/observability_overview/has_data\" | \"GET /api/apm/rum/client-metrics\" | \"GET /api/apm/rum-client/page-load-distribution\" | \"GET /api/apm/rum-client/page-load-distribution/breakdown\" | \"GET /api/apm/rum-client/page-view-trends\" | \"GET /api/apm/rum-client/services\" | \"GET /api/apm/rum-client/visitor-breakdown\" | \"GET /api/apm/rum-client/web-core-vitals\" | \"GET /api/apm/rum-client/long-task-metrics\" | \"GET /api/apm/rum-client/url-search\" | \"GET /api/apm/rum-client/js-errors\" | \"GET /api/apm/observability_overview/has_rum_data\" | \"GET /internal/apm/service-map\" | \"GET /internal/apm/service-map/service/{serviceName}\" | \"GET /internal/apm/service-map/backend/{backendName}\" | \"GET /internal/apm/services/{serviceName}/serviceNodes\" | \"GET /internal/apm/services\" | \"GET /internal/apm/services/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/metadata/details\" | \"GET /internal/apm/services/{serviceName}/metadata/icons\" | \"GET /internal/apm/services/{serviceName}/agent\" | \"GET /internal/apm/services/{serviceName}/transaction_types\" | \"GET /internal/apm/services/{serviceName}/node/{serviceNodeName}/metadata\" | \"GET /api/apm/services/{serviceName}/annotation/search\" | \"POST /api/apm/services/{serviceName}/annotation\" | \"GET /internal/apm/services/{serviceName}/error_groups/main_statistics\" | \"GET /internal/apm/services/{serviceName}/error_groups/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/details/{serviceNodeName}\" | \"GET /internal/apm/services/{serviceName}/throughput\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/main_statistics\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/dependencies\" | \"GET /internal/apm/services/{serviceName}/dependencies/breakdown\" | \"GET /internal/apm/services/{serviceName}/profiling/timeline\" | \"GET /internal/apm/services/{serviceName}/profiling/statistics\" | \"GET /internal/apm/services/{serviceName}/alerts\" | \"GET /internal/apm/services/{serviceName}/infrastructure\" | \"GET /internal/apm/suggestions\" | \"GET /internal/apm/traces/{traceId}\" | \"GET /internal/apm/traces\" | \"GET /internal/apm/traces/{traceId}/root_transaction\" | \"GET /internal/apm/transactions/{transactionId}\" | \"GET /internal/apm/services/{serviceName}/transactions/groups/main_statistics\" | \"GET /internal/apm/services/{serviceName}/transactions/groups/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/latency\" | \"GET /internal/apm/services/{serviceName}/transactions/traces/samples\" | \"GET /internal/apm/services/{serviceName}/transaction/charts/breakdown\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/error_rate\" | \"GET /internal/apm/alerts/chart_preview/transaction_error_rate\" | \"GET /internal/apm/alerts/chart_preview/transaction_duration\" | \"GET /internal/apm/alerts/chart_preview/transaction_error_count\" | \"GET /api/apm/settings/agent-configuration\" | \"GET /api/apm/settings/agent-configuration/view\" | \"DELETE /api/apm/settings/agent-configuration\" | \"PUT /api/apm/settings/agent-configuration\" | \"POST /api/apm/settings/agent-configuration/search\" | \"GET /api/apm/settings/agent-configuration/services\" | \"GET /api/apm/settings/agent-configuration/environments\" | \"GET /api/apm/settings/agent-configuration/agent_name\" | \"GET /internal/apm/settings/anomaly-detection/jobs\" | \"POST /internal/apm/settings/anomaly-detection/jobs\" | \"GET /internal/apm/settings/anomaly-detection/environments\" | \"GET /internal/apm/settings/apm-index-settings\" | \"GET /internal/apm/settings/apm-indices\" | \"POST /internal/apm/settings/apm-indices/save\" | \"GET /internal/apm/settings/custom_links/transaction\" | \"GET /internal/apm/settings/custom_links\" | \"POST /internal/apm/settings/custom_links\" | \"PUT /internal/apm/settings/custom_links/{id}\" | \"DELETE /internal/apm/settings/custom_links/{id}\" | \"GET /api/apm/sourcemaps\" | \"POST /api/apm/sourcemaps\" | \"DELETE /api/apm/sourcemaps/{id}\" | \"GET /internal/apm/fleet/has_data\" | \"GET /internal/apm/fleet/agents\" | \"POST /internal/apm/fleet/apm_server_schema\" | \"GET /internal/apm/fleet/apm_server_schema/unsupported\" | \"GET /internal/apm/fleet/migration_check\" | \"POST /internal/apm/fleet/cloud_apm_package_policy\" | \"GET /internal/apm/backends/top_backends\" | \"GET /internal/apm/backends/{backendName}/upstream_services\" | \"GET /internal/apm/backends/{backendName}/metadata\" | \"GET /internal/apm/backends/{backendName}/charts/latency\" | \"GET /internal/apm/backends/{backendName}/charts/throughput\" | \"GET /internal/apm/backends/{backendName}/charts/error_rate\" | \"GET /internal/apm/fallback_to_transactions\" | \"GET /internal/apm/has_data\" | \"GET /api/apm/event_metadata/{processorEvent}/{id}\"" ], "path": "x-pack/plugins/apm/server/routes/get_global_apm_server_route_repository.ts", "deprecated": false, @@ -825,9 +765,23 @@ "label": "APMConfig", "description": [], "signature": [ - "{ 'apm_oss.transactionIndices': string; 'apm_oss.spanIndices': string; 'apm_oss.errorIndices': string; 'apm_oss.metricsIndices': string; 'apm_oss.sourcemapIndices': string; 'apm_oss.onboardingIndices': string; 'xpack.apm.serviceMapEnabled': boolean; 'xpack.apm.serviceMapFingerprintBucketSize': number; 'xpack.apm.serviceMapTraceIdBucketSize': number; 'xpack.apm.serviceMapFingerprintGlobalBucketSize': number; 'xpack.apm.serviceMapTraceIdGlobalBucketSize': number; 'xpack.apm.serviceMapMaxTracesPerRequest': number; 'xpack.apm.ui.enabled': boolean; 'xpack.apm.ui.maxTraceItems': number; 'xpack.apm.ui.transactionGroupBucketSize': number; 'xpack.apm.autocreateApmIndexPattern': boolean; 'xpack.apm.telemetryCollectionEnabled': boolean; 'xpack.apm.searchAggregatedTransactions': ", + "{ readonly enabled: boolean; readonly indices: Readonly<{} & { error: string; metric: string; span: string; transaction: string; sourcemap: string; onboarding: string; }>; readonly serviceMapEnabled: boolean; readonly serviceMapFingerprintBucketSize: number; readonly serviceMapTraceIdBucketSize: number; readonly serviceMapFingerprintGlobalBucketSize: number; readonly serviceMapTraceIdGlobalBucketSize: number; readonly serviceMapMaxTracesPerRequest: number; readonly autocreateApmIndexPattern: boolean; readonly ui: Readonly<{} & { enabled: boolean; transactionGroupBucketSize: number; maxTraceItems: number; }>; readonly searchAggregatedTransactions: ", "SearchAggregatedTransactionSetting", - "; 'xpack.apm.metricsInterval': number; 'xpack.apm.agent.migrations.enabled': boolean; }" + "; readonly telemetryCollectionEnabled: boolean; readonly metricsInterval: number; readonly profilingEnabled: boolean; readonly agent: Readonly<{} & { migrations: Readonly<{} & { enabled: boolean; }>; }>; }" + ], + "path": "x-pack/plugins/apm/server/index.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "apm", + "id": "def-server.ApmIndicesConfigName", + "type": "Type", + "tags": [], + "label": "ApmIndicesConfigName", + "description": [], + "signature": [ + "\"error\" | \"metric\" | \"span\" | \"transaction\" | \"sourcemap\" | \"onboarding\"" ], "path": "x-pack/plugins/apm/server/index.ts", "deprecated": false, @@ -858,7 +812,7 @@ }, ", ", "APMRouteCreateOptions", - ", { \"POST /api/apm/index_pattern/static\": ", + ", { \"POST /internal/apm/index_pattern/static\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -866,7 +820,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"POST /api/apm/index_pattern/static\", undefined, ", + "<\"POST /internal/apm/index_pattern/static\", undefined, ", { "pluginId": "apm", "scope": "server", @@ -876,7 +830,7 @@ }, ", { created: boolean; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/index_pattern/dynamic\": ", + ">; } & { \"GET /internal/apm/index_pattern/dynamic\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -884,7 +838,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/index_pattern/dynamic\", undefined, ", + "<\"GET /internal/apm/index_pattern/dynamic\", undefined, ", { "pluginId": "apm", "scope": "server", @@ -896,7 +850,7 @@ "IndexPatternTitleAndFields", " | undefined; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/environments\": ", + ">; } & { \"GET /internal/apm/environments\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -904,7 +858,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/environments\", ", + "<\"GET /internal/apm/environments\", ", "TypeC", "<{ query: ", "IntersectionC", @@ -928,7 +882,7 @@ }, ", { environments: string[]; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/services/{serviceName}/errors\": ", + ">; } & { \"GET /internal/apm/services/{serviceName}/errors\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -936,7 +890,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/services/{serviceName}/errors\", ", + "<\"GET /internal/apm/services/{serviceName}/errors\", ", "TypeC", "<{ path: ", "TypeC", @@ -988,7 +942,7 @@ }, ", { errorGroups: { message: string; occurrenceCount: number; culprit: string | undefined; groupId: string; latestOccurrenceAt: string; handled: boolean | undefined; type: string | undefined; }[]; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/services/{serviceName}/errors/{groupId}\": ", + ">; } & { \"GET /internal/apm/services/{serviceName}/errors/{groupId}\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -996,7 +950,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/services/{serviceName}/errors/{groupId}\", ", + "<\"GET /internal/apm/services/{serviceName}/errors/{groupId}\", ", "TypeC", "<{ path: ", "TypeC", @@ -1044,7 +998,7 @@ "APMError", "; occurrencesCount: number; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/services/{serviceName}/errors/distribution\": ", + ">; } & { \"GET /internal/apm/services/{serviceName}/errors/distribution\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -1052,7 +1006,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/services/{serviceName}/errors/distribution\", ", + "<\"GET /internal/apm/services/{serviceName}/errors/distribution\", ", "TypeC", "<{ path: ", "TypeC", @@ -1098,7 +1052,7 @@ }, ", { noHits: boolean; buckets: { key: number; count: number; }[]; bucketSize: number; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/services/{serviceName}/metrics/charts\": ", + ">; } & { \"GET /internal/apm/services/{serviceName}/metrics/charts\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -1106,7 +1060,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/services/{serviceName}/metrics/charts\", ", + "<\"GET /internal/apm/services/{serviceName}/metrics/charts\", ", "TypeC", "<{ path: ", "TypeC", @@ -1158,7 +1112,7 @@ "MetricsChartsByAgentAPIResponse", ", ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/observability_overview\": ", + ">; } & { \"GET /internal/apm/observability_overview\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -1166,7 +1120,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/observability_overview\", ", + "<\"GET /internal/apm/observability_overview\", ", "TypeC", "<{ query: ", "IntersectionC", @@ -1190,7 +1144,7 @@ }, ", { serviceCount: number; transactionPerMinute: { value: undefined; timeseries: never[]; } | { value: number; timeseries: { x: number; y: number | null; }[]; }; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/observability_overview/has_data\": ", + ">; } & { \"GET /internal/apm/observability_overview/has_data\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -1198,7 +1152,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/observability_overview/has_data\", undefined, ", + "<\"GET /internal/apm/observability_overview/has_data\", undefined, ", { "pluginId": "apm", "scope": "server", @@ -1642,7 +1596,7 @@ }, ", { indices: string; hasData: boolean; serviceName: string | number | undefined; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/service-map\": ", + ">; } & { \"GET /internal/apm/service-map\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -1650,7 +1604,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/service-map\", ", + "<\"GET /internal/apm/service-map\", ", "TypeC", "<{ query: ", "IntersectionC", @@ -1692,7 +1646,7 @@ "ServiceAnomalyStats", " | undefined; label: string | undefined; id?: string | undefined; parent?: string | undefined; position?: cytoscape.Position | undefined; } | { 'span.destination.service.resource': string; 'span.type': string; 'span.subtype': string; label: string | undefined; id?: string | undefined; parent?: string | undefined; position?: cytoscape.Position | undefined; } | { id: string; source: string | undefined; target: string | undefined; label: string | undefined; bidirectional?: boolean | undefined; isInverseEdge?: boolean | undefined; } | undefined)[]; }; } | { data: { id: string; source: string; target: string; }; })[]; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/service-map/service/{serviceName}\": ", + ">; } & { \"GET /internal/apm/service-map/service/{serviceName}\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -1700,7 +1654,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/service-map/service/{serviceName}\", ", + "<\"GET /internal/apm/service-map/service/{serviceName}\", ", "TypeC", "<{ path: ", "TypeC", @@ -1738,7 +1692,7 @@ }, ", { avgMemoryUsage: number | null; avgCpuUsage: number | null; transactionStats: { avgTransactionDuration: number | null; avgRequestsPerMinute: number | null; }; avgErrorRate: number | null; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/service-map/backend/{backendName}\": ", + ">; } & { \"GET /internal/apm/service-map/backend/{backendName}\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -1746,7 +1700,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/service-map/backend/{backendName}\", ", + "<\"GET /internal/apm/service-map/backend/{backendName}\", ", "TypeC", "<{ path: ", "TypeC", @@ -1784,7 +1738,7 @@ }, ", { avgErrorRate: null; transactionStats: { avgRequestsPerMinute: null; avgTransactionDuration: null; }; } | { avgErrorRate: number; transactionStats: { avgRequestsPerMinute: number; avgTransactionDuration: number; }; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/services/{serviceName}/serviceNodes\": ", + ">; } & { \"GET /internal/apm/services/{serviceName}/serviceNodes\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -1792,7 +1746,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/services/{serviceName}/serviceNodes\", ", + "<\"GET /internal/apm/services/{serviceName}/serviceNodes\", ", "TypeC", "<{ path: ", "TypeC", @@ -1834,7 +1788,7 @@ }, ", { serviceNodes: { name: string; cpu: number | null; heapMemory: number | null; hostName: string | null | undefined; nonHeapMemory: number | null; threadCount: number | null; }[]; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/services\": ", + ">; } & { \"GET /internal/apm/services\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -1842,7 +1796,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/services\", ", + "<\"GET /internal/apm/services\", ", "TypeC", "<{ query: ", "IntersectionC", @@ -1892,7 +1846,7 @@ "ServiceHealthStatus", "; }>; hasLegacyData: boolean; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/services/detailed_statistics\": ", + ">; } & { \"GET /internal/apm/services/detailed_statistics\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -1900,7 +1854,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/services/detailed_statistics\", ", + "<\"GET /internal/apm/services/detailed_statistics\", ", "TypeC", "<{ query: ", "IntersectionC", @@ -1946,7 +1900,7 @@ }, ", { currentPeriod: _.Dictionary<{ serviceName: string; latency: { x: number; y: number | null; }[]; transactionErrorRate: { x: number; y: number; }[]; throughput: { x: number; y: number; }[]; }>; previousPeriod: _.Dictionary<{ serviceName: string; latency: { x: number; y: number | null; }[]; transactionErrorRate: { x: number; y: number; }[]; throughput: { x: number; y: number; }[]; }>; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/services/{serviceName}/metadata/details\": ", + ">; } & { \"GET /internal/apm/services/{serviceName}/metadata/details\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -1954,7 +1908,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/services/{serviceName}/metadata/details\", ", + "<\"GET /internal/apm/services/{serviceName}/metadata/details\", ", "TypeC", "<{ path: ", "TypeC", @@ -1978,7 +1932,7 @@ "ServiceMetadataDetails", ", ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/services/{serviceName}/metadata/icons\": ", + ">; } & { \"GET /internal/apm/services/{serviceName}/metadata/icons\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -1986,7 +1940,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/services/{serviceName}/metadata/icons\", ", + "<\"GET /internal/apm/services/{serviceName}/metadata/icons\", ", "TypeC", "<{ path: ", "TypeC", @@ -2010,7 +1964,7 @@ "ServiceMetadataIcons", ", ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/services/{serviceName}/agent\": ", + ">; } & { \"GET /internal/apm/services/{serviceName}/agent\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -2018,7 +1972,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/services/{serviceName}/agent\", ", + "<\"GET /internal/apm/services/{serviceName}/agent\", ", "TypeC", "<{ path: ", "TypeC", @@ -2040,7 +1994,7 @@ }, ", { agentName?: undefined; runtimeName?: undefined; } | { agentName: string | undefined; runtimeName: string | undefined; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/services/{serviceName}/transaction_types\": ", + ">; } & { \"GET /internal/apm/services/{serviceName}/transaction_types\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -2048,7 +2002,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/services/{serviceName}/transaction_types\", ", + "<\"GET /internal/apm/services/{serviceName}/transaction_types\", ", "TypeC", "<{ path: ", "TypeC", @@ -2070,7 +2024,7 @@ }, ", { transactionTypes: string[]; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/services/{serviceName}/node/{serviceNodeName}/metadata\": ", + ">; } & { \"GET /internal/apm/services/{serviceName}/node/{serviceNodeName}/metadata\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -2078,7 +2032,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/services/{serviceName}/node/{serviceNodeName}/metadata\", ", + "<\"GET /internal/apm/services/{serviceName}/node/{serviceNodeName}/metadata\", ", "TypeC", "<{ path: ", "TypeC", @@ -2206,7 +2160,7 @@ "Annotation", "; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/services/{serviceName}/error_groups/main_statistics\": ", + ">; } & { \"GET /internal/apm/services/{serviceName}/error_groups/main_statistics\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -2214,7 +2168,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/services/{serviceName}/error_groups/main_statistics\", ", + "<\"GET /internal/apm/services/{serviceName}/error_groups/main_statistics\", ", "TypeC", "<{ path: ", "TypeC", @@ -2260,7 +2214,7 @@ }, ", { is_aggregation_accurate: boolean; error_groups: { group_id: string; name: string; lastSeen: number; occurrences: number; }[]; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/services/{serviceName}/error_groups/detailed_statistics\": ", + ">; } & { \"GET /internal/apm/services/{serviceName}/error_groups/detailed_statistics\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -2268,7 +2222,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/services/{serviceName}/error_groups/detailed_statistics\", ", + "<\"GET /internal/apm/services/{serviceName}/error_groups/detailed_statistics\", ", "TypeC", "<{ path: ", "TypeC", @@ -2326,7 +2280,7 @@ "Coordinate", "[]; }>; previousPeriod: _.Dictionary<{ timeseries: { x: number; y: number | null | undefined; }[]; groupId: string; }>; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/services/{serviceName}/service_overview_instances/details/{serviceNodeName}\": ", + ">; } & { \"GET /internal/apm/services/{serviceName}/service_overview_instances/details/{serviceNodeName}\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -2334,7 +2288,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/services/{serviceName}/service_overview_instances/details/{serviceNodeName}\", ", + "<\"GET /internal/apm/services/{serviceName}/service_overview_instances/details/{serviceNodeName}\", ", "TypeC", "<{ path: ", "TypeC", @@ -2380,7 +2334,7 @@ "Cloud", " | undefined; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/services/{serviceName}/throughput\": ", + ">; } & { \"GET /internal/apm/services/{serviceName}/throughput\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -2388,7 +2342,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/services/{serviceName}/throughput\", ", + "<\"GET /internal/apm/services/{serviceName}/throughput\", ", "TypeC", "<{ path: ", "TypeC", @@ -2448,7 +2402,7 @@ "ThroughputUnit", "; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/services/{serviceName}/service_overview_instances/main_statistics\": ", + ">; } & { \"GET /internal/apm/services/{serviceName}/service_overview_instances/main_statistics\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -2456,7 +2410,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/services/{serviceName}/service_overview_instances/main_statistics\", ", + "<\"GET /internal/apm/services/{serviceName}/service_overview_instances/main_statistics\", ", "TypeC", "<{ path: ", "TypeC", @@ -2522,7 +2476,7 @@ }, ", { currentPeriod: { serviceNodeName: string; errorRate?: number | undefined; latency?: number | undefined; throughput?: number | undefined; cpuUsage?: number | null | undefined; memoryUsage?: number | null | undefined; }[]; previousPeriod: { serviceNodeName: string; errorRate?: number | undefined; latency?: number | undefined; throughput?: number | undefined; cpuUsage?: number | null | undefined; memoryUsage?: number | null | undefined; }[]; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/services/{serviceName}/service_overview_instances/detailed_statistics\": ", + ">; } & { \"GET /internal/apm/services/{serviceName}/service_overview_instances/detailed_statistics\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -2530,7 +2484,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/services/{serviceName}/service_overview_instances/detailed_statistics\", ", + "<\"GET /internal/apm/services/{serviceName}/service_overview_instances/detailed_statistics\", ", "TypeC", "<{ path: ", "TypeC", @@ -2610,7 +2564,7 @@ "Coordinate", "[] | undefined; }>; previousPeriod: _.Dictionary<{ cpuUsage: { x: number; y: number | null | undefined; }[]; errorRate: { x: number; y: number | null | undefined; }[]; latency: { x: number; y: number | null | undefined; }[]; memoryUsage: { x: number; y: number | null | undefined; }[]; throughput: { x: number; y: number | null | undefined; }[]; serviceNodeName: string; }>; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/services/{serviceName}/dependencies\": ", + ">; } & { \"GET /internal/apm/services/{serviceName}/dependencies\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -2618,7 +2572,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/services/{serviceName}/dependencies\", ", + "<\"GET /internal/apm/services/{serviceName}/dependencies\", ", "TypeC", "<{ path: ", "TypeC", @@ -2682,7 +2636,7 @@ "Node", "; }[]; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/services/{serviceName}/dependencies/breakdown\": ", + ">; } & { \"GET /internal/apm/services/{serviceName}/dependencies/breakdown\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -2690,7 +2644,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/services/{serviceName}/dependencies/breakdown\", ", + "<\"GET /internal/apm/services/{serviceName}/dependencies/breakdown\", ", "TypeC", "<{ path: ", "TypeC", @@ -2732,7 +2686,7 @@ }, ", { breakdown: { title: string; data: { x: number; y: number; }[]; }[]; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/services/{serviceName}/profiling/timeline\": ", + ">; } & { \"GET /internal/apm/services/{serviceName}/profiling/timeline\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -2740,7 +2694,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/services/{serviceName}/profiling/timeline\", ", + "<\"GET /internal/apm/services/{serviceName}/profiling/timeline\", ", "TypeC", "<{ path: ", "TypeC", @@ -2782,7 +2736,7 @@ }, ", { profilingTimeline: { x: number; valueTypes: { wall_time: number; cpu_time: number; samples: number; alloc_objects: number; alloc_space: number; inuse_objects: number; inuse_space: number; unknown: number; }; }[]; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/services/{serviceName}/profiling/statistics\": ", + ">; } & { \"GET /internal/apm/services/{serviceName}/profiling/statistics\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -2790,7 +2744,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/services/{serviceName}/profiling/statistics\", ", + "<\"GET /internal/apm/services/{serviceName}/profiling/statistics\", ", "TypeC", "<{ path: ", "TypeC", @@ -2866,7 +2820,7 @@ "ProfileNode", ">; rootNodes: string[]; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/services/{serviceName}/alerts\": ", + ">; } & { \"GET /internal/apm/services/{serviceName}/alerts\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -2874,7 +2828,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/services/{serviceName}/alerts\", ", + "<\"GET /internal/apm/services/{serviceName}/alerts\", ", "TypeC", "<{ path: ", "TypeC", @@ -2916,7 +2870,7 @@ }, ", { alerts: Partial>[]; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/services/{serviceName}/infrastructure\": ", + ">; } & { \"GET /internal/apm/services/{serviceName}/infrastructure\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -2924,7 +2878,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/services/{serviceName}/infrastructure\", ", + "<\"GET /internal/apm/services/{serviceName}/infrastructure\", ", "TypeC", "<{ path: ", "TypeC", @@ -2992,7 +2946,7 @@ }, ", { terms: string[]; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/traces/{traceId}\": ", + ">; } & { \"GET /internal/apm/traces/{traceId}\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -3000,7 +2954,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/traces/{traceId}\", ", + "<\"GET /internal/apm/traces/{traceId}\", ", "TypeC", "<{ path: ", "TypeC", @@ -3028,7 +2982,7 @@ "APMError", "[]; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/traces\": ", + ">; } & { \"GET /internal/apm/traces\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -3036,7 +2990,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/traces\", ", + "<\"GET /internal/apm/traces\", ", "TypeC", "<{ query: ", "IntersectionC", @@ -3076,7 +3030,7 @@ "TransactionGroup", "[]; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/traces/{traceId}/root_transaction\": ", + ">; } & { \"GET /internal/apm/traces/{traceId}/root_transaction\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -3084,7 +3038,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/traces/{traceId}/root_transaction\", ", + "<\"GET /internal/apm/traces/{traceId}/root_transaction\", ", "TypeC", "<{ path: ", "TypeC", @@ -3102,7 +3056,7 @@ "Transaction", "; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/transactions/{transactionId}\": ", + ">; } & { \"GET /internal/apm/transactions/{transactionId}\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -3110,7 +3064,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/transactions/{transactionId}\", ", + "<\"GET /internal/apm/transactions/{transactionId}\", ", "TypeC", "<{ path: ", "TypeC", @@ -3128,7 +3082,7 @@ "Transaction", "; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/services/{serviceName}/transactions/groups/main_statistics\": ", + ">; } & { \"GET /internal/apm/services/{serviceName}/transactions/groups/main_statistics\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -3136,7 +3090,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/services/{serviceName}/transactions/groups/main_statistics\", ", + "<\"GET /internal/apm/services/{serviceName}/transactions/groups/main_statistics\", ", "TypeC", "<{ path: ", "TypeC", @@ -3196,7 +3150,7 @@ }, ", { transactionGroups: { transactionType: string; name: string; latency: number | null; throughput: number; errorRate: number; impact: number; }[]; isAggregationAccurate: boolean; bucketSize: number; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/services/{serviceName}/transactions/groups/detailed_statistics\": ", + ">; } & { \"GET /internal/apm/services/{serviceName}/transactions/groups/detailed_statistics\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -3204,7 +3158,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/services/{serviceName}/transactions/groups/detailed_statistics\", ", + "<\"GET /internal/apm/services/{serviceName}/transactions/groups/detailed_statistics\", ", "TypeC", "<{ path: ", "TypeC", @@ -3280,7 +3234,7 @@ "Coordinate", "[]; impact: number; }>; previousPeriod: _.Dictionary<{ errorRate: { x: number; y: number | null | undefined; }[]; throughput: { x: number; y: number | null | undefined; }[]; latency: { x: number; y: number | null | undefined; }[]; transactionName: string; impact: number; }>; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/services/{serviceName}/transactions/charts/latency\": ", + ">; } & { \"GET /internal/apm/services/{serviceName}/transactions/charts/latency\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -3288,7 +3242,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/services/{serviceName}/transactions/charts/latency\", ", + "<\"GET /internal/apm/services/{serviceName}/transactions/charts/latency\", ", "TypeC", "<{ path: ", "TypeC", @@ -3360,7 +3314,7 @@ }, ", { currentPeriod: { overallAvgDuration: number | null; latencyTimeseries: { x: number; y: number | null; }[]; }; previousPeriod: { latencyTimeseries: { x: number; y: number | null | undefined; }[]; overallAvgDuration: number | null; }; anomalyTimeseries: { jobId: string; anomalyScore: { x0: number; x: number; y: number; }[]; anomalyBoundaries: { x: number; y0: number; y: number; }[]; } | undefined; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/services/{serviceName}/transactions/traces/samples\": ", + ">; } & { \"GET /internal/apm/services/{serviceName}/transactions/traces/samples\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -3368,7 +3322,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/services/{serviceName}/transactions/traces/samples\", ", + "<\"GET /internal/apm/services/{serviceName}/transactions/traces/samples\", ", "TypeC", "<{ path: ", "TypeC", @@ -3426,7 +3380,7 @@ }, ", { noHits: boolean; traceSamples: { transactionId: string; traceId: string; }[]; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/services/{serviceName}/transaction/charts/breakdown\": ", + ">; } & { \"GET /internal/apm/services/{serviceName}/transaction/charts/breakdown\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -3434,7 +3388,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/services/{serviceName}/transaction/charts/breakdown\", ", + "<\"GET /internal/apm/services/{serviceName}/transaction/charts/breakdown\", ", "TypeC", "<{ path: ", "TypeC", @@ -3484,7 +3438,7 @@ }, ", { timeseries: { title: string; color: string; type: string; data: { x: number; y: number | null; }[]; hideLegend: boolean; legendValue: string; }[]; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/services/{serviceName}/transactions/charts/error_rate\": ", + ">; } & { \"GET /internal/apm/services/{serviceName}/transactions/charts/error_rate\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -3492,7 +3446,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/services/{serviceName}/transactions/charts/error_rate\", ", + "<\"GET /internal/apm/services/{serviceName}/transactions/charts/error_rate\", ", "TypeC", "<{ path: ", "TypeC", @@ -3552,7 +3506,7 @@ "Coordinate", "[]; average: number | null; }; previousPeriod: { transactionErrorRate: { x: number; y: number | null | undefined; }[]; noHits: boolean; average: number | null; }; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/alerts/chart_preview/transaction_error_rate\": ", + ">; } & { \"GET /internal/apm/alerts/chart_preview/transaction_error_rate\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -3560,7 +3514,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/alerts/chart_preview/transaction_error_rate\", ", + "<\"GET /internal/apm/alerts/chart_preview/transaction_error_rate\", ", "TypeC", "<{ query: ", "IntersectionC", @@ -3612,7 +3566,7 @@ }, ", { errorRateChartPreview: { x: number; y: number; }[]; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/alerts/chart_preview/transaction_duration\": ", + ">; } & { \"GET /internal/apm/alerts/chart_preview/transaction_duration\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -3620,7 +3574,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/alerts/chart_preview/transaction_duration\", ", + "<\"GET /internal/apm/alerts/chart_preview/transaction_duration\", ", "TypeC", "<{ query: ", "IntersectionC", @@ -3672,7 +3626,7 @@ }, ", { latencyChartPreview: { x: number; y: number | null; }[]; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/alerts/chart_preview/transaction_error_count\": ", + ">; } & { \"GET /internal/apm/alerts/chart_preview/transaction_error_count\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -3680,7 +3634,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/alerts/chart_preview/transaction_error_count\", ", + "<\"GET /internal/apm/alerts/chart_preview/transaction_error_count\", ", "TypeC", "<{ query: ", "IntersectionC", @@ -3968,7 +3922,7 @@ }, ", { agentName: string | undefined; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/settings/anomaly-detection/jobs\": ", + ">; } & { \"GET /internal/apm/settings/anomaly-detection/jobs\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -3976,7 +3930,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/settings/anomaly-detection/jobs\", undefined, ", + "<\"GET /internal/apm/settings/anomaly-detection/jobs\", undefined, ", { "pluginId": "apm", "scope": "server", @@ -3986,7 +3940,7 @@ }, ", { jobs: { job_id: string; environment: string; }[]; hasLegacyJobs: boolean; }, ", "APMRouteCreateOptions", - ">; } & { \"POST /api/apm/settings/anomaly-detection/jobs\": ", + ">; } & { \"POST /internal/apm/settings/anomaly-detection/jobs\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -3994,7 +3948,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"POST /api/apm/settings/anomaly-detection/jobs\", ", + "<\"POST /internal/apm/settings/anomaly-detection/jobs\", ", "TypeC", "<{ body: ", "TypeC", @@ -4012,7 +3966,7 @@ }, ", { jobCreated: boolean; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/settings/anomaly-detection/environments\": ", + ">; } & { \"GET /internal/apm/settings/anomaly-detection/environments\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -4020,7 +3974,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/settings/anomaly-detection/environments\", undefined, ", + "<\"GET /internal/apm/settings/anomaly-detection/environments\", undefined, ", { "pluginId": "apm", "scope": "server", @@ -4030,7 +3984,7 @@ }, ", { environments: string[]; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/settings/apm-index-settings\": ", + ">; } & { \"GET /internal/apm/settings/apm-index-settings\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -4038,7 +3992,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/settings/apm-index-settings\", undefined, ", + "<\"GET /internal/apm/settings/apm-index-settings\", undefined, ", { "pluginId": "apm", "scope": "server", @@ -4046,9 +4000,9 @@ "section": "def-server.APMRouteHandlerResources", "text": "APMRouteHandlerResources" }, - ", { apmIndexSettings: { configurationName: \"apm_oss.sourcemapIndices\" | \"apm_oss.errorIndices\" | \"apm_oss.onboardingIndices\" | \"apm_oss.spanIndices\" | \"apm_oss.transactionIndices\" | \"apm_oss.metricsIndices\" | \"apmAgentConfigurationIndex\" | \"apmCustomLinkIndex\"; defaultValue: string; savedValue: string | undefined; }[]; }, ", + ", { apmIndexSettings: { configurationName: \"error\" | \"metric\" | \"span\" | \"transaction\" | \"sourcemap\" | \"onboarding\"; defaultValue: string; savedValue: string | undefined; }[]; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/settings/apm-indices\": ", + ">; } & { \"GET /internal/apm/settings/apm-indices\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -4056,7 +4010,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/settings/apm-indices\", undefined, ", + "<\"GET /internal/apm/settings/apm-indices\", undefined, ", { "pluginId": "apm", "scope": "server", @@ -4068,7 +4022,7 @@ "ApmIndicesConfig", ", ", "APMRouteCreateOptions", - ">; } & { \"POST /api/apm/settings/apm-indices/save\": ", + ">; } & { \"POST /internal/apm/settings/apm-indices/save\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -4076,23 +4030,11 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"POST /api/apm/settings/apm-indices/save\", ", + "<\"POST /internal/apm/settings/apm-indices/save\", ", "TypeC", "<{ body: ", "PartialC", - "<{ 'apm_oss.sourcemapIndices': ", - "StringC", - "; 'apm_oss.errorIndices': ", - "StringC", - "; 'apm_oss.onboardingIndices': ", - "StringC", - "; 'apm_oss.spanIndices': ", - "StringC", - "; 'apm_oss.transactionIndices': ", - "StringC", - "; 'apm_oss.metricsIndices': ", - "StringC", - "; }>; }>, ", + "; }>, ", { "pluginId": "apm", "scope": "server", @@ -4104,7 +4046,7 @@ "SavedObject", "<{}>, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/settings/custom_links/transaction\": ", + ">; } & { \"GET /internal/apm/settings/custom_links/transaction\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -4112,7 +4054,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/settings/custom_links/transaction\", ", + "<\"GET /internal/apm/settings/custom_links/transaction\", ", "PartialC", "<{ query: ", "PartialC", @@ -4136,7 +4078,7 @@ "Transaction", ", ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/settings/custom_links\": ", + ">; } & { \"GET /internal/apm/settings/custom_links\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -4144,7 +4086,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/settings/custom_links\", ", + "<\"GET /internal/apm/settings/custom_links\", ", "PartialC", "<{ query: ", "PartialC", @@ -4168,7 +4110,7 @@ "CustomLink", "[]; }, ", "APMRouteCreateOptions", - ">; } & { \"POST /api/apm/settings/custom_links\": ", + ">; } & { \"POST /internal/apm/settings/custom_links\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -4176,7 +4118,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"POST /api/apm/settings/custom_links\", ", + "<\"POST /internal/apm/settings/custom_links\", ", "TypeC", "<{ body: ", "IntersectionC", @@ -4220,7 +4162,7 @@ }, ", void, ", "APMRouteCreateOptions", - ">; } & { \"PUT /api/apm/settings/custom_links/{id}\": ", + ">; } & { \"PUT /internal/apm/settings/custom_links/{id}\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -4228,7 +4170,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"PUT /api/apm/settings/custom_links/{id}\", ", + "<\"PUT /internal/apm/settings/custom_links/{id}\", ", "TypeC", "<{ path: ", "TypeC", @@ -4276,7 +4218,7 @@ }, ", void, ", "APMRouteCreateOptions", - ">; } & { \"DELETE /api/apm/settings/custom_links/{id}\": ", + ">; } & { \"DELETE /internal/apm/settings/custom_links/{id}\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -4284,7 +4226,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"DELETE /api/apm/settings/custom_links/{id}\", ", + "<\"DELETE /internal/apm/settings/custom_links/{id}\", ", "TypeC", "<{ path: ", "TypeC", @@ -4382,7 +4324,7 @@ }, ", void, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/fleet/has_data\": ", + ">; } & { \"GET /internal/apm/fleet/has_data\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -4390,7 +4332,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/fleet/has_data\", undefined, ", + "<\"GET /internal/apm/fleet/has_data\", undefined, ", { "pluginId": "apm", "scope": "server", @@ -4400,7 +4342,7 @@ }, ", { hasData: boolean; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/fleet/agents\": ", + ">; } & { \"GET /internal/apm/fleet/agents\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -4408,7 +4350,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/fleet/agents\", undefined, ", + "<\"GET /internal/apm/fleet/agents\", undefined, ", { "pluginId": "apm", "scope": "server", @@ -4418,7 +4360,7 @@ }, ", { cloudStandaloneSetup: { apmServerUrl: string | undefined; secretToken: string | undefined; } | undefined; isFleetEnabled: boolean; fleetAgents: { id: string; name: string; apmServerUrl: any; secretToken: any; }[]; }, ", "APMRouteCreateOptions", - ">; } & { \"POST /api/apm/fleet/apm_server_schema\": ", + ">; } & { \"POST /internal/apm/fleet/apm_server_schema\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -4426,7 +4368,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"POST /api/apm/fleet/apm_server_schema\", ", + "<\"POST /internal/apm/fleet/apm_server_schema\", ", "TypeC", "<{ body: ", "TypeC", @@ -4446,7 +4388,7 @@ }, ", void, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/fleet/apm_server_schema/unsupported\": ", + ">; } & { \"GET /internal/apm/fleet/apm_server_schema/unsupported\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -4454,7 +4396,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/fleet/apm_server_schema/unsupported\", undefined, ", + "<\"GET /internal/apm/fleet/apm_server_schema/unsupported\", undefined, ", { "pluginId": "apm", "scope": "server", @@ -4464,7 +4406,7 @@ }, ", { unsupported: { key: string; value: any; }[]; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/fleet/migration_check\": ", + ">; } & { \"GET /internal/apm/fleet/migration_check\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -4472,7 +4414,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/fleet/migration_check\", undefined, ", + "<\"GET /internal/apm/fleet/migration_check\", undefined, ", { "pluginId": "apm", "scope": "server", @@ -4482,7 +4424,7 @@ }, ", { has_cloud_agent_policy: boolean; has_cloud_apm_package_policy: boolean; cloud_apm_migration_enabled: boolean; has_required_role: boolean | undefined; }, ", "APMRouteCreateOptions", - ">; } & { \"POST /api/apm/fleet/cloud_apm_package_policy\": ", + ">; } & { \"POST /internal/apm/fleet/cloud_apm_package_policy\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -4490,7 +4432,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"POST /api/apm/fleet/cloud_apm_package_policy\", undefined, ", + "<\"POST /internal/apm/fleet/cloud_apm_package_policy\", undefined, ", { "pluginId": "apm", "scope": "server", @@ -4508,7 +4450,7 @@ }, "; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/backends/top_backends\": ", + ">; } & { \"GET /internal/apm/backends/top_backends\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -4516,7 +4458,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/backends/top_backends\", ", + "<\"GET /internal/apm/backends/top_backends\", ", "IntersectionC", "<[", "TypeC", @@ -4584,7 +4526,7 @@ "Node", "; }[]; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/backends/{backendName}/upstream_services\": ", + ">; } & { \"GET /internal/apm/backends/{backendName}/upstream_services\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -4592,7 +4534,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/backends/{backendName}/upstream_services\", ", + "<\"GET /internal/apm/backends/{backendName}/upstream_services\", ", "IntersectionC", "<[", "TypeC", @@ -4666,7 +4608,7 @@ "Node", "; }[]; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/backends/{backendName}/metadata\": ", + ">; } & { \"GET /internal/apm/backends/{backendName}/metadata\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -4674,7 +4616,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/backends/{backendName}/metadata\", ", + "<\"GET /internal/apm/backends/{backendName}/metadata\", ", "TypeC", "<{ path: ", "TypeC", @@ -4696,7 +4638,7 @@ }, ", { metadata: { spanType: string | undefined; spanSubtype: string | undefined; }; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/backends/{backendName}/charts/latency\": ", + ">; } & { \"GET /internal/apm/backends/{backendName}/charts/latency\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -4704,7 +4646,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/backends/{backendName}/charts/latency\", ", + "<\"GET /internal/apm/backends/{backendName}/charts/latency\", ", "TypeC", "<{ path: ", "TypeC", @@ -4750,7 +4692,7 @@ }, ", { currentTimeseries: { x: number; y: number; }[]; comparisonTimeseries: { x: number; y: number; }[] | null; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/backends/{backendName}/charts/throughput\": ", + ">; } & { \"GET /internal/apm/backends/{backendName}/charts/throughput\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -4758,7 +4700,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/backends/{backendName}/charts/throughput\", ", + "<\"GET /internal/apm/backends/{backendName}/charts/throughput\", ", "TypeC", "<{ path: ", "TypeC", @@ -4804,7 +4746,7 @@ }, ", { currentTimeseries: { x: number; y: number | null; }[]; comparisonTimeseries: { x: number; y: number | null; }[] | null; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/backends/{backendName}/charts/error_rate\": ", + ">; } & { \"GET /internal/apm/backends/{backendName}/charts/error_rate\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -4812,7 +4754,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/backends/{backendName}/charts/error_rate\", ", + "<\"GET /internal/apm/backends/{backendName}/charts/error_rate\", ", "TypeC", "<{ path: ", "TypeC", @@ -4858,7 +4800,7 @@ }, ", { currentTimeseries: { x: number; y: number; }[]; comparisonTimeseries: { x: number; y: number; }[] | null; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/fallback_to_transactions\": ", + ">; } & { \"GET /internal/apm/fallback_to_transactions\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -4866,7 +4808,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/fallback_to_transactions\", ", + "<\"GET /internal/apm/fallback_to_transactions\", ", "PartialC", "<{ query: ", "IntersectionC", @@ -4890,7 +4832,7 @@ }, ", { fallbackToTransactions: boolean; }, ", "APMRouteCreateOptions", - ">; } & { \"GET /api/apm/has_data\": ", + ">; } & { \"GET /internal/apm/has_data\": ", { "pluginId": "@kbn/server-route-repository", "scope": "server", @@ -4898,7 +4840,7 @@ "section": "def-server.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/apm/has_data\", undefined, ", + "<\"GET /internal/apm/has_data\", undefined, ", { "pluginId": "apm", "scope": "server", @@ -4908,27 +4850,57 @@ }, ", { hasData: boolean; }, ", "APMRouteCreateOptions", + ">; } & { \"GET /api/apm/event_metadata/{processorEvent}/{id}\": ", + { + "pluginId": "@kbn/server-route-repository", + "scope": "server", + "docId": "kibKbnServerRouteRepositoryPluginApi", + "section": "def-server.ServerRoute", + "text": "ServerRoute" + }, + "<\"GET /api/apm/event_metadata/{processorEvent}/{id}\", ", + "TypeC", + "<{ path: ", + "TypeC", + "<{ processorEvent: ", + "UnionC", + "<[", + "LiteralC", + "<", + "ProcessorEvent", + ".transaction>, ", + "LiteralC", + "<", + "ProcessorEvent", + ".error>, ", + "LiteralC", + "<", + "ProcessorEvent", + ".metric>, ", + "LiteralC", + "<", + "ProcessorEvent", + ".span>, ", + "LiteralC", + "<", + "ProcessorEvent", + ".profile>]>; id: ", + "StringC", + "; }>; }>, ", + { + "pluginId": "apm", + "scope": "server", + "docId": "kibApmPluginApi", + "section": "def-server.APMRouteHandlerResources", + "text": "APMRouteHandlerResources" + }, + ", { metadata: Partial>; }, ", + "APMRouteCreateOptions", ">; }>" ], "path": "x-pack/plugins/apm/server/routes/get_global_apm_server_route_repository.ts", "deprecated": false, "initialIsOpen": false - }, - { - "parentPluginId": "apm", - "id": "def-server.APMXPackConfig", - "type": "Type", - "tags": [], - "label": "APMXPackConfig", - "description": [], - "signature": [ - "{ readonly enabled: boolean; readonly serviceMapEnabled: boolean; readonly serviceMapFingerprintBucketSize: number; readonly serviceMapTraceIdBucketSize: number; readonly serviceMapFingerprintGlobalBucketSize: number; readonly serviceMapTraceIdGlobalBucketSize: number; readonly serviceMapMaxTracesPerRequest: number; readonly autocreateApmIndexPattern: boolean; readonly ui: Readonly<{} & { enabled: boolean; transactionGroupBucketSize: number; maxTraceItems: number; }>; readonly searchAggregatedTransactions: ", - "SearchAggregatedTransactionSetting", - "; readonly telemetryCollectionEnabled: boolean; readonly metricsInterval: number; readonly profilingEnabled: boolean; readonly agent: Readonly<{} & { migrations: Readonly<{} & { enabled: boolean; }>; }>; }" - ], - "path": "x-pack/plugins/apm/server/index.ts", - "deprecated": false, - "initialIsOpen": false } ], "objects": [], @@ -4951,9 +4923,9 @@ "description": [], "signature": [ "Observable", - "<{ 'apm_oss.transactionIndices': string; 'apm_oss.spanIndices': string; 'apm_oss.errorIndices': string; 'apm_oss.metricsIndices': string; 'apm_oss.sourcemapIndices': string; 'apm_oss.onboardingIndices': string; 'xpack.apm.serviceMapEnabled': boolean; 'xpack.apm.serviceMapFingerprintBucketSize': number; 'xpack.apm.serviceMapTraceIdBucketSize': number; 'xpack.apm.serviceMapFingerprintGlobalBucketSize': number; 'xpack.apm.serviceMapTraceIdGlobalBucketSize': number; 'xpack.apm.serviceMapMaxTracesPerRequest': number; 'xpack.apm.ui.enabled': boolean; 'xpack.apm.ui.maxTraceItems': number; 'xpack.apm.ui.transactionGroupBucketSize': number; 'xpack.apm.autocreateApmIndexPattern': boolean; 'xpack.apm.telemetryCollectionEnabled': boolean; 'xpack.apm.searchAggregatedTransactions': ", + "; serviceMapEnabled: boolean; serviceMapFingerprintBucketSize: number; serviceMapTraceIdBucketSize: number; serviceMapFingerprintGlobalBucketSize: number; serviceMapTraceIdGlobalBucketSize: number; serviceMapMaxTracesPerRequest: number; autocreateApmIndexPattern: boolean; ui: Readonly<{} & { enabled: boolean; transactionGroupBucketSize: number; maxTraceItems: number; }>; searchAggregatedTransactions: ", "SearchAggregatedTransactionSetting", - "; 'xpack.apm.metricsInterval': number; 'xpack.apm.agent.migrations.enabled': boolean; }>" + "; telemetryCollectionEnabled: boolean; metricsInterval: number; profilingEnabled: boolean; agent: Readonly<{} & { migrations: Readonly<{} & { enabled: boolean; }>; }>; }>>" ], "path": "x-pack/plugins/apm/server/types.ts", "deprecated": false diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx index d9e53e6ec9df8..5daa09e8df84c 100644 --- a/api_docs/apm.mdx +++ b/api_docs/apm.mdx @@ -18,7 +18,7 @@ Contact [APM UI](https://github.com/orgs/elastic/teams/apm-ui) for questions reg | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 42 | 0 | 42 | 37 | +| 39 | 0 | 39 | 37 | ## Client @@ -36,9 +36,6 @@ Contact [APM UI](https://github.com/orgs/elastic/teams/apm-ui) for questions reg ### Setup -### Functions - - ### Classes diff --git a/api_docs/apm_oss.json b/api_docs/apm_oss.json deleted file mode 100644 index adcf164f39450..0000000000000 --- a/api_docs/apm_oss.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "id": "apmOss", - "client": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], - "misc": [], - "objects": [], - "setup": { - "parentPluginId": "apmOss", - "id": "def-public.ApmOssPluginSetup", - "type": "Interface", - "tags": [], - "label": "ApmOssPluginSetup", - "description": [], - "path": "src/plugins/apm_oss/public/types.ts", - "deprecated": false, - "children": [], - "lifecycle": "setup", - "initialIsOpen": true - }, - "start": { - "parentPluginId": "apmOss", - "id": "def-public.ApmOssPluginStart", - "type": "Interface", - "tags": [], - "label": "ApmOssPluginStart", - "description": [], - "path": "src/plugins/apm_oss/public/types.ts", - "deprecated": false, - "children": [], - "lifecycle": "start", - "initialIsOpen": true - } - }, - "server": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], - "misc": [ - { - "parentPluginId": "apmOss", - "id": "def-server.APMOSSConfig", - "type": "Type", - "tags": [], - "label": "APMOSSConfig", - "description": [], - "signature": [ - "{ readonly enabled: boolean; readonly transactionIndices: string; readonly spanIndices: string; readonly errorIndices: string; readonly metricsIndices: string; readonly sourcemapIndices: string; readonly onboardingIndices: string; readonly indexPattern: string; readonly fleetMode: boolean; }" - ], - "path": "src/plugins/apm_oss/server/index.ts", - "deprecated": false, - "initialIsOpen": false - } - ], - "objects": [], - "setup": { - "parentPluginId": "apmOss", - "id": "def-server.APMOSSPluginSetup", - "type": "Interface", - "tags": [], - "label": "APMOSSPluginSetup", - "description": [], - "path": "src/plugins/apm_oss/server/plugin.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "apmOss", - "id": "def-server.APMOSSPluginSetup.config", - "type": "Object", - "tags": [], - "label": "config", - "description": [], - "signature": [ - "{ readonly enabled: boolean; readonly transactionIndices: string; readonly spanIndices: string; readonly errorIndices: string; readonly metricsIndices: string; readonly sourcemapIndices: string; readonly onboardingIndices: string; readonly indexPattern: string; readonly fleetMode: boolean; }" - ], - "path": "src/plugins/apm_oss/server/plugin.ts", - "deprecated": false - }, - { - "parentPluginId": "apmOss", - "id": "def-server.APMOSSPluginSetup.config$", - "type": "Object", - "tags": [], - "label": "config$", - "description": [], - "signature": [ - "Observable", - ">" - ], - "path": "src/plugins/apm_oss/server/plugin.ts", - "deprecated": false - } - ], - "lifecycle": "setup", - "initialIsOpen": true - } - }, - "common": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], - "misc": [], - "objects": [] - } -} \ No newline at end of file diff --git a/api_docs/apm_oss.mdx b/api_docs/apm_oss.mdx deleted file mode 100644 index 214147f9f4690..0000000000000 --- a/api_docs/apm_oss.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -id: kibApmOssPluginApi -slug: /kibana-dev-docs/api/apmOss -title: "apmOss" -image: https://source.unsplash.com/400x175/?github -summary: API docs for the apmOss plugin -date: 2020-11-16 -tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apmOss'] -warning: 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. ---- -import apmOssObj from './apm_oss.json'; - - - -Contact [APM UI](https://github.com/orgs/elastic/teams/apm-ui) for questions regarding this plugin. - -**Code health stats** - -| Public API count | Any count | Items lacking comments | Missing exports | -|-------------------|-----------|------------------------|-----------------| -| 6 | 0 | 6 | 0 | - -## Client - -### Setup - - -### Start - - -## Server - -### Setup - - -### Consts, variables and types - - diff --git a/api_docs/bfetch.json b/api_docs/bfetch.json index c274b6a6d1ced..4f9f7a33ebd3f 100644 --- a/api_docs/bfetch.json +++ b/api_docs/bfetch.json @@ -238,86 +238,7 @@ } ], "enums": [], - "misc": [ - { - "parentPluginId": "bfetch", - "id": "def-server.StreamingRequestHandler", - "type": "Type", - "tags": [], - "label": "StreamingRequestHandler", - "description": [ - "\nRequest handler modified to allow to return an observable.\n\nSee {@link BfetchServerSetup.createStreamingRequestHandler} for usage example." - ], - "signature": [ - "(context: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.RequestHandlerContext", - "text": "RequestHandlerContext" - }, - ", request: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.KibanaRequest", - "text": "KibanaRequest" - }, - ") => ", - "Observable", - " | Promise<", - "Observable", - ">" - ], - "path": "src/plugins/bfetch/server/types.ts", - "deprecated": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "bfetch", - "id": "def-server.StreamingRequestHandler.$1", - "type": "Object", - "tags": [], - "label": "context", - "description": [], - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.RequestHandlerContext", - "text": "RequestHandlerContext" - } - ], - "path": "src/plugins/bfetch/server/types.ts", - "deprecated": false - }, - { - "parentPluginId": "bfetch", - "id": "def-server.StreamingRequestHandler.$2", - "type": "Object", - "tags": [], - "label": "request", - "description": [], - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.KibanaRequest", - "text": "KibanaRequest" - }, - "" - ], - "path": "src/plugins/bfetch/server/types.ts", - "deprecated": false - } - ], - "initialIsOpen": false - } - ], + "misc": [], "objects": [], "setup": { "parentPluginId": "bfetch", @@ -480,259 +401,6 @@ } ], "returnComment": [] - }, - { - "parentPluginId": "bfetch", - "id": "def-server.BfetchServerSetup.createStreamingRequestHandler", - "type": "Function", - "tags": [], - "label": "createStreamingRequestHandler", - "description": [ - "\nCreate a streaming request handler to be able to use an Observable to return chunked content to the client.\nThis is meant to be used with the `fetchStreaming` API of the `bfetch` client-side plugin.\n" - ], - "signature": [ - "(streamHandler: ", - { - "pluginId": "bfetch", - "scope": "server", - "docId": "kibBfetchPluginApi", - "section": "def-server.StreamingRequestHandler", - "text": "StreamingRequestHandler" - }, - ") => ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.RequestHandler", - "text": "RequestHandler" - }, - " | Error | { message: string | Error; attributes?: Record | undefined; } | Buffer | ", - "Stream", - " | undefined>(options: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.CustomHttpResponseOptions", - "text": "CustomHttpResponseOptions" - }, - ") => ", - "KibanaResponse", - "; badRequest: (options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.ErrorHttpResponseOptions", - "text": "ErrorHttpResponseOptions" - }, - ") => ", - "KibanaResponse", - "<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.ResponseError", - "text": "ResponseError" - }, - ">; unauthorized: (options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.ErrorHttpResponseOptions", - "text": "ErrorHttpResponseOptions" - }, - ") => ", - "KibanaResponse", - "<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.ResponseError", - "text": "ResponseError" - }, - ">; forbidden: (options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.ErrorHttpResponseOptions", - "text": "ErrorHttpResponseOptions" - }, - ") => ", - "KibanaResponse", - "<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.ResponseError", - "text": "ResponseError" - }, - ">; notFound: (options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.ErrorHttpResponseOptions", - "text": "ErrorHttpResponseOptions" - }, - ") => ", - "KibanaResponse", - "<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.ResponseError", - "text": "ResponseError" - }, - ">; conflict: (options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.ErrorHttpResponseOptions", - "text": "ErrorHttpResponseOptions" - }, - ") => ", - "KibanaResponse", - "<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.ResponseError", - "text": "ResponseError" - }, - ">; customError: (options: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.CustomHttpResponseOptions", - "text": "CustomHttpResponseOptions" - }, - "<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.ResponseError", - "text": "ResponseError" - }, - ">) => ", - "KibanaResponse", - "<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.ResponseError", - "text": "ResponseError" - }, - ">; redirected: (options: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.RedirectResponseOptions", - "text": "RedirectResponseOptions" - }, - ") => ", - "KibanaResponse", - " | Buffer | ", - "Stream", - ">; ok: (options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.HttpResponseOptions", - "text": "HttpResponseOptions" - }, - ") => ", - "KibanaResponse", - " | Buffer | ", - "Stream", - ">; accepted: (options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.HttpResponseOptions", - "text": "HttpResponseOptions" - }, - ") => ", - "KibanaResponse", - " | Buffer | ", - "Stream", - ">; noContent: (options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.HttpResponseOptions", - "text": "HttpResponseOptions" - }, - ") => ", - "KibanaResponse", - "; }>" - ], - "path": "src/plugins/bfetch/server/plugin.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "bfetch", - "id": "def-server.BfetchServerSetup.createStreamingRequestHandler.$1", - "type": "Function", - "tags": [], - "label": "streamHandler", - "description": [], - "signature": [ - { - "pluginId": "bfetch", - "scope": "server", - "docId": "kibBfetchPluginApi", - "section": "def-server.StreamingRequestHandler", - "text": "StreamingRequestHandler" - }, - "" - ], - "path": "src/plugins/bfetch/server/plugin.ts", - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] } ], "lifecycle": "setup", @@ -1024,6 +692,65 @@ } ], "functions": [ + { + "parentPluginId": "bfetch", + "id": "def-common.appendQueryParam", + "type": "Function", + "tags": [], + "label": "appendQueryParam", + "description": [], + "signature": [ + "(url: string, key: string, value: string) => string" + ], + "path": "src/plugins/bfetch/common/util/query_params.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "bfetch", + "id": "def-common.appendQueryParam.$1", + "type": "string", + "tags": [], + "label": "url", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/bfetch/common/util/query_params.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "bfetch", + "id": "def-common.appendQueryParam.$2", + "type": "string", + "tags": [], + "label": "key", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/bfetch/common/util/query_params.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "bfetch", + "id": "def-common.appendQueryParam.$3", + "type": "string", + "tags": [], + "label": "value", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/bfetch/common/util/query_params.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "bfetch", "id": "def-common.createBatchedFunction", diff --git a/api_docs/bfetch.mdx b/api_docs/bfetch.mdx index 25e77b7731790..ca32afc24e166 100644 --- a/api_docs/bfetch.mdx +++ b/api_docs/bfetch.mdx @@ -18,7 +18,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 77 | 1 | 66 | 2 | +| 76 | 1 | 67 | 2 | ## Client @@ -42,9 +42,6 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services ### Interfaces -### Consts, variables and types - - ## Common ### Functions diff --git a/api_docs/cases.json b/api_docs/cases.json index 062235d8ed679..c35220cda3c66 100644 --- a/api_docs/cases.json +++ b/api_docs/cases.json @@ -2948,7 +2948,7 @@ "label": "action", "description": [], "signature": [ - "\"add\" | \"delete\" | \"create\" | \"update\" | \"push-to-service\"" + "\"add\" | \"create\" | \"delete\" | \"update\" | \"push-to-service\"" ], "path": "x-pack/plugins/cases/common/ui/types.ts", "deprecated": false @@ -4964,6 +4964,26 @@ "deprecated": false, "initialIsOpen": false }, + { + "parentPluginId": "cases", + "id": "def-common.CaseActionConnector", + "type": "Type", + "tags": [], + "label": "CaseActionConnector", + "description": [], + "signature": [ + { + "pluginId": "actions", + "scope": "common", + "docId": "kibActionsPluginApi", + "section": "def-common.ActionResult", + "text": "ActionResult" + } + ], + "path": "x-pack/plugins/cases/common/ui/types.ts", + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "cases", "id": "def-common.CaseAttributes", @@ -6776,7 +6796,7 @@ "label": "CaseUserActionAttributes", "description": [], "signature": [ - "{ action_field: (\"status\" | \"title\" | \"description\" | \"tags\" | \"comment\" | \"settings\" | \"owner\" | \"connector\" | \"pushed\" | \"sub_case\")[]; action: \"add\" | \"delete\" | \"create\" | \"update\" | \"push-to-service\"; action_at: string; action_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; new_value: string | null; old_value: string | null; owner: string; }" + "{ action_field: (\"status\" | \"title\" | \"description\" | \"tags\" | \"comment\" | \"settings\" | \"owner\" | \"connector\" | \"pushed\" | \"sub_case\")[]; action: \"add\" | \"create\" | \"delete\" | \"update\" | \"push-to-service\"; action_at: string; action_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; new_value: string | null; old_value: string | null; owner: string; }" ], "path": "x-pack/plugins/cases/common/api/cases/user_actions.ts", "deprecated": false, @@ -6852,7 +6872,7 @@ "label": "CaseUserActionResponse", "description": [], "signature": [ - "{ action_field: (\"status\" | \"title\" | \"description\" | \"tags\" | \"comment\" | \"settings\" | \"owner\" | \"connector\" | \"pushed\" | \"sub_case\")[]; action: \"add\" | \"delete\" | \"create\" | \"update\" | \"push-to-service\"; action_at: string; action_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; new_value: string | null; old_value: string | null; owner: string; } & { action_id: string; case_id: string; comment_id: string | null; new_val_connector_id: string | null; old_val_connector_id: string | null; } & { sub_case_id?: string | undefined; }" + "{ action_field: (\"status\" | \"title\" | \"description\" | \"tags\" | \"comment\" | \"settings\" | \"owner\" | \"connector\" | \"pushed\" | \"sub_case\")[]; action: \"add\" | \"create\" | \"delete\" | \"update\" | \"push-to-service\"; action_at: string; action_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; new_value: string | null; old_value: string | null; owner: string; } & { action_id: string; case_id: string; comment_id: string | null; new_val_connector_id: string | null; old_val_connector_id: string | null; } & { sub_case_id?: string | undefined; }" ], "path": "x-pack/plugins/cases/common/api/cases/user_actions.ts", "deprecated": false, @@ -6866,7 +6886,7 @@ "label": "CaseUserActionsResponse", "description": [], "signature": [ - "({ action_field: (\"status\" | \"title\" | \"description\" | \"tags\" | \"comment\" | \"settings\" | \"owner\" | \"connector\" | \"pushed\" | \"sub_case\")[]; action: \"add\" | \"delete\" | \"create\" | \"update\" | \"push-to-service\"; action_at: string; action_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; new_value: string | null; old_value: string | null; owner: string; } & { action_id: string; case_id: string; comment_id: string | null; new_val_connector_id: string | null; old_val_connector_id: string | null; } & { sub_case_id?: string | undefined; })[]" + "({ action_field: (\"status\" | \"title\" | \"description\" | \"tags\" | \"comment\" | \"settings\" | \"owner\" | \"connector\" | \"pushed\" | \"sub_case\")[]; action: \"add\" | \"create\" | \"delete\" | \"update\" | \"push-to-service\"; action_at: string; action_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; new_value: string | null; old_value: string | null; owner: string; } & { action_id: string; case_id: string; comment_id: string | null; new_val_connector_id: string | null; old_val_connector_id: string | null; } & { sub_case_id?: string | undefined; })[]" ], "path": "x-pack/plugins/cases/common/api/cases/user_actions.ts", "deprecated": false, @@ -8573,7 +8593,7 @@ "label": "UserAction", "description": [], "signature": [ - "\"add\" | \"delete\" | \"create\" | \"update\" | \"push-to-service\"" + "\"add\" | \"create\" | \"delete\" | \"update\" | \"push-to-service\"" ], "path": "x-pack/plugins/cases/common/api/cases/user_actions.ts", "deprecated": false, diff --git a/api_docs/cases.mdx b/api_docs/cases.mdx index 4d2c96b89917f..9400133d89bda 100644 --- a/api_docs/cases.mdx +++ b/api_docs/cases.mdx @@ -18,7 +18,7 @@ Contact [Security Solution Threat Hunting](https://github.com/orgs/elastic/teams | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 475 | 0 | 431 | 14 | +| 476 | 0 | 432 | 14 | ## Client diff --git a/api_docs/charts.json b/api_docs/charts.json index 83a2a93df42a1..d6ad087ad1601 100644 --- a/api_docs/charts.json +++ b/api_docs/charts.json @@ -4266,4 +4266,4 @@ } ] } -} +} \ No newline at end of file diff --git a/api_docs/core.json b/api_docs/core.json index 5816b54efa62e..3e0ab71beb578 100644 --- a/api_docs/core.json +++ b/api_docs/core.json @@ -1603,7 +1603,7 @@ "label": "links", "description": [], "signature": [ - "{ readonly settings: string; readonly apm: { readonly kibanaSettings: string; readonly supportedServiceMaps: string; readonly customLinks: string; readonly droppedTransactionSpans: string; readonly upgrading: string; readonly metaData: string; }; readonly canvas: { readonly guide: string; }; readonly dashboard: { readonly guide: string; readonly drilldowns: string; readonly drilldownsTriggerPicker: string; readonly urlDrilldownTemplateSyntax: string; readonly urlDrilldownVariables: string; }; readonly discover: Record; readonly filebeat: { readonly base: string; readonly installation: string; readonly configuration: string; readonly elasticsearchOutput: string; readonly elasticsearchModule: string; readonly startup: string; readonly exportedFields: string; readonly suricataModule: string; readonly zeekModule: string; }; readonly auditbeat: { readonly base: string; readonly auditdModule: string; readonly systemModule: string; }; readonly metricbeat: { readonly base: string; readonly configure: string; readonly httpEndpoint: string; readonly install: string; readonly start: string; }; readonly enterpriseSearch: { readonly base: string; readonly appSearchBase: string; readonly workplaceSearchBase: string; }; readonly heartbeat: { readonly base: string; }; readonly libbeat: { readonly getStarted: string; }; readonly logstash: { readonly base: string; }; readonly functionbeat: { readonly base: string; }; readonly winlogbeat: { readonly base: string; }; readonly aggs: { readonly composite: string; readonly composite_missing_bucket: string; readonly date_histogram: string; readonly date_range: string; readonly date_format_pattern: string; readonly filter: string; readonly filters: string; readonly geohash_grid: string; readonly histogram: string; readonly ip_range: string; readonly range: string; readonly significant_terms: string; readonly terms: string; readonly avg: string; readonly avg_bucket: string; readonly max_bucket: string; readonly min_bucket: string; readonly sum_bucket: string; readonly cardinality: string; readonly count: string; readonly cumulative_sum: string; readonly derivative: string; readonly geo_bounds: string; readonly geo_centroid: string; readonly max: string; readonly median: string; readonly min: string; readonly moving_avg: string; readonly percentile_ranks: string; readonly serial_diff: string; readonly std_dev: string; readonly sum: string; readonly top_hits: string; }; readonly runtimeFields: { readonly overview: string; readonly mapping: string; }; readonly scriptedFields: { readonly scriptFields: string; readonly scriptAggs: string; readonly painless: string; readonly painlessApi: string; readonly painlessLangSpec: string; readonly painlessSyntax: string; readonly painlessWalkthrough: string; readonly luceneExpressions: string; }; readonly search: { readonly sessions: string; readonly sessionLimits: string; }; readonly indexPatterns: { readonly introduction: string; readonly fieldFormattersNumber: string; readonly fieldFormattersString: string; readonly runtimeFields: string; }; readonly addData: string; readonly kibana: string; readonly upgradeAssistant: { readonly overview: string; readonly batchReindex: string; }; readonly rollupJobs: string; readonly elasticsearch: Record; readonly siem: { readonly privileges: string; readonly guide: string; readonly gettingStarted: string; readonly ml: string; readonly ruleChangeLog: string; readonly detectionsReq: string; readonly networkMap: string; }; readonly query: { readonly eql: string; readonly kueryQuerySyntax: string; readonly luceneQuerySyntax: string; readonly percolate: string; readonly queryDsl: string; readonly autocompleteChanges: string; }; readonly date: { readonly dateMath: string; readonly dateMathIndexNames: string; }; readonly management: Record; readonly ml: Record; readonly transforms: Record; readonly visualize: Record; readonly apis: Readonly<{ bulkIndexAlias: string; byteSizeUnits: string; createAutoFollowPattern: string; createFollower: string; createIndex: string; createSnapshotLifecyclePolicy: string; createRoleMapping: string; createRoleMappingTemplates: string; createRollupJobsRequest: string; createApiKey: string; createPipeline: string; createTransformRequest: string; cronExpressions: string; executeWatchActionModes: string; indexExists: string; openIndex: string; putComponentTemplate: string; painlessExecute: string; painlessExecuteAPIContexts: string; putComponentTemplateMetadata: string; putSnapshotLifecyclePolicy: string; putIndexTemplateV1: string; putWatch: string; simulatePipeline: string; timeUnits: string; updateTransform: string; }>; readonly observability: Readonly<{ guide: string; infrastructureThreshold: string; logsThreshold: string; metricsThreshold: string; monitorStatus: string; monitorUptime: string; tlsCertificate: string; uptimeDurationAnomaly: string; }>; readonly alerting: Record; readonly maps: Record; readonly monitoring: Record; readonly security: Readonly<{ apiKeyServiceSettings: string; clusterPrivileges: string; elasticsearchSettings: string; elasticsearchEnableSecurity: string; indicesPrivileges: string; kibanaTLS: string; kibanaPrivileges: string; mappingRoles: string; mappingRolesFieldRules: string; runAsPrivilege: string; }>; readonly spaces: Readonly<{ kibanaLegacyUrlAliases: string; kibanaDisableLegacyUrlAliasesApi: string; }>; readonly watcher: Record; readonly ccs: Record; readonly plugins: Record; readonly snapshotRestore: Record; readonly ingest: Record; readonly fleet: Readonly<{ guide: string; fleetServer: string; fleetServerAddFleetServer: string; settings: string; settingsFleetServerHostSettings: string; troubleshooting: string; elasticAgent: string; datastreams: string; datastreamsNamingScheme: string; upgradeElasticAgent: string; upgradeElasticAgent712lower: string; learnMoreBlog: string; }>; readonly ecs: { readonly guide: string; }; readonly clients: { readonly guide: string; readonly goOverview: string; readonly javaIndex: string; readonly jsIntro: string; readonly netGuide: string; readonly perlGuide: string; readonly phpGuide: string; readonly pythonGuide: string; readonly rubyOverview: string; readonly rustGuide: string; }; }" + "{ readonly settings: string; readonly apm: { readonly kibanaSettings: string; readonly supportedServiceMaps: string; readonly customLinks: string; readonly droppedTransactionSpans: string; readonly upgrading: string; readonly metaData: string; }; readonly canvas: { readonly guide: string; }; readonly dashboard: { readonly guide: string; readonly drilldowns: string; readonly drilldownsTriggerPicker: string; readonly urlDrilldownTemplateSyntax: string; readonly urlDrilldownVariables: string; }; readonly discover: Record; readonly filebeat: { readonly base: string; readonly installation: string; readonly configuration: string; readonly elasticsearchOutput: string; readonly elasticsearchModule: string; readonly startup: string; readonly exportedFields: string; readonly suricataModule: string; readonly zeekModule: string; }; readonly auditbeat: { readonly base: string; readonly auditdModule: string; readonly systemModule: string; }; readonly metricbeat: { readonly base: string; readonly configure: string; readonly httpEndpoint: string; readonly install: string; readonly start: string; }; readonly enterpriseSearch: { readonly base: string; readonly appSearchBase: string; readonly workplaceSearchBase: string; }; readonly heartbeat: { readonly base: string; }; readonly libbeat: { readonly getStarted: string; }; readonly logstash: { readonly base: string; }; readonly functionbeat: { readonly base: string; }; readonly winlogbeat: { readonly base: string; }; readonly aggs: { readonly composite: string; readonly composite_missing_bucket: string; readonly date_histogram: string; readonly date_range: string; readonly date_format_pattern: string; readonly filter: string; readonly filters: string; readonly geohash_grid: string; readonly histogram: string; readonly ip_range: string; readonly range: string; readonly significant_terms: string; readonly terms: string; readonly avg: string; readonly avg_bucket: string; readonly max_bucket: string; readonly min_bucket: string; readonly sum_bucket: string; readonly cardinality: string; readonly count: string; readonly cumulative_sum: string; readonly derivative: string; readonly geo_bounds: string; readonly geo_centroid: string; readonly max: string; readonly median: string; readonly min: string; readonly moving_avg: string; readonly percentile_ranks: string; readonly serial_diff: string; readonly std_dev: string; readonly sum: string; readonly top_hits: string; }; readonly runtimeFields: { readonly overview: string; readonly mapping: string; }; readonly scriptedFields: { readonly scriptFields: string; readonly scriptAggs: string; readonly painless: string; readonly painlessApi: string; readonly painlessLangSpec: string; readonly painlessSyntax: string; readonly painlessWalkthrough: string; readonly luceneExpressions: string; }; readonly search: { readonly sessions: string; readonly sessionLimits: string; }; readonly indexPatterns: { readonly introduction: string; readonly fieldFormattersNumber: string; readonly fieldFormattersString: string; readonly runtimeFields: string; }; readonly addData: string; readonly kibana: string; readonly upgradeAssistant: { readonly overview: string; readonly batchReindex: string; }; readonly rollupJobs: string; readonly elasticsearch: Record; readonly siem: { readonly privileges: string; readonly guide: string; readonly gettingStarted: string; readonly ml: string; readonly ruleChangeLog: string; readonly detectionsReq: string; readonly networkMap: string; readonly troubleshootGaps: string; }; readonly securitySolution: { readonly trustedApps: string; }; readonly query: { readonly eql: string; readonly kueryQuerySyntax: string; readonly luceneQuerySyntax: string; readonly percolate: string; readonly queryDsl: string; readonly autocompleteChanges: string; }; readonly date: { readonly dateMath: string; readonly dateMathIndexNames: string; }; readonly management: Record; readonly ml: Record; readonly transforms: Record; readonly visualize: Record; readonly apis: Readonly<{ bulkIndexAlias: string; byteSizeUnits: string; createAutoFollowPattern: string; createFollower: string; createIndex: string; createSnapshotLifecyclePolicy: string; createRoleMapping: string; createRoleMappingTemplates: string; createRollupJobsRequest: string; createApiKey: string; createPipeline: string; createTransformRequest: string; cronExpressions: string; executeWatchActionModes: string; indexExists: string; openIndex: string; putComponentTemplate: string; painlessExecute: string; painlessExecuteAPIContexts: string; putComponentTemplateMetadata: string; putSnapshotLifecyclePolicy: string; putIndexTemplateV1: string; putWatch: string; simulatePipeline: string; timeUnits: string; updateTransform: string; }>; readonly observability: Readonly<{ guide: string; infrastructureThreshold: string; logsThreshold: string; metricsThreshold: string; monitorStatus: string; monitorUptime: string; tlsCertificate: string; uptimeDurationAnomaly: string; }>; readonly alerting: Record; readonly maps: Record; readonly monitoring: Record; readonly security: Readonly<{ apiKeyServiceSettings: string; clusterPrivileges: string; elasticsearchSettings: string; elasticsearchEnableSecurity: string; indicesPrivileges: string; kibanaTLS: string; kibanaPrivileges: string; mappingRoles: string; mappingRolesFieldRules: string; runAsPrivilege: string; }>; readonly spaces: Readonly<{ kibanaLegacyUrlAliases: string; kibanaDisableLegacyUrlAliasesApi: string; }>; readonly watcher: Record; readonly ccs: Record; readonly plugins: Record; readonly snapshotRestore: Record; readonly ingest: Record; readonly fleet: Readonly<{ guide: string; fleetServer: string; fleetServerAddFleetServer: string; settings: string; settingsFleetServerHostSettings: string; troubleshooting: string; elasticAgent: string; datastreams: string; datastreamsNamingScheme: string; upgradeElasticAgent: string; upgradeElasticAgent712lower: string; learnMoreBlog: string; apiKeysLearnMore: string; }>; readonly ecs: { readonly guide: string; }; readonly clients: { readonly guide: string; readonly goOverview: string; readonly javaIndex: string; readonly jsIntro: string; readonly netGuide: string; readonly perlGuide: string; readonly phpGuide: string; readonly pythonGuide: string; readonly rubyOverview: string; readonly rustGuide: string; }; }" ], "path": "src/core/public/doc_links/doc_links_service.ts", "deprecated": false @@ -2079,7 +2079,7 @@ "signature": [ "() => Readonly, \"type\" | \"options\" | \"description\" | \"name\" | \"order\" | \"value\" | \"category\" | \"optionLabels\" | \"requiresPageReload\" | \"readonly\" | \"sensitive\" | \"deprecation\" | \"metric\"> & ", + ", \"type\" | \"description\" | \"name\" | \"options\" | \"order\" | \"value\" | \"category\" | \"optionLabels\" | \"requiresPageReload\" | \"readonly\" | \"sensitive\" | \"deprecation\" | \"metric\"> & ", "UserProvidedValues", ">>" ], @@ -3265,7 +3265,7 @@ "label": "buttonColor", "description": [], "signature": [ - "\"warning\" | \"text\" | \"primary\" | \"success\" | \"danger\" | \"accent\" | \"secondary\" | \"ghost\" | undefined" + "\"text\" | \"primary\" | \"success\" | \"warning\" | \"danger\" | \"accent\" | \"secondary\" | \"ghost\" | undefined" ], "path": "src/core/public/overlays/modal/modal_service.tsx", "deprecated": false @@ -6622,7 +6622,7 @@ "\nA sub-set of {@link UiSettingsParams} exposed to the client-side." ], "signature": [ - "{ type?: \"string\" | \"number\" | \"boolean\" | \"undefined\" | \"color\" | \"json\" | \"image\" | \"markdown\" | \"select\" | \"array\" | undefined; options?: string[] | undefined; description?: string | undefined; name?: string | undefined; order?: number | undefined; value?: unknown; category?: string[] | undefined; optionLabels?: Record | undefined; requiresPageReload?: boolean | undefined; readonly?: boolean | undefined; sensitive?: boolean | undefined; deprecation?: ", + "{ type?: \"string\" | \"number\" | \"boolean\" | \"undefined\" | \"color\" | \"json\" | \"image\" | \"markdown\" | \"select\" | \"array\" | undefined; description?: string | undefined; name?: string | undefined; options?: string[] | undefined; order?: number | undefined; value?: unknown; category?: string[] | undefined; optionLabels?: Record | undefined; requiresPageReload?: boolean | undefined; readonly?: boolean | undefined; sensitive?: boolean | undefined; deprecation?: ", "DeprecationSettings", " | undefined; metric?: { type: ", { @@ -9627,7 +9627,7 @@ "corrective action needed to fix this deprecation." ], "signature": [ - "{ api?: { path: string; method: \"PUT\" | \"POST\"; body?: { [key: string]: any; } | undefined; } | undefined; manualSteps: string[]; }" + "{ api?: { path: string; method: \"PUT\" | \"POST\"; body?: { [key: string]: any; } | undefined; omitContextFromBody?: boolean | undefined; } | undefined; manualSteps: string[]; }" ], "path": "src/core/server/deprecations/types.ts", "deprecated": false @@ -10345,7 +10345,7 @@ "Headers used for authentication against Elasticsearch" ], "signature": [ - "{ accept?: string | string[] | undefined; \"accept-language\"?: string | string[] | undefined; \"accept-patch\"?: string | string[] | undefined; \"accept-ranges\"?: string | string[] | undefined; \"access-control-allow-credentials\"?: string | string[] | undefined; \"access-control-allow-headers\"?: string | string[] | undefined; \"access-control-allow-methods\"?: string | string[] | undefined; \"access-control-allow-origin\"?: string | string[] | undefined; \"access-control-expose-headers\"?: string | string[] | undefined; \"access-control-max-age\"?: string | string[] | undefined; \"access-control-request-headers\"?: string | string[] | undefined; \"access-control-request-method\"?: string | string[] | undefined; age?: string | string[] | undefined; allow?: string | string[] | undefined; \"alt-svc\"?: string | string[] | undefined; authorization?: string | string[] | undefined; \"cache-control\"?: string | string[] | undefined; connection?: string | string[] | undefined; \"content-disposition\"?: string | string[] | undefined; \"content-encoding\"?: string | string[] | undefined; \"content-language\"?: string | string[] | undefined; \"content-length\"?: string | string[] | undefined; \"content-location\"?: string | string[] | undefined; \"content-range\"?: string | string[] | undefined; \"content-type\"?: string | string[] | undefined; cookie?: string | string[] | undefined; date?: string | string[] | undefined; expect?: string | string[] | undefined; expires?: string | string[] | undefined; forwarded?: string | string[] | undefined; from?: string | string[] | undefined; host?: string | string[] | undefined; \"if-match\"?: string | string[] | undefined; \"if-modified-since\"?: string | string[] | undefined; \"if-none-match\"?: string | string[] | undefined; \"if-unmodified-since\"?: string | string[] | undefined; \"last-modified\"?: string | string[] | undefined; location?: string | string[] | undefined; origin?: string | string[] | undefined; pragma?: string | string[] | undefined; \"proxy-authenticate\"?: string | string[] | undefined; \"proxy-authorization\"?: string | string[] | undefined; \"public-key-pins\"?: string | string[] | undefined; range?: string | string[] | undefined; referer?: string | string[] | undefined; \"retry-after\"?: string | string[] | undefined; \"sec-websocket-accept\"?: string | string[] | undefined; \"sec-websocket-extensions\"?: string | string[] | undefined; \"sec-websocket-key\"?: string | string[] | undefined; \"sec-websocket-protocol\"?: string | string[] | undefined; \"sec-websocket-version\"?: string | string[] | undefined; \"set-cookie\"?: string | string[] | undefined; \"strict-transport-security\"?: string | string[] | undefined; tk?: string | string[] | undefined; trailer?: string | string[] | undefined; \"transfer-encoding\"?: string | string[] | undefined; upgrade?: string | string[] | undefined; \"user-agent\"?: string | string[] | undefined; vary?: string | string[] | undefined; via?: string | string[] | undefined; warning?: string | string[] | undefined; \"www-authenticate\"?: string | string[] | undefined; } & { [header: string]: string | string[] | undefined; }" + "{ from?: string | string[] | undefined; date?: string | string[] | undefined; origin?: string | string[] | undefined; range?: string | string[] | undefined; warning?: string | string[] | undefined; location?: string | string[] | undefined; allow?: string | string[] | undefined; accept?: string | string[] | undefined; \"accept-language\"?: string | string[] | undefined; \"accept-patch\"?: string | string[] | undefined; \"accept-ranges\"?: string | string[] | undefined; \"access-control-allow-credentials\"?: string | string[] | undefined; \"access-control-allow-headers\"?: string | string[] | undefined; \"access-control-allow-methods\"?: string | string[] | undefined; \"access-control-allow-origin\"?: string | string[] | undefined; \"access-control-expose-headers\"?: string | string[] | undefined; \"access-control-max-age\"?: string | string[] | undefined; \"access-control-request-headers\"?: string | string[] | undefined; \"access-control-request-method\"?: string | string[] | undefined; age?: string | string[] | undefined; \"alt-svc\"?: string | string[] | undefined; authorization?: string | string[] | undefined; \"cache-control\"?: string | string[] | undefined; connection?: string | string[] | undefined; \"content-disposition\"?: string | string[] | undefined; \"content-encoding\"?: string | string[] | undefined; \"content-language\"?: string | string[] | undefined; \"content-length\"?: string | string[] | undefined; \"content-location\"?: string | string[] | undefined; \"content-range\"?: string | string[] | undefined; \"content-type\"?: string | string[] | undefined; cookie?: string | string[] | undefined; expect?: string | string[] | undefined; expires?: string | string[] | undefined; forwarded?: string | string[] | undefined; host?: string | string[] | undefined; \"if-match\"?: string | string[] | undefined; \"if-modified-since\"?: string | string[] | undefined; \"if-none-match\"?: string | string[] | undefined; \"if-unmodified-since\"?: string | string[] | undefined; \"last-modified\"?: string | string[] | undefined; pragma?: string | string[] | undefined; \"proxy-authenticate\"?: string | string[] | undefined; \"proxy-authorization\"?: string | string[] | undefined; \"public-key-pins\"?: string | string[] | undefined; referer?: string | string[] | undefined; \"retry-after\"?: string | string[] | undefined; \"sec-websocket-accept\"?: string | string[] | undefined; \"sec-websocket-extensions\"?: string | string[] | undefined; \"sec-websocket-key\"?: string | string[] | undefined; \"sec-websocket-protocol\"?: string | string[] | undefined; \"sec-websocket-version\"?: string | string[] | undefined; \"set-cookie\"?: string | string[] | undefined; \"strict-transport-security\"?: string | string[] | undefined; tk?: string | string[] | undefined; trailer?: string | string[] | undefined; \"transfer-encoding\"?: string | string[] | undefined; upgrade?: string | string[] | undefined; \"user-agent\"?: string | string[] | undefined; vary?: string | string[] | undefined; via?: string | string[] | undefined; \"www-authenticate\"?: string | string[] | undefined; } & { [header: string]: string | string[] | undefined; }" ], "path": "src/core/server/elasticsearch/types.ts", "deprecated": false @@ -10390,25 +10390,7 @@ "label": "savedObjectsClient", "description": [], "signature": [ - "{ get: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" - }, - ") => Promise<", - "SavedObject", - ">; delete: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsDeleteOptions", - "text": "SavedObjectsDeleteOptions" - }, - ") => Promise<{}>; create: (type: string, attributes: T, options?: ", + "{ create: (type: string, attributes: T, options?: ", { "pluginId": "core", "scope": "server", @@ -10466,7 +10448,15 @@ "section": "def-server.SavedObjectsCheckConflictsResponse", "text": "SavedObjectsCheckConflictsResponse" }, - ">; find: (options: ", + ">; delete: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsDeleteOptions", + "text": "SavedObjectsDeleteOptions" + }, + ") => Promise<{}>; find: (options: ", { "pluginId": "core", "scope": "server", @@ -10530,6 +10520,16 @@ "section": "def-server.SavedObjectsBulkResolveResponse", "text": "SavedObjectsBulkResolveResponse" }, + ">; get: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsBaseOptions", + "text": "SavedObjectsBaseOptions" + }, + ") => Promise<", + "SavedObject", ">; resolve: (type: string, id: string, options?: ", { "pluginId": "core", @@ -11334,7 +11334,7 @@ "\nHTTP Headers with additional information about response." ], "signature": [ - "Record<\"accept\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"allow\" | \"alt-svc\" | \"authorization\" | \"cache-control\" | \"connection\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"date\" | \"expect\" | \"expires\" | \"forwarded\" | \"from\" | \"host\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"location\" | \"origin\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"range\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"warning\" | \"www-authenticate\", string | string[]> | Record | undefined" + "Record<\"from\" | \"date\" | \"origin\" | \"range\" | \"warning\" | \"location\" | \"allow\" | \"accept\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"alt-svc\" | \"authorization\" | \"cache-control\" | \"connection\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"expect\" | \"expires\" | \"forwarded\" | \"host\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"www-authenticate\", string | string[]> | Record | undefined" ], "path": "src/core/server/http_resources/types.ts", "deprecated": false @@ -11646,7 +11646,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", @@ -12858,7 +12858,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", @@ -12883,7 +12883,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", @@ -12923,7 +12923,7 @@ "signature": [ "() => Readonly, \"type\" | \"options\" | \"description\" | \"name\" | \"order\" | \"value\" | \"category\" | \"optionLabels\" | \"requiresPageReload\" | \"readonly\" | \"sensitive\" | \"deprecation\" | \"metric\">>>" + ", \"type\" | \"description\" | \"name\" | \"options\" | \"order\" | \"value\" | \"category\" | \"optionLabels\" | \"requiresPageReload\" | \"readonly\" | \"sensitive\" | \"deprecation\" | \"metric\">>>" ], "path": "src/core/server/ui_settings/types.ts", "deprecated": false, @@ -15382,7 +15382,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">; typeRegistry: Pick<", + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">; typeRegistry: Pick<", { "pluginId": "core", "scope": "server", @@ -15406,7 +15406,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">; getExporter: (client: Pick<", + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">; getExporter: (client: Pick<", { "pluginId": "core", "scope": "server", @@ -15414,7 +15414,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">) => Pick<", + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">) => Pick<", { "pluginId": "core", "scope": "server", @@ -15430,7 +15430,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">) => Pick<", + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">) => Pick<", { "pluginId": "core", "scope": "server", @@ -16611,7 +16611,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">) => ", + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">) => ", { "pluginId": "core", "scope": "server", @@ -16639,7 +16639,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">" + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">" ], "path": "src/core/server/ui_settings/types.ts", "deprecated": false, @@ -17159,7 +17159,7 @@ "label": "EcsEventCategory", "description": [], "signature": [ - "\"host\" | \"network\" | \"web\" | \"database\" | \"package\" | \"session\" | \"file\" | \"registry\" | \"process\" | \"authentication\" | \"configuration\" | \"driver\" | \"iam\" | \"intrusion_detection\" | \"malware\"" + "\"network\" | \"web\" | \"database\" | \"package\" | \"host\" | \"session\" | \"file\" | \"registry\" | \"process\" | \"authentication\" | \"configuration\" | \"driver\" | \"iam\" | \"intrusion_detection\" | \"malware\"" ], "path": "node_modules/@kbn/logging/target_types/ecs/event.d.ts", "deprecated": false, @@ -17201,7 +17201,7 @@ "label": "EcsEventType", "description": [], "signature": [ - "\"start\" | \"connection\" | \"end\" | \"user\" | \"error\" | \"info\" | \"group\" | \"protocol\" | \"access\" | \"admin\" | \"allowed\" | \"change\" | \"creation\" | \"deletion\" | \"denied\" | \"installation\"" + "\"start\" | \"end\" | \"user\" | \"error\" | \"info\" | \"connection\" | \"group\" | \"protocol\" | \"access\" | \"admin\" | \"allowed\" | \"change\" | \"creation\" | \"deletion\" | \"denied\" | \"installation\"" ], "path": "node_modules/@kbn/logging/target_types/ecs/event.d.ts", "deprecated": false, @@ -17219,7 +17219,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", @@ -18366,7 +18366,7 @@ "\nA sub-set of {@link UiSettingsParams} exposed to the client-side." ], "signature": [ - "{ type?: \"string\" | \"number\" | \"boolean\" | \"undefined\" | \"color\" | \"json\" | \"image\" | \"markdown\" | \"select\" | \"array\" | undefined; options?: string[] | undefined; description?: string | undefined; name?: string | undefined; order?: number | undefined; value?: unknown; category?: string[] | undefined; optionLabels?: Record | undefined; requiresPageReload?: boolean | undefined; readonly?: boolean | undefined; sensitive?: boolean | undefined; deprecation?: ", + "{ type?: \"string\" | \"number\" | \"boolean\" | \"undefined\" | \"color\" | \"json\" | \"image\" | \"markdown\" | \"select\" | \"array\" | undefined; description?: string | undefined; name?: string | undefined; options?: string[] | undefined; order?: number | undefined; value?: unknown; category?: string[] | undefined; optionLabels?: Record | undefined; requiresPageReload?: boolean | undefined; readonly?: boolean | undefined; sensitive?: boolean | undefined; deprecation?: ", "DeprecationSettings", " | undefined; metric?: { type: ", { diff --git a/api_docs/core_chrome.json b/api_docs/core_chrome.json index ad2f2de7c9d22..fef73f7abb9e7 100644 --- a/api_docs/core_chrome.json +++ b/api_docs/core_chrome.json @@ -1966,7 +1966,7 @@ "description": [], "signature": [ "CommonProps", - " & { text: React.ReactNode; href?: string | undefined; onClick?: ((event: React.MouseEvent) => void) | undefined; truncate?: boolean | undefined; 'aria-current'?: boolean | \"date\" | \"location\" | \"page\" | \"time\" | \"true\" | \"false\" | \"step\" | undefined; }" + " & { text: React.ReactNode; href?: string | undefined; onClick?: ((event: React.MouseEvent) => void) | undefined; truncate?: boolean | undefined; 'aria-current'?: boolean | \"date\" | \"page\" | \"time\" | \"true\" | \"false\" | \"step\" | \"location\" | undefined; }" ], "path": "src/core/public/chrome/types.ts", "deprecated": false, diff --git a/api_docs/core_http.json b/api_docs/core_http.json index 457d512e8df4a..bbf002fadb18d 100644 --- a/api_docs/core_http.json +++ b/api_docs/core_http.json @@ -2286,7 +2286,7 @@ "\nReadonly copy of incoming request headers." ], "signature": [ - "{ accept?: string | string[] | undefined; \"accept-language\"?: string | string[] | undefined; \"accept-patch\"?: string | string[] | undefined; \"accept-ranges\"?: string | string[] | undefined; \"access-control-allow-credentials\"?: string | string[] | undefined; \"access-control-allow-headers\"?: string | string[] | undefined; \"access-control-allow-methods\"?: string | string[] | undefined; \"access-control-allow-origin\"?: string | string[] | undefined; \"access-control-expose-headers\"?: string | string[] | undefined; \"access-control-max-age\"?: string | string[] | undefined; \"access-control-request-headers\"?: string | string[] | undefined; \"access-control-request-method\"?: string | string[] | undefined; age?: string | string[] | undefined; allow?: string | string[] | undefined; \"alt-svc\"?: string | string[] | undefined; authorization?: string | string[] | undefined; \"cache-control\"?: string | string[] | undefined; connection?: string | string[] | undefined; \"content-disposition\"?: string | string[] | undefined; \"content-encoding\"?: string | string[] | undefined; \"content-language\"?: string | string[] | undefined; \"content-length\"?: string | string[] | undefined; \"content-location\"?: string | string[] | undefined; \"content-range\"?: string | string[] | undefined; \"content-type\"?: string | string[] | undefined; cookie?: string | string[] | undefined; date?: string | string[] | undefined; expect?: string | string[] | undefined; expires?: string | string[] | undefined; forwarded?: string | string[] | undefined; from?: string | string[] | undefined; host?: string | string[] | undefined; \"if-match\"?: string | string[] | undefined; \"if-modified-since\"?: string | string[] | undefined; \"if-none-match\"?: string | string[] | undefined; \"if-unmodified-since\"?: string | string[] | undefined; \"last-modified\"?: string | string[] | undefined; location?: string | string[] | undefined; origin?: string | string[] | undefined; pragma?: string | string[] | undefined; \"proxy-authenticate\"?: string | string[] | undefined; \"proxy-authorization\"?: string | string[] | undefined; \"public-key-pins\"?: string | string[] | undefined; range?: string | string[] | undefined; referer?: string | string[] | undefined; \"retry-after\"?: string | string[] | undefined; \"sec-websocket-accept\"?: string | string[] | undefined; \"sec-websocket-extensions\"?: string | string[] | undefined; \"sec-websocket-key\"?: string | string[] | undefined; \"sec-websocket-protocol\"?: string | string[] | undefined; \"sec-websocket-version\"?: string | string[] | undefined; \"set-cookie\"?: string | string[] | undefined; \"strict-transport-security\"?: string | string[] | undefined; tk?: string | string[] | undefined; trailer?: string | string[] | undefined; \"transfer-encoding\"?: string | string[] | undefined; upgrade?: string | string[] | undefined; \"user-agent\"?: string | string[] | undefined; vary?: string | string[] | undefined; via?: string | string[] | undefined; warning?: string | string[] | undefined; \"www-authenticate\"?: string | string[] | undefined; } & { [header: string]: string | string[] | undefined; }" + "{ from?: string | string[] | undefined; date?: string | string[] | undefined; origin?: string | string[] | undefined; range?: string | string[] | undefined; warning?: string | string[] | undefined; location?: string | string[] | undefined; allow?: string | string[] | undefined; accept?: string | string[] | undefined; \"accept-language\"?: string | string[] | undefined; \"accept-patch\"?: string | string[] | undefined; \"accept-ranges\"?: string | string[] | undefined; \"access-control-allow-credentials\"?: string | string[] | undefined; \"access-control-allow-headers\"?: string | string[] | undefined; \"access-control-allow-methods\"?: string | string[] | undefined; \"access-control-allow-origin\"?: string | string[] | undefined; \"access-control-expose-headers\"?: string | string[] | undefined; \"access-control-max-age\"?: string | string[] | undefined; \"access-control-request-headers\"?: string | string[] | undefined; \"access-control-request-method\"?: string | string[] | undefined; age?: string | string[] | undefined; \"alt-svc\"?: string | string[] | undefined; authorization?: string | string[] | undefined; \"cache-control\"?: string | string[] | undefined; connection?: string | string[] | undefined; \"content-disposition\"?: string | string[] | undefined; \"content-encoding\"?: string | string[] | undefined; \"content-language\"?: string | string[] | undefined; \"content-length\"?: string | string[] | undefined; \"content-location\"?: string | string[] | undefined; \"content-range\"?: string | string[] | undefined; \"content-type\"?: string | string[] | undefined; cookie?: string | string[] | undefined; expect?: string | string[] | undefined; expires?: string | string[] | undefined; forwarded?: string | string[] | undefined; host?: string | string[] | undefined; \"if-match\"?: string | string[] | undefined; \"if-modified-since\"?: string | string[] | undefined; \"if-none-match\"?: string | string[] | undefined; \"if-unmodified-since\"?: string | string[] | undefined; \"last-modified\"?: string | string[] | undefined; pragma?: string | string[] | undefined; \"proxy-authenticate\"?: string | string[] | undefined; \"proxy-authorization\"?: string | string[] | undefined; \"public-key-pins\"?: string | string[] | undefined; referer?: string | string[] | undefined; \"retry-after\"?: string | string[] | undefined; \"sec-websocket-accept\"?: string | string[] | undefined; \"sec-websocket-extensions\"?: string | string[] | undefined; \"sec-websocket-key\"?: string | string[] | undefined; \"sec-websocket-protocol\"?: string | string[] | undefined; \"sec-websocket-version\"?: string | string[] | undefined; \"set-cookie\"?: string | string[] | undefined; \"strict-transport-security\"?: string | string[] | undefined; tk?: string | string[] | undefined; trailer?: string | string[] | undefined; \"transfer-encoding\"?: string | string[] | undefined; upgrade?: string | string[] | undefined; \"user-agent\"?: string | string[] | undefined; vary?: string | string[] | undefined; via?: string | string[] | undefined; \"www-authenticate\"?: string | string[] | undefined; } & { [header: string]: string | string[] | undefined; }" ], "path": "src/core/server/http/router/request.ts", "deprecated": false @@ -2697,7 +2697,7 @@ "\nHeaders to attach for auth redirect.\nMust include \"location\" header" ], "signature": [ - "({ location: string; } & Record<\"accept\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"allow\" | \"alt-svc\" | \"authorization\" | \"cache-control\" | \"connection\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"date\" | \"expect\" | \"expires\" | \"forwarded\" | \"from\" | \"host\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"location\" | \"origin\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"range\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"warning\" | \"www-authenticate\", string | string[]>) | ({ location: string; } & Record)" + "({ location: string; } & Record<\"from\" | \"date\" | \"origin\" | \"range\" | \"warning\" | \"location\" | \"allow\" | \"accept\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"alt-svc\" | \"authorization\" | \"cache-control\" | \"connection\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"expect\" | \"expires\" | \"forwarded\" | \"host\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"www-authenticate\", string | string[]>) | ({ location: string; } & Record)" ], "path": "src/core/server/http/lifecycle/auth.ts", "deprecated": false @@ -2863,7 +2863,7 @@ "\nRedirects user to another location to complete authentication when authRequired: true\nAllows user to access a resource without redirection when authRequired: 'optional'" ], "signature": [ - "(headers: ({ location: string; } & Record<\"accept\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"allow\" | \"alt-svc\" | \"authorization\" | \"cache-control\" | \"connection\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"date\" | \"expect\" | \"expires\" | \"forwarded\" | \"from\" | \"host\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"location\" | \"origin\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"range\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"warning\" | \"www-authenticate\", string | string[]>) | ({ location: string; } & Record)) => ", + "(headers: ({ location: string; } & Record<\"from\" | \"date\" | \"origin\" | \"range\" | \"warning\" | \"location\" | \"allow\" | \"accept\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"alt-svc\" | \"authorization\" | \"cache-control\" | \"connection\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"expect\" | \"expires\" | \"forwarded\" | \"host\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"www-authenticate\", string | string[]>) | ({ location: string; } & Record)) => ", { "pluginId": "core", "scope": "server", @@ -2883,7 +2883,7 @@ "label": "headers", "description": [], "signature": [ - "({ location: string; } & Record<\"accept\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"allow\" | \"alt-svc\" | \"authorization\" | \"cache-control\" | \"connection\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"date\" | \"expect\" | \"expires\" | \"forwarded\" | \"from\" | \"host\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"location\" | \"origin\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"range\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"warning\" | \"www-authenticate\", string | string[]>) | ({ location: string; } & Record)" + "({ location: string; } & Record<\"from\" | \"date\" | \"origin\" | \"range\" | \"warning\" | \"location\" | \"allow\" | \"accept\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"alt-svc\" | \"authorization\" | \"cache-control\" | \"connection\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"expect\" | \"expires\" | \"forwarded\" | \"host\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"www-authenticate\", string | string[]>) | ({ location: string; } & Record)" ], "path": "src/core/server/http/lifecycle/auth.ts", "deprecated": false, @@ -2942,7 +2942,7 @@ "HTTP Headers with additional information about response" ], "signature": [ - "Record<\"accept\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"allow\" | \"alt-svc\" | \"authorization\" | \"cache-control\" | \"connection\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"date\" | \"expect\" | \"expires\" | \"forwarded\" | \"from\" | \"host\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"location\" | \"origin\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"range\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"warning\" | \"www-authenticate\", string | string[]> | Record | undefined" + "Record<\"from\" | \"date\" | \"origin\" | \"range\" | \"warning\" | \"location\" | \"allow\" | \"accept\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"alt-svc\" | \"authorization\" | \"cache-control\" | \"connection\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"expect\" | \"expires\" | \"forwarded\" | \"host\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"www-authenticate\", string | string[]> | Record | undefined" ], "path": "src/core/server/http/router/response.ts", "deprecated": false @@ -3012,7 +3012,7 @@ "HTTP Headers with additional information about response" ], "signature": [ - "Record<\"accept\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"allow\" | \"alt-svc\" | \"authorization\" | \"cache-control\" | \"connection\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"date\" | \"expect\" | \"expires\" | \"forwarded\" | \"from\" | \"host\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"location\" | \"origin\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"range\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"warning\" | \"www-authenticate\", string | string[]> | Record | undefined" + "Record<\"from\" | \"date\" | \"origin\" | \"range\" | \"warning\" | \"location\" | \"allow\" | \"accept\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"alt-svc\" | \"authorization\" | \"cache-control\" | \"connection\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"expect\" | \"expires\" | \"forwarded\" | \"host\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"www-authenticate\", string | string[]> | Record | undefined" ], "path": "src/core/server/http/router/response.ts", "deprecated": false @@ -3172,7 +3172,7 @@ "HTTP Headers with additional information about response" ], "signature": [ - "Record<\"accept\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"allow\" | \"alt-svc\" | \"authorization\" | \"cache-control\" | \"connection\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"date\" | \"expect\" | \"expires\" | \"forwarded\" | \"from\" | \"host\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"location\" | \"origin\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"range\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"warning\" | \"www-authenticate\", string | string[]> | Record | undefined" + "Record<\"from\" | \"date\" | \"origin\" | \"range\" | \"warning\" | \"location\" | \"allow\" | \"accept\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"alt-svc\" | \"authorization\" | \"cache-control\" | \"connection\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"expect\" | \"expires\" | \"forwarded\" | \"host\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"www-authenticate\", string | string[]> | Record | undefined" ], "path": "src/core/server/http/router/response.ts", "deprecated": false @@ -7505,7 +7505,7 @@ "additional headers to attach to the response" ], "signature": [ - "Record<\"accept\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"allow\" | \"alt-svc\" | \"authorization\" | \"cache-control\" | \"connection\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"date\" | \"expect\" | \"expires\" | \"forwarded\" | \"from\" | \"host\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"location\" | \"origin\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"range\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"warning\" | \"www-authenticate\", string | string[]> | Record | undefined" + "Record<\"from\" | \"date\" | \"origin\" | \"range\" | \"warning\" | \"location\" | \"allow\" | \"accept\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"alt-svc\" | \"authorization\" | \"cache-control\" | \"connection\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"expect\" | \"expires\" | \"forwarded\" | \"host\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"www-authenticate\", string | string[]> | Record | undefined" ], "path": "src/core/server/http/lifecycle/on_pre_response.ts", "deprecated": false @@ -7560,7 +7560,7 @@ "additional headers to attach to the response" ], "signature": [ - "Record<\"accept\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"allow\" | \"alt-svc\" | \"authorization\" | \"cache-control\" | \"connection\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"date\" | \"expect\" | \"expires\" | \"forwarded\" | \"from\" | \"host\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"location\" | \"origin\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"range\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"warning\" | \"www-authenticate\", string | string[]> | Record | undefined" + "Record<\"from\" | \"date\" | \"origin\" | \"range\" | \"warning\" | \"location\" | \"allow\" | \"accept\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"alt-svc\" | \"authorization\" | \"cache-control\" | \"connection\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"expect\" | \"expires\" | \"forwarded\" | \"host\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"www-authenticate\", string | string[]> | Record | undefined" ], "path": "src/core/server/http/lifecycle/on_pre_response.ts", "deprecated": false @@ -9130,7 +9130,7 @@ "\nSet of HTTP methods changing the state of the server." ], "signature": [ - "\"post\" | \"put\" | \"delete\" | \"patch\"" + "\"delete\" | \"post\" | \"put\" | \"patch\"" ], "path": "src/core/server/http/router/route.ts", "deprecated": false, @@ -9252,7 +9252,7 @@ "\nHttp request headers to read." ], "signature": [ - "{ accept?: string | string[] | undefined; \"accept-language\"?: string | string[] | undefined; \"accept-patch\"?: string | string[] | undefined; \"accept-ranges\"?: string | string[] | undefined; \"access-control-allow-credentials\"?: string | string[] | undefined; \"access-control-allow-headers\"?: string | string[] | undefined; \"access-control-allow-methods\"?: string | string[] | undefined; \"access-control-allow-origin\"?: string | string[] | undefined; \"access-control-expose-headers\"?: string | string[] | undefined; \"access-control-max-age\"?: string | string[] | undefined; \"access-control-request-headers\"?: string | string[] | undefined; \"access-control-request-method\"?: string | string[] | undefined; age?: string | string[] | undefined; allow?: string | string[] | undefined; \"alt-svc\"?: string | string[] | undefined; authorization?: string | string[] | undefined; \"cache-control\"?: string | string[] | undefined; connection?: string | string[] | undefined; \"content-disposition\"?: string | string[] | undefined; \"content-encoding\"?: string | string[] | undefined; \"content-language\"?: string | string[] | undefined; \"content-length\"?: string | string[] | undefined; \"content-location\"?: string | string[] | undefined; \"content-range\"?: string | string[] | undefined; \"content-type\"?: string | string[] | undefined; cookie?: string | string[] | undefined; date?: string | string[] | undefined; expect?: string | string[] | undefined; expires?: string | string[] | undefined; forwarded?: string | string[] | undefined; from?: string | string[] | undefined; host?: string | string[] | undefined; \"if-match\"?: string | string[] | undefined; \"if-modified-since\"?: string | string[] | undefined; \"if-none-match\"?: string | string[] | undefined; \"if-unmodified-since\"?: string | string[] | undefined; \"last-modified\"?: string | string[] | undefined; location?: string | string[] | undefined; origin?: string | string[] | undefined; pragma?: string | string[] | undefined; \"proxy-authenticate\"?: string | string[] | undefined; \"proxy-authorization\"?: string | string[] | undefined; \"public-key-pins\"?: string | string[] | undefined; range?: string | string[] | undefined; referer?: string | string[] | undefined; \"retry-after\"?: string | string[] | undefined; \"sec-websocket-accept\"?: string | string[] | undefined; \"sec-websocket-extensions\"?: string | string[] | undefined; \"sec-websocket-key\"?: string | string[] | undefined; \"sec-websocket-protocol\"?: string | string[] | undefined; \"sec-websocket-version\"?: string | string[] | undefined; \"set-cookie\"?: string | string[] | undefined; \"strict-transport-security\"?: string | string[] | undefined; tk?: string | string[] | undefined; trailer?: string | string[] | undefined; \"transfer-encoding\"?: string | string[] | undefined; upgrade?: string | string[] | undefined; \"user-agent\"?: string | string[] | undefined; vary?: string | string[] | undefined; via?: string | string[] | undefined; warning?: string | string[] | undefined; \"www-authenticate\"?: string | string[] | undefined; } & { [header: string]: string | string[] | undefined; }" + "{ from?: string | string[] | undefined; date?: string | string[] | undefined; origin?: string | string[] | undefined; range?: string | string[] | undefined; warning?: string | string[] | undefined; location?: string | string[] | undefined; allow?: string | string[] | undefined; accept?: string | string[] | undefined; \"accept-language\"?: string | string[] | undefined; \"accept-patch\"?: string | string[] | undefined; \"accept-ranges\"?: string | string[] | undefined; \"access-control-allow-credentials\"?: string | string[] | undefined; \"access-control-allow-headers\"?: string | string[] | undefined; \"access-control-allow-methods\"?: string | string[] | undefined; \"access-control-allow-origin\"?: string | string[] | undefined; \"access-control-expose-headers\"?: string | string[] | undefined; \"access-control-max-age\"?: string | string[] | undefined; \"access-control-request-headers\"?: string | string[] | undefined; \"access-control-request-method\"?: string | string[] | undefined; age?: string | string[] | undefined; \"alt-svc\"?: string | string[] | undefined; authorization?: string | string[] | undefined; \"cache-control\"?: string | string[] | undefined; connection?: string | string[] | undefined; \"content-disposition\"?: string | string[] | undefined; \"content-encoding\"?: string | string[] | undefined; \"content-language\"?: string | string[] | undefined; \"content-length\"?: string | string[] | undefined; \"content-location\"?: string | string[] | undefined; \"content-range\"?: string | string[] | undefined; \"content-type\"?: string | string[] | undefined; cookie?: string | string[] | undefined; expect?: string | string[] | undefined; expires?: string | string[] | undefined; forwarded?: string | string[] | undefined; host?: string | string[] | undefined; \"if-match\"?: string | string[] | undefined; \"if-modified-since\"?: string | string[] | undefined; \"if-none-match\"?: string | string[] | undefined; \"if-unmodified-since\"?: string | string[] | undefined; \"last-modified\"?: string | string[] | undefined; pragma?: string | string[] | undefined; \"proxy-authenticate\"?: string | string[] | undefined; \"proxy-authorization\"?: string | string[] | undefined; \"public-key-pins\"?: string | string[] | undefined; referer?: string | string[] | undefined; \"retry-after\"?: string | string[] | undefined; \"sec-websocket-accept\"?: string | string[] | undefined; \"sec-websocket-extensions\"?: string | string[] | undefined; \"sec-websocket-key\"?: string | string[] | undefined; \"sec-websocket-protocol\"?: string | string[] | undefined; \"sec-websocket-version\"?: string | string[] | undefined; \"set-cookie\"?: string | string[] | undefined; \"strict-transport-security\"?: string | string[] | undefined; tk?: string | string[] | undefined; trailer?: string | string[] | undefined; \"transfer-encoding\"?: string | string[] | undefined; upgrade?: string | string[] | undefined; \"user-agent\"?: string | string[] | undefined; vary?: string | string[] | undefined; via?: string | string[] | undefined; \"www-authenticate\"?: string | string[] | undefined; } & { [header: string]: string | string[] | undefined; }" ], "path": "src/core/server/http/router/headers.ts", "deprecated": false, @@ -9595,7 +9595,7 @@ "\nSet of well-known HTTP headers." ], "signature": [ - "\"accept\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"allow\" | \"alt-svc\" | \"authorization\" | \"cache-control\" | \"connection\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"date\" | \"expect\" | \"expires\" | \"forwarded\" | \"from\" | \"host\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"location\" | \"origin\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"range\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"warning\" | \"www-authenticate\"" + "\"from\" | \"date\" | \"origin\" | \"range\" | \"warning\" | \"location\" | \"allow\" | \"accept\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"alt-svc\" | \"authorization\" | \"cache-control\" | \"connection\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"expect\" | \"expires\" | \"forwarded\" | \"host\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"www-authenticate\"" ], "path": "src/core/server/http/router/headers.ts", "deprecated": false, @@ -11965,7 +11965,7 @@ "\nHttp response headers to set." ], "signature": [ - "Record<\"accept\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"allow\" | \"alt-svc\" | \"authorization\" | \"cache-control\" | \"connection\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"date\" | \"expect\" | \"expires\" | \"forwarded\" | \"from\" | \"host\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"location\" | \"origin\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"range\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"warning\" | \"www-authenticate\", string | string[]> | Record" + "Record<\"from\" | \"date\" | \"origin\" | \"range\" | \"warning\" | \"location\" | \"allow\" | \"accept\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"alt-svc\" | \"authorization\" | \"cache-control\" | \"connection\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"expect\" | \"expires\" | \"forwarded\" | \"host\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"www-authenticate\", string | string[]> | Record" ], "path": "src/core/server/http/router/headers.ts", "deprecated": false, @@ -11997,7 +11997,7 @@ "\nThe set of common HTTP methods supported by Kibana routing." ], "signature": [ - "\"get\" | \"options\" | \"post\" | \"put\" | \"delete\" | \"patch\"" + "\"options\" | \"delete\" | \"get\" | \"post\" | \"put\" | \"patch\"" ], "path": "src/core/server/http/router/route.ts", "deprecated": false, @@ -12638,7 +12638,7 @@ "\nSet of HTTP methods not changing the state of the server." ], "signature": [ - "\"get\" | \"options\"" + "\"options\" | \"get\"" ], "path": "src/core/server/http/router/route.ts", "deprecated": false, diff --git a/api_docs/core_saved_objects.json b/api_docs/core_saved_objects.json index f5b601e346dec..2cc7c8b44a804 100644 --- a/api_docs/core_saved_objects.json +++ b/api_docs/core_saved_objects.json @@ -847,7 +847,7 @@ "section": "def-public.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"bulkUpdate\">" + ", \"create\" | \"bulkCreate\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"bulkUpdate\">" ], "path": "src/core/public/saved_objects/simple_saved_object.ts", "deprecated": false, @@ -1513,17 +1513,7 @@ "{@link SavedObjectsClient}" ], "signature": [ - "{ get: (type: string, id: string) => Promise<", - { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-public.SimpleSavedObject", - "text": "SimpleSavedObject" - }, - ">; delete: (type: string, id: string, options?: ", - "SavedObjectsDeleteOptions", - " | undefined) => Promise<{}>; create: (type: string, attributes: T, options?: ", + "{ create: (type: string, attributes: T, options?: ", { "pluginId": "core", "scope": "public", @@ -1563,7 +1553,9 @@ "section": "def-public.SavedObjectsBatchResponse", "text": "SavedObjectsBatchResponse" }, - ">; find: (options: Pick<", + ">; delete: (type: string, id: string, options?: ", + "SavedObjectsDeleteOptions", + " | undefined) => Promise<{}>; find: (options: Pick<", { "pluginId": "core", "scope": "server", @@ -1595,7 +1587,15 @@ "section": "def-public.ResolvedSimpleSavedObject", "text": "ResolvedSimpleSavedObject" }, - "[]; }>; resolve: (type: string, id: string) => Promise<", + "[]; }>; get: (type: string, id: string) => Promise<", + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SimpleSavedObject", + "text": "SimpleSavedObject" + }, + ">; resolve: (type: string, id: string) => Promise<", { "pluginId": "core", "scope": "public", @@ -1719,17 +1719,7 @@ "\nSavedObjectsClientContract as implemented by the {@link SavedObjectsClient}\n" ], "signature": [ - "{ get: (type: string, id: string) => Promise<", - { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-public.SimpleSavedObject", - "text": "SimpleSavedObject" - }, - ">; delete: (type: string, id: string, options?: ", - "SavedObjectsDeleteOptions", - " | undefined) => Promise<{}>; create: (type: string, attributes: T, options?: ", + "{ create: (type: string, attributes: T, options?: ", { "pluginId": "core", "scope": "public", @@ -1769,7 +1759,9 @@ "section": "def-public.SavedObjectsBatchResponse", "text": "SavedObjectsBatchResponse" }, - ">; find: (options: Pick<", + ">; delete: (type: string, id: string, options?: ", + "SavedObjectsDeleteOptions", + " | undefined) => Promise<{}>; find: (options: Pick<", { "pluginId": "core", "scope": "server", @@ -1801,7 +1793,15 @@ "section": "def-public.ResolvedSimpleSavedObject", "text": "ResolvedSimpleSavedObject" }, - "[]; }>; resolve: (type: string, id: string) => Promise<", + "[]; }>; get: (type: string, id: string) => Promise<", + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SimpleSavedObject", + "text": "SimpleSavedObject" + }, + ">; resolve: (type: string, id: string) => Promise<", { "pluginId": "core", "scope": "public", @@ -4493,25 +4493,7 @@ "label": "#savedObjectsClient", "description": [], "signature": [ - "{ get: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" - }, - ") => Promise<", - "SavedObject", - ">; delete: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsDeleteOptions", - "text": "SavedObjectsDeleteOptions" - }, - ") => Promise<{}>; create: (type: string, attributes: T, options?: ", + "{ create: (type: string, attributes: T, options?: ", { "pluginId": "core", "scope": "server", @@ -4569,7 +4551,15 @@ "section": "def-server.SavedObjectsCheckConflictsResponse", "text": "SavedObjectsCheckConflictsResponse" }, - ">; find: (options: ", + ">; delete: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsDeleteOptions", + "text": "SavedObjectsDeleteOptions" + }, + ") => Promise<{}>; find: (options: ", { "pluginId": "core", "scope": "server", @@ -4633,6 +4623,16 @@ "section": "def-server.SavedObjectsBulkResolveResponse", "text": "SavedObjectsBulkResolveResponse" }, + ">; get: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsBaseOptions", + "text": "SavedObjectsBaseOptions" + }, + ") => Promise<", + "SavedObject", ">; resolve: (type: string, id: string, options?: ", { "pluginId": "core", @@ -4927,25 +4927,7 @@ "label": "savedObjectsClient", "description": [], "signature": [ - "{ get: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" - }, - ") => Promise<", - "SavedObject", - ">; delete: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsDeleteOptions", - "text": "SavedObjectsDeleteOptions" - }, - ") => Promise<{}>; create: (type: string, attributes: T, options?: ", + "{ create: (type: string, attributes: T, options?: ", { "pluginId": "core", "scope": "server", @@ -5003,7 +4985,15 @@ "section": "def-server.SavedObjectsCheckConflictsResponse", "text": "SavedObjectsCheckConflictsResponse" }, - ">; find: (options: ", + ">; delete: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsDeleteOptions", + "text": "SavedObjectsDeleteOptions" + }, + ") => Promise<{}>; find: (options: ", { "pluginId": "core", "scope": "server", @@ -5067,6 +5057,16 @@ "section": "def-server.SavedObjectsBulkResolveResponse", "text": "SavedObjectsBulkResolveResponse" }, + ">; get: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsBaseOptions", + "text": "SavedObjectsBaseOptions" + }, + ") => Promise<", + "SavedObject", ">; resolve: (type: string, id: string, options?: ", { "pluginId": "core", @@ -5709,25 +5709,7 @@ "label": "#savedObjectsClient", "description": [], "signature": [ - "{ get: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" - }, - ") => Promise<", - "SavedObject", - ">; delete: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsDeleteOptions", - "text": "SavedObjectsDeleteOptions" - }, - ") => Promise<{}>; create: (type: string, attributes: T, options?: ", + "{ create: (type: string, attributes: T, options?: ", { "pluginId": "core", "scope": "server", @@ -5785,7 +5767,15 @@ "section": "def-server.SavedObjectsCheckConflictsResponse", "text": "SavedObjectsCheckConflictsResponse" }, - ">; find: (options: ", + ">; delete: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsDeleteOptions", + "text": "SavedObjectsDeleteOptions" + }, + ") => Promise<{}>; find: (options: ", { "pluginId": "core", "scope": "server", @@ -5849,6 +5839,16 @@ "section": "def-server.SavedObjectsBulkResolveResponse", "text": "SavedObjectsBulkResolveResponse" }, + ">; get: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsBaseOptions", + "text": "SavedObjectsBaseOptions" + }, + ") => Promise<", + "SavedObject", ">; resolve: (type: string, id: string, options?: ", { "pluginId": "core", @@ -6145,25 +6145,7 @@ "label": "savedObjectsClient", "description": [], "signature": [ - "{ get: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" - }, - ") => Promise<", - "SavedObject", - ">; delete: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsDeleteOptions", - "text": "SavedObjectsDeleteOptions" - }, - ") => Promise<{}>; create: (type: string, attributes: T, options?: ", + "{ create: (type: string, attributes: T, options?: ", { "pluginId": "core", "scope": "server", @@ -6221,7 +6203,15 @@ "section": "def-server.SavedObjectsCheckConflictsResponse", "text": "SavedObjectsCheckConflictsResponse" }, - ">; find: (options: ", + ">; delete: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsDeleteOptions", + "text": "SavedObjectsDeleteOptions" + }, + ") => Promise<{}>; find: (options: ", { "pluginId": "core", "scope": "server", @@ -6285,6 +6275,16 @@ "section": "def-server.SavedObjectsBulkResolveResponse", "text": "SavedObjectsBulkResolveResponse" }, + ">; get: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsBaseOptions", + "text": "SavedObjectsBaseOptions" + }, + ") => Promise<", + "SavedObject", ">; resolve: (type: string, id: string, options?: ", { "pluginId": "core", @@ -10596,25 +10596,7 @@ "label": "client", "description": [], "signature": [ - "{ get: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" - }, - ") => Promise<", - "SavedObject", - ">; delete: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsDeleteOptions", - "text": "SavedObjectsDeleteOptions" - }, - ") => Promise<{}>; create: (type: string, attributes: T, options?: ", + "{ create: (type: string, attributes: T, options?: ", { "pluginId": "core", "scope": "server", @@ -10672,7 +10654,15 @@ "section": "def-server.SavedObjectsCheckConflictsResponse", "text": "SavedObjectsCheckConflictsResponse" }, - ">; find: (options: ", + ">; delete: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsDeleteOptions", + "text": "SavedObjectsDeleteOptions" + }, + ") => Promise<{}>; find: (options: ", { "pluginId": "core", "scope": "server", @@ -10736,6 +10726,16 @@ "section": "def-server.SavedObjectsBulkResolveResponse", "text": "SavedObjectsBulkResolveResponse" }, + ">; get: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsBaseOptions", + "text": "SavedObjectsBaseOptions" + }, + ") => Promise<", + "SavedObject", ">; resolve: (type: string, id: string, options?: ", { "pluginId": "core", @@ -13862,7 +13862,7 @@ "section": "def-server.SavedObjectsRepository", "text": "SavedObjectsRepository" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"deleteByNamespace\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"incrementCounter\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\">" + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"deleteByNamespace\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"incrementCounter\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\">" ], "path": "src/core/server/saved_objects/saved_objects_service.ts", "deprecated": false, @@ -13925,7 +13925,7 @@ "section": "def-server.SavedObjectsRepository", "text": "SavedObjectsRepository" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"deleteByNamespace\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"incrementCounter\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\">" + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"deleteByNamespace\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"incrementCounter\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\">" ], "path": "src/core/server/saved_objects/saved_objects_service.ts", "deprecated": false, @@ -14330,7 +14330,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">" + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">" ], "path": "src/core/server/saved_objects/saved_objects_service.ts", "deprecated": false, @@ -14406,7 +14406,7 @@ "section": "def-server.SavedObjectsRepository", "text": "SavedObjectsRepository" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"deleteByNamespace\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"incrementCounter\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\">" + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"deleteByNamespace\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"incrementCounter\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\">" ], "path": "src/core/server/saved_objects/saved_objects_service.ts", "deprecated": false, @@ -14471,7 +14471,7 @@ "section": "def-server.SavedObjectsRepository", "text": "SavedObjectsRepository" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"deleteByNamespace\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"incrementCounter\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\">" + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"deleteByNamespace\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"incrementCounter\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\">" ], "path": "src/core/server/saved_objects/saved_objects_service.ts", "deprecated": false, @@ -14537,7 +14537,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">) => Pick<", + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">) => Pick<", { "pluginId": "core", "scope": "server", @@ -14566,7 +14566,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">" + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">" ], "path": "src/core/server/saved_objects/saved_objects_service.ts", "deprecated": false, @@ -14593,7 +14593,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">) => Pick<", + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">) => Pick<", { "pluginId": "core", "scope": "server", @@ -14622,7 +14622,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">" + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">" ], "path": "src/core/server/saved_objects/saved_objects_service.ts", "deprecated": false, @@ -15638,25 +15638,7 @@ "\nSee {@link SavedObjectsRepository}\n" ], "signature": [ - "{ get: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" - }, - ") => Promise<", - "SavedObject", - ">; delete: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsDeleteOptions", - "text": "SavedObjectsDeleteOptions" - }, - ") => Promise<{}>; create: (type: string, attributes: T, options?: ", + "{ create: (type: string, attributes: T, options?: ", { "pluginId": "core", "scope": "server", @@ -15714,7 +15696,15 @@ "section": "def-server.SavedObjectsCheckConflictsResponse", "text": "SavedObjectsCheckConflictsResponse" }, - ">; deleteByNamespace: (namespace: string, options?: ", + ">; delete: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsDeleteOptions", + "text": "SavedObjectsDeleteOptions" + }, + ") => Promise<{}>; deleteByNamespace: (namespace: string, options?: ", { "pluginId": "core", "scope": "server", @@ -15786,6 +15776,16 @@ "section": "def-server.SavedObjectsBulkResolveResponse", "text": "SavedObjectsBulkResolveResponse" }, + ">; get: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsBaseOptions", + "text": "SavedObjectsBaseOptions" + }, + ") => Promise<", + "SavedObject", ">; resolve: (type: string, id: string, options?: ", { "pluginId": "core", @@ -16151,25 +16151,7 @@ "\nSaved Objects is Kibana's data persisentence mechanism allowing plugins to\nuse Elasticsearch for storing plugin state.\n\n## SavedObjectsClient errors\n\nSince the SavedObjectsClient has its hands in everything we\nare a little paranoid about the way we present errors back to\nto application code. Ideally, all errors will be either:\n\n 1. Caused by bad implementation (ie. undefined is not a function) and\n as such unpredictable\n 2. An error that has been classified and decorated appropriately\n by the decorators in {@link SavedObjectsErrorHelpers}\n\nType 1 errors are inevitable, but since all expected/handle-able errors\nshould be Type 2 the `isXYZError()` helpers exposed at\n`SavedObjectsErrorHelpers` should be used to understand and manage error\nresponses from the `SavedObjectsClient`.\n\nType 2 errors are decorated versions of the source error, so if\nthe elasticsearch client threw an error it will be decorated based\non its type. That means that rather than looking for `error.body.error.type` or\ndoing substring checks on `error.body.error.reason`, just use the helpers to\nunderstand the meaning of the error:\n\n ```js\n if (SavedObjectsErrorHelpers.isNotFoundError(error)) {\n // handle 404\n }\n\n if (SavedObjectsErrorHelpers.isNotAuthorizedError(error)) {\n // 401 handling should be automatic, but in case you wanted to know\n }\n\n // always rethrow the error unless you handle it\n throw error;\n ```\n\n### 404s from missing index\n\nFrom the perspective of application code and APIs the SavedObjectsClient is\na black box that persists objects. One of the internal details that users have\nno control over is that we use an elasticsearch index for persistance and that\nindex might be missing.\n\nAt the time of writing we are in the process of transitioning away from the\noperating assumption that the SavedObjects index is always available. Part of\nthis transition is handling errors resulting from an index missing. These used\nto trigger a 500 error in most cases, and in others cause 404s with different\nerror messages.\n\nFrom my (Spencer) perspective, a 404 from the SavedObjectsApi is a 404; The\nobject the request/call was targeting could not be found. This is why #14141\ntakes special care to ensure that 404 errors are generic and don't distinguish\nbetween index missing or document missing.\n\nSee {@link SavedObjectsClient}\nSee {@link SavedObjectsErrorHelpers}\n" ], "signature": [ - "{ get: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" - }, - ") => Promise<", - "SavedObject", - ">; delete: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsDeleteOptions", - "text": "SavedObjectsDeleteOptions" - }, - ") => Promise<{}>; create: (type: string, attributes: T, options?: ", + "{ create: (type: string, attributes: T, options?: ", { "pluginId": "core", "scope": "server", @@ -16227,7 +16209,15 @@ "section": "def-server.SavedObjectsCheckConflictsResponse", "text": "SavedObjectsCheckConflictsResponse" }, - ">; find: (options: ", + ">; delete: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsDeleteOptions", + "text": "SavedObjectsDeleteOptions" + }, + ") => Promise<{}>; find: (options: ", { "pluginId": "core", "scope": "server", @@ -16291,6 +16281,16 @@ "section": "def-server.SavedObjectsBulkResolveResponse", "text": "SavedObjectsBulkResolveResponse" }, + ">; get: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsBaseOptions", + "text": "SavedObjectsBaseOptions" + }, + ") => Promise<", + "SavedObject", ">; resolve: (type: string, id: string, options?: ", { "pluginId": "core", @@ -16507,7 +16507,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">" + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">" ], "path": "src/core/server/saved_objects/service/lib/scoped_client_provider.ts", "deprecated": false, @@ -16616,7 +16616,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">" + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">" ], "path": "src/core/server/saved_objects/service/lib/scoped_client_provider.ts", "deprecated": false, diff --git a/api_docs/custom_integrations.json b/api_docs/custom_integrations.json index 7cf82e84cfafc..3a693af2b696a 100644 --- a/api_docs/custom_integrations.json +++ b/api_docs/custom_integrations.json @@ -290,7 +290,9 @@ "type": "Interface", "tags": [], "label": "CustomIntegration", - "description": [], + "description": [ + "\nA definition of a dataintegration, which can be registered with Kibana." + ], "path": "src/plugins/custom_integrations/common/index.ts", "deprecated": false, "children": [ @@ -385,7 +387,7 @@ "label": "categories", "description": [], "signature": [ - "(\"custom\" | \"aws\" | \"azure\" | \"cloud\" | \"config_management\" | \"containers\" | \"crm\" | \"datastore\" | \"elastic_stack\" | \"google_cloud\" | \"kubernetes\" | \"languages\" | \"message_queue\" | \"monitoring\" | \"network\" | \"notification\" | \"os_system\" | \"productivity\" | \"security\" | \"sample_data\" | \"support\" | \"ticketing\" | \"version_control\" | \"web\" | \"upload_file\" | \"language_client\" | \"updates_available\")[]" + "(\"custom\" | \"sample_data\" | \"aws\" | \"azure\" | \"cloud\" | \"config_management\" | \"containers\" | \"crm\" | \"datastore\" | \"elastic_stack\" | \"google_cloud\" | \"kubernetes\" | \"languages\" | \"message_queue\" | \"monitoring\" | \"network\" | \"notification\" | \"os_system\" | \"productivity\" | \"security\" | \"support\" | \"ticketing\" | \"version_control\" | \"web\" | \"upload_file\" | \"language_client\")[]" ], "path": "src/plugins/custom_integrations/common/index.ts", "deprecated": false @@ -393,10 +395,13 @@ { "parentPluginId": "customIntegrations", "id": "def-server.CustomIntegration.shipper", - "type": "string", + "type": "CompoundType", "tags": [], "label": "shipper", "description": [], + "signature": [ + "\"beats\" | \"language_clients\" | \"other\" | \"sample_data\" | \"tests\" | \"tutorial\"" + ], "path": "src/plugins/custom_integrations/common/index.ts", "deprecated": false }, @@ -415,42 +420,6 @@ } ], "initialIsOpen": false - }, - { - "parentPluginId": "customIntegrations", - "id": "def-server.IntegrationCategoryCount", - "type": "Interface", - "tags": [], - "label": "IntegrationCategoryCount", - "description": [], - "path": "src/plugins/custom_integrations/common/index.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "customIntegrations", - "id": "def-server.IntegrationCategoryCount.count", - "type": "number", - "tags": [], - "label": "count", - "description": [], - "path": "src/plugins/custom_integrations/common/index.ts", - "deprecated": false - }, - { - "parentPluginId": "customIntegrations", - "id": "def-server.IntegrationCategoryCount.id", - "type": "CompoundType", - "tags": [], - "label": "id", - "description": [], - "signature": [ - "\"custom\" | \"aws\" | \"azure\" | \"cloud\" | \"config_management\" | \"containers\" | \"crm\" | \"datastore\" | \"elastic_stack\" | \"google_cloud\" | \"kubernetes\" | \"languages\" | \"message_queue\" | \"monitoring\" | \"network\" | \"notification\" | \"os_system\" | \"productivity\" | \"security\" | \"sample_data\" | \"support\" | \"ticketing\" | \"version_control\" | \"web\" | \"upload_file\" | \"language_client\" | \"updates_available\"" - ], - "path": "src/plugins/custom_integrations/common/index.ts", - "deprecated": false - } - ], - "initialIsOpen": false } ], "enums": [], @@ -461,9 +430,11 @@ "type": "Type", "tags": [], "label": "IntegrationCategory", - "description": [], + "description": [ + "\nA category applicable to an Integration." + ], "signature": [ - "\"custom\" | \"aws\" | \"azure\" | \"cloud\" | \"config_management\" | \"containers\" | \"crm\" | \"datastore\" | \"elastic_stack\" | \"google_cloud\" | \"kubernetes\" | \"languages\" | \"message_queue\" | \"monitoring\" | \"network\" | \"notification\" | \"os_system\" | \"productivity\" | \"security\" | \"sample_data\" | \"support\" | \"ticketing\" | \"version_control\" | \"web\" | \"upload_file\" | \"language_client\" | \"updates_available\"" + "\"custom\" | \"sample_data\" | \"aws\" | \"azure\" | \"cloud\" | \"config_management\" | \"containers\" | \"crm\" | \"datastore\" | \"elastic_stack\" | \"google_cloud\" | \"kubernetes\" | \"languages\" | \"message_queue\" | \"monitoring\" | \"network\" | \"notification\" | \"os_system\" | \"productivity\" | \"security\" | \"support\" | \"ticketing\" | \"version_control\" | \"web\" | \"upload_file\" | \"language_client\"" ], "path": "src/plugins/custom_integrations/common/index.ts", "deprecated": false, @@ -578,7 +549,9 @@ "type": "Interface", "tags": [], "label": "CustomIntegration", - "description": [], + "description": [ + "\nA definition of a dataintegration, which can be registered with Kibana." + ], "path": "src/plugins/custom_integrations/common/index.ts", "deprecated": false, "children": [ @@ -673,7 +646,7 @@ "label": "categories", "description": [], "signature": [ - "(\"custom\" | \"aws\" | \"azure\" | \"cloud\" | \"config_management\" | \"containers\" | \"crm\" | \"datastore\" | \"elastic_stack\" | \"google_cloud\" | \"kubernetes\" | \"languages\" | \"message_queue\" | \"monitoring\" | \"network\" | \"notification\" | \"os_system\" | \"productivity\" | \"security\" | \"sample_data\" | \"support\" | \"ticketing\" | \"version_control\" | \"web\" | \"upload_file\" | \"language_client\" | \"updates_available\")[]" + "(\"custom\" | \"sample_data\" | \"aws\" | \"azure\" | \"cloud\" | \"config_management\" | \"containers\" | \"crm\" | \"datastore\" | \"elastic_stack\" | \"google_cloud\" | \"kubernetes\" | \"languages\" | \"message_queue\" | \"monitoring\" | \"network\" | \"notification\" | \"os_system\" | \"productivity\" | \"security\" | \"support\" | \"ticketing\" | \"version_control\" | \"web\" | \"upload_file\" | \"language_client\")[]" ], "path": "src/plugins/custom_integrations/common/index.ts", "deprecated": false @@ -681,10 +654,13 @@ { "parentPluginId": "customIntegrations", "id": "def-common.CustomIntegration.shipper", - "type": "string", + "type": "CompoundType", "tags": [], "label": "shipper", "description": [], + "signature": [ + "\"beats\" | \"language_clients\" | \"other\" | \"sample_data\" | \"tests\" | \"tutorial\"" + ], "path": "src/plugins/custom_integrations/common/index.ts", "deprecated": false }, @@ -710,7 +686,9 @@ "type": "Interface", "tags": [], "label": "CustomIntegrationIcon", - "description": [], + "description": [ + "\nAn icon representing an Integration." + ], "path": "src/plugins/custom_integrations/common/index.ts", "deprecated": false, "children": [ @@ -746,7 +724,9 @@ "type": "Interface", "tags": [], "label": "IntegrationCategoryCount", - "description": [], + "description": [ + "\nAn object containing the id of an `IntegrationCategory` and the count of all Integrations in that category." + ], "path": "src/plugins/custom_integrations/common/index.ts", "deprecated": false, "children": [ @@ -768,7 +748,7 @@ "label": "id", "description": [], "signature": [ - "\"custom\" | \"aws\" | \"azure\" | \"cloud\" | \"config_management\" | \"containers\" | \"crm\" | \"datastore\" | \"elastic_stack\" | \"google_cloud\" | \"kubernetes\" | \"languages\" | \"message_queue\" | \"monitoring\" | \"network\" | \"notification\" | \"os_system\" | \"productivity\" | \"security\" | \"sample_data\" | \"support\" | \"ticketing\" | \"version_control\" | \"web\" | \"upload_file\" | \"language_client\" | \"updates_available\"" + "\"custom\" | \"sample_data\" | \"aws\" | \"azure\" | \"cloud\" | \"config_management\" | \"containers\" | \"crm\" | \"datastore\" | \"elastic_stack\" | \"google_cloud\" | \"kubernetes\" | \"languages\" | \"message_queue\" | \"monitoring\" | \"network\" | \"notification\" | \"os_system\" | \"productivity\" | \"security\" | \"support\" | \"ticketing\" | \"version_control\" | \"web\" | \"upload_file\" | \"language_client\"" ], "path": "src/plugins/custom_integrations/common/index.ts", "deprecated": false @@ -779,15 +759,33 @@ ], "enums": [], "misc": [ + { + "parentPluginId": "customIntegrations", + "id": "def-common.category", + "type": "Array", + "tags": [], + "label": "category", + "description": [ + "\nThe list of all available categories." + ], + "signature": [ + "(\"custom\" | \"sample_data\" | \"aws\" | \"azure\" | \"cloud\" | \"config_management\" | \"containers\" | \"crm\" | \"datastore\" | \"elastic_stack\" | \"google_cloud\" | \"kubernetes\" | \"languages\" | \"message_queue\" | \"monitoring\" | \"network\" | \"notification\" | \"os_system\" | \"productivity\" | \"security\" | \"support\" | \"ticketing\" | \"version_control\" | \"web\" | \"upload_file\" | \"language_client\")[]" + ], + "path": "src/plugins/custom_integrations/common/index.ts", + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "customIntegrations", "id": "def-common.IntegrationCategory", "type": "Type", "tags": [], "label": "IntegrationCategory", - "description": [], + "description": [ + "\nA category applicable to an Integration." + ], "signature": [ - "\"custom\" | \"aws\" | \"azure\" | \"cloud\" | \"config_management\" | \"containers\" | \"crm\" | \"datastore\" | \"elastic_stack\" | \"google_cloud\" | \"kubernetes\" | \"languages\" | \"message_queue\" | \"monitoring\" | \"network\" | \"notification\" | \"os_system\" | \"productivity\" | \"security\" | \"sample_data\" | \"support\" | \"ticketing\" | \"version_control\" | \"web\" | \"upload_file\" | \"language_client\" | \"updates_available\"" + "\"custom\" | \"sample_data\" | \"aws\" | \"azure\" | \"cloud\" | \"config_management\" | \"containers\" | \"crm\" | \"datastore\" | \"elastic_stack\" | \"google_cloud\" | \"kubernetes\" | \"languages\" | \"message_queue\" | \"monitoring\" | \"network\" | \"notification\" | \"os_system\" | \"productivity\" | \"security\" | \"support\" | \"ticketing\" | \"version_control\" | \"web\" | \"upload_file\" | \"language_client\"" ], "path": "src/plugins/custom_integrations/common/index.ts", "deprecated": false, @@ -842,6 +840,38 @@ "path": "src/plugins/custom_integrations/common/index.ts", "deprecated": false, "initialIsOpen": false + }, + { + "parentPluginId": "customIntegrations", + "id": "def-common.shipper", + "type": "Array", + "tags": [], + "label": "shipper", + "description": [ + "\nThe list of all known shippers." + ], + "signature": [ + "(\"beats\" | \"language_clients\" | \"other\" | \"sample_data\" | \"tests\" | \"tutorial\")[]" + ], + "path": "src/plugins/custom_integrations/common/index.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "customIntegrations", + "id": "def-common.Shipper", + "type": "Type", + "tags": [], + "label": "Shipper", + "description": [ + "\nA shipper-- an internal or external system capable of storing data in ES/Kibana-- applicable to an Integration." + ], + "signature": [ + "\"beats\" | \"language_clients\" | \"other\" | \"sample_data\" | \"tests\" | \"tutorial\"" + ], + "path": "src/plugins/custom_integrations/common/index.ts", + "deprecated": false, + "initialIsOpen": false } ], "objects": [ @@ -851,7 +881,9 @@ "type": "Object", "tags": [], "label": "INTEGRATION_CATEGORY_DISPLAY", - "description": [], + "description": [ + "\nA map of category names and their corresponding titles." + ], "path": "src/plugins/custom_integrations/common/index.ts", "deprecated": false, "children": [ @@ -861,9 +893,7 @@ "type": "string", "tags": [], "label": "aws", - "description": [ - "// Known EPR" - ], + "description": [], "path": "src/plugins/custom_integrations/common/index.ts", "deprecated": false }, @@ -1118,16 +1148,79 @@ "description": [], "path": "src/plugins/custom_integrations/common/index.ts", "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "customIntegrations", + "id": "def-common.SHIPPER_DISPLAY", + "type": "Object", + "tags": [], + "label": "SHIPPER_DISPLAY", + "description": [ + "\nA map of shipper names and their corresponding titles." + ], + "path": "src/plugins/custom_integrations/common/index.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "customIntegrations", + "id": "def-common.SHIPPER_DISPLAY.beats", + "type": "string", + "tags": [], + "label": "beats", + "description": [], + "path": "src/plugins/custom_integrations/common/index.ts", + "deprecated": false }, { "parentPluginId": "customIntegrations", - "id": "def-common.INTEGRATION_CATEGORY_DISPLAY.updates_available", + "id": "def-common.SHIPPER_DISPLAY.language_clients", "type": "string", "tags": [], - "label": "updates_available", - "description": [ - "// Internal" - ], + "label": "language_clients", + "description": [], + "path": "src/plugins/custom_integrations/common/index.ts", + "deprecated": false + }, + { + "parentPluginId": "customIntegrations", + "id": "def-common.SHIPPER_DISPLAY.other", + "type": "string", + "tags": [], + "label": "other", + "description": [], + "path": "src/plugins/custom_integrations/common/index.ts", + "deprecated": false + }, + { + "parentPluginId": "customIntegrations", + "id": "def-common.SHIPPER_DISPLAY.sample_data", + "type": "string", + "tags": [], + "label": "sample_data", + "description": [], + "path": "src/plugins/custom_integrations/common/index.ts", + "deprecated": false + }, + { + "parentPluginId": "customIntegrations", + "id": "def-common.SHIPPER_DISPLAY.tests", + "type": "string", + "tags": [], + "label": "tests", + "description": [], + "path": "src/plugins/custom_integrations/common/index.ts", + "deprecated": false + }, + { + "parentPluginId": "customIntegrations", + "id": "def-common.SHIPPER_DISPLAY.tutorial", + "type": "string", + "tags": [], + "label": "tutorial", + "description": [], "path": "src/plugins/custom_integrations/common/index.ts", "deprecated": false } diff --git a/api_docs/custom_integrations.mdx b/api_docs/custom_integrations.mdx index 378d3b16c57fa..a5c470066ad71 100644 --- a/api_docs/custom_integrations.mdx +++ b/api_docs/custom_integrations.mdx @@ -18,7 +18,7 @@ Contact [Fleet](https://github.com/orgs/elastic/teams/fleet) for questions regar | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 85 | 1 | 78 | 1 | +| 91 | 1 | 75 | 1 | ## Client diff --git a/api_docs/dashboard.json b/api_docs/dashboard.json index b42846c747bfa..48be2a07d8236 100644 --- a/api_docs/dashboard.json +++ b/api_docs/dashboard.json @@ -1560,7 +1560,7 @@ "section": "def-common.SearchSource", "text": "SearchSource" }, - "; history: Record[]; setPreferredSearchStrategyId: (searchStrategyId: string) => void; setField: (field: K, value: ", + "; history: Record[]; setPreferredSearchStrategyId: (searchStrategyId: string) => void; setField: (field: K, value: ", { "pluginId": "data", "scope": "common", @@ -1576,7 +1576,7 @@ "section": "def-common.SearchSource", "text": "SearchSource" }, - "; removeField: (field: K) => ", + "; removeField: (field: K) => ", { "pluginId": "data", "scope": "common", @@ -1608,7 +1608,7 @@ "section": "def-common.SearchSourceFields", "text": "SearchSourceFields" }, - "; getField: (field: K, recurse?: boolean) => ", + "; getField: (field: K, recurse?: boolean) => ", { "pluginId": "data", "scope": "common", @@ -1616,7 +1616,7 @@ "section": "def-common.SearchSourceFields", "text": "SearchSourceFields" }, - "[K]; getOwnField: (field: K) => ", + "[K]; getOwnField: (field: K) => ", { "pluginId": "data", "scope": "common", @@ -2501,7 +2501,7 @@ "section": "def-server.SavedObjectsRepository", "text": "SavedObjectsRepository" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"deleteByNamespace\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"incrementCounter\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\">, \"find\">, embeddableType: string) => Promise<{ [key: string]: ", + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"deleteByNamespace\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"incrementCounter\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\">, \"find\">, embeddableType: string) => Promise<{ [key: string]: ", { "pluginId": "@kbn/utility-types", "scope": "server", @@ -2530,7 +2530,7 @@ "section": "def-server.SavedObjectsRepository", "text": "SavedObjectsRepository" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"deleteByNamespace\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"incrementCounter\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\">, \"find\">" + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"deleteByNamespace\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"incrementCounter\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\">, \"find\">" ], "path": "src/plugins/dashboard/server/usage/find_by_value_embeddables.ts", "deprecated": false, diff --git a/api_docs/data.json b/api_docs/data.json index 4e6ffaff53657..0f095e651aa7e 100644 --- a/api_docs/data.json +++ b/api_docs/data.json @@ -248,7 +248,7 @@ "section": "def-server.SerializableRecord", "text": "SerializableRecord" }, - " | undefined; schema?: string | undefined; }, \"enabled\" | \"id\" | \"schema\" | \"params\"> & Pick<{ type: ", + " | undefined; schema?: string | undefined; }, \"id\" | \"enabled\" | \"schema\" | \"params\"> & Pick<{ type: ", { "pluginId": "data", "scope": "common", @@ -264,7 +264,7 @@ "section": "def-common.IAggType", "text": "IAggType" }, - "; }, never>, \"type\" | \"enabled\" | \"id\" | \"schema\" | \"params\">" + "; }, never>, \"type\" | \"id\" | \"enabled\" | \"schema\" | \"params\">" ], "path": "src/plugins/data/common/search/aggs/agg_config.ts", "deprecated": false, @@ -1315,7 +1315,7 @@ "section": "def-server.SerializableRecord", "text": "SerializableRecord" }, - " | undefined; schema?: string | undefined; }, \"enabled\" | \"id\" | \"schema\" | \"params\"> & Pick<{ type: string | ", + " | undefined; schema?: string | undefined; }, \"id\" | \"enabled\" | \"schema\" | \"params\"> & Pick<{ type: string | ", { "pluginId": "data", "scope": "common", @@ -1331,7 +1331,7 @@ "section": "def-common.IAggType", "text": "IAggType" }, - "; }, never>, \"type\" | \"enabled\" | \"id\" | \"schema\" | \"params\">[]" + "; }, never>, \"type\" | \"id\" | \"enabled\" | \"schema\" | \"params\">[]" ], "path": "src/plugins/data/common/search/aggs/agg_configs.ts", "deprecated": false, @@ -1560,7 +1560,7 @@ "section": "def-server.SerializableRecord", "text": "SerializableRecord" }, - " | undefined; schema?: string | undefined; }, \"enabled\" | \"id\" | \"schema\" | \"params\"> & Pick<{ type: string | ", + " | undefined; schema?: string | undefined; }, \"id\" | \"enabled\" | \"schema\" | \"params\"> & Pick<{ type: string | ", { "pluginId": "data", "scope": "common", @@ -1576,7 +1576,7 @@ "section": "def-common.IAggType", "text": "IAggType" }, - "; }, never>, \"type\" | \"enabled\" | \"id\" | \"schema\" | \"params\">, { addToAggConfigs }?: { addToAggConfigs?: boolean | undefined; }) => T" + "; }, never>, \"type\" | \"id\" | \"enabled\" | \"schema\" | \"params\">, { addToAggConfigs }?: { addToAggConfigs?: boolean | undefined; }) => T" ], "path": "src/plugins/data/common/search/aggs/agg_configs.ts", "deprecated": false, @@ -1597,7 +1597,7 @@ "section": "def-server.SerializableRecord", "text": "SerializableRecord" }, - " | undefined; schema?: string | undefined; }, \"enabled\" | \"id\" | \"schema\" | \"params\"> & Pick<{ type: string | ", + " | undefined; schema?: string | undefined; }, \"id\" | \"enabled\" | \"schema\" | \"params\"> & Pick<{ type: string | ", { "pluginId": "data", "scope": "common", @@ -1613,7 +1613,7 @@ "section": "def-common.IAggType", "text": "IAggType" }, - "; }, never>, \"type\" | \"enabled\" | \"id\" | \"schema\" | \"params\">" + "; }, never>, \"type\" | \"id\" | \"enabled\" | \"schema\" | \"params\">" ], "path": "src/plugins/data/common/search/aggs/agg_configs.ts", "deprecated": false, @@ -2504,7 +2504,7 @@ "section": "def-public.PluginInitializerContext", "text": "PluginInitializerContext" }, - "; }>; }>; autocomplete: Readonly<{} & { querySuggestions: Readonly<{} & { enabled: boolean; }>; valueSuggestions: Readonly<{} & { enabled: boolean; timeout: moment.Duration; tiers: string[]; terminateAfter: moment.Duration; }>; }>; }>>" + "; }>; }>; autocomplete: Readonly<{} & { querySuggestions: Readonly<{} & { enabled: boolean; }>; valueSuggestions: Readonly<{} & { timeout: moment.Duration; enabled: boolean; tiers: string[]; terminateAfter: moment.Duration; }>; }>; }>>" ], "path": "src/plugins/data/public/plugin.ts", "deprecated": false, @@ -3120,18 +3120,6 @@ "plugin": "observability", "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_app_index_pattern.tsx" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts" - }, { "plugin": "maps", "path": "x-pack/plugins/maps/public/embeddable/types.ts" @@ -3304,30 +3292,6 @@ "plugin": "dataVisualizer", "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/chart_loader/chart_loader.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/chart_loader/chart_loader.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/embeddables/types.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/embeddables/types.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx" - }, { "plugin": "apm", "path": "x-pack/plugins/apm/public/components/app/RumDashboard/LocalUIFilters/SelectedFilters.tsx" @@ -3456,14 +3420,6 @@ "plugin": "transform", "path": "x-pack/plugins/transform/common/types/index_pattern.ts" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" - }, { "plugin": "lens", "path": "x-pack/plugins/lens/server/routes/existing_fields.test.ts" @@ -3496,14 +3452,6 @@ "plugin": "dataVisualizer", "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/utils/saved_search_utils.test.ts" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/common/dependency_mocks/index_patterns.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/common/dependency_mocks/index_patterns.d.ts" - }, { "plugin": "lens", "path": "x-pack/plugins/lens/target/types/server/routes/existing_fields.d.ts" @@ -4170,35 +4118,35 @@ }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts" + "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts" + "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts" + "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts" + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts" + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts" }, { "plugin": "observability", @@ -4408,250 +4356,6 @@ "plugin": "dataVisualizer", "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/field_format_service.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/field_format_service.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_grid/common.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_grid/common.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_grid/common.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_grid/common.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/data_loader/data_loader.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/data_loader/data_loader.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/data_loader/data_loader.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/scatterplot_matrix/use_scatterplot_field_options.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/scatterplot_matrix/use_scatterplot_field_options.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/single_metric_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/single_metric_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/multi_metric_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/multi_metric_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/population_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/population_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/advanced_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/advanced_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/results_loader/categorization_examples_loader.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/results_loader/categorization_examples_loader.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/categorization_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/categorization_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/rare_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/rare_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator_factory.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator_factory.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector_service.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector_service.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/expandable_section/expandable_section_results.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/expandable_section/expandable_section_results.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/use_exploration_results.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/use_exploration_results.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/exploration_results_table.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/exploration_results_table.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/ml_context.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/ml_context.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/common/use_results_view_config.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/common/use_results_view_config.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/common/use_results_view_config.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" - }, { "plugin": "apm", "path": "x-pack/plugins/apm/public/components/shared/kuery_bar/index.tsx" @@ -4952,22 +4656,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/target/types/public/components/geo_index_pattern_select.d.ts" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities._service.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities._service.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/remove_nested_field_children.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/remove_nested_field_children.test.ts" - }, { "plugin": "maps", "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/util/get_docvalue_source_fields.test.ts" @@ -4980,14 +4668,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/util/get_docvalue_source_fields.test.ts" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/__mocks__/index_pattern.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/__mocks__/index_pattern.ts" - }, { "plugin": "maps", "path": "x-pack/plugins/maps/target/types/public/classes/fields/agg/count_agg_field.d.ts" @@ -5052,14 +4732,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/target/types/public/connected_components/edit_layer_panel/filter_editor/filter_editor.d.ts" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/components/full_time_range_selector/full_time_range_selector.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/components/full_time_range_selector/full_time_range_selector.d.ts" - }, { "plugin": "dataVisualizer", "path": "x-pack/plugins/data_visualizer/target/types/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector.d.ts" @@ -7584,7 +7256,7 @@ "\nsets value to a single search source field" ], "signature": [ - "(field: K, value: ", + "(field: K, value: ", { "pluginId": "data", "scope": "common", @@ -7649,7 +7321,7 @@ "\nremove field" ], "signature": [ - "(field: K) => this" + "(field: K) => this" ], "path": "src/plugins/data/common/search/search_source/search_source.ts", "deprecated": false, @@ -7774,7 +7446,7 @@ "\nGets a single field from the fields" ], "signature": [ - "(field: K, recurse?: boolean) => ", + "(field: K, recurse?: boolean) => ", { "pluginId": "data", "scope": "common", @@ -7828,7 +7500,7 @@ "\nGet the field from our own fields, don't traverse up the chain" ], "signature": [ - "(field: K) => ", + "(field: K) => ", { "pluginId": "data", "scope": "common", @@ -9300,7 +8972,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".FILTER>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\"> & Pick<{ geo_bounding_box?: ({ type: \"geo_bounding_box\"; } & GeoBox) | ({ type: \"geo_bounding_box\"; } & { top_left: ", + ".FILTER>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\"> & Pick<{ geo_bounding_box?: ({ type: \"geo_bounding_box\"; } & GeoBox) | ({ type: \"geo_bounding_box\"; } & { top_left: ", { "pluginId": "data", "scope": "common", @@ -9396,7 +9068,7 @@ "section": "def-common.Query", "text": "Query" }, - "> | undefined; }, never>, \"enabled\" | \"id\" | \"filter\" | \"schema\" | \"geo_bounding_box\" | \"json\" | \"customLabel\" | \"timeShift\">, ", + "> | undefined; }, never>, \"id\" | \"filter\" | \"enabled\" | \"schema\" | \"geo_bounding_box\" | \"json\" | \"customLabel\" | \"timeShift\">, ", "AggExpressionType", ", ", { @@ -9452,7 +9124,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".FILTERS>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ filters?: ", + ".FILTERS>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ filters?: ", { "pluginId": "expressions", "scope": "common", @@ -9484,7 +9156,7 @@ "section": "def-common.QueryFilter", "text": "QueryFilter" }, - ">[] | undefined; }, never>, \"enabled\" | \"id\" | \"filters\" | \"schema\" | \"json\" | \"timeShift\">, ", + ">[] | undefined; }, never>, \"id\" | \"filters\" | \"enabled\" | \"schema\" | \"json\" | \"timeShift\">, ", "AggExpressionType", ", ", { @@ -9596,7 +9268,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".IP_RANGE>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\"> & Pick<{ ranges?: (", + ".IP_RANGE>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\"> & Pick<{ ranges?: (", { "pluginId": "expressions", "scope": "common", @@ -9660,7 +9332,7 @@ "section": "def-common.IpRange", "text": "IpRange" }, - ">)[] | undefined; ipRangeType?: string | undefined; }, never>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"ipRangeType\" | \"ranges\">, ", + ">)[] | undefined; ipRangeType?: string | undefined; }, never>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"ipRangeType\" | \"ranges\">, ", "AggExpressionType", ", ", { @@ -9716,7 +9388,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".DATE_RANGE>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"time_zone\"> & Pick<{ ranges?: ", + ".DATE_RANGE>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"time_zone\"> & Pick<{ ranges?: ", { "pluginId": "expressions", "scope": "common", @@ -9748,7 +9420,7 @@ "section": "def-common.DateRange", "text": "DateRange" }, - ">[] | undefined; }, never>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"ranges\" | \"time_zone\">, ", + ">[] | undefined; }, never>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"ranges\" | \"time_zone\">, ", "AggExpressionType", ", ", { @@ -9804,7 +9476,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".RANGE>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\"> & Pick<{ ranges?: ", + ".RANGE>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\"> & Pick<{ ranges?: ", { "pluginId": "expressions", "scope": "common", @@ -9836,7 +9508,7 @@ "section": "def-common.NumericalRange", "text": "NumericalRange" }, - ">[] | undefined; }, never>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"ranges\">, ", + ">[] | undefined; }, never>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"ranges\">, ", "AggExpressionType", ", ", { @@ -9948,7 +9620,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".GEOHASH_GRID>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\"> & Pick<{ boundingBox?: ({ type: \"geo_bounding_box\"; } & GeoBox) | ({ type: \"geo_bounding_box\"; } & { top_left: ", + ".GEOHASH_GRID>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\"> & Pick<{ boundingBox?: ({ type: \"geo_bounding_box\"; } & GeoBox) | ({ type: \"geo_bounding_box\"; } & { top_left: ", { "pluginId": "data", "scope": "common", @@ -10012,7 +9684,7 @@ "section": "def-common.GeoPoint", "text": "GeoPoint" }, - "; }) | ({ type: \"geo_bounding_box\"; } & WellKnownText) | undefined; }, never>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\" | \"boundingBox\">, ", + "; }) | ({ type: \"geo_bounding_box\"; } & WellKnownText) | undefined; }, never>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\" | \"boundingBox\">, ", "AggExpressionType", ", ", { @@ -10068,7 +9740,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".HISTOGRAM>, \"enabled\" | \"interval\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\"> & Pick<{ extended_bounds?: ", + ".HISTOGRAM>, \"interval\" | \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\"> & Pick<{ extended_bounds?: ", { "pluginId": "expressions", "scope": "common", @@ -10100,7 +9772,7 @@ "section": "def-common.ExtendedBounds", "text": "ExtendedBounds" }, - "> | undefined; }, never>, \"enabled\" | \"interval\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\" | \"extended_bounds\">, ", + "> | undefined; }, never>, \"interval\" | \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\" | \"extended_bounds\">, ", "AggExpressionType", ", ", { @@ -10156,7 +9828,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".DATE_HISTOGRAM>, \"enabled\" | \"interval\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\"> & Pick<{ timeRange?: ", + ".DATE_HISTOGRAM>, \"interval\" | \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\"> & Pick<{ timeRange?: ", { "pluginId": "expressions", "scope": "common", @@ -10220,7 +9892,7 @@ "section": "def-common.ExtendedBounds", "text": "ExtendedBounds" }, - "> | undefined; }, never>, \"enabled\" | \"interval\" | \"id\" | \"timeRange\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"extended_bounds\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\">, ", + "> | undefined; }, never>, \"interval\" | \"id\" | \"timeRange\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"extended_bounds\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\">, ", "AggExpressionType", ", ", { @@ -10276,11 +9948,11 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".TERMS>, \"enabled\" | \"id\" | \"size\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"orderBy\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\"> & Pick<{ orderAgg?: ", + ".TERMS>, \"id\" | \"size\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"orderBy\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\"> & Pick<{ orderAgg?: ", "AggExpressionType", " | undefined; }, \"orderAgg\"> & Pick<{ orderAgg?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"size\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"orderBy\" | \"orderAgg\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\">, ", + " | undefined; }, never>, \"id\" | \"size\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"orderBy\" | \"orderAgg\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\">, ", "AggExpressionType", ", ", { @@ -10392,7 +10064,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".AVG_BUCKET>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\"> & Pick<{ customBucket?: ", + ".AVG_BUCKET>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -10400,7 +10072,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -10456,7 +10128,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".MAX_BUCKET>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\"> & Pick<{ customBucket?: ", + ".MAX_BUCKET>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -10464,7 +10136,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -10520,7 +10192,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".MIN_BUCKET>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\"> & Pick<{ customBucket?: ", + ".MIN_BUCKET>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -10528,7 +10200,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -10584,7 +10256,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".SUM_BUCKET>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\"> & Pick<{ customBucket?: ", + ".SUM_BUCKET>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -10592,7 +10264,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -10648,7 +10320,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".FILTERED_METRIC>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\"> & Pick<{ customBucket?: ", + ".FILTERED_METRIC>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -10656,7 +10328,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -10824,11 +10496,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".CUMULATIVE_SUM>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", + ".CUMULATIVE_SUM>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", + " | undefined; }, never>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", "AggExpressionType", ", ", { @@ -10884,11 +10556,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".DERIVATIVE>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", + ".DERIVATIVE>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", + " | undefined; }, never>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", "AggExpressionType", ", ", { @@ -11280,11 +10952,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".MOVING_FN>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\"> & Pick<{ customMetric?: ", + ".MOVING_FN>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\">, ", + " | undefined; }, never>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\">, ", "AggExpressionType", ", ", { @@ -11452,11 +11124,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".SERIAL_DIFF>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", + ".SERIAL_DIFF>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", + " | undefined; }, never>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", "AggExpressionType", ", ", { @@ -12403,14 +12075,6 @@ "plugin": "fleet", "path": "x-pack/plugins/fleet/public/applications/fleet/components/search_bar.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_grid/common.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_grid/common.ts" - }, { "plugin": "infra", "path": "x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/custom_metric_form.tsx" @@ -12583,34 +12247,6 @@ "plugin": "stackAlerts", "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.test.ts" - }, { "plugin": "infra", "path": "x-pack/plugins/infra/target/types/public/alerting/common/group_by_expression/group_by_expression.d.ts" @@ -13153,142 +12789,6 @@ "plugin": "timelines", "path": "x-pack/plugins/timelines/public/container/source/index.tsx" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/containers/with_kuery_autocompletion.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/containers/with_kuery_autocompletion.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/kuery_bar.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/kuery_bar.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_recognizer/data_recognizer.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_recognizer/data_recognizer.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/load_new_job_capabilities.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/load_new_job_capabilities.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/inventory_view/components/toolbars/toolbar.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/inventory_view/components/toolbars/toolbar.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/utils/kuery.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/utils/kuery.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_data.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_data.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/alerting/metric_threshold/hooks/use_metrics_explorer_chart_data.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/alerting/metric_threshold/hooks/use_metrics_explorer_chart_data.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/alerting/metric_threshold/components/expression_chart.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/alerting/metric_threshold/components/expression_chart.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/containers/logs/log_filter/log_filter_state.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/containers/logs/log_filter/log_filter_state.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/containers/with_source/with_source.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/containers/with_source/with_source.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/toolbar.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/toolbar.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metric_explorer_state.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metric_explorer_state.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/metrics_explorer/index.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/metrics_explorer/index.tsx" - }, { "plugin": "monitoring", "path": "x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx" @@ -13321,14 +12821,6 @@ "plugin": "monitoring", "path": "x-pack/plugins/monitoring/public/lib/kuery.ts" }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts" - }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts" @@ -13541,38 +13033,6 @@ "plugin": "timelines", "path": "x-pack/plugins/timelines/public/mock/index_pattern.ts" }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/target/types/common/search_strategy/index_fields/index.d.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/target/types/common/search_strategy/index_fields/index.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/containers/with_kuery_autocompletion.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/containers/with_kuery_autocompletion.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/containers/with_source/with_source.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/containers/with_source/with_source.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/index_pattern_context.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/index_pattern_context.ts" - }, { "plugin": "monitoring", "path": "x-pack/plugins/monitoring/target/types/public/components/kuery_bar/with_kuery_autocompletion.d.ts" @@ -13617,30 +13077,6 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/target/types/public/network/components/network_top_countries_table/columns.d.ts" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/alerting/metric_threshold/components/expression_chart.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/alerting/metric_threshold/components/expression_chart.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/alerting/metric_threshold/hooks/use_metrics_explorer_chart_data.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/alerting/metric_threshold/hooks/use_metrics_explorer_chart_data.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/pages/metrics/metrics_explorer/index.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/pages/metrics/metrics_explorer/index.d.ts" - }, { "plugin": "monitoring", "path": "x-pack/plugins/monitoring/target/types/public/alerts/components/param_details_form/use_derived_index_pattern.d.ts" @@ -13689,34 +13125,6 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/target/types/public/ueba/pages/details/types.d.ts" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/pages/metrics/metrics_explorer/hooks/use_metric_explorer_state.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/pages/metrics/metrics_explorer/hooks/use_metric_explorer_state.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_data.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_data.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/jobs/new_job/common/index_pattern_context.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/jobs/new_job/common/index_pattern_context.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/jobs/new_job/common/index_pattern_context.d.ts" - }, { "plugin": "indexPatternManagement", "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.tsx" @@ -13750,68 +13158,12 @@ "path": "src/plugins/index_pattern_management/target/types/public/components/edit_index_pattern/index_header/index_header.d.ts" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_query_bar/exploration_query_bar.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_query_bar/exploration_query_bar.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_clone/clone_action_name.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_clone/clone_action_name.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_delete/use_delete_action.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_delete/use_delete_action.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/utils.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/utils.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/editor.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/editor.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/edit_utils.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/edit_utils.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/tabs/custom_urls.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/tabs/custom_urls.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/index.tsx" + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts" }, { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/index.tsx" + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts" }, { "plugin": "securitySolution", @@ -13913,14 +13265,6 @@ "plugin": "transform", "path": "x-pack/plugins/transform/server/routes/api/transforms.ts" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" - }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/common/mock/index_pattern.ts" @@ -13928,34 +13272,6 @@ { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/common/mock/index_pattern.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/common/dependency_mocks/index_patterns.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/common/dependency_mocks/index_patterns.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/explorer/components/explorer_query_bar/explorer_query_bar.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/explorer/components/explorer_query_bar/explorer_query_bar.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/explorer/components/explorer_query_bar/explorer_query_bar.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/utils/new_job_utils.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/utils/new_job_utils.test.ts" } ], "children": [ @@ -14063,9 +13379,9 @@ "signature": [ "Record & Pick<{ type: string | ", + " | undefined; schema?: string | undefined; }, \"id\" | \"enabled\" | \"schema\" | \"params\"> & Pick<{ type: string | ", { "pluginId": "data", "scope": "common", @@ -15457,7 +14773,7 @@ "section": "def-common.IAggType", "text": "IAggType" }, - "; }, never>, \"type\" | \"enabled\" | \"id\" | \"schema\" | \"params\">[] | undefined) => ", + "; }, never>, \"type\" | \"id\" | \"enabled\" | \"schema\" | \"params\">[] | undefined) => ", { "pluginId": "data", "scope": "common", @@ -15529,23 +14845,23 @@ "label": "DataViewsContract", "description": [], "signature": [ - "{ get: (id: string) => Promise<", + "{ create: (spec: ", { "pluginId": "dataViews", "scope": "common", "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" + "section": "def-common.DataViewSpec", + "text": "DataViewSpec" }, - ">; delete: (indexPatternId: string) => Promise<{}>; create: (spec: ", + ", skipFetchFields?: boolean) => Promise<", { "pluginId": "dataViews", "scope": "common", "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewSpec", - "text": "DataViewSpec" + "section": "def-common.DataView", + "text": "DataView" }, - ", skipFetchFields?: boolean) => Promise<", + ">; delete: (indexPatternId: string) => Promise<{}>; find: (search: string, size?: number) => Promise<", { "pluginId": "dataViews", "scope": "common", @@ -15553,7 +14869,7 @@ "section": "def-common.DataView", "text": "DataView" }, - ">; find: (search: string, size?: number) => Promise<", + "[]>; get: (id: string) => Promise<", { "pluginId": "dataViews", "scope": "common", @@ -15561,7 +14877,7 @@ "section": "def-common.DataView", "text": "DataView" }, - "[]>; ensureDefaultDataView: ", + ">; ensureDefaultDataView: ", "EnsureDefaultDataView", "; getIds: (refresh?: boolean) => Promise; getTitles: (refresh?: boolean) => Promise; getIdsWithTitle: (refresh?: boolean) => Promise<", { @@ -15727,7 +15043,15 @@ "section": "def-common.DataView", "text": "DataView" }, - ", saveAttempts?: number, ignoreErrors?: boolean) => Promise; }" + ", saveAttempts?: number, ignoreErrors?: boolean) => Promise; getDefaultDataView: () => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " | undefined>; }" ], "path": "src/plugins/data_views/common/data_views/data_views.ts", "deprecated": false, @@ -15943,7 +15267,7 @@ "section": "def-common.FilterMeta", "text": "FilterMeta" }, - "; exists?: { field: string; } | undefined; }" + "; query: { exists?: { field: string; } | undefined; }; }" ], "path": "src/plugins/data/common/es_query/index.ts", "deprecated": true, @@ -18216,14 +17540,6 @@ "plugin": "discover", "path": "src/plugins/discover/public/application/apps/main/components/sidebar/discover_index_pattern.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, { "plugin": "transform", "path": "x-pack/plugins/transform/public/app/hooks/use_search_items/common.ts" @@ -18252,34 +17568,6 @@ "plugin": "discover", "path": "src/plugins/discover/target/types/public/application/apps/main/components/sidebar/discover_index_pattern.d.ts" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts" - }, { "plugin": "discover", "path": "src/plugins/discover/public/application/apps/main/components/sidebar/discover_sidebar_responsive.tsx" @@ -18315,22 +17603,6 @@ { "plugin": "discover", "path": "src/plugins/discover/public/application/apps/main/discover_main_route.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/common/types/kibana.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/common/types/kibana.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/common/types/kibana.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/common/types/kibana.d.ts" } ], "initialIsOpen": false @@ -18454,23 +17726,23 @@ "label": "IndexPatternsContract", "description": [], "signature": [ - "{ get: (id: string) => Promise<", + "{ create: (spec: ", { "pluginId": "dataViews", "scope": "common", "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" + "section": "def-common.DataViewSpec", + "text": "DataViewSpec" }, - ">; delete: (indexPatternId: string) => Promise<{}>; create: (spec: ", + ", skipFetchFields?: boolean) => Promise<", { "pluginId": "dataViews", "scope": "common", "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewSpec", - "text": "DataViewSpec" + "section": "def-common.DataView", + "text": "DataView" }, - ", skipFetchFields?: boolean) => Promise<", + ">; delete: (indexPatternId: string) => Promise<{}>; find: (search: string, size?: number) => Promise<", { "pluginId": "dataViews", "scope": "common", @@ -18478,7 +17750,7 @@ "section": "def-common.DataView", "text": "DataView" }, - ">; find: (search: string, size?: number) => Promise<", + "[]>; get: (id: string) => Promise<", { "pluginId": "dataViews", "scope": "common", @@ -18486,7 +17758,7 @@ "section": "def-common.DataView", "text": "DataView" }, - "[]>; ensureDefaultDataView: ", + ">; ensureDefaultDataView: ", "EnsureDefaultDataView", "; getIds: (refresh?: boolean) => Promise; getTitles: (refresh?: boolean) => Promise; getIdsWithTitle: (refresh?: boolean) => Promise<", { @@ -18652,7 +17924,15 @@ "section": "def-common.DataView", "text": "DataView" }, - ", saveAttempts?: number, ignoreErrors?: boolean) => Promise; }" + ", saveAttempts?: number, ignoreErrors?: boolean) => Promise; getDefaultDataView: () => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " | undefined>; }" ], "path": "src/plugins/data_views/common/data_views/data_views.ts", "deprecated": true, @@ -18685,50 +17965,6 @@ "plugin": "discover", "path": "src/plugins/discover/public/application/apps/main/utils/resolve_index_pattern.ts" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/containers/logs/log_source/log_source.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/containers/logs/log_source/log_source.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/common/dependency_mocks/index_patterns.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/common/dependency_mocks/index_patterns.d.ts" - }, { "plugin": "observability", "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/rtl_helpers.tsx" @@ -18905,66 +18141,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/public/lazy_load_bundle/index.ts" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/dependency_cache.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/dependency_cache.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/routing/resolvers.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/routing/resolvers.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/index_or_search/preconfigured_job_redirect.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/index_or_search/preconfigured_job_redirect.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/load_new_job_capabilities.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/load_new_job_capabilities.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/routing/router.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/routing/router.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/ml_context.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/ml_context.ts" - }, { "plugin": "graph", "path": "x-pack/plugins/graph/public/application.ts" @@ -19029,30 +18205,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/target/types/public/lazy_load_bundle/index.d.ts" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/__mocks__/index_patterns.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/__mocks__/index_patterns.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/routing/router.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/routing/router.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/util/dependency_cache.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/util/dependency_cache.d.ts" - }, { "plugin": "security", "path": "x-pack/plugins/security/target/types/public/management/roles/edit_role/edit_role_page.d.ts" @@ -19446,7 +18598,7 @@ "section": "def-common.SearchSource", "text": "SearchSource" }, - "; history: Record[]; setPreferredSearchStrategyId: (searchStrategyId: string) => void; setField: (field: K, value: ", + "; history: Record[]; setPreferredSearchStrategyId: (searchStrategyId: string) => void; setField: (field: K, value: ", { "pluginId": "data", "scope": "common", @@ -19462,7 +18614,7 @@ "section": "def-common.SearchSource", "text": "SearchSource" }, - "; removeField: (field: K) => ", + "; removeField: (field: K) => ", { "pluginId": "data", "scope": "common", @@ -19494,7 +18646,7 @@ "section": "def-common.SearchSourceFields", "text": "SearchSourceFields" }, - "; getField: (field: K, recurse?: boolean) => ", + "; getField: (field: K, recurse?: boolean) => ", { "pluginId": "data", "scope": "common", @@ -19502,7 +18654,7 @@ "section": "def-common.SearchSourceFields", "text": "SearchSourceFields" }, - "[K]; getOwnField: (field: K) => ", + "[K]; getOwnField: (field: K) => ", { "pluginId": "data", "scope": "common", @@ -19876,9 +19028,9 @@ }, " & { meta: ", "MatchAllFilterMeta", - "; match_all: ", + "; query: { match_all: ", "QueryDslMatchAllQuery", - "; }" + "; }; }" ], "path": "src/plugins/data/common/es_query/index.ts", "deprecated": true, @@ -20007,7 +19159,7 @@ "section": "def-common.RangeFilterMeta", "text": "RangeFilterMeta" }, - "; range: { [key: string]: ", + "; query: { range: { [key: string]: ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -20015,7 +19167,7 @@ "section": "def-common.RangeFilterParams", "text": "RangeFilterParams" }, - "; }; }" + "; }; }; }" ], "path": "src/plugins/data/common/es_query/index.ts", "deprecated": true, @@ -20397,35 +19549,35 @@ }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts" + "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts" + "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts" + "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts" + "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts" }, { "plugin": "maps", @@ -20567,10 +19719,6 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/timelines/store/timeline/epic.ts" }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/timelines/store/timeline/epic.ts" - }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/detections/components/rules/description_step/helpers.tsx" @@ -21593,66 +20741,6 @@ } ] }, - { - "parentPluginId": "data", - "id": "def-public.esFilters.isMissingFilter", - "type": "Function", - "tags": [], - "label": "isMissingFilter", - "description": [], - "signature": [ - "(filter: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - ") => filter is ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.MissingFilter", - "text": "MissingFilter" - } - ], - "path": "src/plugins/data/public/deprecated.ts", - "deprecated": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "data", - "id": "def-public.esFilters.isMissingFilter.$1", - "type": "Object", - "tags": [], - "label": "filter", - "description": [], - "signature": [ - "{ $state?: { store: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.FilterStateStore", - "text": "FilterStateStore" - }, - "; } | undefined; meta: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.FilterMeta", - "text": "FilterMeta" - }, - "; query?: Record | undefined; }" - ], - "path": "node_modules/@kbn/es-query/target_types/filters/build_filters/missing_filter.d.ts", - "deprecated": false - } - ] - }, { "parentPluginId": "data", "id": "def-public.esFilters.isQueryStringFilter", @@ -22641,7 +21729,7 @@ "section": "def-common.RangeFilterMeta", "text": "RangeFilterMeta" }, - "; range: { [key: string]: ", + "; query: { range: { [key: string]: ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -22649,7 +21737,7 @@ "section": "def-common.RangeFilterParams", "text": "RangeFilterParams" }, - "; }; }" + "; }; }; }" ], "path": "src/plugins/data/public/query/timefilter/lib/change_time_filter.ts", "deprecated": false @@ -22708,7 +21796,7 @@ "section": "def-common.RangeFilterMeta", "text": "RangeFilterMeta" }, - "; range: { [key: string]: ", + "; query: { range: { [key: string]: ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -22716,7 +21804,7 @@ "section": "def-common.RangeFilterParams", "text": "RangeFilterParams" }, - "; }; }" + "; }; }; }" ], "path": "src/plugins/data/public/query/timefilter/lib/change_time_filter.ts", "deprecated": false @@ -25537,23 +24625,23 @@ "\ndata views service\n{@link DataViewsContract}" ], "signature": [ - "{ get: (id: string) => Promise<", + "{ create: (spec: ", { "pluginId": "dataViews", "scope": "common", "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" + "section": "def-common.DataViewSpec", + "text": "DataViewSpec" }, - ">; delete: (indexPatternId: string) => Promise<{}>; create: (spec: ", + ", skipFetchFields?: boolean) => Promise<", { "pluginId": "dataViews", "scope": "common", "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewSpec", - "text": "DataViewSpec" + "section": "def-common.DataView", + "text": "DataView" }, - ", skipFetchFields?: boolean) => Promise<", + ">; delete: (indexPatternId: string) => Promise<{}>; find: (search: string, size?: number) => Promise<", { "pluginId": "dataViews", "scope": "common", @@ -25561,7 +24649,7 @@ "section": "def-common.DataView", "text": "DataView" }, - ">; find: (search: string, size?: number) => Promise<", + "[]>; get: (id: string) => Promise<", { "pluginId": "dataViews", "scope": "common", @@ -25569,7 +24657,7 @@ "section": "def-common.DataView", "text": "DataView" }, - "[]>; ensureDefaultDataView: ", + ">; ensureDefaultDataView: ", "EnsureDefaultDataView", "; getIds: (refresh?: boolean) => Promise; getTitles: (refresh?: boolean) => Promise; getIdsWithTitle: (refresh?: boolean) => Promise<", { @@ -25735,7 +24823,15 @@ "section": "def-common.DataView", "text": "DataView" }, - ", saveAttempts?: number, ignoreErrors?: boolean) => Promise; }" + ", saveAttempts?: number, ignoreErrors?: boolean) => Promise; getDefaultDataView: () => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " | undefined>; }" ], "path": "src/plugins/data/public/types.ts", "deprecated": false @@ -25752,23 +24848,23 @@ "\nindex patterns service\n{@link DataViewsContract}" ], "signature": [ - "{ get: (id: string) => Promise<", + "{ create: (spec: ", { "pluginId": "dataViews", "scope": "common", "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" + "section": "def-common.DataViewSpec", + "text": "DataViewSpec" }, - ">; delete: (indexPatternId: string) => Promise<{}>; create: (spec: ", + ", skipFetchFields?: boolean) => Promise<", { "pluginId": "dataViews", "scope": "common", "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewSpec", - "text": "DataViewSpec" + "section": "def-common.DataView", + "text": "DataView" }, - ", skipFetchFields?: boolean) => Promise<", + ">; delete: (indexPatternId: string) => Promise<{}>; find: (search: string, size?: number) => Promise<", { "pluginId": "dataViews", "scope": "common", @@ -25776,7 +24872,7 @@ "section": "def-common.DataView", "text": "DataView" }, - ">; find: (search: string, size?: number) => Promise<", + "[]>; get: (id: string) => Promise<", { "pluginId": "dataViews", "scope": "common", @@ -25784,7 +24880,7 @@ "section": "def-common.DataView", "text": "DataView" }, - "[]>; ensureDefaultDataView: ", + ">; ensureDefaultDataView: ", "EnsureDefaultDataView", "; getIds: (refresh?: boolean) => Promise; getTitles: (refresh?: boolean) => Promise; getIdsWithTitle: (refresh?: boolean) => Promise<", { @@ -25950,7 +25046,15 @@ "section": "def-common.DataView", "text": "DataView" }, - ", saveAttempts?: number, ignoreErrors?: boolean) => Promise; }" + ", saveAttempts?: number, ignoreErrors?: boolean) => Promise; getDefaultDataView: () => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " | undefined>; }" ], "path": "src/plugins/data/public/types.ts", "deprecated": true, @@ -26857,7 +25961,7 @@ "section": "def-server.PluginInitializerContext", "text": "PluginInitializerContext" }, - "; }>; }>; autocomplete: Readonly<{} & { querySuggestions: Readonly<{} & { enabled: boolean; }>; valueSuggestions: Readonly<{} & { enabled: boolean; timeout: moment.Duration; tiers: string[]; terminateAfter: moment.Duration; }>; }>; }>>" + "; }>; }>; autocomplete: Readonly<{} & { querySuggestions: Readonly<{} & { enabled: boolean; }>; valueSuggestions: Readonly<{} & { timeout: moment.Duration; enabled: boolean; tiers: string[]; terminateAfter: moment.Duration; }>; }>; }>>" ], "path": "src/plugins/data/server/plugin.ts", "deprecated": false, @@ -28546,13 +27650,21 @@ "signature": [ "(fieldName: string, format: ", { - "pluginId": "expressions", + "pluginId": "fieldFormats", "scope": "common", - "docId": "kibExpressionsPluginApi", + "docId": "kibFieldFormatsPluginApi", "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - ">) => void" + "<", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormatParams", + "text": "FieldFormatParams" + }, + ">) => void" ], "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": false, @@ -28580,13 +27692,21 @@ "description": [], "signature": [ { - "pluginId": "expressions", + "pluginId": "fieldFormats", "scope": "common", - "docId": "kibExpressionsPluginApi", + "docId": "kibFieldFormatsPluginApi", "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - ">" + "<", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormatParams", + "text": "FieldFormatParams" + }, + ">" ], "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": false, @@ -29009,18 +28129,6 @@ "plugin": "observability", "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_app_index_pattern.tsx" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts" - }, { "plugin": "maps", "path": "x-pack/plugins/maps/public/embeddable/types.ts" @@ -29193,30 +28301,6 @@ "plugin": "dataVisualizer", "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/chart_loader/chart_loader.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/chart_loader/chart_loader.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/embeddables/types.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/embeddables/types.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx" - }, { "plugin": "apm", "path": "x-pack/plugins/apm/public/components/app/RumDashboard/LocalUIFilters/SelectedFilters.tsx" @@ -29345,14 +28429,6 @@ "plugin": "transform", "path": "x-pack/plugins/transform/common/types/index_pattern.ts" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" - }, { "plugin": "lens", "path": "x-pack/plugins/lens/server/routes/existing_fields.test.ts" @@ -29385,14 +28461,6 @@ "plugin": "dataVisualizer", "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/utils/saved_search_utils.test.ts" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/common/dependency_mocks/index_patterns.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/common/dependency_mocks/index_patterns.d.ts" - }, { "plugin": "lens", "path": "x-pack/plugins/lens/target/types/server/routes/existing_fields.d.ts" @@ -30059,35 +29127,35 @@ }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts" + "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts" + "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts" + "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts" + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts" + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts" }, { "plugin": "observability", @@ -30297,250 +29365,6 @@ "plugin": "dataVisualizer", "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/field_format_service.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/field_format_service.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_grid/common.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_grid/common.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_grid/common.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_grid/common.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/data_loader/data_loader.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/data_loader/data_loader.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/data_loader/data_loader.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/scatterplot_matrix/use_scatterplot_field_options.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/scatterplot_matrix/use_scatterplot_field_options.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/single_metric_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/single_metric_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/multi_metric_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/multi_metric_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/population_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/population_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/advanced_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/advanced_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/results_loader/categorization_examples_loader.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/results_loader/categorization_examples_loader.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/categorization_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/categorization_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/rare_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/rare_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator_factory.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator_factory.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector_service.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector_service.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/expandable_section/expandable_section_results.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/expandable_section/expandable_section_results.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/use_exploration_results.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/use_exploration_results.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/exploration_results_table.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/exploration_results_table.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/ml_context.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/ml_context.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/common/use_results_view_config.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/common/use_results_view_config.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/common/use_results_view_config.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" - }, { "plugin": "apm", "path": "x-pack/plugins/apm/public/components/shared/kuery_bar/index.tsx" @@ -30841,22 +29665,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/target/types/public/components/geo_index_pattern_select.d.ts" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities._service.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities._service.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/remove_nested_field_children.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/remove_nested_field_children.test.ts" - }, { "plugin": "maps", "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/util/get_docvalue_source_fields.test.ts" @@ -30869,14 +29677,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/util/get_docvalue_source_fields.test.ts" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/__mocks__/index_pattern.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/__mocks__/index_pattern.ts" - }, { "plugin": "maps", "path": "x-pack/plugins/maps/target/types/public/classes/fields/agg/count_agg_field.d.ts" @@ -30941,14 +29741,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/target/types/public/connected_components/edit_layer_panel/filter_editor/filter_editor.d.ts" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/components/full_time_range_selector/full_time_range_selector.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/components/full_time_range_selector/full_time_range_selector.d.ts" - }, { "plugin": "dataVisualizer", "path": "x-pack/plugins/data_visualizer/target/types/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector.d.ts" @@ -34362,14 +33154,6 @@ "plugin": "fleet", "path": "x-pack/plugins/fleet/public/applications/fleet/components/search_bar.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_grid/common.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_grid/common.ts" - }, { "plugin": "infra", "path": "x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/custom_metric_form.tsx" @@ -34542,34 +33326,6 @@ "plugin": "stackAlerts", "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.test.ts" - }, { "plugin": "infra", "path": "x-pack/plugins/infra/target/types/public/alerting/common/group_by_expression/group_by_expression.d.ts" @@ -37307,14 +36063,6 @@ "plugin": "discover", "path": "src/plugins/discover/public/application/apps/main/components/sidebar/discover_index_pattern.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, { "plugin": "transform", "path": "x-pack/plugins/transform/public/app/hooks/use_search_items/common.ts" @@ -37343,34 +36091,6 @@ "plugin": "discover", "path": "src/plugins/discover/target/types/public/application/apps/main/components/sidebar/discover_index_pattern.d.ts" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts" - }, { "plugin": "discover", "path": "src/plugins/discover/public/application/apps/main/components/sidebar/discover_sidebar_responsive.tsx" @@ -37406,22 +36126,6 @@ { "plugin": "discover", "path": "src/plugins/discover/public/application/apps/main/discover_main_route.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/common/types/kibana.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/common/types/kibana.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/common/types/kibana.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/common/types/kibana.d.ts" } ], "initialIsOpen": false @@ -40955,13 +39659,21 @@ "signature": [ "(fieldName: string, format: ", { - "pluginId": "expressions", + "pluginId": "fieldFormats", "scope": "common", - "docId": "kibExpressionsPluginApi", + "docId": "kibFieldFormatsPluginApi", "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - ">) => void" + "<", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormatParams", + "text": "FieldFormatParams" + }, + ">) => void" ], "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": false, @@ -40989,13 +39701,21 @@ "description": [], "signature": [ { - "pluginId": "expressions", + "pluginId": "fieldFormats", "scope": "common", - "docId": "kibExpressionsPluginApi", + "docId": "kibFieldFormatsPluginApi", "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - ">" + "<", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormatParams", + "text": "FieldFormatParams" + }, + ">" ], "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": false, @@ -41727,14 +40447,38 @@ "parentPluginId": "data", "id": "def-common.DataViewsService.ensureDefaultDataView", "type": "Function", - "tags": [], + "tags": [ + "deprecated" + ], "label": "ensureDefaultDataView", "description": [], "signature": [ "() => Promise | undefined" ], "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, + "deprecated": true, + "references": [ + { + "plugin": "dataViews", + "path": "src/plugins/data_views/common/data_views/data_views.ts" + }, + { + "plugin": "discover", + "path": "src/plugins/discover/public/application/apps/main/discover_main_route.tsx" + }, + { + "plugin": "dashboard", + "path": "src/plugins/dashboard/public/application/lib/load_saved_dashboard_state.ts" + }, + { + "plugin": "lens", + "path": "x-pack/plugins/lens/public/plugin.ts" + }, + { + "plugin": "visualize", + "path": "src/plugins/visualize/public/plugin.ts" + } + ], "returnComment": [], "children": [] }, @@ -42866,6 +41610,33 @@ } ], "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-common.DataViewsService.getDefaultDataView", + "type": "Function", + "tags": [], + "label": "getDefaultDataView", + "description": [ + "\nReturns the default data view as an object. If no default is found, or it is missing\nanother data view is selected as default and returned." + ], + "signature": [ + "() => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " | undefined>" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "children": [], + "returnComment": [ + "default data view" + ] } ], "initialIsOpen": false @@ -43304,18 +42075,6 @@ "plugin": "observability", "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_app_index_pattern.tsx" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts" - }, { "plugin": "maps", "path": "x-pack/plugins/maps/public/embeddable/types.ts" @@ -43488,30 +42247,6 @@ "plugin": "dataVisualizer", "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/chart_loader/chart_loader.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/chart_loader/chart_loader.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/embeddables/types.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/embeddables/types.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx" - }, { "plugin": "apm", "path": "x-pack/plugins/apm/public/components/app/RumDashboard/LocalUIFilters/SelectedFilters.tsx" @@ -43640,14 +42375,6 @@ "plugin": "transform", "path": "x-pack/plugins/transform/common/types/index_pattern.ts" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" - }, { "plugin": "lens", "path": "x-pack/plugins/lens/server/routes/existing_fields.test.ts" @@ -43680,14 +42407,6 @@ "plugin": "dataVisualizer", "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/utils/saved_search_utils.test.ts" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/common/dependency_mocks/index_patterns.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/common/dependency_mocks/index_patterns.d.ts" - }, { "plugin": "lens", "path": "x-pack/plugins/lens/target/types/server/routes/existing_fields.d.ts" @@ -44354,35 +43073,35 @@ }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts" + "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts" + "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts" + "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts" + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts" + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts" }, { "plugin": "observability", @@ -44592,250 +43311,6 @@ "plugin": "dataVisualizer", "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/field_format_service.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/field_format_service.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_grid/common.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_grid/common.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_grid/common.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_grid/common.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/data_loader/data_loader.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/data_loader/data_loader.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/data_loader/data_loader.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/scatterplot_matrix/use_scatterplot_field_options.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/scatterplot_matrix/use_scatterplot_field_options.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/single_metric_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/single_metric_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/multi_metric_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/multi_metric_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/population_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/population_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/advanced_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/advanced_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/results_loader/categorization_examples_loader.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/results_loader/categorization_examples_loader.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/categorization_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/categorization_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/rare_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/rare_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator_factory.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator_factory.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector_service.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector_service.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/expandable_section/expandable_section_results.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/expandable_section/expandable_section_results.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/use_exploration_results.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/use_exploration_results.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/exploration_results_table.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/exploration_results_table.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/ml_context.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/ml_context.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/common/use_results_view_config.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/common/use_results_view_config.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/common/use_results_view_config.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" - }, { "plugin": "apm", "path": "x-pack/plugins/apm/public/components/shared/kuery_bar/index.tsx" @@ -45136,22 +43611,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/target/types/public/components/geo_index_pattern_select.d.ts" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities._service.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities._service.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/remove_nested_field_children.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/remove_nested_field_children.test.ts" - }, { "plugin": "maps", "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/util/get_docvalue_source_fields.test.ts" @@ -45164,14 +43623,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/util/get_docvalue_source_fields.test.ts" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/__mocks__/index_pattern.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/__mocks__/index_pattern.ts" - }, { "plugin": "maps", "path": "x-pack/plugins/maps/target/types/public/classes/fields/agg/count_agg_field.d.ts" @@ -45236,14 +43687,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/target/types/public/connected_components/edit_layer_panel/filter_editor/filter_editor.d.ts" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/components/full_time_range_selector/full_time_range_selector.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/components/full_time_range_selector/full_time_range_selector.d.ts" - }, { "plugin": "dataVisualizer", "path": "x-pack/plugins/data_visualizer/target/types/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector.d.ts" @@ -49725,7 +48168,7 @@ "section": "def-common.IndexPatternLoadExpressionFunctionDefinition", "text": "IndexPatternLoadExpressionFunctionDefinition" }, - ", \"type\" | \"telemetry\" | \"inject\" | \"extract\" | \"migrations\" | \"name\" | \"disabled\" | \"help\" | \"inputTypes\" | \"args\" | \"aliases\" | \"context\">" + ", \"telemetry\" | \"inject\" | \"extract\" | \"migrations\" | \"type\" | \"name\" | \"disabled\" | \"help\" | \"inputTypes\" | \"args\" | \"aliases\" | \"context\">" ], "path": "src/plugins/data_views/common/expressions/load_index_pattern.ts", "deprecated": false, @@ -50316,71 +48759,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "data", - "id": "def-common.isMissingFilter", - "type": "Function", - "tags": [ - "deprecated" - ], - "label": "isMissingFilter", - "description": [], - "signature": [ - "(filter: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - ") => filter is ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.MissingFilter", - "text": "MissingFilter" - } - ], - "path": "src/plugins/data/common/es_query/index.ts", - "deprecated": true, - "removeBy": "8.1", - "references": [], - "returnComment": [], - "children": [ - { - "parentPluginId": "data", - "id": "def-common.isMissingFilter.$1", - "type": "Object", - "tags": [], - "label": "filter", - "description": [], - "signature": [ - "{ $state?: { store: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.FilterStateStore", - "text": "FilterStateStore" - }, - "; } | undefined; meta: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.FilterMeta", - "text": "FilterMeta" - }, - "; query?: Record | undefined; }" - ], - "path": "node_modules/@kbn/es-query/target_types/filters/build_filters/missing_filter.d.ts", - "deprecated": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "data", "id": "def-common.isMultiField", @@ -51694,13 +50072,21 @@ "signature": [ "Record>> | undefined" + "<", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormatParams", + "text": "FieldFormatParams" + }, + ">> | undefined" ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false @@ -51893,13 +50279,21 @@ "description": [], "signature": [ { - "pluginId": "expressions", + "pluginId": "fieldFormats", "scope": "common", - "docId": "kibExpressionsPluginApi", + "docId": "kibFieldFormatsPluginApi", "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "> | undefined" + "<", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormatParams", + "text": "FieldFormatParams" + }, + "> | undefined" ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false @@ -52197,13 +50591,21 @@ "description": [], "signature": [ { - "pluginId": "expressions", + "pluginId": "fieldFormats", "scope": "common", - "docId": "kibExpressionsPluginApi", + "docId": "kibFieldFormatsPluginApi", "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "> | undefined" + "<", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormatParams", + "text": "FieldFormatParams" + }, + "> | undefined" ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false @@ -52670,14 +51072,6 @@ "plugin": "fleet", "path": "x-pack/plugins/fleet/public/applications/fleet/components/search_bar.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_grid/common.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_grid/common.ts" - }, { "plugin": "infra", "path": "x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/custom_metric_form.tsx" @@ -52850,34 +51244,6 @@ "plugin": "stackAlerts", "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.test.ts" - }, { "plugin": "infra", "path": "x-pack/plugins/infra/target/types/public/alerting/common/group_by_expression/group_by_expression.d.ts" @@ -53420,142 +51786,6 @@ "plugin": "timelines", "path": "x-pack/plugins/timelines/public/container/source/index.tsx" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/containers/with_kuery_autocompletion.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/containers/with_kuery_autocompletion.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/kuery_bar.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/kuery_bar.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_recognizer/data_recognizer.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_recognizer/data_recognizer.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/load_new_job_capabilities.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/load_new_job_capabilities.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/inventory_view/components/toolbars/toolbar.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/inventory_view/components/toolbars/toolbar.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/utils/kuery.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/utils/kuery.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_data.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_data.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/alerting/metric_threshold/hooks/use_metrics_explorer_chart_data.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/alerting/metric_threshold/hooks/use_metrics_explorer_chart_data.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/alerting/metric_threshold/components/expression_chart.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/alerting/metric_threshold/components/expression_chart.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/containers/logs/log_filter/log_filter_state.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/containers/logs/log_filter/log_filter_state.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/containers/with_source/with_source.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/containers/with_source/with_source.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/toolbar.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/toolbar.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metric_explorer_state.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metric_explorer_state.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/metrics_explorer/index.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/metrics_explorer/index.tsx" - }, { "plugin": "monitoring", "path": "x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx" @@ -53588,14 +51818,6 @@ "plugin": "monitoring", "path": "x-pack/plugins/monitoring/public/lib/kuery.ts" }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts" - }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts" @@ -53808,38 +52030,6 @@ "plugin": "timelines", "path": "x-pack/plugins/timelines/public/mock/index_pattern.ts" }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/target/types/common/search_strategy/index_fields/index.d.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/target/types/common/search_strategy/index_fields/index.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/containers/with_kuery_autocompletion.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/containers/with_kuery_autocompletion.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/containers/with_source/with_source.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/containers/with_source/with_source.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/index_pattern_context.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/index_pattern_context.ts" - }, { "plugin": "monitoring", "path": "x-pack/plugins/monitoring/target/types/public/components/kuery_bar/with_kuery_autocompletion.d.ts" @@ -53884,30 +52074,6 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/target/types/public/network/components/network_top_countries_table/columns.d.ts" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/alerting/metric_threshold/components/expression_chart.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/alerting/metric_threshold/components/expression_chart.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/alerting/metric_threshold/hooks/use_metrics_explorer_chart_data.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/alerting/metric_threshold/hooks/use_metrics_explorer_chart_data.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/pages/metrics/metrics_explorer/index.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/pages/metrics/metrics_explorer/index.d.ts" - }, { "plugin": "monitoring", "path": "x-pack/plugins/monitoring/target/types/public/alerts/components/param_details_form/use_derived_index_pattern.d.ts" @@ -53956,34 +52122,6 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/target/types/public/ueba/pages/details/types.d.ts" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/pages/metrics/metrics_explorer/hooks/use_metric_explorer_state.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/pages/metrics/metrics_explorer/hooks/use_metric_explorer_state.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_data.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_data.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/jobs/new_job/common/index_pattern_context.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/jobs/new_job/common/index_pattern_context.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/jobs/new_job/common/index_pattern_context.d.ts" - }, { "plugin": "indexPatternManagement", "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.tsx" @@ -54017,68 +52155,12 @@ "path": "src/plugins/index_pattern_management/target/types/public/components/edit_index_pattern/index_header/index_header.d.ts" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_query_bar/exploration_query_bar.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_query_bar/exploration_query_bar.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_clone/clone_action_name.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_clone/clone_action_name.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_delete/use_delete_action.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_delete/use_delete_action.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/utils.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/utils.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/editor.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/editor.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/edit_utils.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/edit_utils.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/tabs/custom_urls.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/tabs/custom_urls.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/index.tsx" + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts" }, { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/index.tsx" + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts" }, { "plugin": "securitySolution", @@ -54180,14 +52262,6 @@ "plugin": "transform", "path": "x-pack/plugins/transform/server/routes/api/transforms.ts" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" - }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/common/mock/index_pattern.ts" @@ -54195,34 +52269,6 @@ { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/common/mock/index_pattern.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/common/dependency_mocks/index_patterns.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/common/dependency_mocks/index_patterns.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/explorer/components/explorer_query_bar/explorer_query_bar.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/explorer/components/explorer_query_bar/explorer_query_bar.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/explorer/components/explorer_query_bar/explorer_query_bar.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/utils/new_job_utils.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/utils/new_job_utils.test.ts" } ], "children": [ @@ -54330,9 +52376,9 @@ "signature": [ "Record Promise<", + "{ create: (spec: ", { "pluginId": "dataViews", "scope": "common", "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" + "section": "def-common.DataViewSpec", + "text": "DataViewSpec" }, - ">; delete: (indexPatternId: string) => Promise<{}>; create: (spec: ", + ", skipFetchFields?: boolean) => Promise<", { "pluginId": "dataViews", "scope": "common", "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewSpec", - "text": "DataViewSpec" + "section": "def-common.DataView", + "text": "DataView" }, - ", skipFetchFields?: boolean) => Promise<", + ">; delete: (indexPatternId: string) => Promise<{}>; find: (search: string, size?: number) => Promise<", { "pluginId": "dataViews", "scope": "common", @@ -55957,7 +54003,7 @@ "section": "def-common.DataView", "text": "DataView" }, - ">; find: (search: string, size?: number) => Promise<", + "[]>; get: (id: string) => Promise<", { "pluginId": "dataViews", "scope": "common", @@ -55965,7 +54011,7 @@ "section": "def-common.DataView", "text": "DataView" }, - "[]>; ensureDefaultDataView: ", + ">; ensureDefaultDataView: ", "EnsureDefaultDataView", "; getIds: (refresh?: boolean) => Promise; getTitles: (refresh?: boolean) => Promise; getIdsWithTitle: (refresh?: boolean) => Promise<", { @@ -56131,7 +54177,15 @@ "section": "def-common.DataView", "text": "DataView" }, - ", saveAttempts?: number, ignoreErrors?: boolean) => Promise; }" + ", saveAttempts?: number, ignoreErrors?: boolean) => Promise; getDefaultDataView: () => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " | undefined>; }" ], "path": "src/plugins/data_views/common/data_views/data_views.ts", "deprecated": false, @@ -56218,7 +54272,7 @@ "section": "def-common.FilterMeta", "text": "FilterMeta" }, - "; exists?: { field: string; } | undefined; }" + "; query: { exists?: { field: string; } | undefined; }; }" ], "path": "src/plugins/data/common/es_query/index.ts", "deprecated": true, @@ -56245,13 +54299,21 @@ "signature": [ "{ [x: string]: ", { - "pluginId": "expressions", + "pluginId": "fieldFormats", "scope": "common", - "docId": "kibExpressionsPluginApi", + "docId": "kibFieldFormatsPluginApi", "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - ">; }" + "<", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormatParams", + "text": "FieldFormatParams" + }, + ">; }" ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false, @@ -58304,19 +56366,19 @@ }, { "plugin": "visualizations", - "path": "src/plugins/visualizations/public/saved_visualizations/saved_visualization_references/controls_references.ts" + "path": "src/plugins/visualizations/public/utils/saved_visualization_references/controls_references.ts" }, { "plugin": "visualizations", - "path": "src/plugins/visualizations/public/saved_visualizations/saved_visualization_references/controls_references.ts" + "path": "src/plugins/visualizations/public/utils/saved_visualization_references/controls_references.ts" }, { "plugin": "visualizations", - "path": "src/plugins/visualizations/public/saved_visualizations/saved_visualization_references/timeseries_references.ts" + "path": "src/plugins/visualizations/public/utils/saved_visualization_references/timeseries_references.ts" }, { "plugin": "visualizations", - "path": "src/plugins/visualizations/public/saved_visualizations/saved_visualization_references/timeseries_references.ts" + "path": "src/plugins/visualizations/public/utils/saved_visualization_references/timeseries_references.ts" }, { "plugin": "dashboard", @@ -58418,14 +56480,6 @@ "plugin": "discover", "path": "src/plugins/discover/public/application/apps/main/components/sidebar/discover_index_pattern.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, { "plugin": "transform", "path": "x-pack/plugins/transform/public/app/hooks/use_search_items/common.ts" @@ -58454,34 +56508,6 @@ "plugin": "discover", "path": "src/plugins/discover/target/types/public/application/apps/main/components/sidebar/discover_index_pattern.d.ts" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts" - }, { "plugin": "discover", "path": "src/plugins/discover/public/application/apps/main/components/sidebar/discover_sidebar_responsive.tsx" @@ -58517,22 +56543,6 @@ { "plugin": "discover", "path": "src/plugins/discover/public/application/apps/main/discover_main_route.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/common/types/kibana.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/common/types/kibana.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/common/types/kibana.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/common/types/kibana.d.ts" } ], "initialIsOpen": false @@ -58686,23 +56696,23 @@ "label": "IndexPatternsContract", "description": [], "signature": [ - "{ get: (id: string) => Promise<", + "{ create: (spec: ", { "pluginId": "dataViews", "scope": "common", "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" + "section": "def-common.DataViewSpec", + "text": "DataViewSpec" }, - ">; delete: (indexPatternId: string) => Promise<{}>; create: (spec: ", + ", skipFetchFields?: boolean) => Promise<", { "pluginId": "dataViews", "scope": "common", "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewSpec", - "text": "DataViewSpec" + "section": "def-common.DataView", + "text": "DataView" }, - ", skipFetchFields?: boolean) => Promise<", + ">; delete: (indexPatternId: string) => Promise<{}>; find: (search: string, size?: number) => Promise<", { "pluginId": "dataViews", "scope": "common", @@ -58710,7 +56720,7 @@ "section": "def-common.DataView", "text": "DataView" }, - ">; find: (search: string, size?: number) => Promise<", + "[]>; get: (id: string) => Promise<", { "pluginId": "dataViews", "scope": "common", @@ -58718,7 +56728,7 @@ "section": "def-common.DataView", "text": "DataView" }, - "[]>; ensureDefaultDataView: ", + ">; ensureDefaultDataView: ", "EnsureDefaultDataView", "; getIds: (refresh?: boolean) => Promise; getTitles: (refresh?: boolean) => Promise; getIdsWithTitle: (refresh?: boolean) => Promise<", { @@ -58884,7 +56894,15 @@ "section": "def-common.DataView", "text": "DataView" }, - ", saveAttempts?: number, ignoreErrors?: boolean) => Promise; }" + ", saveAttempts?: number, ignoreErrors?: boolean) => Promise; getDefaultDataView: () => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " | undefined>; }" ], "path": "src/plugins/data_views/common/data_views/data_views.ts", "deprecated": true, @@ -58917,50 +56935,6 @@ "plugin": "discover", "path": "src/plugins/discover/public/application/apps/main/utils/resolve_index_pattern.ts" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/containers/logs/log_source/log_source.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/containers/logs/log_source/log_source.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/common/dependency_mocks/index_patterns.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/common/dependency_mocks/index_patterns.d.ts" - }, { "plugin": "observability", "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/rtl_helpers.tsx" @@ -59137,66 +57111,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/public/lazy_load_bundle/index.ts" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/dependency_cache.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/dependency_cache.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/routing/resolvers.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/routing/resolvers.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/index_or_search/preconfigured_job_redirect.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/index_or_search/preconfigured_job_redirect.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/load_new_job_capabilities.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/load_new_job_capabilities.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/routing/router.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/routing/router.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/ml_context.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/ml_context.ts" - }, { "plugin": "graph", "path": "x-pack/plugins/graph/public/application.ts" @@ -59261,30 +57175,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/target/types/public/lazy_load_bundle/index.d.ts" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/__mocks__/index_patterns.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/__mocks__/index_patterns.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/routing/router.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/routing/router.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/util/dependency_cache.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/util/dependency_cache.d.ts" - }, { "plugin": "security", "path": "x-pack/plugins/security/target/types/public/management/roles/edit_role/edit_role_page.d.ts" @@ -59817,9 +57707,9 @@ }, " & { meta: ", "MatchAllFilterMeta", - "; match_all: ", + "; query: { match_all: ", "QueryDslMatchAllQuery", - "; }" + "; }; }" ], "path": "src/plugins/data/common/es_query/index.ts", "deprecated": true, @@ -59841,39 +57731,6 @@ "deprecated": false, "initialIsOpen": false }, - { - "parentPluginId": "data", - "id": "def-common.MissingFilter", - "type": "Type", - "tags": [ - "deprecated" - ], - "label": "MissingFilter", - "description": [], - "signature": [ - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - " & { meta: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.FilterMeta", - "text": "FilterMeta" - }, - "; missing: { field: string; }; }" - ], - "path": "src/plugins/data/common/es_query/index.ts", - "deprecated": true, - "removeBy": "8.1", - "references": [], - "initialIsOpen": false - }, { "parentPluginId": "data", "id": "def-common.OnError", @@ -60086,7 +57943,7 @@ "section": "def-common.RangeFilterMeta", "text": "RangeFilterMeta" }, - "; range: { [key: string]: ", + "; query: { range: { [key: string]: ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -60094,7 +57951,7 @@ "section": "def-common.RangeFilterParams", "text": "RangeFilterParams" }, - "; }; }" + "; }; }; }" ], "path": "src/plugins/data/common/es_query/index.ts", "deprecated": true, @@ -60192,7 +58049,7 @@ "label": "RuntimeType", "description": [], "signature": [ - "\"boolean\" | \"date\" | \"keyword\" | \"geo_point\" | \"ip\" | \"long\" | \"double\"" + "\"boolean\" | \"keyword\" | \"date\" | \"geo_point\" | \"ip\" | \"long\" | \"double\"" ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false, diff --git a/api_docs/data.mdx b/api_docs/data.mdx index 163889f42a098..a4c3b991b2f80 100644 --- a/api_docs/data.mdx +++ b/api_docs/data.mdx @@ -18,7 +18,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3210 | 43 | 2825 | 48 | +| 3206 | 43 | 2820 | 48 | ## Client diff --git a/api_docs/data_autocomplete.mdx b/api_docs/data_autocomplete.mdx index 89eec94f4d474..863f7a11dc1b9 100644 --- a/api_docs/data_autocomplete.mdx +++ b/api_docs/data_autocomplete.mdx @@ -18,7 +18,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3210 | 43 | 2825 | 48 | +| 3206 | 43 | 2820 | 48 | ## Client diff --git a/api_docs/data_query.json b/api_docs/data_query.json index e711d7c5bbb76..858e25ebb2b09 100644 --- a/api_docs/data_query.json +++ b/api_docs/data_query.json @@ -1167,7 +1167,7 @@ "section": "def-public.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"bulkUpdate\">) => ", + ", \"create\" | \"bulkCreate\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"bulkUpdate\">) => ", { "pluginId": "data", "scope": "public", @@ -1195,7 +1195,7 @@ "section": "def-public.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"bulkUpdate\">" + ", \"create\" | \"bulkCreate\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"bulkUpdate\">" ], "path": "src/plugins/data/public/query/saved_query/saved_query_service.ts", "deprecated": false, diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index bf310e14a12c0..45581645ccad6 100644 --- a/api_docs/data_query.mdx +++ b/api_docs/data_query.mdx @@ -18,7 +18,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3210 | 43 | 2825 | 48 | +| 3206 | 43 | 2820 | 48 | ## Client diff --git a/api_docs/data_search.json b/api_docs/data_search.json index a17d25b4307e7..00ec8551707c2 100644 --- a/api_docs/data_search.json +++ b/api_docs/data_search.json @@ -217,11 +217,9 @@ "\nSearch sessions SO CRUD\n{@link ISessionsClient}" ], "signature": [ - "{ get: (sessionId: string) => Promise<", + "{ create: ({ name, appId, urlGeneratorId, initialState, restoreState, sessionId, }: { name: string; appId: string; initialState: Record; restoreState: Record; urlGeneratorId: string; sessionId: string; }) => Promise<", "SearchSessionSavedObject", - ">; delete: (sessionId: string) => Promise; create: ({ name, appId, urlGeneratorId, initialState, restoreState, sessionId, }: { name: string; appId: string; initialState: Record; restoreState: Record; urlGeneratorId: string; sessionId: string; }) => Promise<", - "SearchSessionSavedObject", - ">; find: (options: Pick<", + ">; delete: (sessionId: string) => Promise; find: (options: Pick<", { "pluginId": "core", "scope": "server", @@ -237,7 +235,9 @@ "section": "def-server.SavedObjectsFindResponse", "text": "SavedObjectsFindResponse" }, - ">; update: (sessionId: string, attributes: unknown) => Promise<", + ">; get: (sessionId: string) => Promise<", + "SearchSessionSavedObject", + ">; update: (sessionId: string, attributes: unknown) => Promise<", { "pluginId": "core", "scope": "server", @@ -379,7 +379,7 @@ "section": "def-server.SerializableRecord", "text": "SerializableRecord" }, - " | undefined; schema?: string | undefined; }, \"enabled\" | \"id\" | \"schema\" | \"params\"> & Pick<{ type: string | ", + " | undefined; schema?: string | undefined; }, \"id\" | \"enabled\" | \"schema\" | \"params\"> & Pick<{ type: string | ", { "pluginId": "data", "scope": "common", @@ -395,7 +395,7 @@ "section": "def-common.IAggType", "text": "IAggType" }, - "; }, never>, \"type\" | \"enabled\" | \"id\" | \"schema\" | \"params\">[] | undefined) => ", + "; }, never>, \"type\" | \"id\" | \"enabled\" | \"schema\" | \"params\">[] | undefined) => ", { "pluginId": "data", "scope": "common", @@ -617,11 +617,9 @@ "\nSearch sessions SO CRUD\n{@link ISessionsClient}" ], "signature": [ - "{ get: (sessionId: string) => Promise<", + "{ create: ({ name, appId, urlGeneratorId, initialState, restoreState, sessionId, }: { name: string; appId: string; initialState: Record; restoreState: Record; urlGeneratorId: string; sessionId: string; }) => Promise<", "SearchSessionSavedObject", - ">; delete: (sessionId: string) => Promise; create: ({ name, appId, urlGeneratorId, initialState, restoreState, sessionId, }: { name: string; appId: string; initialState: Record; restoreState: Record; urlGeneratorId: string; sessionId: string; }) => Promise<", - "SearchSessionSavedObject", - ">; find: (options: Pick<", + ">; delete: (sessionId: string) => Promise; find: (options: Pick<", { "pluginId": "core", "scope": "server", @@ -637,7 +635,9 @@ "section": "def-server.SavedObjectsFindResponse", "text": "SavedObjectsFindResponse" }, - ">; update: (sessionId: string, attributes: unknown) => Promise<", + ">; get: (sessionId: string) => Promise<", + "SearchSessionSavedObject", + ">; update: (sessionId: string, attributes: unknown) => Promise<", { "pluginId": "core", "scope": "server", @@ -957,11 +957,9 @@ "label": "ISessionsClient", "description": [], "signature": [ - "{ get: (sessionId: string) => Promise<", + "{ create: ({ name, appId, urlGeneratorId, initialState, restoreState, sessionId, }: { name: string; appId: string; initialState: Record; restoreState: Record; urlGeneratorId: string; sessionId: string; }) => Promise<", "SearchSessionSavedObject", - ">; delete: (sessionId: string) => Promise; create: ({ name, appId, urlGeneratorId, initialState, restoreState, sessionId, }: { name: string; appId: string; initialState: Record; restoreState: Record; urlGeneratorId: string; sessionId: string; }) => Promise<", - "SearchSessionSavedObject", - ">; find: (options: Pick<", + ">; delete: (sessionId: string) => Promise; find: (options: Pick<", { "pluginId": "core", "scope": "server", @@ -977,7 +975,9 @@ "section": "def-server.SavedObjectsFindResponse", "text": "SavedObjectsFindResponse" }, - ">; update: (sessionId: string, attributes: unknown) => Promise<", + ">; get: (sessionId: string) => Promise<", + "SearchSessionSavedObject", + ">; update: (sessionId: string, attributes: unknown) => Promise<", { "pluginId": "core", "scope": "server", @@ -1921,25 +1921,7 @@ "label": "savedObjectsClient", "description": [], "signature": [ - "{ get: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" - }, - ") => Promise<", - "SavedObject", - ">; delete: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsDeleteOptions", - "text": "SavedObjectsDeleteOptions" - }, - ") => Promise<{}>; create: (type: string, attributes: T, options?: ", + "{ create: (type: string, attributes: T, options?: ", { "pluginId": "core", "scope": "server", @@ -1997,7 +1979,15 @@ "section": "def-server.SavedObjectsCheckConflictsResponse", "text": "SavedObjectsCheckConflictsResponse" }, - ">; find: (options: ", + ">; delete: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsDeleteOptions", + "text": "SavedObjectsDeleteOptions" + }, + ") => Promise<{}>; find: (options: ", { "pluginId": "core", "scope": "server", @@ -2061,6 +2051,16 @@ "section": "def-server.SavedObjectsBulkResolveResponse", "text": "SavedObjectsBulkResolveResponse" }, + ">; get: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsBaseOptions", + "text": "SavedObjectsBaseOptions" + }, + ") => Promise<", + "SavedObject", ">; resolve: (type: string, id: string, options?: ", { "pluginId": "core", @@ -2593,7 +2593,7 @@ "section": "def-server.SerializableRecord", "text": "SerializableRecord" }, - " | undefined; schema?: string | undefined; }, \"enabled\" | \"id\" | \"schema\" | \"params\"> & Pick<{ type: ", + " | undefined; schema?: string | undefined; }, \"id\" | \"enabled\" | \"schema\" | \"params\"> & Pick<{ type: ", { "pluginId": "data", "scope": "common", @@ -2609,7 +2609,7 @@ "section": "def-common.IAggType", "text": "IAggType" }, - "; }, never>, \"type\" | \"enabled\" | \"id\" | \"schema\" | \"params\">" + "; }, never>, \"type\" | \"id\" | \"enabled\" | \"schema\" | \"params\">" ], "path": "src/plugins/data/common/search/aggs/agg_config.ts", "deprecated": false, @@ -3660,7 +3660,7 @@ "section": "def-server.SerializableRecord", "text": "SerializableRecord" }, - " | undefined; schema?: string | undefined; }, \"enabled\" | \"id\" | \"schema\" | \"params\"> & Pick<{ type: string | ", + " | undefined; schema?: string | undefined; }, \"id\" | \"enabled\" | \"schema\" | \"params\"> & Pick<{ type: string | ", { "pluginId": "data", "scope": "common", @@ -3676,7 +3676,7 @@ "section": "def-common.IAggType", "text": "IAggType" }, - "; }, never>, \"type\" | \"enabled\" | \"id\" | \"schema\" | \"params\">[]" + "; }, never>, \"type\" | \"id\" | \"enabled\" | \"schema\" | \"params\">[]" ], "path": "src/plugins/data/common/search/aggs/agg_configs.ts", "deprecated": false, @@ -3905,7 +3905,7 @@ "section": "def-server.SerializableRecord", "text": "SerializableRecord" }, - " | undefined; schema?: string | undefined; }, \"enabled\" | \"id\" | \"schema\" | \"params\"> & Pick<{ type: string | ", + " | undefined; schema?: string | undefined; }, \"id\" | \"enabled\" | \"schema\" | \"params\"> & Pick<{ type: string | ", { "pluginId": "data", "scope": "common", @@ -3921,7 +3921,7 @@ "section": "def-common.IAggType", "text": "IAggType" }, - "; }, never>, \"type\" | \"enabled\" | \"id\" | \"schema\" | \"params\">, { addToAggConfigs }?: { addToAggConfigs?: boolean | undefined; }) => T" + "; }, never>, \"type\" | \"id\" | \"enabled\" | \"schema\" | \"params\">, { addToAggConfigs }?: { addToAggConfigs?: boolean | undefined; }) => T" ], "path": "src/plugins/data/common/search/aggs/agg_configs.ts", "deprecated": false, @@ -3942,7 +3942,7 @@ "section": "def-server.SerializableRecord", "text": "SerializableRecord" }, - " | undefined; schema?: string | undefined; }, \"enabled\" | \"id\" | \"schema\" | \"params\"> & Pick<{ type: string | ", + " | undefined; schema?: string | undefined; }, \"id\" | \"enabled\" | \"schema\" | \"params\"> & Pick<{ type: string | ", { "pluginId": "data", "scope": "common", @@ -3958,7 +3958,7 @@ "section": "def-common.IAggType", "text": "IAggType" }, - "; }, never>, \"type\" | \"enabled\" | \"id\" | \"schema\" | \"params\">" + "; }, never>, \"type\" | \"id\" | \"enabled\" | \"schema\" | \"params\">" ], "path": "src/plugins/data/common/search/aggs/agg_configs.ts", "deprecated": false, @@ -4967,7 +4967,7 @@ "\nThe type the values produced by this agg will have in the final data table.\nIf not specified, the type of the field is used." ], "signature": [ - "\"string\" | \"number\" | \"boolean\" | \"object\" | \"date\" | \"_source\" | \"attachment\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"murmur3\" | \"unknown\" | \"conflict\" | \"nested\" | \"histogram\" | \"null\" | undefined" + "\"string\" | \"number\" | \"boolean\" | \"object\" | \"_source\" | \"attachment\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"murmur3\" | \"unknown\" | \"conflict\" | \"nested\" | \"histogram\" | \"null\" | undefined" ], "path": "src/plugins/data/common/search/aggs/agg_type.ts", "deprecated": false @@ -5289,7 +5289,7 @@ "section": "def-common.SearchSource", "text": "SearchSource" }, - "; history: Record[]; setPreferredSearchStrategyId: (searchStrategyId: string) => void; setField: (field: K, value: ", + "; history: Record[]; setPreferredSearchStrategyId: (searchStrategyId: string) => void; setField: (field: K, value: ", { "pluginId": "data", "scope": "common", @@ -5305,7 +5305,7 @@ "section": "def-common.SearchSource", "text": "SearchSource" }, - "; removeField: (field: K) => ", + "; removeField: (field: K) => ", { "pluginId": "data", "scope": "common", @@ -5337,7 +5337,7 @@ "section": "def-common.SearchSourceFields", "text": "SearchSourceFields" }, - "; getField: (field: K, recurse?: boolean) => ", + "; getField: (field: K, recurse?: boolean) => ", { "pluginId": "data", "scope": "common", @@ -5345,7 +5345,7 @@ "section": "def-common.SearchSourceFields", "text": "SearchSourceFields" }, - "[K]; getOwnField: (field: K) => ", + "[K]; getOwnField: (field: K) => ", { "pluginId": "data", "scope": "common", @@ -5528,13 +5528,21 @@ "signature": [ "(agg: TAggConfig) => ", { - "pluginId": "expressions", + "pluginId": "fieldFormats", "scope": "common", - "docId": "kibExpressionsPluginApi", + "docId": "kibFieldFormatsPluginApi", "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - ">" + "<", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormatParams", + "text": "FieldFormatParams" + }, + ">" ], "path": "src/plugins/data/common/search/aggs/agg_type.ts", "deprecated": false, @@ -7556,7 +7564,7 @@ "\nsets value to a single search source field" ], "signature": [ - "(field: K, value: ", + "(field: K, value: ", { "pluginId": "data", "scope": "common", @@ -7621,7 +7629,7 @@ "\nremove field" ], "signature": [ - "(field: K) => this" + "(field: K) => this" ], "path": "src/plugins/data/common/search/search_source/search_source.ts", "deprecated": false, @@ -7746,7 +7754,7 @@ "\nGets a single field from the fields" ], "signature": [ - "(field: K, recurse?: boolean) => ", + "(field: K, recurse?: boolean) => ", { "pluginId": "data", "scope": "common", @@ -7800,7 +7808,7 @@ "\nGet the field from our own fields, don't traverse up the chain" ], "signature": [ - "(field: K) => ", + "(field: K) => ", { "pluginId": "data", "scope": "common", @@ -8381,7 +8389,7 @@ "section": "def-common.DataViewsService", "text": "DataViewsService" }, - ", \"get\" | \"delete\" | \"create\" | \"find\" | \"ensureDefaultDataView\" | \"getIds\" | \"getTitles\" | \"getIdsWithTitle\" | \"clearCache\" | \"getCache\" | \"getDefault\" | \"getDefaultId\" | \"setDefault\" | \"hasUserDataView\" | \"getFieldsForWildcard\" | \"getFieldsForIndexPattern\" | \"refreshFields\" | \"fieldArrayToMap\" | \"savedObjectToSpec\" | \"migrate\" | \"createAndSave\" | \"createSavedObject\" | \"updateSavedObject\">, dependencies: ", + ", \"create\" | \"delete\" | \"find\" | \"get\" | \"ensureDefaultDataView\" | \"getIds\" | \"getTitles\" | \"getIdsWithTitle\" | \"clearCache\" | \"getCache\" | \"getDefault\" | \"getDefaultId\" | \"setDefault\" | \"hasUserDataView\" | \"getFieldsForWildcard\" | \"getFieldsForIndexPattern\" | \"refreshFields\" | \"fieldArrayToMap\" | \"savedObjectToSpec\" | \"migrate\" | \"createAndSave\" | \"createSavedObject\" | \"updateSavedObject\" | \"getDefaultDataView\">, dependencies: ", { "pluginId": "data", "scope": "common", @@ -8434,7 +8442,7 @@ "section": "def-common.DataViewsService", "text": "DataViewsService" }, - ", \"get\" | \"delete\" | \"create\" | \"find\" | \"ensureDefaultDataView\" | \"getIds\" | \"getTitles\" | \"getIdsWithTitle\" | \"clearCache\" | \"getCache\" | \"getDefault\" | \"getDefaultId\" | \"setDefault\" | \"hasUserDataView\" | \"getFieldsForWildcard\" | \"getFieldsForIndexPattern\" | \"refreshFields\" | \"fieldArrayToMap\" | \"savedObjectToSpec\" | \"migrate\" | \"createAndSave\" | \"createSavedObject\" | \"updateSavedObject\">" + ", \"create\" | \"delete\" | \"find\" | \"get\" | \"ensureDefaultDataView\" | \"getIds\" | \"getTitles\" | \"getIdsWithTitle\" | \"clearCache\" | \"getCache\" | \"getDefault\" | \"getDefaultId\" | \"setDefault\" | \"hasUserDataView\" | \"getFieldsForWildcard\" | \"getFieldsForIndexPattern\" | \"refreshFields\" | \"fieldArrayToMap\" | \"savedObjectToSpec\" | \"migrate\" | \"createAndSave\" | \"createSavedObject\" | \"updateSavedObject\" | \"getDefaultDataView\">" ], "path": "src/plugins/data/common/search/search_source/search_source_service.ts", "deprecated": false, @@ -9388,7 +9396,7 @@ "section": "def-common.DataViewsService", "text": "DataViewsService" }, - ", \"get\" | \"delete\" | \"create\" | \"find\" | \"ensureDefaultDataView\" | \"getIds\" | \"getTitles\" | \"getIdsWithTitle\" | \"clearCache\" | \"getCache\" | \"getDefault\" | \"getDefaultId\" | \"setDefault\" | \"hasUserDataView\" | \"getFieldsForWildcard\" | \"getFieldsForIndexPattern\" | \"refreshFields\" | \"fieldArrayToMap\" | \"savedObjectToSpec\" | \"migrate\" | \"createAndSave\" | \"createSavedObject\" | \"updateSavedObject\">, searchSourceDependencies: ", + ", \"create\" | \"delete\" | \"find\" | \"get\" | \"ensureDefaultDataView\" | \"getIds\" | \"getTitles\" | \"getIdsWithTitle\" | \"clearCache\" | \"getCache\" | \"getDefault\" | \"getDefaultId\" | \"setDefault\" | \"hasUserDataView\" | \"getFieldsForWildcard\" | \"getFieldsForIndexPattern\" | \"refreshFields\" | \"fieldArrayToMap\" | \"savedObjectToSpec\" | \"migrate\" | \"createAndSave\" | \"createSavedObject\" | \"updateSavedObject\" | \"getDefaultDataView\">, searchSourceDependencies: ", { "pluginId": "data", "scope": "common", @@ -9435,7 +9443,7 @@ "section": "def-common.DataViewsService", "text": "DataViewsService" }, - ", \"get\" | \"delete\" | \"create\" | \"find\" | \"ensureDefaultDataView\" | \"getIds\" | \"getTitles\" | \"getIdsWithTitle\" | \"clearCache\" | \"getCache\" | \"getDefault\" | \"getDefaultId\" | \"setDefault\" | \"hasUserDataView\" | \"getFieldsForWildcard\" | \"getFieldsForIndexPattern\" | \"refreshFields\" | \"fieldArrayToMap\" | \"savedObjectToSpec\" | \"migrate\" | \"createAndSave\" | \"createSavedObject\" | \"updateSavedObject\">" + ", \"create\" | \"delete\" | \"find\" | \"get\" | \"ensureDefaultDataView\" | \"getIds\" | \"getTitles\" | \"getIdsWithTitle\" | \"clearCache\" | \"getCache\" | \"getDefault\" | \"getDefaultId\" | \"setDefault\" | \"hasUserDataView\" | \"getFieldsForWildcard\" | \"getFieldsForIndexPattern\" | \"refreshFields\" | \"fieldArrayToMap\" | \"savedObjectToSpec\" | \"migrate\" | \"createAndSave\" | \"createSavedObject\" | \"updateSavedObject\" | \"getDefaultDataView\">" ], "path": "src/plugins/data/common/search/search_source/create_search_source.ts", "deprecated": false, @@ -13382,7 +13390,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".FILTER>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\"> & Pick<{ geo_bounding_box?: ({ type: \"geo_bounding_box\"; } & GeoBox) | ({ type: \"geo_bounding_box\"; } & { top_left: ", + ".FILTER>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\"> & Pick<{ geo_bounding_box?: ({ type: \"geo_bounding_box\"; } & GeoBox) | ({ type: \"geo_bounding_box\"; } & { top_left: ", { "pluginId": "data", "scope": "common", @@ -13478,7 +13486,7 @@ "section": "def-common.Query", "text": "Query" }, - "> | undefined; }, never>, \"enabled\" | \"id\" | \"filter\" | \"schema\" | \"geo_bounding_box\" | \"json\" | \"customLabel\" | \"timeShift\">, ", + "> | undefined; }, never>, \"id\" | \"filter\" | \"enabled\" | \"schema\" | \"geo_bounding_box\" | \"json\" | \"customLabel\" | \"timeShift\">, ", "AggExpressionType", ", ", { @@ -13534,7 +13542,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".FILTERS>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ filters?: ", + ".FILTERS>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ filters?: ", { "pluginId": "expressions", "scope": "common", @@ -13566,7 +13574,7 @@ "section": "def-common.QueryFilter", "text": "QueryFilter" }, - ">[] | undefined; }, never>, \"enabled\" | \"id\" | \"filters\" | \"schema\" | \"json\" | \"timeShift\">, ", + ">[] | undefined; }, never>, \"id\" | \"filters\" | \"enabled\" | \"schema\" | \"json\" | \"timeShift\">, ", "AggExpressionType", ", ", { @@ -13678,7 +13686,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".IP_RANGE>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\"> & Pick<{ ranges?: (", + ".IP_RANGE>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\"> & Pick<{ ranges?: (", { "pluginId": "expressions", "scope": "common", @@ -13742,7 +13750,7 @@ "section": "def-common.IpRange", "text": "IpRange" }, - ">)[] | undefined; ipRangeType?: string | undefined; }, never>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"ipRangeType\" | \"ranges\">, ", + ">)[] | undefined; ipRangeType?: string | undefined; }, never>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"ipRangeType\" | \"ranges\">, ", "AggExpressionType", ", ", { @@ -13798,7 +13806,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".DATE_RANGE>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"time_zone\"> & Pick<{ ranges?: ", + ".DATE_RANGE>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"time_zone\"> & Pick<{ ranges?: ", { "pluginId": "expressions", "scope": "common", @@ -13830,7 +13838,7 @@ "section": "def-common.DateRange", "text": "DateRange" }, - ">[] | undefined; }, never>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"ranges\" | \"time_zone\">, ", + ">[] | undefined; }, never>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"ranges\" | \"time_zone\">, ", "AggExpressionType", ", ", { @@ -13886,7 +13894,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".RANGE>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\"> & Pick<{ ranges?: ", + ".RANGE>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\"> & Pick<{ ranges?: ", { "pluginId": "expressions", "scope": "common", @@ -13918,7 +13926,7 @@ "section": "def-common.NumericalRange", "text": "NumericalRange" }, - ">[] | undefined; }, never>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"ranges\">, ", + ">[] | undefined; }, never>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"ranges\">, ", "AggExpressionType", ", ", { @@ -14030,7 +14038,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".GEOHASH_GRID>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\"> & Pick<{ boundingBox?: ({ type: \"geo_bounding_box\"; } & GeoBox) | ({ type: \"geo_bounding_box\"; } & { top_left: ", + ".GEOHASH_GRID>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\"> & Pick<{ boundingBox?: ({ type: \"geo_bounding_box\"; } & GeoBox) | ({ type: \"geo_bounding_box\"; } & { top_left: ", { "pluginId": "data", "scope": "common", @@ -14094,7 +14102,7 @@ "section": "def-common.GeoPoint", "text": "GeoPoint" }, - "; }) | ({ type: \"geo_bounding_box\"; } & WellKnownText) | undefined; }, never>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\" | \"boundingBox\">, ", + "; }) | ({ type: \"geo_bounding_box\"; } & WellKnownText) | undefined; }, never>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\" | \"boundingBox\">, ", "AggExpressionType", ", ", { @@ -14150,7 +14158,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".HISTOGRAM>, \"enabled\" | \"interval\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\"> & Pick<{ extended_bounds?: ", + ".HISTOGRAM>, \"interval\" | \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\"> & Pick<{ extended_bounds?: ", { "pluginId": "expressions", "scope": "common", @@ -14182,7 +14190,7 @@ "section": "def-common.ExtendedBounds", "text": "ExtendedBounds" }, - "> | undefined; }, never>, \"enabled\" | \"interval\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\" | \"extended_bounds\">, ", + "> | undefined; }, never>, \"interval\" | \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\" | \"extended_bounds\">, ", "AggExpressionType", ", ", { @@ -14238,7 +14246,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".DATE_HISTOGRAM>, \"enabled\" | \"interval\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\"> & Pick<{ timeRange?: ", + ".DATE_HISTOGRAM>, \"interval\" | \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\"> & Pick<{ timeRange?: ", { "pluginId": "expressions", "scope": "common", @@ -14302,7 +14310,7 @@ "section": "def-common.ExtendedBounds", "text": "ExtendedBounds" }, - "> | undefined; }, never>, \"enabled\" | \"interval\" | \"id\" | \"timeRange\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"extended_bounds\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\">, ", + "> | undefined; }, never>, \"interval\" | \"id\" | \"timeRange\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"extended_bounds\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\">, ", "AggExpressionType", ", ", { @@ -14358,11 +14366,11 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".TERMS>, \"enabled\" | \"id\" | \"size\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"orderBy\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\"> & Pick<{ orderAgg?: ", + ".TERMS>, \"id\" | \"size\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"orderBy\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\"> & Pick<{ orderAgg?: ", "AggExpressionType", " | undefined; }, \"orderAgg\"> & Pick<{ orderAgg?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"size\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"orderBy\" | \"orderAgg\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\">, ", + " | undefined; }, never>, \"id\" | \"size\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"field\" | \"orderBy\" | \"orderAgg\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\">, ", "AggExpressionType", ", ", { @@ -14474,7 +14482,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".AVG_BUCKET>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\"> & Pick<{ customBucket?: ", + ".AVG_BUCKET>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -14482,7 +14490,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -14538,7 +14546,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".MAX_BUCKET>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\"> & Pick<{ customBucket?: ", + ".MAX_BUCKET>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -14546,7 +14554,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -14602,7 +14610,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".MIN_BUCKET>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\"> & Pick<{ customBucket?: ", + ".MIN_BUCKET>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -14610,7 +14618,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -14666,7 +14674,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".SUM_BUCKET>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\"> & Pick<{ customBucket?: ", + ".SUM_BUCKET>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -14674,7 +14682,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -14730,7 +14738,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".FILTERED_METRIC>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\"> & Pick<{ customBucket?: ", + ".FILTERED_METRIC>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -14738,7 +14746,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -14906,11 +14914,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".CUMULATIVE_SUM>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", + ".CUMULATIVE_SUM>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", + " | undefined; }, never>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", "AggExpressionType", ", ", { @@ -14966,11 +14974,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".DERIVATIVE>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", + ".DERIVATIVE>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", + " | undefined; }, never>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", "AggExpressionType", ", ", { @@ -15362,11 +15370,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".MOVING_FN>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\"> & Pick<{ customMetric?: ", + ".MOVING_FN>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\">, ", + " | undefined; }, never>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\">, ", "AggExpressionType", ", ", { @@ -15534,11 +15542,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".SERIAL_DIFF>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", + ".SERIAL_DIFF>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", + " | undefined; }, never>, \"id\" | \"enabled\" | \"schema\" | \"json\" | \"customLabel\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", "AggExpressionType", ", ", { @@ -18302,7 +18310,7 @@ "label": "valueType", "description": [], "signature": [ - "\"string\" | \"number\" | \"boolean\" | \"object\" | \"date\" | \"_source\" | \"attachment\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"murmur3\" | \"unknown\" | \"conflict\" | \"nested\" | \"histogram\" | \"null\" | undefined" + "\"string\" | \"number\" | \"boolean\" | \"object\" | \"_source\" | \"attachment\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"murmur3\" | \"unknown\" | \"conflict\" | \"nested\" | \"histogram\" | \"null\" | undefined" ], "path": "src/plugins/data/common/search/aggs/agg_type.ts", "deprecated": false @@ -18397,13 +18405,21 @@ "signature": [ "((agg: TAggConfig) => ", { - "pluginId": "expressions", + "pluginId": "fieldFormats", "scope": "common", - "docId": "kibExpressionsPluginApi", + "docId": "kibFieldFormatsPluginApi", "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - ">) | undefined" + "<", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormatParams", + "text": "FieldFormatParams" + }, + ">) | undefined" ], "path": "src/plugins/data/common/search/aggs/agg_type.ts", "deprecated": false, @@ -22511,7 +22527,7 @@ "section": "def-common.IAggType", "text": "IAggType" }, - "; enabled?: boolean | undefined; id?: string | undefined; schema?: string | undefined; params?: {} | ", + "; id?: string | undefined; enabled?: boolean | undefined; schema?: string | undefined; params?: {} | ", { "pluginId": "@kbn/utility-types", "scope": "server", @@ -23000,7 +23016,7 @@ "section": "def-server.SerializableRecord", "text": "SerializableRecord" }, - " | undefined; schema?: string | undefined; }, \"enabled\" | \"id\" | \"schema\" | \"params\"> & Pick<{ type: string | ", + " | undefined; schema?: string | undefined; }, \"id\" | \"enabled\" | \"schema\" | \"params\"> & Pick<{ type: string | ", { "pluginId": "data", "scope": "common", @@ -23016,7 +23032,7 @@ "section": "def-common.IAggType", "text": "IAggType" }, - "; }, never>, \"type\" | \"enabled\" | \"id\" | \"schema\" | \"params\">[] | undefined) => ", + "; }, never>, \"type\" | \"id\" | \"enabled\" | \"schema\" | \"params\">[] | undefined) => ", { "pluginId": "data", "scope": "common", @@ -23187,7 +23203,7 @@ "section": "def-common.IAggType", "text": "IAggType" }, - "; enabled?: boolean | undefined; id?: string | undefined; schema?: string | undefined; params?: {} | ", + "; id?: string | undefined; enabled?: boolean | undefined; schema?: string | undefined; params?: {} | ", { "pluginId": "@kbn/utility-types", "scope": "server", @@ -25507,7 +25523,7 @@ "section": "def-common.SearchSource", "text": "SearchSource" }, - "; history: Record[]; setPreferredSearchStrategyId: (searchStrategyId: string) => void; setField: (field: K, value: ", + "; history: Record[]; setPreferredSearchStrategyId: (searchStrategyId: string) => void; setField: (field: K, value: ", { "pluginId": "data", "scope": "common", @@ -25523,7 +25539,7 @@ "section": "def-common.SearchSource", "text": "SearchSource" }, - "; removeField: (field: K) => ", + "; removeField: (field: K) => ", { "pluginId": "data", "scope": "common", @@ -25555,7 +25571,7 @@ "section": "def-common.SearchSourceFields", "text": "SearchSourceFields" }, - "; getField: (field: K, recurse?: boolean) => ", + "; getField: (field: K, recurse?: boolean) => ", { "pluginId": "data", "scope": "common", @@ -25563,7 +25579,7 @@ "section": "def-common.SearchSourceFields", "text": "SearchSourceFields" }, - "[K]; getOwnField: (field: K) => ", + "[K]; getOwnField: (field: K) => ", { "pluginId": "data", "scope": "common", @@ -28626,7 +28642,7 @@ "label": "fn", "description": [], "signature": [ - "(input: null, args: Arguments) => any" + "(input: null, args: Arguments) => { type: \"kibana_filter\"; meta: { negate: boolean; alias: string; disabled: boolean; }; query: any; }" ], "path": "src/plugins/data/common/search/expressions/kibana_filter.ts", "deprecated": false, diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx index cdb3d58ce3297..90f0ccd68ebc9 100644 --- a/api_docs/data_search.mdx +++ b/api_docs/data_search.mdx @@ -18,7 +18,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3210 | 43 | 2825 | 48 | +| 3206 | 43 | 2820 | 48 | ## Client diff --git a/api_docs/data_ui.mdx b/api_docs/data_ui.mdx index 25333ca44b600..699822f83228a 100644 --- a/api_docs/data_ui.mdx +++ b/api_docs/data_ui.mdx @@ -18,7 +18,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3210 | 43 | 2825 | 48 | +| 3206 | 43 | 2820 | 48 | ## Client diff --git a/api_docs/data_views.json b/api_docs/data_views.json index 7585271e4d51b..cc99e7bbcc3f6 100644 --- a/api_docs/data_views.json +++ b/api_docs/data_views.json @@ -1387,13 +1387,21 @@ "signature": [ "(fieldName: string, format: ", { - "pluginId": "expressions", + "pluginId": "fieldFormats", "scope": "common", - "docId": "kibExpressionsPluginApi", + "docId": "kibFieldFormatsPluginApi", "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - ">) => void" + "<", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormatParams", + "text": "FieldFormatParams" + }, + ">) => void" ], "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": false, @@ -1421,13 +1429,21 @@ "description": [], "signature": [ { - "pluginId": "expressions", + "pluginId": "fieldFormats", "scope": "common", - "docId": "kibExpressionsPluginApi", + "docId": "kibFieldFormatsPluginApi", "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - ">" + "<", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormatParams", + "text": "FieldFormatParams" + }, + ">" ], "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": false, @@ -1677,7 +1693,7 @@ "section": "def-common.DataViewsService", "text": "DataViewsService" }, - ", \"get\" | \"delete\" | \"create\" | \"find\" | \"ensureDefaultDataView\" | \"getIds\" | \"getTitles\" | \"getIdsWithTitle\" | \"clearCache\" | \"getCache\" | \"getDefault\" | \"getDefaultId\" | \"setDefault\" | \"hasUserDataView\" | \"getFieldsForWildcard\" | \"getFieldsForIndexPattern\" | \"refreshFields\" | \"fieldArrayToMap\" | \"savedObjectToSpec\" | \"migrate\" | \"createAndSave\" | \"createSavedObject\" | \"updateSavedObject\">, ", + ", \"create\" | \"delete\" | \"find\" | \"get\" | \"ensureDefaultDataView\" | \"getIds\" | \"getTitles\" | \"getIdsWithTitle\" | \"clearCache\" | \"getCache\" | \"getDefault\" | \"getDefaultId\" | \"setDefault\" | \"hasUserDataView\" | \"getFieldsForWildcard\" | \"getFieldsForIndexPattern\" | \"refreshFields\" | \"fieldArrayToMap\" | \"savedObjectToSpec\" | \"migrate\" | \"createAndSave\" | \"createSavedObject\" | \"updateSavedObject\" | \"getDefaultDataView\">, ", "DataViewsPublicSetupDependencies", ", ", "DataViewsPublicStartDependencies", @@ -1712,7 +1728,7 @@ "section": "def-common.DataViewsService", "text": "DataViewsService" }, - ", \"get\" | \"delete\" | \"create\" | \"find\" | \"ensureDefaultDataView\" | \"getIds\" | \"getTitles\" | \"getIdsWithTitle\" | \"clearCache\" | \"getCache\" | \"getDefault\" | \"getDefaultId\" | \"setDefault\" | \"hasUserDataView\" | \"getFieldsForWildcard\" | \"getFieldsForIndexPattern\" | \"refreshFields\" | \"fieldArrayToMap\" | \"savedObjectToSpec\" | \"migrate\" | \"createAndSave\" | \"createSavedObject\" | \"updateSavedObject\">>, { expressions }: ", + ", \"create\" | \"delete\" | \"find\" | \"get\" | \"ensureDefaultDataView\" | \"getIds\" | \"getTitles\" | \"getIdsWithTitle\" | \"clearCache\" | \"getCache\" | \"getDefault\" | \"getDefaultId\" | \"setDefault\" | \"hasUserDataView\" | \"getFieldsForWildcard\" | \"getFieldsForIndexPattern\" | \"refreshFields\" | \"fieldArrayToMap\" | \"savedObjectToSpec\" | \"migrate\" | \"createAndSave\" | \"createSavedObject\" | \"updateSavedObject\" | \"getDefaultDataView\">>, { expressions }: ", "DataViewsPublicSetupDependencies", ") => ", { @@ -1751,7 +1767,7 @@ "section": "def-common.DataViewsService", "text": "DataViewsService" }, - ", \"get\" | \"delete\" | \"create\" | \"find\" | \"ensureDefaultDataView\" | \"getIds\" | \"getTitles\" | \"getIdsWithTitle\" | \"clearCache\" | \"getCache\" | \"getDefault\" | \"getDefaultId\" | \"setDefault\" | \"hasUserDataView\" | \"getFieldsForWildcard\" | \"getFieldsForIndexPattern\" | \"refreshFields\" | \"fieldArrayToMap\" | \"savedObjectToSpec\" | \"migrate\" | \"createAndSave\" | \"createSavedObject\" | \"updateSavedObject\">>" + ", \"create\" | \"delete\" | \"find\" | \"get\" | \"ensureDefaultDataView\" | \"getIds\" | \"getTitles\" | \"getIdsWithTitle\" | \"clearCache\" | \"getCache\" | \"getDefault\" | \"getDefaultId\" | \"setDefault\" | \"hasUserDataView\" | \"getFieldsForWildcard\" | \"getFieldsForIndexPattern\" | \"refreshFields\" | \"fieldArrayToMap\" | \"savedObjectToSpec\" | \"migrate\" | \"createAndSave\" | \"createSavedObject\" | \"updateSavedObject\" | \"getDefaultDataView\">>" ], "path": "src/plugins/data_views/public/plugin.ts", "deprecated": false, @@ -1800,7 +1816,7 @@ "section": "def-common.DataViewsService", "text": "DataViewsService" }, - ", \"get\" | \"delete\" | \"create\" | \"find\" | \"ensureDefaultDataView\" | \"getIds\" | \"getTitles\" | \"getIdsWithTitle\" | \"clearCache\" | \"getCache\" | \"getDefault\" | \"getDefaultId\" | \"setDefault\" | \"hasUserDataView\" | \"getFieldsForWildcard\" | \"getFieldsForIndexPattern\" | \"refreshFields\" | \"fieldArrayToMap\" | \"savedObjectToSpec\" | \"migrate\" | \"createAndSave\" | \"createSavedObject\" | \"updateSavedObject\">" + ", \"create\" | \"delete\" | \"find\" | \"get\" | \"ensureDefaultDataView\" | \"getIds\" | \"getTitles\" | \"getIdsWithTitle\" | \"clearCache\" | \"getCache\" | \"getDefault\" | \"getDefaultId\" | \"setDefault\" | \"hasUserDataView\" | \"getFieldsForWildcard\" | \"getFieldsForIndexPattern\" | \"refreshFields\" | \"fieldArrayToMap\" | \"savedObjectToSpec\" | \"migrate\" | \"createAndSave\" | \"createSavedObject\" | \"updateSavedObject\" | \"getDefaultDataView\">" ], "path": "src/plugins/data_views/public/plugin.ts", "deprecated": false, @@ -1874,14 +1890,34 @@ "parentPluginId": "dataViews", "id": "def-public.DataViewsService.ensureDefaultDataView", "type": "Function", - "tags": [], + "tags": [ + "deprecated" + ], "label": "ensureDefaultDataView", "description": [], "signature": [ "() => Promise | undefined" ], "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, + "deprecated": true, + "references": [ + { + "plugin": "discover", + "path": "src/plugins/discover/public/application/apps/main/discover_main_route.tsx" + }, + { + "plugin": "dashboard", + "path": "src/plugins/dashboard/public/application/lib/load_saved_dashboard_state.ts" + }, + { + "plugin": "lens", + "path": "x-pack/plugins/lens/public/plugin.ts" + }, + { + "plugin": "visualize", + "path": "src/plugins/visualize/public/plugin.ts" + } + ], "returnComment": [], "children": [] }, @@ -3013,6 +3049,33 @@ } ], "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-public.DataViewsService.getDefaultDataView", + "type": "Function", + "tags": [], + "label": "getDefaultDataView", + "description": [ + "\nReturns the default data view as an object. If no default is found, or it is missing\nanother data view is selected as default and returned." + ], + "signature": [ + "() => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " | undefined>" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "children": [], + "returnComment": [ + "default data view" + ] } ], "initialIsOpen": false @@ -3534,18 +3597,6 @@ "plugin": "observability", "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_app_index_pattern.tsx" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts" - }, { "plugin": "maps", "path": "x-pack/plugins/maps/public/embeddable/types.ts" @@ -3718,30 +3769,6 @@ "plugin": "dataVisualizer", "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/chart_loader/chart_loader.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/chart_loader/chart_loader.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/embeddables/types.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/embeddables/types.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx" - }, { "plugin": "apm", "path": "x-pack/plugins/apm/public/components/app/RumDashboard/LocalUIFilters/SelectedFilters.tsx" @@ -3870,14 +3897,6 @@ "plugin": "transform", "path": "x-pack/plugins/transform/common/types/index_pattern.ts" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" - }, { "plugin": "lens", "path": "x-pack/plugins/lens/server/routes/existing_fields.test.ts" @@ -3910,14 +3929,6 @@ "plugin": "dataVisualizer", "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/utils/saved_search_utils.test.ts" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/common/dependency_mocks/index_patterns.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/common/dependency_mocks/index_patterns.d.ts" - }, { "plugin": "lens", "path": "x-pack/plugins/lens/target/types/server/routes/existing_fields.d.ts" @@ -4824,35 +4835,35 @@ }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts" + "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts" + "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts" + "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts" + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts" + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts" }, { "plugin": "observability", @@ -5062,250 +5073,6 @@ "plugin": "dataVisualizer", "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/field_format_service.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/field_format_service.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_grid/common.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_grid/common.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_grid/common.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_grid/common.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/data_loader/data_loader.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/data_loader/data_loader.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/data_loader/data_loader.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/scatterplot_matrix/use_scatterplot_field_options.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/scatterplot_matrix/use_scatterplot_field_options.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/single_metric_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/single_metric_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/multi_metric_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/multi_metric_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/population_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/population_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/advanced_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/advanced_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/results_loader/categorization_examples_loader.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/results_loader/categorization_examples_loader.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/categorization_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/categorization_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/rare_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/rare_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator_factory.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator_factory.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector_service.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector_service.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/expandable_section/expandable_section_results.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/expandable_section/expandable_section_results.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/use_exploration_results.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/use_exploration_results.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/exploration_results_table.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/exploration_results_table.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/ml_context.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/ml_context.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/common/use_results_view_config.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/common/use_results_view_config.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/common/use_results_view_config.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" - }, { "plugin": "apm", "path": "x-pack/plugins/apm/public/components/shared/kuery_bar/index.tsx" @@ -5606,22 +5373,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/target/types/public/components/geo_index_pattern_select.d.ts" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities._service.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities._service.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/remove_nested_field_children.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/remove_nested_field_children.test.ts" - }, { "plugin": "maps", "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/util/get_docvalue_source_fields.test.ts" @@ -5634,14 +5385,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/util/get_docvalue_source_fields.test.ts" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/__mocks__/index_pattern.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/__mocks__/index_pattern.ts" - }, { "plugin": "maps", "path": "x-pack/plugins/maps/target/types/public/classes/fields/agg/count_agg_field.d.ts" @@ -5706,14 +5449,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/target/types/public/connected_components/edit_layer_panel/filter_editor/filter_editor.d.ts" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/components/full_time_range_selector/full_time_range_selector.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/components/full_time_range_selector/full_time_range_selector.d.ts" - }, { "plugin": "dataVisualizer", "path": "x-pack/plugins/data_visualizer/target/types/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector.d.ts" @@ -8116,7 +7851,7 @@ "section": "def-public.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"delete\" | \"create\" | \"find\" | \"resolve\" | \"update\">" + ", \"create\" | \"delete\" | \"find\" | \"resolve\" | \"update\">" ], "path": "src/plugins/data_views/public/saved_objects_client_wrapper.ts", "deprecated": false, @@ -8501,7 +8236,7 @@ "signature": [ "() => Promise, \"type\" | \"options\" | \"description\" | \"name\" | \"order\" | \"value\" | \"category\" | \"optionLabels\" | \"requiresPageReload\" | \"readonly\" | \"sensitive\" | \"deprecation\" | \"metric\"> & ", + ", \"type\" | \"description\" | \"name\" | \"options\" | \"order\" | \"value\" | \"category\" | \"optionLabels\" | \"requiresPageReload\" | \"readonly\" | \"sensitive\" | \"deprecation\" | \"metric\"> & ", "UserProvidedValues", ">>" ], @@ -9392,15 +9127,7 @@ "\nData plugin public Start contract" ], "signature": [ - "{ get: (id: string) => Promise<", - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" - }, - ">; delete: (indexPatternId: string) => Promise<{}>; create: (spec: ", + "{ create: (spec: ", { "pluginId": "dataViews", "scope": "common", @@ -9416,7 +9143,7 @@ "section": "def-common.DataView", "text": "DataView" }, - ">; find: (search: string, size?: number) => Promise<", + ">; delete: (indexPatternId: string) => Promise<{}>; find: (search: string, size?: number) => Promise<", { "pluginId": "dataViews", "scope": "common", @@ -9424,8 +9151,16 @@ "section": "def-common.DataView", "text": "DataView" }, - "[]>; ensureDefaultDataView: ", - "EnsureDefaultDataView", + "[]>; get: (id: string) => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + ">; ensureDefaultDataView: ", + "EnsureDefaultDataView", "; getIds: (refresh?: boolean) => Promise; getTitles: (refresh?: boolean) => Promise; getIdsWithTitle: (refresh?: boolean) => Promise<", { "pluginId": "dataViews", @@ -9590,7 +9325,15 @@ "section": "def-common.DataView", "text": "DataView" }, - ", saveAttempts?: number, ignoreErrors?: boolean) => Promise; }" + ", saveAttempts?: number, ignoreErrors?: boolean) => Promise; getDefaultDataView: () => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " | undefined>; }" ], "path": "src/plugins/data_views/public/types.ts", "deprecated": false, @@ -9807,7 +9550,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">, elasticsearchClient: ", + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">, elasticsearchClient: ", { "pluginId": "core", "scope": "server", @@ -9831,7 +9574,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">, elasticsearchClient: ", + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">, elasticsearchClient: ", { "pluginId": "core", "scope": "server", @@ -10241,7 +9984,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">, elasticsearchClient: ", + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">, elasticsearchClient: ", { "pluginId": "core", "scope": "server", @@ -10351,7 +10094,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">, index: string) => Promise<", + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">, index: string) => Promise<", "SavedObject", "<", { @@ -10382,7 +10125,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">" + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">" ], "path": "src/plugins/data_views/server/utils.ts", "deprecated": false, @@ -10797,7 +10540,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">, elasticsearchClient: ", + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">, elasticsearchClient: ", { "pluginId": "core", "scope": "server", @@ -10827,25 +10570,7 @@ "label": "savedObjectsClient", "description": [], "signature": [ - "{ get: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" - }, - ") => Promise<", - "SavedObject", - ">; delete: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsDeleteOptions", - "text": "SavedObjectsDeleteOptions" - }, - ") => Promise<{}>; create: (type: string, attributes: T, options?: ", + "{ create: (type: string, attributes: T, options?: ", { "pluginId": "core", "scope": "server", @@ -10903,7 +10628,15 @@ "section": "def-server.SavedObjectsCheckConflictsResponse", "text": "SavedObjectsCheckConflictsResponse" }, - ">; find: (options: ", + ">; delete: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsDeleteOptions", + "text": "SavedObjectsDeleteOptions" + }, + ") => Promise<{}>; find: (options: ", { "pluginId": "core", "scope": "server", @@ -10967,6 +10700,16 @@ "section": "def-server.SavedObjectsBulkResolveResponse", "text": "SavedObjectsBulkResolveResponse" }, + ">; get: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsBaseOptions", + "text": "SavedObjectsBaseOptions" + }, + ") => Promise<", + "SavedObject", ">; resolve: (type: string, id: string, options?: ", { "pluginId": "core", @@ -11166,7 +10909,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", @@ -11199,7 +10942,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">, elasticsearchClient: ", + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">, elasticsearchClient: ", { "pluginId": "core", "scope": "server", @@ -11283,25 +11026,7 @@ "label": "savedObjectsClient", "description": [], "signature": [ - "{ get: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" - }, - ") => Promise<", - "SavedObject", - ">; delete: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsDeleteOptions", - "text": "SavedObjectsDeleteOptions" - }, - ") => Promise<{}>; create: (type: string, attributes: T, options?: ", + "{ create: (type: string, attributes: T, options?: ", { "pluginId": "core", "scope": "server", @@ -11359,7 +11084,15 @@ "section": "def-server.SavedObjectsCheckConflictsResponse", "text": "SavedObjectsCheckConflictsResponse" }, - ">; find: (options: ", + ">; delete: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsDeleteOptions", + "text": "SavedObjectsDeleteOptions" + }, + ") => Promise<{}>; find: (options: ", { "pluginId": "core", "scope": "server", @@ -11423,6 +11156,16 @@ "section": "def-server.SavedObjectsBulkResolveResponse", "text": "SavedObjectsBulkResolveResponse" }, + ">; get: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsBaseOptions", + "text": "SavedObjectsBaseOptions" + }, + ") => Promise<", + "SavedObject", ">; resolve: (type: string, id: string, options?: ", { "pluginId": "core", @@ -11622,7 +11365,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", @@ -13042,13 +12785,21 @@ "signature": [ "(fieldName: string, format: ", { - "pluginId": "expressions", + "pluginId": "fieldFormats", "scope": "common", - "docId": "kibExpressionsPluginApi", + "docId": "kibFieldFormatsPluginApi", "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - ">) => void" + "<", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormatParams", + "text": "FieldFormatParams" + }, + ">) => void" ], "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": false, @@ -13076,13 +12827,21 @@ "description": [], "signature": [ { - "pluginId": "expressions", + "pluginId": "fieldFormats", "scope": "common", - "docId": "kibExpressionsPluginApi", + "docId": "kibFieldFormatsPluginApi", "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - ">" + "<", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormatParams", + "text": "FieldFormatParams" + }, + ">" ], "path": "src/plugins/data_views/common/data_views/data_view.ts", "deprecated": false, @@ -13814,14 +13573,34 @@ "parentPluginId": "dataViews", "id": "def-common.DataViewsService.ensureDefaultDataView", "type": "Function", - "tags": [], + "tags": [ + "deprecated" + ], "label": "ensureDefaultDataView", "description": [], "signature": [ "() => Promise | undefined" ], "path": "src/plugins/data_views/common/data_views/data_views.ts", - "deprecated": false, + "deprecated": true, + "references": [ + { + "plugin": "discover", + "path": "src/plugins/discover/public/application/apps/main/discover_main_route.tsx" + }, + { + "plugin": "dashboard", + "path": "src/plugins/dashboard/public/application/lib/load_saved_dashboard_state.ts" + }, + { + "plugin": "lens", + "path": "x-pack/plugins/lens/public/plugin.ts" + }, + { + "plugin": "visualize", + "path": "src/plugins/visualize/public/plugin.ts" + } + ], "returnComment": [], "children": [] }, @@ -14953,6 +14732,33 @@ } ], "returnComment": [] + }, + { + "parentPluginId": "dataViews", + "id": "def-common.DataViewsService.getDefaultDataView", + "type": "Function", + "tags": [], + "label": "getDefaultDataView", + "description": [ + "\nReturns the default data view as an object. If no default is found, or it is missing\nanother data view is selected as default and returned." + ], + "signature": [ + "() => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " | undefined>" + ], + "path": "src/plugins/data_views/common/data_views/data_views.ts", + "deprecated": false, + "children": [], + "returnComment": [ + "default data view" + ] } ], "initialIsOpen": false @@ -15527,18 +15333,6 @@ "plugin": "observability", "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_app_index_pattern.tsx" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts" - }, { "plugin": "maps", "path": "x-pack/plugins/maps/public/embeddable/types.ts" @@ -15711,30 +15505,6 @@ "plugin": "dataVisualizer", "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/chart_loader/chart_loader.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/chart_loader/chart_loader.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/embeddables/types.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/embeddables/types.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx" - }, { "plugin": "apm", "path": "x-pack/plugins/apm/public/components/app/RumDashboard/LocalUIFilters/SelectedFilters.tsx" @@ -15863,14 +15633,6 @@ "plugin": "transform", "path": "x-pack/plugins/transform/common/types/index_pattern.ts" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" - }, { "plugin": "lens", "path": "x-pack/plugins/lens/server/routes/existing_fields.test.ts" @@ -15903,14 +15665,6 @@ "plugin": "dataVisualizer", "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/utils/saved_search_utils.test.ts" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/common/dependency_mocks/index_patterns.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/common/dependency_mocks/index_patterns.d.ts" - }, { "plugin": "lens", "path": "x-pack/plugins/lens/target/types/server/routes/existing_fields.d.ts" @@ -16817,35 +16571,35 @@ }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts" + "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts" + "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts" + "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts" + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts" + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts" }, { "plugin": "observability", - "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx" + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts" }, { "plugin": "observability", @@ -17056,392 +16810,148 @@ "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector.tsx" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" + "plugin": "apm", + "path": "x-pack/plugins/apm/public/components/shared/kuery_bar/index.tsx" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" + "plugin": "apm", + "path": "x-pack/plugins/apm/public/components/shared/kuery_bar/index.tsx" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" + "plugin": "apm", + "path": "x-pack/plugins/apm/public/components/shared/kuery_bar/index.tsx" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/field_format_service.ts" + "plugin": "graph", + "path": "x-pack/plugins/graph/public/types/app_state.ts" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/field_format_service.ts" + "plugin": "graph", + "path": "x-pack/plugins/graph/public/types/app_state.ts" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_grid/common.ts" + "plugin": "graph", + "path": "x-pack/plugins/graph/public/services/persistence/deserialize.ts" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_grid/common.ts" + "plugin": "graph", + "path": "x-pack/plugins/graph/public/services/persistence/deserialize.ts" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_grid/common.ts" + "plugin": "graph", + "path": "x-pack/plugins/graph/public/services/persistence/deserialize.ts" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_grid/common.ts" + "plugin": "graph", + "path": "x-pack/plugins/graph/public/services/persistence/deserialize.ts" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/data_loader/data_loader.ts" + "plugin": "graph", + "path": "x-pack/plugins/graph/public/state_management/datasource.sagas.ts" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/data_loader/data_loader.ts" + "plugin": "graph", + "path": "x-pack/plugins/graph/public/state_management/datasource.sagas.ts" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/datavisualizer/index_based/data_loader/data_loader.ts" + "plugin": "graph", + "path": "x-pack/plugins/graph/public/components/search_bar.tsx" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" + "plugin": "graph", + "path": "x-pack/plugins/graph/public/components/search_bar.tsx" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" + "plugin": "graph", + "path": "x-pack/plugins/graph/public/components/search_bar.tsx" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts" + "plugin": "graph", + "path": "x-pack/plugins/graph/public/components/search_bar.tsx" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/scatterplot_matrix/use_scatterplot_field_options.ts" + "plugin": "graph", + "path": "x-pack/plugins/graph/public/components/inspect_panel.tsx" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/scatterplot_matrix/use_scatterplot_field_options.ts" + "plugin": "graph", + "path": "x-pack/plugins/graph/public/components/inspect_panel.tsx" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx" + "plugin": "graph", + "path": "x-pack/plugins/graph/public/components/workspace_layout/workspace_layout.tsx" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx" + "plugin": "graph", + "path": "x-pack/plugins/graph/public/components/workspace_layout/workspace_layout.tsx" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts" + "plugin": "graph", + "path": "x-pack/plugins/graph/public/components/workspace_layout/workspace_layout.tsx" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts" + "plugin": "graph", + "path": "x-pack/plugins/graph/public/services/index_pattern_cache.ts" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts" + "plugin": "graph", + "path": "x-pack/plugins/graph/public/services/index_pattern_cache.ts" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/single_metric_job_creator.ts" + "plugin": "graph", + "path": "x-pack/plugins/graph/public/services/index_pattern_cache.ts" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/single_metric_job_creator.ts" + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/components/rules/threatmatch_input/index.tsx" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/multi_metric_job_creator.ts" + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/components/rules/threatmatch_input/index.tsx" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/multi_metric_job_creator.ts" + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/components/rules/threatmatch_input/index.tsx" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/population_job_creator.ts" + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.tsx" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/population_job_creator.ts" + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.tsx" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/advanced_job_creator.ts" + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.tsx" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/advanced_job_creator.ts" + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/results_loader/categorization_examples_loader.ts" + "plugin": "stackAlerts", + "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/results_loader/categorization_examples_loader.ts" + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/categorization_job_creator.ts" + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/categorization_job_creator.ts" + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/get_pivot_dropdown_options.ts" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/rare_job_creator.ts" + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/get_pivot_dropdown_options.ts" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/rare_job_creator.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator_factory.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator_factory.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector_service.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector_service.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/expandable_section/expandable_section_results.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/expandable_section/expandable_section_results.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/use_exploration_results.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/use_exploration_results.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/exploration_results_table.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/exploration_results_table.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/ml_context.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/ml_context.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/common/use_results_view_config.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/common/use_results_view_config.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/common/use_results_view_config.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts" - }, - { - "plugin": "apm", - "path": "x-pack/plugins/apm/public/components/shared/kuery_bar/index.tsx" - }, - { - "plugin": "apm", - "path": "x-pack/plugins/apm/public/components/shared/kuery_bar/index.tsx" - }, - { - "plugin": "apm", - "path": "x-pack/plugins/apm/public/components/shared/kuery_bar/index.tsx" - }, - { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/types/app_state.ts" - }, - { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/types/app_state.ts" - }, - { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/services/persistence/deserialize.ts" - }, - { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/services/persistence/deserialize.ts" - }, - { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/services/persistence/deserialize.ts" - }, - { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/services/persistence/deserialize.ts" - }, - { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/state_management/datasource.sagas.ts" - }, - { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/state_management/datasource.sagas.ts" - }, - { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/components/search_bar.tsx" - }, - { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/components/search_bar.tsx" - }, - { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/components/search_bar.tsx" - }, - { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/components/search_bar.tsx" - }, - { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/components/inspect_panel.tsx" - }, - { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/components/inspect_panel.tsx" - }, - { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/components/workspace_layout/workspace_layout.tsx" - }, - { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/components/workspace_layout/workspace_layout.tsx" - }, - { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/components/workspace_layout/workspace_layout.tsx" - }, - { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/services/index_pattern_cache.ts" - }, - { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/services/index_pattern_cache.ts" - }, - { - "plugin": "graph", - "path": "x-pack/plugins/graph/public/services/index_pattern_cache.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/detections/components/rules/threatmatch_input/index.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/detections/components/rules/threatmatch_input/index.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/detections/components/rules/threatmatch_input/index.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.tsx" - }, - { - "plugin": "stackAlerts", - "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx" - }, - { - "plugin": "stackAlerts", - "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/geo_index_pattern_select.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/get_pivot_dropdown_options.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/get_pivot_dropdown_options.ts" - }, - { - "plugin": "transform", - "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_agg_form.tsx" + "plugin": "transform", + "path": "x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_agg_form.tsx" }, { "plugin": "transform", @@ -17599,22 +17109,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/target/types/public/components/geo_index_pattern_select.d.ts" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities._service.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities._service.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/remove_nested_field_children.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/remove_nested_field_children.test.ts" - }, { "plugin": "maps", "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/util/get_docvalue_source_fields.test.ts" @@ -17627,14 +17121,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/util/get_docvalue_source_fields.test.ts" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/__mocks__/index_pattern.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/__mocks__/index_pattern.ts" - }, { "plugin": "maps", "path": "x-pack/plugins/maps/target/types/public/classes/fields/agg/count_agg_field.d.ts" @@ -17699,14 +17185,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/target/types/public/connected_components/edit_layer_panel/filter_editor/filter_editor.d.ts" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/components/full_time_range_selector/full_time_range_selector.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/components/full_time_range_selector/full_time_range_selector.d.ts" - }, { "plugin": "dataVisualizer", "path": "x-pack/plugins/data_visualizer/target/types/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector.d.ts" @@ -20238,7 +19716,7 @@ "section": "def-common.IndexPatternLoadExpressionFunctionDefinition", "text": "IndexPatternLoadExpressionFunctionDefinition" }, - ", \"type\" | \"telemetry\" | \"inject\" | \"extract\" | \"migrations\" | \"name\" | \"disabled\" | \"help\" | \"inputTypes\" | \"args\" | \"aliases\" | \"context\">" + ", \"telemetry\" | \"inject\" | \"extract\" | \"migrations\" | \"type\" | \"name\" | \"disabled\" | \"help\" | \"inputTypes\" | \"args\" | \"aliases\" | \"context\">" ], "path": "src/plugins/data_views/common/expressions/load_index_pattern.ts", "deprecated": false, @@ -20765,13 +20243,21 @@ "signature": [ "Record>> | undefined" + "<", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormatParams", + "text": "FieldFormatParams" + }, + ">> | undefined" ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false @@ -20964,13 +20450,21 @@ "description": [], "signature": [ { - "pluginId": "expressions", + "pluginId": "fieldFormats", "scope": "common", - "docId": "kibExpressionsPluginApi", + "docId": "kibFieldFormatsPluginApi", "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "> | undefined" + "<", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormatParams", + "text": "FieldFormatParams" + }, + "> | undefined" ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false @@ -21268,13 +20762,21 @@ "description": [], "signature": [ { - "pluginId": "expressions", + "pluginId": "fieldFormats", "scope": "common", - "docId": "kibExpressionsPluginApi", + "docId": "kibFieldFormatsPluginApi", "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "> | undefined" + "<", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormatParams", + "text": "FieldFormatParams" + }, + "> | undefined" ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false @@ -21729,14 +21231,6 @@ "plugin": "fleet", "path": "x-pack/plugins/fleet/public/applications/fleet/components/search_bar.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_grid/common.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_grid/common.ts" - }, { "plugin": "infra", "path": "x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/custom_metric_form.tsx" @@ -21910,52 +21404,24 @@ "path": "x-pack/plugins/stack_alerts/public/alert_types/geo_containment/query_builder/util_components/single_field_select.tsx" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.ts" + "plugin": "infra", + "path": "x-pack/plugins/infra/target/types/public/alerting/common/group_by_expression/group_by_expression.d.ts" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.ts" + "plugin": "infra", + "path": "x-pack/plugins/infra/target/types/public/alerting/common/group_by_expression/group_by_expression.d.ts" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.test.ts" + "plugin": "infra", + "path": "x-pack/plugins/infra/target/types/public/alerting/common/group_by_expression/selector.d.ts" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.test.ts" + "plugin": "infra", + "path": "x-pack/plugins/infra/target/types/public/alerting/common/group_by_expression/selector.d.ts" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/field_types_utils.test.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/alerting/common/group_by_expression/group_by_expression.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/alerting/common/group_by_expression/group_by_expression.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/alerting/common/group_by_expression/selector.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/alerting/common/group_by_expression/selector.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/alerting/inventory/components/expression.d.ts" + "plugin": "infra", + "path": "x-pack/plugins/infra/target/types/public/alerting/inventory/components/expression.d.ts" }, { "plugin": "infra", @@ -22731,142 +22197,6 @@ "plugin": "timelines", "path": "x-pack/plugins/timelines/public/container/source/index.tsx" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/containers/with_kuery_autocompletion.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/containers/with_kuery_autocompletion.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/kuery_bar.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/kuery_bar.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_recognizer/data_recognizer.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/components/data_recognizer/data_recognizer.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/load_new_job_capabilities.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/load_new_job_capabilities.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/inventory_view/components/toolbars/toolbar.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/inventory_view/components/toolbars/toolbar.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/utils/kuery.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/utils/kuery.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_data.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_data.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/alerting/metric_threshold/hooks/use_metrics_explorer_chart_data.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/alerting/metric_threshold/hooks/use_metrics_explorer_chart_data.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/alerting/metric_threshold/components/expression_chart.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/alerting/metric_threshold/components/expression_chart.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/containers/logs/log_filter/log_filter_state.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/containers/logs/log_filter/log_filter_state.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/containers/with_source/with_source.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/containers/with_source/with_source.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/toolbar.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/toolbar.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metric_explorer_state.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metric_explorer_state.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/metrics_explorer/index.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/metrics_explorer/index.tsx" - }, { "plugin": "monitoring", "path": "x-pack/plugins/monitoring/public/alerts/components/param_details_form/use_derived_index_pattern.tsx" @@ -22899,14 +22229,6 @@ "plugin": "monitoring", "path": "x-pack/plugins/monitoring/public/lib/kuery.ts" }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts" - }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts" @@ -23119,38 +22441,6 @@ "plugin": "timelines", "path": "x-pack/plugins/timelines/public/mock/index_pattern.ts" }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/target/types/common/search_strategy/index_fields/index.d.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/target/types/common/search_strategy/index_fields/index.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/containers/with_kuery_autocompletion.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/containers/with_kuery_autocompletion.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/containers/with_source/with_source.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/containers/with_source/with_source.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/index_pattern_context.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/common/index_pattern_context.ts" - }, { "plugin": "monitoring", "path": "x-pack/plugins/monitoring/target/types/public/components/kuery_bar/with_kuery_autocompletion.d.ts" @@ -23195,30 +22485,6 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/target/types/public/network/components/network_top_countries_table/columns.d.ts" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/alerting/metric_threshold/components/expression_chart.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/alerting/metric_threshold/components/expression_chart.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/alerting/metric_threshold/hooks/use_metrics_explorer_chart_data.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/alerting/metric_threshold/hooks/use_metrics_explorer_chart_data.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/pages/metrics/metrics_explorer/index.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/pages/metrics/metrics_explorer/index.d.ts" - }, { "plugin": "monitoring", "path": "x-pack/plugins/monitoring/target/types/public/alerts/components/param_details_form/use_derived_index_pattern.d.ts" @@ -23267,34 +22533,6 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/target/types/public/ueba/pages/details/types.d.ts" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/pages/metrics/metrics_explorer/hooks/use_metric_explorer_state.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/pages/metrics/metrics_explorer/hooks/use_metric_explorer_state.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_data.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_data.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/jobs/new_job/common/index_pattern_context.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/jobs/new_job/common/index_pattern_context.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/jobs/new_job/common/index_pattern_context.d.ts" - }, { "plugin": "indexPatternManagement", "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.tsx" @@ -23328,68 +22566,12 @@ "path": "src/plugins/index_pattern_management/target/types/public/components/edit_index_pattern/index_header/index_header.d.ts" }, { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_query_bar/exploration_query_bar.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_query_bar/exploration_query_bar.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_clone/clone_action_name.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_clone/clone_action_name.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_delete/use_delete_action.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_delete/use_delete_action.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/utils.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/utils.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/editor.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/editor.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/edit_utils.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/edit_utils.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/tabs/custom_urls.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/tabs/custom_urls.tsx" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/index.tsx" + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts" }, { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/pages/metrics/index.tsx" + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts" }, { "plugin": "securitySolution", @@ -23491,14 +22673,6 @@ "plugin": "transform", "path": "x-pack/plugins/transform/server/routes/api/transforms.ts" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" - }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/common/mock/index_pattern.ts" @@ -23507,34 +22681,6 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/common/mock/index_pattern.ts" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/common/dependency_mocks/index_patterns.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/common/dependency_mocks/index_patterns.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/explorer/components/explorer_query_bar/explorer_query_bar.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/explorer/components/explorer_query_bar/explorer_query_bar.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/explorer/components/explorer_query_bar/explorer_query_bar.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/utils/new_job_utils.test.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/utils/new_job_utils.test.ts" - }, { "plugin": "data", "path": "src/plugins/data/common/query/timefilter/get_time.test.ts" @@ -23705,9 +22851,9 @@ "signature": [ "Record Promise<", + "{ create: (spec: ", { "pluginId": "dataViews", "scope": "common", "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" + "section": "def-common.DataViewSpec", + "text": "DataViewSpec" }, - ">; delete: (indexPatternId: string) => Promise<{}>; create: (spec: ", + ", skipFetchFields?: boolean) => Promise<", { "pluginId": "dataViews", "scope": "common", "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewSpec", - "text": "DataViewSpec" + "section": "def-common.DataView", + "text": "DataView" }, - ", skipFetchFields?: boolean) => Promise<", + ">; delete: (indexPatternId: string) => Promise<{}>; find: (search: string, size?: number) => Promise<", { "pluginId": "dataViews", "scope": "common", @@ -25176,7 +24322,7 @@ "section": "def-common.DataView", "text": "DataView" }, - ">; find: (search: string, size?: number) => Promise<", + "[]>; get: (id: string) => Promise<", { "pluginId": "dataViews", "scope": "common", @@ -25184,7 +24330,7 @@ "section": "def-common.DataView", "text": "DataView" }, - "[]>; ensureDefaultDataView: ", + ">; ensureDefaultDataView: ", "EnsureDefaultDataView", "; getIds: (refresh?: boolean) => Promise; getTitles: (refresh?: boolean) => Promise; getIdsWithTitle: (refresh?: boolean) => Promise<", { @@ -25350,7 +24496,15 @@ "section": "def-common.DataView", "text": "DataView" }, - ", saveAttempts?: number, ignoreErrors?: boolean) => Promise; }" + ", saveAttempts?: number, ignoreErrors?: boolean) => Promise; getDefaultDataView: () => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " | undefined>; }" ], "path": "src/plugins/data_views/common/data_views/data_views.ts", "deprecated": false, @@ -25366,13 +24520,21 @@ "signature": [ "{ [x: string]: ", { - "pluginId": "expressions", + "pluginId": "fieldFormats", "scope": "common", - "docId": "kibExpressionsPluginApi", + "docId": "kibFieldFormatsPluginApi", "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - ">; }" + "<", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormatParams", + "text": "FieldFormatParams" + }, + ">; }" ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false, @@ -25441,19 +24603,19 @@ }, { "plugin": "visualizations", - "path": "src/plugins/visualizations/public/saved_visualizations/saved_visualization_references/controls_references.ts" + "path": "src/plugins/visualizations/public/utils/saved_visualization_references/controls_references.ts" }, { "plugin": "visualizations", - "path": "src/plugins/visualizations/public/saved_visualizations/saved_visualization_references/controls_references.ts" + "path": "src/plugins/visualizations/public/utils/saved_visualization_references/controls_references.ts" }, { "plugin": "visualizations", - "path": "src/plugins/visualizations/public/saved_visualizations/saved_visualization_references/timeseries_references.ts" + "path": "src/plugins/visualizations/public/utils/saved_visualization_references/timeseries_references.ts" }, { "plugin": "visualizations", - "path": "src/plugins/visualizations/public/saved_visualizations/saved_visualization_references/timeseries_references.ts" + "path": "src/plugins/visualizations/public/utils/saved_visualization_references/timeseries_references.ts" }, { "plugin": "dashboard", @@ -25535,14 +24697,6 @@ "plugin": "discover", "path": "src/plugins/discover/public/application/apps/main/components/sidebar/discover_index_pattern.tsx" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, { "plugin": "transform", "path": "x-pack/plugins/transform/public/app/hooks/use_search_items/common.ts" @@ -25575,34 +24729,6 @@ "plugin": "data", "path": "src/plugins/data/server/index.ts" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts" - }, { "plugin": "discover", "path": "src/plugins/discover/public/application/apps/main/components/sidebar/discover_sidebar_responsive.tsx" @@ -25638,22 +24764,6 @@ { "plugin": "discover", "path": "src/plugins/discover/public/application/apps/main/discover_main_route.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/common/types/kibana.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/common/types/kibana.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/common/types/kibana.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/common/types/kibana.d.ts" } ], "initialIsOpen": false @@ -25807,23 +24917,23 @@ "label": "IndexPatternsContract", "description": [], "signature": [ - "{ get: (id: string) => Promise<", + "{ create: (spec: ", { "pluginId": "dataViews", "scope": "common", "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" + "section": "def-common.DataViewSpec", + "text": "DataViewSpec" }, - ">; delete: (indexPatternId: string) => Promise<{}>; create: (spec: ", + ", skipFetchFields?: boolean) => Promise<", { "pluginId": "dataViews", "scope": "common", "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewSpec", - "text": "DataViewSpec" + "section": "def-common.DataView", + "text": "DataView" }, - ", skipFetchFields?: boolean) => Promise<", + ">; delete: (indexPatternId: string) => Promise<{}>; find: (search: string, size?: number) => Promise<", { "pluginId": "dataViews", "scope": "common", @@ -25831,7 +24941,7 @@ "section": "def-common.DataView", "text": "DataView" }, - ">; find: (search: string, size?: number) => Promise<", + "[]>; get: (id: string) => Promise<", { "pluginId": "dataViews", "scope": "common", @@ -25839,7 +24949,7 @@ "section": "def-common.DataView", "text": "DataView" }, - "[]>; ensureDefaultDataView: ", + ">; ensureDefaultDataView: ", "EnsureDefaultDataView", "; getIds: (refresh?: boolean) => Promise; getTitles: (refresh?: boolean) => Promise; getIdsWithTitle: (refresh?: boolean) => Promise<", { @@ -26005,7 +25115,15 @@ "section": "def-common.DataView", "text": "DataView" }, - ", saveAttempts?: number, ignoreErrors?: boolean) => Promise; }" + ", saveAttempts?: number, ignoreErrors?: boolean) => Promise; getDefaultDataView: () => Promise<", + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " | undefined>; }" ], "path": "src/plugins/data_views/common/data_views/data_views.ts", "deprecated": true, @@ -26070,50 +25188,6 @@ "plugin": "discover", "path": "src/plugins/discover/public/application/apps/main/utils/resolve_index_pattern.ts" }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/containers/logs/log_source/log_source.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/public/containers/logs/log_source/log_source.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/common/dependency_mocks/index_patterns.d.ts" - }, - { - "plugin": "infra", - "path": "x-pack/plugins/infra/target/types/common/dependency_mocks/index_patterns.d.ts" - }, { "plugin": "observability", "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/rtl_helpers.tsx" @@ -26374,66 +25448,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/public/lazy_load_bundle/index.ts" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/dependency_cache.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/dependency_cache.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/util/index_utils.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/routing/resolvers.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/routing/resolvers.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/index_or_search/preconfigured_job_redirect.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/jobs/new_job/pages/index_or_search/preconfigured_job_redirect.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/load_new_job_capabilities.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/services/new_job_capabilities/load_new_job_capabilities.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/routing/router.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/routing/router.tsx" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/ml_context.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/ml_context.ts" - }, { "plugin": "graph", "path": "x-pack/plugins/graph/public/application.ts" @@ -26498,30 +25512,6 @@ "plugin": "maps", "path": "x-pack/plugins/maps/target/types/public/lazy_load_bundle/index.d.ts" }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/__mocks__/index_patterns.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/public/application/contexts/ml/__mocks__/index_patterns.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/routing/router.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/routing/router.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/util/dependency_cache.d.ts" - }, - { - "plugin": "ml", - "path": "x-pack/plugins/ml/target/types/public/application/util/dependency_cache.d.ts" - }, { "plugin": "security", "path": "x-pack/plugins/security/target/types/public/management/roles/edit_role/edit_role_page.d.ts" @@ -26968,7 +25958,7 @@ "label": "RuntimeType", "description": [], "signature": [ - "\"boolean\" | \"date\" | \"keyword\" | \"geo_point\" | \"ip\" | \"long\" | \"double\"" + "\"boolean\" | \"keyword\" | \"date\" | \"geo_point\" | \"ip\" | \"long\" | \"double\"" ], "path": "src/plugins/data_views/common/types.ts", "deprecated": false, diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx index 0e9045d742c0c..49919859c2243 100644 --- a/api_docs/data_views.mdx +++ b/api_docs/data_views.mdx @@ -18,7 +18,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 695 | 6 | 555 | 5 | +| 697 | 6 | 555 | 5 | ## Client diff --git a/api_docs/data_visualizer.json b/api_docs/data_visualizer.json index 6e46a32aabda7..4a0e41ac2318c 100644 --- a/api_docs/data_visualizer.json +++ b/api_docs/data_visualizer.json @@ -574,7 +574,7 @@ "label": "type", "description": [], "signature": [ - "\"number\" | \"boolean\" | \"date\" | \"keyword\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"unknown\" | \"histogram\" | \"text\"" + "\"number\" | \"boolean\" | \"keyword\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"unknown\" | \"histogram\" | \"text\"" ], "path": "x-pack/plugins/data_visualizer/common/types/field_request_config.ts", "deprecated": false @@ -1004,7 +1004,7 @@ "label": "JobFieldType", "description": [], "signature": [ - "\"number\" | \"boolean\" | \"date\" | \"keyword\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"unknown\" | \"histogram\" | \"text\"" + "\"number\" | \"boolean\" | \"keyword\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"unknown\" | \"histogram\" | \"text\"" ], "path": "x-pack/plugins/data_visualizer/common/types/job_field_type.ts", "deprecated": false, diff --git a/api_docs/deprecations_by_api.mdx b/api_docs/deprecations_by_api.mdx index 4aeb2476dfa17..f0c26f0f1a27f 100644 --- a/api_docs/deprecations_by_api.mdx +++ b/api_docs/deprecations_by_api.mdx @@ -14,27 +14,27 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Referencing plugin(s) | Remove By | | ---------------|-----------|-----------| | | securitySolution | - | -| | dataViews, visTypeTimeseries, reporting, discover, observability, infra, maps, dataVisualizer, ml, apm, lens, osquery, securitySolution, transform, savedObjects, indexPatternFieldEditor, visualizations, dashboard, graph, stackAlerts, uptime, indexPatternEditor, indexPatternManagement, inputControlVis, visualize, visDefaultEditor, savedObjectsManagement, visTypeVega, data | - | +| | dataViews, visTypeTimeseries, reporting, discover, observability, maps, dataVisualizer, apm, lens, osquery, securitySolution, transform, savedObjects, indexPatternFieldEditor, visualizations, dashboard, graph, stackAlerts, uptime, indexPatternEditor, indexPatternManagement, inputControlVis, visualize, visDefaultEditor, savedObjectsManagement, visTypeVega, data | - | | | dataViews, discover, maps, dataVisualizer, lens, indexPatternFieldEditor, securitySolution, indexPatternEditor, indexPatternManagement, inputControlVis, visDefaultEditor, visTypeTimeseries, data | - | -| | dataViews, timelines, infra, ml, monitoring, securitySolution, indexPatternManagement, stackAlerts, transform | - | +| | dataViews, timelines, monitoring, securitySolution, indexPatternManagement, stackAlerts, transform | - | | | home, savedObjects, security, fleet, indexPatternFieldEditor, discover, visualizations, dashboard, lens, observability, maps, fileUpload, dataVisualizer, ml, infra, apm, graph, monitoring, osquery, securitySolution, stackAlerts, transform, uptime, indexPatternEditor, indexPatternManagement, inputControlVis, kibanaOverview, visualize, savedObjectsManagement, visTypeTimelion, visTypeTimeseries, visTypeVega | - | -| | dataViews, timelines, infra, ml, monitoring, securitySolution, indexPatternManagement, stackAlerts, transform, data | - | +| | dataViews, timelines, monitoring, securitySolution, indexPatternManagement, stackAlerts, transform, data | - | | | dataViews, discover, maps, dataVisualizer, lens, indexPatternFieldEditor, securitySolution, indexPatternEditor, indexPatternManagement, inputControlVis, visDefaultEditor, visTypeTimeseries, data | - | -| | dataViews, visTypeTimeseries, reporting, discover, observability, infra, maps, dataVisualizer, ml, apm, lens, osquery, securitySolution, transform, savedObjects, indexPatternFieldEditor, visualizations, dashboard, graph, stackAlerts, uptime, indexPatternEditor, indexPatternManagement, inputControlVis, visualize, visDefaultEditor, savedObjectsManagement, visTypeVega, data | - | +| | dataViews, visTypeTimeseries, reporting, discover, observability, maps, dataVisualizer, apm, lens, osquery, securitySolution, transform, savedObjects, indexPatternFieldEditor, visualizations, dashboard, graph, stackAlerts, uptime, indexPatternEditor, indexPatternManagement, inputControlVis, visualize, visDefaultEditor, savedObjectsManagement, visTypeVega, data | - | | | dataViews, discover, maps, dataVisualizer, lens, indexPatternFieldEditor, securitySolution, indexPatternEditor, indexPatternManagement, inputControlVis, visDefaultEditor, visTypeTimeseries | - | -| | dataViews, visTypeTimeseries, reporting, discover, observability, infra, maps, dataVisualizer, ml, apm, lens, osquery, securitySolution, transform, savedObjects, indexPatternFieldEditor, visualizations, dashboard, graph, stackAlerts, uptime, indexPatternEditor, indexPatternManagement, inputControlVis, visualize, visDefaultEditor, savedObjectsManagement, visTypeVega | - | +| | dataViews, visTypeTimeseries, reporting, discover, observability, maps, dataVisualizer, apm, lens, osquery, securitySolution, transform, savedObjects, indexPatternFieldEditor, visualizations, dashboard, graph, stackAlerts, uptime, indexPatternEditor, indexPatternManagement, inputControlVis, visualize, visDefaultEditor, savedObjectsManagement, visTypeVega | - | | | apm, security, securitySolution | - | | | apm, security, securitySolution | - | | | reporting, encryptedSavedObjects, actions, ml, dashboardMode, dataEnhanced, logstash, securitySolution | - | | | dashboard, lens, maps, ml, securitySolution, security, visualize | - | | | securitySolution | - | | | dataViews, visTypeTimeseries, maps, lens, discover, data | - | -| | dataViews, discover, infra, observability, savedObjects, security, visualizations, dashboard, lens, maps, ml, graph, stackAlerts, transform, indexPatternManagement, inputControlVis, savedObjectsManagement, visTypeTimelion, data | - | -| | dataViews, discover, ml, transform, canvas | - | +| | dataViews, discover, observability, savedObjects, security, visualizations, dashboard, lens, maps, graph, stackAlerts, transform, indexPatternManagement, inputControlVis, savedObjectsManagement, visTypeTimelion, data | - | +| | dataViews, discover, transform, canvas | - | | | dataViews, observability, indexPatternEditor, savedObjectsManagement, apm | - | | | dataViews | - | | | dataViews, indexPatternManagement | - | -| | dataViews, discover, ml, transform, canvas, data | - | +| | dataViews, discover, transform, canvas, data | - | | | dataViews, data | - | | | dataViews, data | - | | | dataViews | - | @@ -42,38 +42,39 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | dataViews, visualizations, dashboard, data | - | | | dataViews, data | - | | | dataViews, visTypeTimeseries, maps, lens, discover, data | - | -| | dataViews, discover, infra, observability, savedObjects, security, visualizations, dashboard, lens, maps, ml, graph, stackAlerts, transform, indexPatternManagement, inputControlVis, savedObjectsManagement, visTypeTimelion, data | - | +| | dataViews, discover, observability, savedObjects, security, visualizations, dashboard, lens, maps, graph, stackAlerts, transform, indexPatternManagement, inputControlVis, savedObjectsManagement, visTypeTimelion, data | - | +| | dataViews, discover, dashboard, lens, visualize | - | | | dataViews, indexPatternManagement, data | - | -| | dataViews, discover, ml, transform, canvas | - | +| | dataViews, discover, transform, canvas | - | | | dataViews, visTypeTimeseries, maps, lens, discover | - | | | fleet, indexPatternFieldEditor, discover, dashboard, lens, ml, stackAlerts, indexPatternManagement, regionMap, tileMap, visTypePie, visTypeTable, visTypeTimeseries, visTypeXy, visTypeVislib | - | | | reporting, visTypeTimeseries | - | | | data, lens, visTypeTimeseries, infra, maps, visTypeTimelion | - | | | dashboard, maps, graph, visualize | - | | | spaces, security, reporting, actions, alerting, ml, fleet, remoteClusters, graph, indexLifecycleManagement, maps, painlessLab, rollup, searchprofiler, snapshotRestore, transform, upgradeAssistant | - | +| | discover, dashboard, lens, visualize | - | | | lens, dashboard | - | | | discover | - | | | discover | - | | | embeddable, presentationUtil, discover, dashboard, graph | - | | | discover, visualizations, dashboard, savedObjectsManagement | - | -| | discover, savedObjectsTaggingOss, visualizations, dashboard, visualize, visDefaultEditor, savedObjectsManagement | - | +| | savedObjectsTaggingOss, discover, visualizations, dashboard, savedObjectsManagement | - | | | discover, visualizations, dashboard | - | | | data, discover, embeddable | - | | | advancedSettings, discover | - | | | advancedSettings, discover | - | -| | ml, infra, reporting, ingestPipelines, upgradeAssistant | - | -| | ml, infra, reporting, ingestPipelines, upgradeAssistant | - | | | observability, osquery | - | | | security | - | | | security | - | | | security, licenseManagement, ml, fleet, apm, reporting, crossClusterReplication, logstash, painlessLab, searchprofiler, watcher | - | | | management, fleet, security, kibanaOverview | - | -| | actions, ml, enterpriseSearch, savedObjectsTagging | - | -| | ml | - | +| | visualizations | - | | | spaces, savedObjectsManagement | - | | | spaces, savedObjectsManagement | - | | | reporting | - | | | reporting | - | +| | ml, infra, reporting, ingestPipelines, upgradeAssistant | - | +| | ml, infra, reporting, ingestPipelines, upgradeAssistant | - | | | cloud, apm | - | | | visTypeVega | - | | | monitoring, visTypeVega | - | @@ -89,6 +90,8 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | canvas | - | | | canvas | - | | | canvas, regionMap, tileMap, visTypeXy | - | +| | actions, ml, enterpriseSearch, savedObjectsTagging | - | +| | ml | - | | | encryptedSavedObjects, actions, alerting | - | | | actions | - | | | console | - | @@ -100,14 +103,14 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | discover, visualizations, dashboard, lens, observability, timelines, maps, infra, dashboardEnhanced, discoverEnhanced, securitySolution, urlDrilldown, inputControlVis, visualize, visTypeTimelion, visTypeVega, presentationUtil, ml, visTypeTimeseries | 8.1 | | | discover, visualizations, dashboard, lens, observability, timelines, maps, infra, dashboardEnhanced, discoverEnhanced, securitySolution, urlDrilldown, inputControlVis, visualize, visTypeTimelion, visTypeVega, presentationUtil, ml, visTypeTimeseries | 8.1 | | | discover, visualizations, dashboard, lens, observability, timelines, maps, infra, dashboardEnhanced, discoverEnhanced, securitySolution, urlDrilldown, inputControlVis, visualize, visTypeTimelion, visTypeVega, presentationUtil, ml, visTypeTimeseries | 8.1 | -| | dataViews, fleet, ml, infra, monitoring, stackAlerts, indexPatternManagement | 8.1 | -| | dataViews, fleet, ml, infra, monitoring, stackAlerts, indexPatternManagement, data | 8.1 | +| | dataViews, fleet, infra, monitoring, stackAlerts, indexPatternManagement | 8.1 | +| | dataViews, fleet, infra, monitoring, stackAlerts, indexPatternManagement, data | 8.1 | | | dataViews | 8.1 | | | dataViews | 8.1 | | | indexPatternManagement, dataViews | 8.1 | | | visTypeTimeseries, graph, indexPatternManagement, dataViews | 8.1 | | | dataViews, indexPatternManagement | 8.1 | -| | dataViews, fleet, ml, infra, monitoring, stackAlerts, indexPatternManagement | 8.1 | +| | dataViews, fleet, infra, monitoring, stackAlerts, indexPatternManagement | 8.1 | | | dataViews | 8.1 | | | dataViews | 8.1 | | | indexPatternManagement, dataViews | 8.1 | @@ -178,7 +181,6 @@ Safe to remove. | | | | | | -| | | | | | | | @@ -203,7 +205,6 @@ Safe to remove. | | | | | | -| | | | | | | | @@ -213,6 +214,8 @@ Safe to remove. | | | | | | +| | +| | | | | | | | diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index e9818638993bf..d54e092cdc8a5 100644 --- a/api_docs/deprecations_by_plugin.mdx +++ b/api_docs/deprecations_by_plugin.mdx @@ -131,10 +131,12 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [saved_dashboard.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=Filter), [saved_dashboard.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=Filter), [dashboard_state_slice.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts#:~:text=Filter), [dashboard_state_slice.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts#:~:text=Filter), [dashboard_state_slice.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts#:~:text=Filter)+ 25 more | 8.1 | | | [replace_index_pattern_reference.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/server/saved_objects/replace_index_pattern_reference.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [replace_index_pattern_reference.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/server/saved_objects/replace_index_pattern_reference.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [dashboard_migrations.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/server/saved_objects/dashboard_migrations.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [dashboard_migrations.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/server/saved_objects/dashboard_migrations.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [dashboard_migrations.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/server/saved_objects/dashboard_migrations.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [replace_index_pattern_reference.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/server/saved_objects/replace_index_pattern_reference.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [replace_index_pattern_reference.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/server/saved_objects/replace_index_pattern_reference.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [dashboard_migrations.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/server/saved_objects/dashboard_migrations.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [dashboard_migrations.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/server/saved_objects/dashboard_migrations.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [dashboard_migrations.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/server/saved_objects/dashboard_migrations.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE) | - | | | [sync_dashboard_index_patterns.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/sync_dashboard_index_patterns.ts#:~:text=IndexPatternsContract), [sync_dashboard_index_patterns.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/sync_dashboard_index_patterns.ts#:~:text=IndexPatternsContract), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/types.ts#:~:text=IndexPatternsContract), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/types.ts#:~:text=IndexPatternsContract), [make_default_services.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/test_helpers/make_default_services.ts#:~:text=IndexPatternsContract), [make_default_services.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/test_helpers/make_default_services.ts#:~:text=IndexPatternsContract), [sync_dashboard_index_patterns.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/sync_dashboard_index_patterns.ts#:~:text=IndexPatternsContract), [sync_dashboard_index_patterns.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/sync_dashboard_index_patterns.ts#:~:text=IndexPatternsContract), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/types.ts#:~:text=IndexPatternsContract), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/types.ts#:~:text=IndexPatternsContract)+ 2 more | - | +| | [load_saved_dashboard_state.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/load_saved_dashboard_state.ts#:~:text=ensureDefaultDataView), [load_saved_dashboard_state.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/load_saved_dashboard_state.ts#:~:text=ensureDefaultDataView) | - | | | [sync_dashboard_index_patterns.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/sync_dashboard_index_patterns.ts#:~:text=IndexPattern), [sync_dashboard_index_patterns.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/sync_dashboard_index_patterns.ts#:~:text=IndexPattern), [sync_dashboard_index_patterns.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/sync_dashboard_index_patterns.ts#:~:text=IndexPattern), [sync_dashboard_index_patterns.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/sync_dashboard_index_patterns.ts#:~:text=IndexPattern), [sync_dashboard_index_patterns.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/sync_dashboard_index_patterns.ts#:~:text=IndexPattern), [sync_dashboard_index_patterns.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/sync_dashboard_index_patterns.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/types.ts#:~:text=IndexPattern), [sync_dashboard_index_patterns.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/sync_dashboard_index_patterns.ts#:~:text=IndexPattern), [sync_dashboard_index_patterns.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/sync_dashboard_index_patterns.ts#:~:text=IndexPattern)+ 6 more | - | | | [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [saved_dashboard.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=Filter), [saved_dashboard.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=Filter), [dashboard_state_slice.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts#:~:text=Filter), [dashboard_state_slice.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts#:~:text=Filter), [dashboard_state_slice.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts#:~:text=Filter)+ 25 more | 8.1 | | | [sync_dashboard_index_patterns.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/sync_dashboard_index_patterns.ts#:~:text=IndexPattern), [sync_dashboard_index_patterns.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/sync_dashboard_index_patterns.ts#:~:text=IndexPattern), [sync_dashboard_index_patterns.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/sync_dashboard_index_patterns.ts#:~:text=IndexPattern), [sync_dashboard_index_patterns.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/sync_dashboard_index_patterns.ts#:~:text=IndexPattern), [sync_dashboard_index_patterns.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/sync_dashboard_index_patterns.ts#:~:text=IndexPattern), [sync_dashboard_index_patterns.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/sync_dashboard_index_patterns.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/types.ts#:~:text=IndexPattern) | - | | | [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [filter_utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/filter_utils.ts#:~:text=Filter), [saved_dashboard.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=Filter), [saved_dashboard.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=Filter), [dashboard_state_slice.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts#:~:text=Filter), [dashboard_state_slice.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts#:~:text=Filter), [dashboard_state_slice.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts#:~:text=Filter)+ 25 more | 8.1 | +| | [load_saved_dashboard_state.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/load_saved_dashboard_state.ts#:~:text=ensureDefaultDataView) | - | | | [saved_objects.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/services/saved_objects.ts#:~:text=SavedObjectSaveModal), [save_modal.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/top_nav/save_modal.tsx#:~:text=SavedObjectSaveModal), [save_modal.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/top_nav/save_modal.tsx#:~:text=SavedObjectSaveModal) | - | | | [saved_objects.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/services/saved_objects.ts#:~:text=SavedObjectLoader), [saved_dashboards.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboards.ts#:~:text=SavedObjectLoader), [saved_dashboards.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboards.ts#:~:text=SavedObjectLoader), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/types.ts#:~:text=SavedObjectLoader), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/types.ts#:~:text=SavedObjectLoader), [plugin.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/plugin.tsx#:~:text=SavedObjectLoader), [plugin.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/plugin.tsx#:~:text=SavedObjectLoader), [make_default_services.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/test_helpers/make_default_services.ts#:~:text=SavedObjectLoader), [make_default_services.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/test_helpers/make_default_services.ts#:~:text=SavedObjectLoader), [url_generator.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/url_generator.ts#:~:text=SavedObjectLoader)+ 3 more | - | | | [saved_objects.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/services/saved_objects.ts#:~:text=SavedObject), [saved_dashboard.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=SavedObject), [saved_dashboard.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=SavedObject), [dashboard_tagging.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/dashboard_tagging.ts#:~:text=SavedObject), [dashboard_tagging.ts](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/dashboard_tagging.ts#:~:text=SavedObject), [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#:~:text=SavedObject), [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#:~:text=SavedObject), [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#:~:text=SavedObject) | - | @@ -230,6 +232,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IndexPatternType) | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IndexPatternsService), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/public/index.ts#:~:text=IndexPatternsService) | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IndexPatternsContract), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/public/index.ts#:~:text=IndexPatternsContract) | - | +| | [data_views.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_views.ts#:~:text=ensureDefaultDataView) | - | | | [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IndexPattern), [data_view_field.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.test.ts#:~:text=IndexPattern), [data_view_field.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/fields/data_view_field.test.ts#:~:text=IndexPattern), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/public/index.ts#:~:text=IndexPattern), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPattern), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPattern), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPattern), [data_view.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.test.ts#:~:text=IndexPattern) | - | | | [data_views.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_views.ts#:~:text=IndexPatternListItem), [index.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/index.ts#:~:text=IndexPatternListItem) | - | | | [data_view.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.ts#:~:text=intervalName), [data_view.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.ts#:~:text=intervalName), [data_view.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.ts#:~:text=intervalName), [data_view.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_view.ts#:~:text=intervalName), [data_views.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/common/data_views/data_views.ts#:~:text=intervalName), [update_index_pattern.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/server/routes/update_index_pattern.ts#:~:text=intervalName), [update_index_pattern.ts](https://github.com/elastic/kibana/tree/master/src/plugins/data_views/server/routes/update_index_pattern.ts#:~:text=intervalName) | 8.1 | @@ -283,6 +286,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [discover_grid_cell_actions.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/components/discover_grid/discover_grid_cell_actions.tsx#:~:text=IndexPatternField), [discover_grid_cell_actions.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/components/discover_grid/discover_grid_cell_actions.tsx#:~:text=IndexPatternField), [doc_table_wrapper.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/apps/main/components/doc_table/doc_table_wrapper.tsx#:~:text=IndexPatternField), [doc_table_wrapper.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/apps/main/components/doc_table/doc_table_wrapper.tsx#:~:text=IndexPatternField), [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/saved_search_embeddable.tsx#:~:text=IndexPatternField), [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/saved_search_embeddable.tsx#:~:text=IndexPatternField), [context_app.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/apps/context/context_app.tsx#:~:text=IndexPatternField), [context_app.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/apps/context/context_app.tsx#:~:text=IndexPatternField), [discover_field_visualize.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_visualize.tsx#:~:text=IndexPatternField), [discover_field_visualize.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_visualize.tsx#:~:text=IndexPatternField)+ 192 more | - | | | [index_patterns.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/__mocks__/index_patterns.ts#:~:text=IndexPatternsService), [index_patterns.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/__mocks__/index_patterns.ts#:~:text=IndexPatternsService), [popularize_field.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/helpers/popularize_field.test.ts#:~:text=IndexPatternsService), [popularize_field.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/helpers/popularize_field.test.ts#:~:text=IndexPatternsService), [popularize_field.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/helpers/popularize_field.test.ts#:~:text=IndexPatternsService), [popularize_field.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/helpers/popularize_field.test.ts#:~:text=IndexPatternsService), [popularize_field.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/helpers/popularize_field.test.ts#:~:text=IndexPatternsService), [popularize_field.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/helpers/popularize_field.test.ts#:~:text=IndexPatternsService), [index_patterns.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/__mocks__/index_patterns.ts#:~:text=IndexPatternsService), [index_patterns.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/__mocks__/index_patterns.ts#:~:text=IndexPatternsService)+ 6 more | - | | | [use_data_grid_columns.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/helpers/use_data_grid_columns.ts#:~:text=IndexPatternsContract), [use_data_grid_columns.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/helpers/use_data_grid_columns.ts#:~:text=IndexPatternsContract), [use_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/helpers/use_index_pattern.tsx#:~:text=IndexPatternsContract), [use_index_pattern.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/helpers/use_index_pattern.tsx#:~:text=IndexPatternsContract), [resolve_index_pattern.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/apps/main/utils/resolve_index_pattern.ts#:~:text=IndexPatternsContract), [resolve_index_pattern.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/apps/main/utils/resolve_index_pattern.ts#:~:text=IndexPatternsContract), [use_data_grid_columns.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/target/types/public/application/helpers/use_data_grid_columns.d.ts#:~:text=IndexPatternsContract), [use_data_grid_columns.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/target/types/public/application/helpers/use_data_grid_columns.d.ts#:~:text=IndexPatternsContract), [resolve_index_pattern.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/target/types/public/application/apps/main/utils/resolve_index_pattern.d.ts#:~:text=IndexPatternsContract), [resolve_index_pattern.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/target/types/public/application/apps/main/utils/resolve_index_pattern.d.ts#:~:text=IndexPatternsContract)+ 50 more | - | +| | [discover_main_route.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/apps/main/discover_main_route.tsx#:~:text=ensureDefaultDataView), [discover_main_route.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/apps/main/discover_main_route.tsx#:~:text=ensureDefaultDataView) | - | | | [helpers.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/apps/main/components/doc_table/components/table_header/helpers.tsx#:~:text=IndexPattern), [helpers.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/apps/main/components/doc_table/components/table_header/helpers.tsx#:~:text=IndexPattern), [discover_grid_flyout.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/components/discover_grid/discover_grid_flyout.tsx#:~:text=IndexPattern), [discover_grid_flyout.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/components/discover_grid/discover_grid_flyout.tsx#:~:text=IndexPattern), [discover_grid_context.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/components/discover_grid/discover_grid_context.tsx#:~:text=IndexPattern), [discover_grid_context.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/components/discover_grid/discover_grid_context.tsx#:~:text=IndexPattern), [get_render_cell_value.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/components/discover_grid/get_render_cell_value.tsx#:~:text=IndexPattern), [get_render_cell_value.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/components/discover_grid/get_render_cell_value.tsx#:~:text=IndexPattern), [discover_grid_columns.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/components/discover_grid/discover_grid_columns.tsx#:~:text=IndexPattern), [discover_grid_columns.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/components/discover_grid/discover_grid_columns.tsx#:~:text=IndexPattern)+ 354 more | - | | | [url_generator.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/url_generator.ts#:~:text=Filter), [url_generator.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/url_generator.ts#:~:text=Filter), [url_generator.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/url_generator.ts#:~:text=Filter), [locator.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/locator.ts#:~:text=Filter), [locator.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/locator.ts#:~:text=Filter), [locator.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/locator.ts#:~:text=Filter), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/types.ts#:~:text=Filter), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/types.ts#:~:text=Filter), [discover_state.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/apps/main/services/discover_state.ts#:~:text=Filter), [discover_state.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/apps/main/services/discover_state.ts#:~:text=Filter)+ 21 more | 8.1 | | | [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/saved_search_embeddable.tsx#:~:text=create), [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/saved_search_embeddable.tsx#:~:text=create) | - | @@ -292,10 +296,11 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [helpers.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/apps/main/components/doc_table/components/table_header/helpers.tsx#:~:text=IndexPattern), [helpers.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/apps/main/components/doc_table/components/table_header/helpers.tsx#:~:text=IndexPattern), [discover_grid_flyout.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/components/discover_grid/discover_grid_flyout.tsx#:~:text=IndexPattern), [discover_grid_flyout.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/components/discover_grid/discover_grid_flyout.tsx#:~:text=IndexPattern), [discover_grid_context.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/components/discover_grid/discover_grid_context.tsx#:~:text=IndexPattern), [discover_grid_context.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/components/discover_grid/discover_grid_context.tsx#:~:text=IndexPattern), [get_render_cell_value.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/components/discover_grid/get_render_cell_value.tsx#:~:text=IndexPattern), [get_render_cell_value.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/components/discover_grid/get_render_cell_value.tsx#:~:text=IndexPattern), [discover_grid_columns.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/components/discover_grid/discover_grid_columns.tsx#:~:text=IndexPattern), [discover_grid_columns.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/components/discover_grid/discover_grid_columns.tsx#:~:text=IndexPattern)+ 172 more | - | | | [index_patterns.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/__mocks__/index_patterns.ts#:~:text=IndexPatternsService), [index_patterns.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/__mocks__/index_patterns.ts#:~:text=IndexPatternsService), [popularize_field.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/helpers/popularize_field.test.ts#:~:text=IndexPatternsService), [popularize_field.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/helpers/popularize_field.test.ts#:~:text=IndexPatternsService), [popularize_field.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/helpers/popularize_field.test.ts#:~:text=IndexPatternsService), [popularize_field.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/helpers/popularize_field.test.ts#:~:text=IndexPatternsService), [popularize_field.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/helpers/popularize_field.test.ts#:~:text=IndexPatternsService), [popularize_field.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/helpers/popularize_field.test.ts#:~:text=IndexPatternsService), [index_patterns.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/__mocks__/index_patterns.ts#:~:text=IndexPatternsService), [index_patterns.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/__mocks__/index_patterns.ts#:~:text=IndexPatternsService)+ 6 more | - | | | [url_generator.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/url_generator.ts#:~:text=Filter), [url_generator.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/url_generator.ts#:~:text=Filter), [url_generator.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/url_generator.ts#:~:text=Filter), [locator.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/locator.ts#:~:text=Filter), [locator.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/locator.ts#:~:text=Filter), [locator.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/locator.ts#:~:text=Filter), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/types.ts#:~:text=Filter), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/types.ts#:~:text=Filter), [discover_state.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/apps/main/services/discover_state.ts#:~:text=Filter), [discover_state.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/apps/main/services/discover_state.ts#:~:text=Filter)+ 21 more | 8.1 | +| | [discover_main_route.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/apps/main/discover_main_route.tsx#:~:text=ensureDefaultDataView) | - | | | [on_save_search.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/apps/main/components/top_nav/on_save_search.tsx#:~:text=SavedObjectSaveModal), [on_save_search.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/apps/main/components/top_nav/on_save_search.tsx#:~:text=SavedObjectSaveModal) | - | -| | [saved_searches.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/saved_searches/saved_searches.ts#:~:text=SavedObjectLoader), [saved_searches.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/saved_searches/saved_searches.ts#:~:text=SavedObjectLoader), [plugin.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/plugin.tsx#:~:text=SavedObjectLoader), [plugin.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/plugin.tsx#:~:text=SavedObjectLoader) | - | -| | [discover_main_route.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/apps/main/discover_main_route.tsx#:~:text=SavedObject), [_saved_search.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/saved_searches/_saved_search.ts#:~:text=SavedObject), [_saved_search.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/saved_searches/_saved_search.ts#:~:text=SavedObject), [discover_main_route.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/apps/main/discover_main_route.tsx#:~:text=SavedObject), [discover_main_route.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/apps/main/discover_main_route.tsx#:~:text=SavedObject) | - | -| | [_saved_search.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/saved_searches/_saved_search.ts#:~:text=SavedObjectClass) | - | +| | [saved_searches.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/saved_searches/legacy/saved_searches.ts#:~:text=SavedObjectLoader), [saved_searches.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/saved_searches/legacy/saved_searches.ts#:~:text=SavedObjectLoader), [plugin.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/plugin.tsx#:~:text=SavedObjectLoader), [plugin.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/plugin.tsx#:~:text=SavedObjectLoader) | - | +| | [_saved_search.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/saved_searches/legacy/_saved_search.ts#:~:text=SavedObject), [_saved_search.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/saved_searches/legacy/_saved_search.ts#:~:text=SavedObject) | - | +| | [_saved_search.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/saved_searches/legacy/_saved_search.ts#:~:text=SavedObjectClass) | - | | | [saved_search_embeddable.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/saved_search_embeddable.tsx#:~:text=executeTriggerActions), [search_embeddable_factory.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/search_embeddable_factory.ts#:~:text=executeTriggerActions), [plugin.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/plugin.tsx#:~:text=executeTriggerActions), [search_embeddable_factory.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/target/types/public/application/embeddable/search_embeddable_factory.d.ts#:~:text=executeTriggerActions) | - | | | [ui_settings.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/server/ui_settings.ts#:~:text=metric), [ui_settings.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/server/ui_settings.ts#:~:text=metric) | - | | | [ui_settings.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/server/ui_settings.ts#:~:text=metric), [ui_settings.ts](https://github.com/elastic/kibana/tree/master/src/plugins/discover/server/ui_settings.ts#:~:text=metric) | - | @@ -475,21 +480,14 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [resolved_log_source_configuration.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts#:~:text=IndexPatternsContract), [resolved_log_source_configuration.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts#:~:text=IndexPatternsContract), [resolved_log_source_configuration.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts#:~:text=IndexPatternsContract), [resolved_log_source_configuration.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts#:~:text=IndexPatternsContract), [log_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/containers/logs/log_source/log_source.ts#:~:text=IndexPatternsContract), [log_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/containers/logs/log_source/log_source.ts#:~:text=IndexPatternsContract), [index_patterns.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts#:~:text=IndexPatternsContract), [index_patterns.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts#:~:text=IndexPatternsContract), [index_patterns.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts#:~:text=IndexPatternsContract), [index_patterns.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/target/types/common/dependency_mocks/index_patterns.d.ts#:~:text=IndexPatternsContract)+ 12 more | - | -| | [resolved_log_source_configuration.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts#:~:text=IndexPattern), [resolved_log_source_configuration.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts#:~:text=IndexPattern), [resolved_log_source_configuration.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts#:~:text=IndexPattern), [index_patterns.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts#:~:text=IndexPattern), [index_patterns.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts#:~:text=IndexPattern), [index_patterns.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/target/types/common/dependency_mocks/index_patterns.d.ts#:~:text=IndexPattern), [index_patterns.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/target/types/common/dependency_mocks/index_patterns.d.ts#:~:text=IndexPattern), [validation_errors.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts#:~:text=IndexPattern), [validation_errors.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts#:~:text=IndexPattern), [validation_errors.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts#:~:text=IndexPattern)+ 14 more | - | -| | [with_kuery_autocompletion.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/containers/with_kuery_autocompletion.tsx#:~:text=IIndexPattern), [with_kuery_autocompletion.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/containers/with_kuery_autocompletion.tsx#:~:text=IIndexPattern), [kuery_bar.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/kuery_bar.tsx#:~:text=IIndexPattern), [kuery_bar.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/kuery_bar.tsx#:~:text=IIndexPattern), [toolbar.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/toolbars/toolbar.tsx#:~:text=IIndexPattern), [toolbar.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/toolbars/toolbar.tsx#:~:text=IIndexPattern), [kuery.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/utils/kuery.ts#:~:text=IIndexPattern), [kuery.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/utils/kuery.ts#:~:text=IIndexPattern), [use_metrics_explorer_data.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_data.ts#:~:text=IIndexPattern), [use_metrics_explorer_data.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_data.ts#:~:text=IIndexPattern)+ 34 more | - | | | [custom_metric_form.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/custom_metric_form.tsx#:~:text=IFieldType), [custom_metric_form.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/custom_metric_form.tsx#:~:text=IFieldType), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/index.tsx#:~:text=IFieldType), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/index.tsx#:~:text=IFieldType), [custom_field_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/custom_field_panel.tsx#:~:text=IFieldType), [custom_field_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/custom_field_panel.tsx#:~:text=IFieldType), [waffle_group_by_controls.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_group_by_controls.tsx#:~:text=IFieldType), [waffle_group_by_controls.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_group_by_controls.tsx#:~:text=IFieldType), [metric.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/alerting/inventory/components/metric.tsx#:~:text=IFieldType), [metric.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/alerting/inventory/components/metric.tsx#:~:text=IFieldType)+ 46 more | 8.1 | | | [editor.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/alerting/log_threshold/components/expression_editor/editor.tsx#:~:text=indexPatterns), [log_stream.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/components/log_stream/log_stream.tsx#:~:text=indexPatterns), [log_stream.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/components/log_stream/log_stream.tsx#:~:text=indexPatterns), [logs_overview_fetchers.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/utils/logs_overview_fetchers.ts#:~:text=indexPatterns), [redirect_to_node_logs.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/link_to/redirect_to_node_logs.tsx#:~:text=indexPatterns), [use_kibana_index_patterns.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/hooks/use_kibana_index_patterns.ts#:~:text=indexPatterns), [page_providers.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/logs/page_providers.tsx#:~:text=indexPatterns), [logs_overview_fetches.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/utils/logs_overview_fetches.test.ts#:~:text=indexPatterns) | - | | | [kuery_bar.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/kuery_bar.tsx#:~:text=esKuery), [kuery_bar.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/kuery_bar.tsx#:~:text=esKuery), [kuery.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/utils/kuery.ts#:~:text=esKuery), [kuery.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/utils/kuery.ts#:~:text=esKuery), [kuery.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/utils/kuery.ts#:~:text=esKuery), [use_waffle_filters.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/inventory_view/hooks/use_waffle_filters.ts#:~:text=esKuery), [use_waffle_filters.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/inventory_view/hooks/use_waffle_filters.ts#:~:text=esKuery) | 8.1 | | | [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/containers/logs/log_stream/index.ts#:~:text=esQuery), [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/containers/logs/log_stream/index.ts#:~:text=esQuery), [log_filter_state.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/containers/logs/log_filter/log_filter_state.ts#:~:text=esQuery), [log_filter_state.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/containers/logs/log_filter/log_filter_state.ts#:~:text=esQuery), [log_filter_state.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/containers/logs/log_filter/log_filter_state.ts#:~:text=esQuery) | 8.1 | | | [log_stream_embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/components/log_stream/log_stream_embeddable.tsx#:~:text=Filter), [log_stream_embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/components/log_stream/log_stream_embeddable.tsx#:~:text=Filter), [use_dataset_filtering.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/logs/log_entry_rate/use_dataset_filtering.ts#:~:text=Filter), [use_dataset_filtering.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/logs/log_entry_rate/use_dataset_filtering.ts#:~:text=Filter), [use_dataset_filtering.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/logs/log_entry_rate/use_dataset_filtering.ts#:~:text=Filter) | 8.1 | | | [custom_metric_form.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/custom_metric_form.tsx#:~:text=IFieldType), [custom_metric_form.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/custom_metric_form.tsx#:~:text=IFieldType), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/index.tsx#:~:text=IFieldType), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/index.tsx#:~:text=IFieldType), [custom_field_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/custom_field_panel.tsx#:~:text=IFieldType), [custom_field_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/custom_field_panel.tsx#:~:text=IFieldType), [waffle_group_by_controls.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_group_by_controls.tsx#:~:text=IFieldType), [waffle_group_by_controls.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_group_by_controls.tsx#:~:text=IFieldType), [metric.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/alerting/inventory/components/metric.tsx#:~:text=IFieldType), [metric.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/alerting/inventory/components/metric.tsx#:~:text=IFieldType)+ 102 more | 8.1 | -| | [with_kuery_autocompletion.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/containers/with_kuery_autocompletion.tsx#:~:text=IIndexPattern), [with_kuery_autocompletion.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/containers/with_kuery_autocompletion.tsx#:~:text=IIndexPattern), [kuery_bar.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/kuery_bar.tsx#:~:text=IIndexPattern), [kuery_bar.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/kuery_bar.tsx#:~:text=IIndexPattern), [toolbar.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/toolbars/toolbar.tsx#:~:text=IIndexPattern), [toolbar.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/toolbars/toolbar.tsx#:~:text=IIndexPattern), [kuery.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/utils/kuery.ts#:~:text=IIndexPattern), [kuery.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/utils/kuery.ts#:~:text=IIndexPattern), [use_metrics_explorer_data.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_data.ts#:~:text=IIndexPattern), [use_metrics_explorer_data.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_data.ts#:~:text=IIndexPattern)+ 78 more | - | -| | [resolved_log_source_configuration.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts#:~:text=IndexPatternsContract), [resolved_log_source_configuration.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts#:~:text=IndexPatternsContract), [resolved_log_source_configuration.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts#:~:text=IndexPatternsContract), [resolved_log_source_configuration.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts#:~:text=IndexPatternsContract), [log_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/containers/logs/log_source/log_source.ts#:~:text=IndexPatternsContract), [log_source.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/containers/logs/log_source/log_source.ts#:~:text=IndexPatternsContract), [index_patterns.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts#:~:text=IndexPatternsContract), [index_patterns.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts#:~:text=IndexPatternsContract), [index_patterns.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts#:~:text=IndexPatternsContract), [index_patterns.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/target/types/common/dependency_mocks/index_patterns.d.ts#:~:text=IndexPatternsContract)+ 12 more | - | -| | [resolved_log_source_configuration.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts#:~:text=IndexPattern), [resolved_log_source_configuration.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts#:~:text=IndexPattern), [resolved_log_source_configuration.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts#:~:text=IndexPattern), [index_patterns.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts#:~:text=IndexPattern), [index_patterns.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts#:~:text=IndexPattern), [index_patterns.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/target/types/common/dependency_mocks/index_patterns.d.ts#:~:text=IndexPattern), [index_patterns.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/target/types/common/dependency_mocks/index_patterns.d.ts#:~:text=IndexPattern), [validation_errors.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts#:~:text=IndexPattern), [validation_errors.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts#:~:text=IndexPattern), [validation_errors.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts#:~:text=IndexPattern)+ 14 more | - | | | [log_stream_embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/components/log_stream/log_stream_embeddable.tsx#:~:text=Filter), [log_stream_embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/components/log_stream/log_stream_embeddable.tsx#:~:text=Filter), [use_dataset_filtering.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/logs/log_entry_rate/use_dataset_filtering.ts#:~:text=Filter), [use_dataset_filtering.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/logs/log_entry_rate/use_dataset_filtering.ts#:~:text=Filter), [use_dataset_filtering.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/logs/log_entry_rate/use_dataset_filtering.ts#:~:text=Filter) | 8.1 | | | [custom_metric_form.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/custom_metric_form.tsx#:~:text=IFieldType), [custom_metric_form.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/custom_metric_form.tsx#:~:text=IFieldType), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/index.tsx#:~:text=IFieldType), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/index.tsx#:~:text=IFieldType), [custom_field_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/custom_field_panel.tsx#:~:text=IFieldType), [custom_field_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/custom_field_panel.tsx#:~:text=IFieldType), [waffle_group_by_controls.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_group_by_controls.tsx#:~:text=IFieldType), [waffle_group_by_controls.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_group_by_controls.tsx#:~:text=IFieldType), [metric.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/alerting/inventory/components/metric.tsx#:~:text=IFieldType), [metric.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/alerting/inventory/components/metric.tsx#:~:text=IFieldType)+ 46 more | 8.1 | -| | [resolved_log_source_configuration.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts#:~:text=IndexPattern), [resolved_log_source_configuration.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts#:~:text=IndexPattern), [resolved_log_source_configuration.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/common/log_sources/resolved_log_source_configuration.ts#:~:text=IndexPattern), [index_patterns.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts#:~:text=IndexPattern), [index_patterns.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/common/dependency_mocks/index_patterns.ts#:~:text=IndexPattern), [index_patterns.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/target/types/common/dependency_mocks/index_patterns.d.ts#:~:text=IndexPattern), [index_patterns.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/target/types/common/dependency_mocks/index_patterns.d.ts#:~:text=IndexPattern), [validation_errors.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts#:~:text=IndexPattern), [validation_errors.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts#:~:text=IndexPattern), [validation_errors.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/logs/settings/validation_errors.ts#:~:text=IndexPattern)+ 2 more | - | | | [log_stream_embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/components/log_stream/log_stream_embeddable.tsx#:~:text=Filter), [log_stream_embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/components/log_stream/log_stream_embeddable.tsx#:~:text=Filter), [use_dataset_filtering.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/logs/log_entry_rate/use_dataset_filtering.ts#:~:text=Filter), [use_dataset_filtering.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/logs/log_entry_rate/use_dataset_filtering.ts#:~:text=Filter), [use_dataset_filtering.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/pages/logs/log_entry_rate/use_dataset_filtering.ts#:~:text=Filter) | 8.1 | | | [kibana_framework_adapter.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/server/lib/adapters/framework/kibana_framework_adapter.ts#:~:text=indexPatternsServiceFactory), [log_entries_search_strategy.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/server/services/log_entries/log_entries_search_strategy.ts#:~:text=indexPatternsServiceFactory), [log_entry_search_strategy.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/server/services/log_entries/log_entry_search_strategy.ts#:~:text=indexPatternsServiceFactory) | - | | | [module_list_card.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/public/components/logging/log_analysis_setup/setup_flyout/module_list_card.tsx#:~:text=getUrl) | - | @@ -563,12 +561,14 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/server/routes/field_stats.d.ts#:~:text=IndexPatternField), [field_stats.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/server/routes/field_stats.d.ts#:~:text=IndexPatternField), [field_stats.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/server/routes/field_stats.d.ts#:~:text=IndexPatternField), [field_stats.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/server/routes/field_stats.d.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField)+ 8 more | - | | | [existing_fields.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.ts#:~:text=IndexPatternsService), [existing_fields.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.ts#:~:text=IndexPatternsService), [existing_fields.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.ts#:~:text=IndexPatternsService), [existing_fields.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.ts#:~:text=IndexPatternsService) | - | | | [embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable.tsx#:~:text=IndexPatternsContract), [embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable.tsx#:~:text=IndexPatternsContract), [utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/utils.ts#:~:text=IndexPatternsContract), [utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/utils.ts#:~:text=IndexPatternsContract), [loader.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/loader.ts#:~:text=IndexPatternsContract), [loader.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/loader.ts#:~:text=IndexPatternsContract), [embeddable_factory.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable_factory.ts#:~:text=IndexPatternsContract), [embeddable_factory.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable_factory.ts#:~:text=IndexPatternsContract), [loader.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/loader.test.ts#:~:text=IndexPatternsContract), [loader.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/loader.test.ts#:~:text=IndexPatternsContract)+ 20 more | - | +| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/plugin.ts#:~:text=ensureDefaultDataView), [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/plugin.ts#:~:text=ensureDefaultDataView) | - | | | [existing_fields.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.ts#:~:text=IndexPattern), [existing_fields.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.ts#:~:text=IndexPattern), [existing_fields.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.test.ts#:~:text=IndexPattern), [existing_fields.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.test.ts#:~:text=IndexPattern), [existing_fields.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.test.ts#:~:text=IndexPattern), [existing_fields.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.test.ts#:~:text=IndexPattern), [existing_fields.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/server/routes/existing_fields.d.ts#:~:text=IndexPattern), [existing_fields.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/server/routes/existing_fields.d.ts#:~:text=IndexPattern), [loader.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/loader.ts#:~:text=IndexPattern), [embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable.tsx#:~:text=IndexPattern)+ 36 more | - | | | [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/types.ts#:~:text=Filter), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/types.ts#:~:text=Filter), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/types.ts#:~:text=Filter), [embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable.tsx#:~:text=Filter), [embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable.tsx#:~:text=Filter), [embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable.tsx#:~:text=Filter), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/state_management/types.ts#:~:text=Filter), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/state_management/types.ts#:~:text=Filter), [field_item.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/field_item.tsx#:~:text=Filter), [field_item.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/field_item.tsx#:~:text=Filter)+ 16 more | 8.1 | | | [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=IndexPatternField), [field_stats.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/server/routes/field_stats.d.ts#:~:text=IndexPatternField), [field_stats.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/server/routes/field_stats.d.ts#:~:text=IndexPatternField), [field_stats.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/server/routes/field_stats.d.ts#:~:text=IndexPatternField), [field_stats.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/server/routes/field_stats.d.ts#:~:text=IndexPatternField) | - | | | [existing_fields.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.ts#:~:text=IndexPattern), [existing_fields.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.ts#:~:text=IndexPattern), [existing_fields.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.test.ts#:~:text=IndexPattern), [existing_fields.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.test.ts#:~:text=IndexPattern), [existing_fields.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.test.ts#:~:text=IndexPattern), [existing_fields.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.test.ts#:~:text=IndexPattern), [existing_fields.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/server/routes/existing_fields.d.ts#:~:text=IndexPattern), [existing_fields.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/server/routes/existing_fields.d.ts#:~:text=IndexPattern), [loader.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/loader.ts#:~:text=IndexPattern), [embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable.tsx#:~:text=IndexPattern)+ 13 more | - | | | [existing_fields.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.ts#:~:text=IndexPatternsService), [existing_fields.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.ts#:~:text=IndexPatternsService), [existing_fields.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.ts#:~:text=IndexPatternsService), [existing_fields.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.ts#:~:text=IndexPatternsService) | - | | | [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/types.ts#:~:text=Filter), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/types.ts#:~:text=Filter), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/types.ts#:~:text=Filter), [embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable.tsx#:~:text=Filter), [embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable.tsx#:~:text=Filter), [embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/embeddable/embeddable.tsx#:~:text=Filter), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/state_management/types.ts#:~:text=Filter), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/state_management/types.ts#:~:text=Filter), [field_item.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/field_item.tsx#:~:text=Filter), [field_item.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/field_item.tsx#:~:text=Filter)+ 16 more | 8.1 | +| | [plugin.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/plugin.ts#:~:text=ensureDefaultDataView) | - | | | [existing_fields.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/existing_fields.ts#:~:text=indexPatternsServiceFactory), [field_stats.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#:~:text=indexPatternsServiceFactory) | - | | | [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/app_plugin/types.ts#:~:text=onAppLeave), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/app_plugin/types.ts#:~:text=onAppLeave), [mounter.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/app_plugin/mounter.tsx#:~:text=onAppLeave) | - | | | [saved_object_migrations.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/migrations/saved_object_migrations.ts#:~:text=warning), [saved_object_migrations.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/migrations/saved_object_migrations.ts#:~:text=warning) | - | @@ -633,23 +633,10 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [dependency_cache.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/dependency_cache.ts#:~:text=IndexPatternsContract), [dependency_cache.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/dependency_cache.ts#:~:text=IndexPatternsContract), [index_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=IndexPatternsContract), [index_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=IndexPatternsContract), [index_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=IndexPatternsContract), [resolvers.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/routing/resolvers.ts#:~:text=IndexPatternsContract), [resolvers.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/routing/resolvers.ts#:~:text=IndexPatternsContract), [preconfigured_job_redirect.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/jobs/new_job/pages/index_or_search/preconfigured_job_redirect.ts#:~:text=IndexPatternsContract), [preconfigured_job_redirect.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/jobs/new_job/pages/index_or_search/preconfigured_job_redirect.ts#:~:text=IndexPatternsContract), [load_new_job_capabilities.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/services/new_job_capabilities/load_new_job_capabilities.ts#:~:text=IndexPatternsContract)+ 32 more | - | -| | [chart_loader.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/jobs/new_job/common/chart_loader/chart_loader.ts#:~:text=IndexPattern), [chart_loader.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/jobs/new_job/common/chart_loader/chart_loader.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/embeddables/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/embeddables/types.ts#:~:text=IndexPattern), [anomaly_charts_embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx#:~:text=IndexPattern), [anomaly_charts_embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx#:~:text=IndexPattern), [index_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=IndexPattern), [index_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=IndexPattern), [index_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=IndexPattern), [field_format_service.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/services/field_format_service.ts#:~:text=IndexPattern)+ 130 more | - | -| | [index_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=IIndexPattern), [index_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=IIndexPattern), [new_job_capabilities_service_analytics.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts#:~:text=IIndexPattern), [new_job_capabilities_service_analytics.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts#:~:text=IIndexPattern), [data_recognizer.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/components/data_recognizer/data_recognizer.d.ts#:~:text=IIndexPattern), [data_recognizer.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/components/data_recognizer/data_recognizer.d.ts#:~:text=IIndexPattern), [new_job_capabilities_service.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts#:~:text=IIndexPattern), [new_job_capabilities_service.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts#:~:text=IIndexPattern), [load_new_job_capabilities.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/services/new_job_capabilities/load_new_job_capabilities.ts#:~:text=IIndexPattern), [load_new_job_capabilities.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/services/new_job_capabilities/load_new_job_capabilities.ts#:~:text=IIndexPattern)+ 24 more | - | -| | [common.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/components/data_grid/common.ts#:~:text=IFieldType), [common.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/components/data_grid/common.ts#:~:text=IFieldType), [field_types_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.ts#:~:text=IFieldType), [field_types_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.ts#:~:text=IFieldType), [field_types_utils.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.test.ts#:~:text=IFieldType), [field_types_utils.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.test.ts#:~:text=IFieldType), [field_types_utils.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.test.ts#:~:text=IFieldType), [field_types_utils.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.test.ts#:~:text=IFieldType), [field_types_utils.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.test.ts#:~:text=IFieldType) | 8.1 | -| | [index_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=IndexPatternAttributes), [index_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=IndexPatternAttributes), [index_patterns.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts#:~:text=IndexPatternAttributes), [index_patterns.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts#:~:text=IndexPatternAttributes), [rollup.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts#:~:text=IndexPatternAttributes), [rollup.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts#:~:text=IndexPatternAttributes), [rollup.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts#:~:text=IndexPatternAttributes), [data_recognizer.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts#:~:text=IndexPatternAttributes), [data_recognizer.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts#:~:text=IndexPatternAttributes), [kibana.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/common/types/kibana.ts#:~:text=IndexPatternAttributes)+ 3 more | - | | | [index_data_visualizer.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/datavisualizer/index_based/index_data_visualizer.tsx#:~:text=indexPatterns), [file_datavisualizer.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/datavisualizer/file_based/file_datavisualizer.tsx#:~:text=indexPatterns), [app.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/app.tsx#:~:text=indexPatterns), [app.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/app.tsx#:~:text=indexPatterns), [import_jobs_flyout.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/components/import_export_jobs/import_jobs_flyout/import_jobs_flyout.tsx#:~:text=indexPatterns), [anomaly_charts_embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx#:~:text=indexPatterns) | - | | | [dependency_cache.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/dependency_cache.ts#:~:text=fieldFormats), [app.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/app.tsx#:~:text=fieldFormats), [dependency_cache.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/target/types/public/application/util/dependency_cache.d.ts#:~:text=fieldFormats) | - | | | [apply_influencer_filters_action.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/ui_actions/apply_influencer_filters_action.tsx#:~:text=Filter), [apply_influencer_filters_action.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/ui_actions/apply_influencer_filters_action.tsx#:~:text=Filter), [apply_entity_filters_action.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/ui_actions/apply_entity_filters_action.tsx#:~:text=Filter), [apply_entity_filters_action.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/ui_actions/apply_entity_filters_action.tsx#:~:text=Filter) | 8.1 | -| | [common.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/components/data_grid/common.ts#:~:text=IFieldType), [common.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/components/data_grid/common.ts#:~:text=IFieldType), [field_types_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.ts#:~:text=IFieldType), [field_types_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.ts#:~:text=IFieldType), [field_types_utils.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.test.ts#:~:text=IFieldType), [field_types_utils.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.test.ts#:~:text=IFieldType), [field_types_utils.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.test.ts#:~:text=IFieldType), [field_types_utils.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.test.ts#:~:text=IFieldType), [field_types_utils.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.test.ts#:~:text=IFieldType), [common.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/components/data_grid/common.ts#:~:text=IFieldType)+ 8 more | 8.1 | -| | [index_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=IIndexPattern), [index_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=IIndexPattern), [new_job_capabilities_service_analytics.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts#:~:text=IIndexPattern), [new_job_capabilities_service_analytics.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts#:~:text=IIndexPattern), [data_recognizer.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/components/data_recognizer/data_recognizer.d.ts#:~:text=IIndexPattern), [data_recognizer.d.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/components/data_recognizer/data_recognizer.d.ts#:~:text=IIndexPattern), [new_job_capabilities_service.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts#:~:text=IIndexPattern), [new_job_capabilities_service.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts#:~:text=IIndexPattern), [load_new_job_capabilities.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/services/new_job_capabilities/load_new_job_capabilities.ts#:~:text=IIndexPattern), [load_new_job_capabilities.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/services/new_job_capabilities/load_new_job_capabilities.ts#:~:text=IIndexPattern)+ 58 more | - | -| | [index_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=IndexPatternAttributes), [index_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=IndexPatternAttributes), [index_patterns.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts#:~:text=IndexPatternAttributes), [index_patterns.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts#:~:text=IndexPatternAttributes), [rollup.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts#:~:text=IndexPatternAttributes), [rollup.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts#:~:text=IndexPatternAttributes), [rollup.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts#:~:text=IndexPatternAttributes), [data_recognizer.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts#:~:text=IndexPatternAttributes), [data_recognizer.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts#:~:text=IndexPatternAttributes), [kibana.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/common/types/kibana.ts#:~:text=IndexPatternAttributes)+ 16 more | - | -| | [dependency_cache.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/dependency_cache.ts#:~:text=IndexPatternsContract), [dependency_cache.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/dependency_cache.ts#:~:text=IndexPatternsContract), [index_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=IndexPatternsContract), [index_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=IndexPatternsContract), [index_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=IndexPatternsContract), [resolvers.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/routing/resolvers.ts#:~:text=IndexPatternsContract), [resolvers.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/routing/resolvers.ts#:~:text=IndexPatternsContract), [preconfigured_job_redirect.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/jobs/new_job/pages/index_or_search/preconfigured_job_redirect.ts#:~:text=IndexPatternsContract), [preconfigured_job_redirect.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/jobs/new_job/pages/index_or_search/preconfigured_job_redirect.ts#:~:text=IndexPatternsContract), [load_new_job_capabilities.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/services/new_job_capabilities/load_new_job_capabilities.ts#:~:text=IndexPatternsContract)+ 32 more | - | -| | [chart_loader.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/jobs/new_job/common/chart_loader/chart_loader.ts#:~:text=IndexPattern), [chart_loader.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/jobs/new_job/common/chart_loader/chart_loader.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/embeddables/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/embeddables/types.ts#:~:text=IndexPattern), [anomaly_charts_embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx#:~:text=IndexPattern), [anomaly_charts_embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx#:~:text=IndexPattern), [index_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=IndexPattern), [index_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=IndexPattern), [index_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=IndexPattern), [field_format_service.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/services/field_format_service.ts#:~:text=IndexPattern)+ 130 more | - | | | [apply_influencer_filters_action.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/ui_actions/apply_influencer_filters_action.tsx#:~:text=Filter), [apply_influencer_filters_action.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/ui_actions/apply_influencer_filters_action.tsx#:~:text=Filter), [apply_entity_filters_action.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/ui_actions/apply_entity_filters_action.tsx#:~:text=Filter), [apply_entity_filters_action.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/ui_actions/apply_entity_filters_action.tsx#:~:text=Filter) | 8.1 | -| | [common.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/components/data_grid/common.ts#:~:text=IFieldType), [common.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/components/data_grid/common.ts#:~:text=IFieldType), [field_types_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.ts#:~:text=IFieldType), [field_types_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.ts#:~:text=IFieldType), [field_types_utils.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.test.ts#:~:text=IFieldType), [field_types_utils.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.test.ts#:~:text=IFieldType), [field_types_utils.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.test.ts#:~:text=IFieldType), [field_types_utils.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.test.ts#:~:text=IFieldType), [field_types_utils.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/field_types_utils.test.ts#:~:text=IFieldType) | 8.1 | -| | [index_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=IndexPatternAttributes), [index_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=IndexPatternAttributes), [index_patterns.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts#:~:text=IndexPatternAttributes), [index_patterns.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts#:~:text=IndexPatternAttributes), [rollup.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts#:~:text=IndexPatternAttributes), [rollup.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts#:~:text=IndexPatternAttributes), [rollup.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts#:~:text=IndexPatternAttributes), [data_recognizer.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts#:~:text=IndexPatternAttributes), [data_recognizer.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts#:~:text=IndexPatternAttributes), [kibana.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/common/types/kibana.ts#:~:text=IndexPatternAttributes)+ 3 more | - | -| | [chart_loader.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/jobs/new_job/common/chart_loader/chart_loader.ts#:~:text=IndexPattern), [chart_loader.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/jobs/new_job/common/chart_loader/chart_loader.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/embeddables/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/embeddables/types.ts#:~:text=IndexPattern), [anomaly_charts_embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx#:~:text=IndexPattern), [anomaly_charts_embeddable.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx#:~:text=IndexPattern), [index_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=IndexPattern), [index_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=IndexPattern), [index_utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/util/index_utils.ts#:~:text=IndexPattern), [field_format_service.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/services/field_format_service.ts#:~:text=IndexPattern)+ 60 more | - | | | [apply_influencer_filters_action.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/ui_actions/apply_influencer_filters_action.tsx#:~:text=Filter), [apply_influencer_filters_action.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/ui_actions/apply_influencer_filters_action.tsx#:~:text=Filter), [apply_entity_filters_action.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/ui_actions/apply_entity_filters_action.tsx#:~:text=Filter), [apply_entity_filters_action.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/ui_actions/apply_entity_filters_action.tsx#:~:text=Filter) | 8.1 | | | [use_create_url.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/contexts/kibana/use_create_url.ts#:~:text=getUrl), [use_create_url.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/contexts/kibana/use_create_url.ts#:~:text=getUrl), [main_tabs.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/components/navigation_menu/main_tabs.tsx#:~:text=getUrl), [anomaly_detection_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/overview/components/anomaly_detection_panel/anomaly_detection_panel.tsx#:~:text=getUrl), [anomaly_detection_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/overview/components/anomaly_detection_panel/anomaly_detection_panel.tsx#:~:text=getUrl), [use_view_action.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_view/use_view_action.tsx#:~:text=getUrl), [use_map_action.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_map/use_map_action.tsx#:~:text=getUrl), [analytics_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/overview/components/analytics_panel/analytics_panel.tsx#:~:text=getUrl), [page.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/jobs/new_job/pages/job_type/page.tsx#:~:text=getUrl), [page.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/jobs/new_job/recognize/page.tsx#:~:text=getUrl)+ 14 more | - | | | [use_create_url.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/contexts/kibana/use_create_url.ts#:~:text=getUrl), [use_create_url.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/contexts/kibana/use_create_url.ts#:~:text=getUrl), [main_tabs.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/components/navigation_menu/main_tabs.tsx#:~:text=getUrl), [anomaly_detection_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/overview/components/anomaly_detection_panel/anomaly_detection_panel.tsx#:~:text=getUrl), [anomaly_detection_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/overview/components/anomaly_detection_panel/anomaly_detection_panel.tsx#:~:text=getUrl), [use_view_action.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_view/use_view_action.tsx#:~:text=getUrl), [use_map_action.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_map/use_map_action.tsx#:~:text=getUrl), [analytics_panel.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/overview/components/analytics_panel/analytics_panel.tsx#:~:text=getUrl), [page.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/jobs/new_job/pages/job_type/page.tsx#:~:text=getUrl), [page.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/ml/public/application/jobs/new_job/recognize/page.tsx#:~:text=getUrl)+ 14 more | - | @@ -686,7 +673,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#:~:text=IndexPattern), [utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#:~:text=IndexPattern), [utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#:~:text=IndexPattern), [utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#:~:text=IndexPattern), [utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#:~:text=IndexPattern), [lens_attributes.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.ts#:~:text=IndexPattern), [lens_attributes.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.ts#:~:text=IndexPattern), [lens_attributes.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.ts#:~:text=IndexPattern), [default_configs.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/default_configs.ts#:~:text=IndexPattern), [default_configs.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/default_configs.ts#:~:text=IndexPattern)+ 38 more | - | | | [observability_index_patterns.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts#:~:text=IndexPatternSpec), [observability_index_patterns.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts#:~:text=IndexPatternSpec) | - | | | [observability_index_patterns.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts#:~:text=indexPatterns), [observability_index_patterns.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts#:~:text=indexPatterns), [observability_index_patterns.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts#:~:text=indexPatterns), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/pages/alerts/index.tsx#:~:text=indexPatterns), [observability_index_patterns.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.test.ts#:~:text=indexPatterns), [observability_index_patterns.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.test.ts#:~:text=indexPatterns), [observability_index_patterns.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.test.ts#:~:text=indexPatterns), [observability_index_patterns.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.test.ts#:~:text=indexPatterns), [observability_index_patterns.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.test.ts#:~:text=indexPatterns), [observability_index_patterns.test.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.test.ts#:~:text=indexPatterns)+ 5 more | - | -| | [utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#:~:text=esFilters), [utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#:~:text=esFilters), [utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#:~:text=esFilters), [utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#:~:text=esFilters), [filter_value_label.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx#:~:text=esFilters), [filter_value_label.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx#:~:text=esFilters), [filter_value_label.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx#:~:text=esFilters), [filter_value_label.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx#:~:text=esFilters) | 8.1 | +| | [filter_value_label.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx#:~:text=esFilters), [filter_value_label.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx#:~:text=esFilters), [filter_value_label.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx#:~:text=esFilters), [filter_value_label.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx#:~:text=esFilters), [utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#:~:text=esFilters), [utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#:~:text=esFilters), [utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#:~:text=esFilters), [utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#:~:text=esFilters) | 8.1 | | | [utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#:~:text=ExistsFilter), [utils.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#:~:text=ExistsFilter) | 8.1 | | | [filter_value_label.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx#:~:text=Filter), [filter_value_label.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx#:~:text=Filter) | 8.1 | | | [observability_index_patterns.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts#:~:text=IndexPatternSpec), [observability_index_patterns.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts#:~:text=IndexPatternSpec), [observability_index_patterns.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts#:~:text=IndexPatternSpec), [observability_index_patterns.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/utils/observability_index_patterns.ts#:~:text=IndexPatternSpec) | - | @@ -868,12 +855,12 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [use_risky_hosts_dashboard_button_href.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/overview/containers/overview_risky_host_links/use_risky_hosts_dashboard_button_href.ts#:~:text=dashboardUrlGenerator), [use_risky_hosts_dashboard_links.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/overview/containers/overview_risky_host_links/use_risky_hosts_dashboard_links.tsx#:~:text=dashboardUrlGenerator), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/overview/containers/overview_cti_links/index.tsx#:~:text=dashboardUrlGenerator) | - | | | [helpers.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/threat_match/helpers.tsx#:~:text=IndexPattern), [helpers.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/threat_match/helpers.tsx#:~:text=IndexPattern), [helpers.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/threat_match/helpers.tsx#:~:text=IndexPattern), [helpers.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/threat_match/helpers.tsx#:~:text=IndexPattern), [helpers.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/threat_match/helpers.tsx#:~:text=IndexPattern), [entry_item.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/threat_match/entry_item.tsx#:~:text=IndexPattern), [entry_item.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/threat_match/entry_item.tsx#:~:text=IndexPattern), [entry_item.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/threat_match/entry_item.tsx#:~:text=IndexPattern), [list_item.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/threat_match/list_item.tsx#:~:text=IndexPattern), [list_item.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/threat_match/list_item.tsx#:~:text=IndexPattern)+ 30 more | - | | | [field_name_cell.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/event_details/table/field_name_cell.tsx#:~:text=IndexPatternField), [field_name_cell.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/event_details/table/field_name_cell.tsx#:~:text=IndexPatternField), [field_name_cell.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/event_details/table/field_name_cell.tsx#:~:text=IndexPatternField), [field_name_cell.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/event_details/table/field_name_cell.tsx#:~:text=IndexPatternField) | - | -| | [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#:~:text=IIndexPattern), [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#:~:text=IIndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts#:~:text=IIndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts#:~:text=IIndexPattern), [action.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts#:~:text=IIndexPattern), [action.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=IIndexPattern), [helpers.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/components/timeline/helpers.tsx#:~:text=IIndexPattern)+ 76 more | - | +| | [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts#:~:text=IIndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts#:~:text=IIndexPattern), [action.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts#:~:text=IIndexPattern), [action.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=IIndexPattern), [helpers.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/components/timeline/helpers.tsx#:~:text=IIndexPattern), [helpers.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/components/timeline/helpers.tsx#:~:text=IIndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/url_state/types.ts#:~:text=IIndexPattern)+ 74 more | - | | | [middleware.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#:~:text=indexPatterns), [plugin.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/plugin.tsx#:~:text=indexPatterns), [dependencies_start_mock.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/mock/endpoint/dependencies_start_mock.ts#:~:text=indexPatterns) | - | -| | [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.tsx#:~:text=esFilters), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.tsx#:~:text=esFilters), [epic.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.ts#:~:text=esFilters), [epic.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.ts#:~:text=esFilters), [epic.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.ts#:~:text=esFilters), [epic.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.ts#:~:text=esFilters), [epic.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.ts#:~:text=esFilters), [epic.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.ts#:~:text=esFilters), [epic.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.ts#:~:text=esFilters), [epic.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.ts#:~:text=esFilters)+ 15 more | 8.1 | +| | [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.tsx#:~:text=esFilters), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.tsx#:~:text=esFilters), [epic.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.ts#:~:text=esFilters), [epic.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.ts#:~:text=esFilters), [epic.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.ts#:~:text=esFilters), [epic.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.ts#:~:text=esFilters), [epic.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.ts#:~:text=esFilters), [epic.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.ts#:~:text=esFilters), [epic.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.ts#:~:text=esFilters), [epic.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.ts#:~:text=esFilters)+ 14 more | 8.1 | | | [expandable_network.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/components/side_panel/network_details/expandable_network.tsx#:~:text=esQuery), [expandable_network.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/components/side_panel/network_details/expandable_network.tsx#:~:text=esQuery), [events_viewer.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/events_viewer/events_viewer.tsx#:~:text=esQuery), [events_viewer.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/events_viewer/events_viewer.tsx#:~:text=esQuery), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/overview/components/events_by_dataset/index.tsx#:~:text=esQuery), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/overview/components/events_by_dataset/index.tsx#:~:text=esQuery), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/index.tsx#:~:text=esQuery), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/index.tsx#:~:text=esQuery), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/index.tsx#:~:text=esQuery), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/top_n/index.tsx#:~:text=esQuery)+ 30 more | 8.1 | | | [store.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/types/timeline/store.ts#:~:text=Filter), [store.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/types/timeline/store.ts#:~:text=Filter), [model.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/store/inputs/model.ts#:~:text=Filter), [model.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/store/inputs/model.ts#:~:text=Filter), [actions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/store/inputs/actions.ts#:~:text=Filter), [actions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/store/inputs/actions.ts#:~:text=Filter), [selectors.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/store/inputs/selectors.ts#:~:text=Filter), [selectors.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/store/inputs/selectors.ts#:~:text=Filter), [actions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/store/timeline/actions.ts#:~:text=Filter), [actions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/store/timeline/actions.ts#:~:text=Filter)+ 163 more | 8.1 | -| | [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#:~:text=IIndexPattern), [index.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#:~:text=IIndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts#:~:text=IIndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts#:~:text=IIndexPattern), [action.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts#:~:text=IIndexPattern), [action.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=IIndexPattern), [helpers.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/components/timeline/helpers.tsx#:~:text=IIndexPattern)+ 162 more | - | +| | [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts#:~:text=IIndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts#:~:text=IIndexPattern), [action.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts#:~:text=IIndexPattern), [action.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=IIndexPattern), [index.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/containers/source/index.tsx#:~:text=IIndexPattern), [helpers.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/components/timeline/helpers.tsx#:~:text=IIndexPattern), [helpers.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/components/timeline/helpers.tsx#:~:text=IIndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/url_state/types.ts#:~:text=IIndexPattern)+ 158 more | - | | | [field_name_cell.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/event_details/table/field_name_cell.tsx#:~:text=IndexPatternField), [field_name_cell.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/event_details/table/field_name_cell.tsx#:~:text=IndexPatternField), [field_name_cell.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/event_details/table/field_name_cell.tsx#:~:text=IndexPatternField), [field_name_cell.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/event_details/table/field_name_cell.tsx#:~:text=IndexPatternField) | - | | | [helpers.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/threat_match/helpers.tsx#:~:text=IndexPattern), [helpers.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/threat_match/helpers.tsx#:~:text=IndexPattern), [helpers.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/threat_match/helpers.tsx#:~:text=IndexPattern), [helpers.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/threat_match/helpers.tsx#:~:text=IndexPattern), [helpers.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/threat_match/helpers.tsx#:~:text=IndexPattern), [entry_item.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/threat_match/entry_item.tsx#:~:text=IndexPattern), [entry_item.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/threat_match/entry_item.tsx#:~:text=IndexPattern), [entry_item.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/threat_match/entry_item.tsx#:~:text=IndexPattern), [list_item.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/threat_match/list_item.tsx#:~:text=IndexPattern), [list_item.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/threat_match/list_item.tsx#:~:text=IndexPattern)+ 30 more | - | | | [store.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/types/timeline/store.ts#:~:text=Filter), [store.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/types/timeline/store.ts#:~:text=Filter), [model.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/store/inputs/model.ts#:~:text=Filter), [model.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/store/inputs/model.ts#:~:text=Filter), [actions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/store/inputs/actions.ts#:~:text=Filter), [actions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/store/inputs/actions.ts#:~:text=Filter), [selectors.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/store/inputs/selectors.ts#:~:text=Filter), [selectors.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/store/inputs/selectors.ts#:~:text=Filter), [actions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/store/timeline/actions.ts#:~:text=Filter), [actions.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/timelines/store/timeline/actions.ts#:~:text=Filter)+ 163 more | 8.1 | @@ -1020,7 +1007,6 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [reducers.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/sidebar/state/reducers.ts#:~:text=toJSON), [reducers.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/sidebar/state/reducers.ts#:~:text=toJSON), [reducers.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/sidebar/state/reducers.ts#:~:text=toJSON), [sidebar.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/sidebar/sidebar.tsx#:~:text=toJSON) | 8.1 | | | [agg_type_field_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_field_filters.ts#:~:text=IndexPatternField), [agg_type_field_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_field_filters.ts#:~:text=IndexPatternField), [agg_type_field_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_field_filters.ts#:~:text=IndexPatternField), [agg_param_props.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_param_props.ts#:~:text=IndexPatternField), [agg_param_props.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_param_props.ts#:~:text=IndexPatternField), [field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=IndexPatternField), [field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=IndexPatternField), [field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=IndexPatternField), [field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/field.tsx#:~:text=IndexPatternField), [top_field.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/controls/top_field.tsx#:~:text=IndexPatternField)+ 14 more | - | | | [agg_type_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_filters.ts#:~:text=IndexPattern), [agg_type_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_filters.ts#:~:text=IndexPattern), [agg_type_filters.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/agg_filters/agg_type_filters.ts#:~:text=IndexPattern), [editor_config.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/utils/editor_config.ts#:~:text=IndexPattern), [editor_config.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/utils/editor_config.ts#:~:text=IndexPattern), [agg_params_helper.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_params_helper.ts#:~:text=IndexPattern), [agg_params_helper.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_params_helper.ts#:~:text=IndexPattern), [agg_select.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_select.tsx#:~:text=IndexPattern), [agg_select.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_select.tsx#:~:text=IndexPattern), [agg_params.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/agg_params.tsx#:~:text=IndexPattern)+ 7 more | - | -| | [sidebar_title.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/sidebar/sidebar_title.tsx#:~:text=SavedObject), [sidebar_title.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/sidebar/sidebar_title.tsx#:~:text=SavedObject), [sidebar_title.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/sidebar/sidebar_title.tsx#:~:text=SavedObject), [sidebar.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/sidebar/sidebar.tsx#:~:text=SavedObject), [sidebar.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/public/components/sidebar/sidebar.tsx#:~:text=SavedObject), [sidebar.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/target/types/public/components/sidebar/sidebar.d.ts#:~:text=SavedObject), [sidebar.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/target/types/public/components/sidebar/sidebar.d.ts#:~:text=SavedObject), [sidebar_title.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/target/types/public/components/sidebar/sidebar_title.d.ts#:~:text=SavedObject), [sidebar_title.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/target/types/public/components/sidebar/sidebar_title.d.ts#:~:text=SavedObject), [sidebar_title.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_default_editor/target/types/public/components/sidebar/sidebar_title.d.ts#:~:text=SavedObject) | - | @@ -1134,15 +1120,16 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/plugin.ts#:~:text=indexPatterns) | - | | | [visualize_embeddable.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts#:~:text=esFilters), [visualize_embeddable.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts#:~:text=esFilters) | 8.1 | | | [visualize_embeddable.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts#:~:text=Filter), [visualize_embeddable.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts#:~:text=Filter), [visualize_embeddable.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts#:~:text=Filter) | 8.1 | -| | [controls_references.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/saved_visualizations/saved_visualization_references/controls_references.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [controls_references.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/saved_visualizations/saved_visualization_references/controls_references.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [timeseries_references.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/saved_visualizations/saved_visualization_references/timeseries_references.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [timeseries_references.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/saved_visualizations/saved_visualization_references/timeseries_references.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [visualization_saved_object_migrations.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [visualization_saved_object_migrations.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [visualization_saved_object_migrations.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [visualization_saved_object_migrations.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [visualization_saved_object_migrations.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [controls_references.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/saved_visualizations/saved_visualization_references/controls_references.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE)+ 8 more | - | +| | [controls_references.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/utils/saved_visualization_references/controls_references.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [controls_references.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/utils/saved_visualization_references/controls_references.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [timeseries_references.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/utils/saved_visualization_references/timeseries_references.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [timeseries_references.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/utils/saved_visualization_references/timeseries_references.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [visualization_saved_object_migrations.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [visualization_saved_object_migrations.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [visualization_saved_object_migrations.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [visualization_saved_object_migrations.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [visualization_saved_object_migrations.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/server/migrations/visualization_saved_object_migrations.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE), [controls_references.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/utils/saved_visualization_references/controls_references.ts#:~:text=INDEX_PATTERN_SAVED_OBJECT_TYPE)+ 8 more | - | | | [_saved_vis.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/saved_visualizations/_saved_vis.ts#:~:text=IndexPatternsContract), [_saved_vis.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/saved_visualizations/_saved_vis.ts#:~:text=IndexPatternsContract), [_saved_vis.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/saved_visualizations/_saved_vis.ts#:~:text=IndexPatternsContract), [_saved_vis.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/saved_visualizations/_saved_vis.ts#:~:text=IndexPatternsContract) | - | | | [vis.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/vis.ts#:~:text=IndexPattern), [vis.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/vis.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/vis_types/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/vis_types/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/vis_types/types.ts#:~:text=IndexPattern), [create_vis_embeddable_from_object.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/create_vis_embeddable_from_object.ts#:~:text=IndexPattern), [create_vis_embeddable_from_object.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/create_vis_embeddable_from_object.ts#:~:text=IndexPattern), [visualize_embeddable.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts#:~:text=IndexPattern), [visualize_embeddable.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts#:~:text=IndexPattern), [visualize_embeddable.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts#:~:text=IndexPattern)+ 10 more | - | | | [visualize_embeddable.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts#:~:text=Filter), [visualize_embeddable.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts#:~:text=Filter), [visualize_embeddable.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts#:~:text=Filter) | 8.1 | | | [vis.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/vis.ts#:~:text=toJSON) | 8.1 | | | [vis.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/vis.ts#:~:text=IndexPattern), [vis.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/vis.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/vis_types/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/vis_types/types.ts#:~:text=IndexPattern), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/vis_types/types.ts#:~:text=IndexPattern), [create_vis_embeddable_from_object.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/create_vis_embeddable_from_object.ts#:~:text=IndexPattern), [create_vis_embeddable_from_object.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/create_vis_embeddable_from_object.ts#:~:text=IndexPattern), [visualize_embeddable.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts#:~:text=IndexPattern), [visualize_embeddable.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts#:~:text=IndexPattern), [visualize_embeddable.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts#:~:text=IndexPattern) | - | | | [visualize_embeddable.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts#:~:text=Filter), [visualize_embeddable.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts#:~:text=Filter), [visualize_embeddable.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts#:~:text=Filter) | 8.1 | -| | [find_list_items.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/saved_visualizations/find_list_items.ts#:~:text=SavedObjectLoader), [find_list_items.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/saved_visualizations/find_list_items.ts#:~:text=SavedObjectLoader), [saved_visualizations.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/saved_visualizations/saved_visualizations.ts#:~:text=SavedObjectLoader), [saved_visualizations.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/saved_visualizations/saved_visualizations.ts#:~:text=SavedObjectLoader), [saved_visualizations.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/saved_visualizations/saved_visualizations.ts#:~:text=SavedObjectLoader), [services.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/services.ts#:~:text=SavedObjectLoader), [services.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/services.ts#:~:text=SavedObjectLoader) | - | -| | [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/types.ts#:~:text=SavedObject), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/types.ts#:~:text=SavedObject), [_saved_vis.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/saved_visualizations/_saved_vis.ts#:~:text=SavedObject), [_saved_vis.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/saved_visualizations/_saved_vis.ts#:~:text=SavedObject), [_saved_vis.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/saved_visualizations/_saved_vis.ts#:~:text=SavedObject), [_saved_vis.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/saved_visualizations/_saved_vis.ts#:~:text=SavedObject) | - | +| | [_saved_vis.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/saved_visualizations/_saved_vis.ts#:~:text=__LEGACY), [_saved_vis.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/saved_visualizations/_saved_vis.ts#:~:text=__LEGACY) | - | +| | [find_list_items.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/saved_visualizations/find_list_items.ts#:~:text=SavedObjectLoader), [find_list_items.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/saved_visualizations/find_list_items.ts#:~:text=SavedObjectLoader), [saved_visualizations.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/saved_visualizations/saved_visualizations.ts#:~:text=SavedObjectLoader), [saved_visualizations.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/saved_visualizations/saved_visualizations.ts#:~:text=SavedObjectLoader), [saved_visualizations.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/saved_visualizations/saved_visualizations.ts#:~:text=SavedObjectLoader) | - | +| | [_saved_vis.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/saved_visualizations/_saved_vis.ts#:~:text=SavedObject), [_saved_vis.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/saved_visualizations/_saved_vis.ts#:~:text=SavedObject), [_saved_vis.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/saved_visualizations/_saved_vis.ts#:~:text=SavedObject), [_saved_vis.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/saved_visualizations/_saved_vis.ts#:~:text=SavedObject) | - | | | [_saved_vis.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualizations/public/saved_visualizations/_saved_vis.ts#:~:text=SavedObjectClass) | - | @@ -1155,12 +1142,13 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [visualize_top_nav.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/components/visualize_top_nav.tsx#:~:text=indexPatterns), [visualize_top_nav.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/components/visualize_top_nav.tsx#:~:text=indexPatterns), [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/plugin.ts#:~:text=indexPatterns), [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/plugin.ts#:~:text=indexPatterns) | - | | | [use_visualize_app_state.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/utils/use/use_visualize_app_state.tsx#:~:text=esFilters), [use_visualize_app_state.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/utils/use/use_visualize_app_state.tsx#:~:text=esFilters), [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/plugin.ts#:~:text=esFilters), [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/plugin.ts#:~:text=esFilters), [get_visualize_list_item_link.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/utils/get_visualize_list_item_link.test.ts#:~:text=esFilters), [get_visualize_list_item_link.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/utils/get_visualize_list_item_link.test.ts#:~:text=esFilters) | 8.1 | | | [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/types.ts#:~:text=Filter), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/types.ts#:~:text=Filter), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/types.ts#:~:text=Filter), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/types.ts#:~:text=Filter), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/utils/utils.ts#:~:text=Filter), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/utils/utils.ts#:~:text=Filter), [use_linked_search_updates.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/utils/use/use_linked_search_updates.ts#:~:text=Filter), [use_linked_search_updates.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/utils/use/use_linked_search_updates.ts#:~:text=Filter), [types.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/target/types/public/application/types.d.ts#:~:text=Filter), [types.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/target/types/public/application/types.d.ts#:~:text=Filter)+ 6 more | 8.1 | +| | [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/plugin.ts#:~:text=ensureDefaultDataView), [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/plugin.ts#:~:text=ensureDefaultDataView) | - | | | [visualize_top_nav.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/components/visualize_top_nav.tsx#:~:text=IndexPattern), [visualize_top_nav.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/components/visualize_top_nav.tsx#:~:text=IndexPattern), [visualize_top_nav.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/components/visualize_top_nav.tsx#:~:text=IndexPattern), [visualize_top_nav.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/components/visualize_top_nav.tsx#:~:text=IndexPattern), [visualize_top_nav.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/components/visualize_top_nav.tsx#:~:text=IndexPattern), [visualize_top_nav.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/components/visualize_top_nav.tsx#:~:text=IndexPattern) | - | | | [locator.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/common/locator.ts#:~:text=isFilterPinned), [locator.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/common/locator.ts#:~:text=isFilterPinned), [locator.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/common/locator.ts#:~:text=isFilterPinned) | 8.1 | | | [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/types.ts#:~:text=Filter), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/types.ts#:~:text=Filter), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/types.ts#:~:text=Filter), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/types.ts#:~:text=Filter), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/utils/utils.ts#:~:text=Filter), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/utils/utils.ts#:~:text=Filter), [use_linked_search_updates.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/utils/use/use_linked_search_updates.ts#:~:text=Filter), [use_linked_search_updates.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/utils/use/use_linked_search_updates.ts#:~:text=Filter), [types.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/target/types/public/application/types.d.ts#:~:text=Filter), [types.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/target/types/public/application/types.d.ts#:~:text=Filter)+ 6 more | 8.1 | | | [visualize_top_nav.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/components/visualize_top_nav.tsx#:~:text=IndexPattern), [visualize_top_nav.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/components/visualize_top_nav.tsx#:~:text=IndexPattern), [visualize_top_nav.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/components/visualize_top_nav.tsx#:~:text=IndexPattern) | - | | | [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/types.ts#:~:text=Filter), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/types.ts#:~:text=Filter), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/types.ts#:~:text=Filter), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/types.ts#:~:text=Filter), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/utils/utils.ts#:~:text=Filter), [utils.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/utils/utils.ts#:~:text=Filter), [use_linked_search_updates.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/utils/use/use_linked_search_updates.ts#:~:text=Filter), [use_linked_search_updates.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/utils/use/use_linked_search_updates.ts#:~:text=Filter), [types.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/target/types/public/application/types.d.ts#:~:text=Filter), [types.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/target/types/public/application/types.d.ts#:~:text=Filter)+ 6 more | 8.1 | -| | [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/types.ts#:~:text=SavedObject), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/types.ts#:~:text=SavedObject), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/types.ts#:~:text=SavedObject), [types.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/types.ts#:~:text=SavedObject), [get_visualization_instance.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/utils/get_visualization_instance.ts#:~:text=SavedObject), [get_visualization_instance.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/utils/get_visualization_instance.ts#:~:text=SavedObject), [types.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/target/types/public/application/types.d.ts#:~:text=SavedObject), [types.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/target/types/public/application/types.d.ts#:~:text=SavedObject), [types.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/target/types/public/application/types.d.ts#:~:text=SavedObject), [types.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/target/types/public/application/types.d.ts#:~:text=SavedObject)+ 3 more | - | +| | [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/plugin.ts#:~:text=ensureDefaultDataView) | - | | | [visualize_listing.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/components/visualize_listing.tsx#:~:text=settings), [visualize_listing.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/components/visualize_listing.tsx#:~:text=settings) | - | | | [visualize_top_nav.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/components/visualize_top_nav.tsx#:~:text=onAppLeave), [visualize_editor_common.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/components/visualize_editor_common.tsx#:~:text=onAppLeave), [app.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/app.tsx#:~:text=onAppLeave), [index.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/public/application/index.tsx#:~:text=onAppLeave), [app.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/target/types/public/application/app.d.ts#:~:text=onAppLeave), [index.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/target/types/public/application/index.d.ts#:~:text=onAppLeave), [visualize_editor_common.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/target/types/public/application/components/visualize_editor_common.d.ts#:~:text=onAppLeave), [visualize_top_nav.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/visualize/target/types/public/application/components/visualize_top_nav.d.ts#:~:text=onAppLeave) | - | diff --git a/api_docs/discover.json b/api_docs/discover.json index bab87863a903b..2e8dd6a450e7a 100644 --- a/api_docs/discover.json +++ b/api_docs/discover.json @@ -5,35 +5,157 @@ "functions": [ { "parentPluginId": "discover", - "id": "def-public.createSavedSearchesLoader", + "id": "def-public.getSavedSearch", "type": "Function", "tags": [], - "label": "createSavedSearchesLoader", + "label": "getSavedSearch", "description": [], "signature": [ - "({ savedObjectsClient, savedObjects }: Services) => ", + "(savedSearchId: string | undefined, dependencies: GetSavedSearchDependencies) => Promise<", { - "pluginId": "savedObjects", + "pluginId": "discover", "scope": "public", - "docId": "kibSavedObjectsPluginApi", - "section": "def-public.SavedObjectLoader", - "text": "SavedObjectLoader" + "docId": "kibDiscoverPluginApi", + "section": "def-public.SavedSearch", + "text": "SavedSearch" + }, + ">" + ], + "path": "src/plugins/discover/public/saved_searches/get_saved_searches.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "discover", + "id": "def-public.getSavedSearch.$1", + "type": "string", + "tags": [], + "label": "savedSearchId", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/discover/public/saved_searches/get_saved_searches.ts", + "deprecated": false, + "isRequired": false + }, + { + "parentPluginId": "discover", + "id": "def-public.getSavedSearch.$2", + "type": "Object", + "tags": [], + "label": "dependencies", + "description": [], + "signature": [ + "GetSavedSearchDependencies" + ], + "path": "src/plugins/discover/public/saved_searches/get_saved_searches.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "discover", + "id": "def-public.getSavedSearchFullPathUrl", + "type": "Function", + "tags": [], + "label": "getSavedSearchFullPathUrl", + "description": [], + "signature": [ + "(id?: string | undefined) => string" + ], + "path": "src/plugins/discover/public/saved_searches/saved_searches_utils.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "discover", + "id": "def-public.getSavedSearchFullPathUrl.$1", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/discover/public/saved_searches/saved_searches_utils.ts", + "deprecated": false, + "isRequired": false + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "discover", + "id": "def-public.getSavedSearchUrl", + "type": "Function", + "tags": [], + "label": "getSavedSearchUrl", + "description": [], + "signature": [ + "(id?: string | undefined) => string" + ], + "path": "src/plugins/discover/public/saved_searches/saved_searches_utils.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "discover", + "id": "def-public.getSavedSearchUrl.$1", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/discover/public/saved_searches/saved_searches_utils.ts", + "deprecated": false, + "isRequired": false } ], - "path": "src/plugins/discover/public/saved_searches/saved_searches.ts", + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "discover", + "id": "def-public.getSavedSearchUrlConflictMessage", + "type": "Function", + "tags": [], + "label": "getSavedSearchUrlConflictMessage", + "description": [], + "signature": [ + "(savedSearch: ", + { + "pluginId": "discover", + "scope": "public", + "docId": "kibDiscoverPluginApi", + "section": "def-public.SavedSearch", + "text": "SavedSearch" + }, + ") => Promise" + ], + "path": "src/plugins/discover/public/saved_searches/saved_searches_utils.ts", "deprecated": false, "children": [ { "parentPluginId": "discover", - "id": "def-public.createSavedSearchesLoader.$1", + "id": "def-public.getSavedSearchUrlConflictMessage.$1", "type": "Object", "tags": [], - "label": "{ savedObjectsClient, savedObjects }", + "label": "savedSearch", "description": [], "signature": [ - "Services" + { + "pluginId": "discover", + "scope": "public", + "docId": "kibDiscoverPluginApi", + "section": "def-public.SavedSearch", + "text": "SavedSearch" + } ], - "path": "src/plugins/discover/public/saved_searches/saved_searches.ts", + "path": "src/plugins/discover/public/saved_searches/saved_searches_utils.ts", "deprecated": false, "isRequired": true } @@ -58,6 +180,51 @@ "children": [], "returnComment": [], "initialIsOpen": false + }, + { + "parentPluginId": "discover", + "id": "def-public.throwErrorOnSavedSearchUrlConflict", + "type": "Function", + "tags": [], + "label": "throwErrorOnSavedSearchUrlConflict", + "description": [], + "signature": [ + "(savedSearch: ", + { + "pluginId": "discover", + "scope": "public", + "docId": "kibDiscoverPluginApi", + "section": "def-public.SavedSearch", + "text": "SavedSearch" + }, + ") => Promise" + ], + "path": "src/plugins/discover/public/saved_searches/saved_searches_utils.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "discover", + "id": "def-public.throwErrorOnSavedSearchUrlConflict.$1", + "type": "Object", + "tags": [], + "label": "savedSearch", + "description": [], + "signature": [ + { + "pluginId": "discover", + "scope": "public", + "docId": "kibDiscoverPluginApi", + "section": "def-public.SavedSearch", + "text": "SavedSearch" + } + ], + "path": "src/plugins/discover/public/saved_searches/saved_searches_utils.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false } ], "interfaces": [ @@ -602,181 +769,341 @@ }, { "parentPluginId": "discover", - "id": "def-public.SavedSearch", + "id": "def-public.LegacySavedSearch", "type": "Interface", - "tags": [], - "label": "SavedSearch", + "tags": [ + "deprecated" + ], + "label": "LegacySavedSearch", "description": [], - "path": "src/plugins/discover/public/saved_searches/types.ts", - "deprecated": false, + "path": "src/plugins/discover/public/saved_searches/legacy/types.ts", + "deprecated": true, + "references": [], "children": [ { "parentPluginId": "discover", - "id": "def-public.SavedSearch.id", + "id": "def-public.LegacySavedSearch.id", "type": "string", "tags": [], "label": "id", "description": [], - "path": "src/plugins/discover/public/saved_searches/types.ts", + "path": "src/plugins/discover/public/saved_searches/legacy/types.ts", "deprecated": false }, { "parentPluginId": "discover", - "id": "def-public.SavedSearch.title", + "id": "def-public.LegacySavedSearch.title", "type": "string", "tags": [], "label": "title", "description": [], - "path": "src/plugins/discover/public/saved_searches/types.ts", + "path": "src/plugins/discover/public/saved_searches/legacy/types.ts", "deprecated": false }, { "parentPluginId": "discover", - "id": "def-public.SavedSearch.searchSource", + "id": "def-public.LegacySavedSearch.searchSource", "type": "Object", "tags": [], "label": "searchSource", "description": [], "signature": [ + "{ create: () => ", { "pluginId": "data", "scope": "common", "docId": "kibDataSearchPluginApi", "section": "def-common.SearchSource", "text": "SearchSource" - } - ], - "path": "src/plugins/discover/public/saved_searches/types.ts", - "deprecated": false - }, - { - "parentPluginId": "discover", - "id": "def-public.SavedSearch.description", - "type": "string", - "tags": [], - "label": "description", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/discover/public/saved_searches/types.ts", - "deprecated": false - }, - { - "parentPluginId": "discover", - "id": "def-public.SavedSearch.columns", - "type": "Array", - "tags": [], - "label": "columns", - "description": [], - "signature": [ - "string[]" - ], - "path": "src/plugins/discover/public/saved_searches/types.ts", - "deprecated": false - }, - { - "parentPluginId": "discover", - "id": "def-public.SavedSearch.sort", - "type": "Array", - "tags": [], - "label": "sort", - "description": [], - "signature": [ - "SortOrder", - "[]" - ], - "path": "src/plugins/discover/public/saved_searches/types.ts", - "deprecated": false - }, - { - "parentPluginId": "discover", - "id": "def-public.SavedSearch.grid", - "type": "Object", - "tags": [], - "label": "grid", - "description": [], - "signature": [ - "DiscoverGridSettings" - ], - "path": "src/plugins/discover/public/saved_searches/types.ts", - "deprecated": false - }, - { - "parentPluginId": "discover", - "id": "def-public.SavedSearch.destroy", - "type": "Function", - "tags": [], - "label": "destroy", - "description": [], - "signature": [ - "() => void" - ], - "path": "src/plugins/discover/public/saved_searches/types.ts", - "deprecated": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "discover", - "id": "def-public.SavedSearch.save", - "type": "Function", - "tags": [], - "label": "save", - "description": [], - "signature": [ - "(saveOptions: ", + }, + "; history: Record[]; setPreferredSearchStrategyId: (searchStrategyId: string) => void; setField: (field: K, value: ", { - "pluginId": "savedObjects", - "scope": "public", - "docId": "kibSavedObjectsPluginApi", - "section": "def-public.SavedObjectSaveOpts", - "text": "SavedObjectSaveOpts" + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSourceFields", + "text": "SearchSourceFields" }, - ") => Promise" - ], - "path": "src/plugins/discover/public/saved_searches/types.ts", - "deprecated": false, - "children": [ + "[K]) => ", { - "parentPluginId": "discover", - "id": "def-public.SavedSearch.save.$1", - "type": "Object", - "tags": [], - "label": "saveOptions", - "description": [], - "signature": [ - { - "pluginId": "savedObjects", - "scope": "public", - "docId": "kibSavedObjectsPluginApi", - "section": "def-public.SavedObjectSaveOpts", - "text": "SavedObjectSaveOpts" - } - ], - "path": "src/plugins/discover/public/saved_searches/types.ts", - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" + }, + "; removeField: (field: K) => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" + }, + "; setFields: (newFields: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSourceFields", + "text": "SearchSourceFields" + }, + ") => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" + }, + "; getId: () => string; getFields: () => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSourceFields", + "text": "SearchSourceFields" + }, + "; getField: (field: K, recurse?: boolean) => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSourceFields", + "text": "SearchSourceFields" + }, + "[K]; getOwnField: (field: K) => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSourceFields", + "text": "SearchSourceFields" + }, + "[K]; createCopy: () => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" + }, + "; createChild: (options?: {}) => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" + }, + "; setParent: (parent?: Pick<", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" + }, + ", \"create\" | \"history\" | \"setPreferredSearchStrategyId\" | \"setField\" | \"removeField\" | \"setFields\" | \"getId\" | \"getFields\" | \"getField\" | \"getOwnField\" | \"createCopy\" | \"createChild\" | \"setParent\" | \"getParent\" | \"fetch$\" | \"fetch\" | \"onRequestStart\" | \"getSearchRequestBody\" | \"destroy\" | \"getSerializedFields\" | \"serialize\"> | undefined, options?: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSourceOptions", + "text": "SearchSourceOptions" + }, + ") => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" + }, + "; getParent: () => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" + }, + " | undefined; fetch$: (options?: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.ISearchOptions", + "text": "ISearchOptions" + }, + ") => ", + "Observable", + "<", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.IKibanaSearchResponse", + "text": "IKibanaSearchResponse" + }, + "<", + "SearchResponse", + ">>; fetch: (options?: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.ISearchOptions", + "text": "ISearchOptions" + }, + ") => Promise<", + "SearchResponse", + ">; onRequestStart: (handler: (searchSource: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" + }, + ", options?: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.ISearchOptions", + "text": "ISearchOptions" + }, + " | undefined) => Promise) => void; getSearchRequestBody: () => any; destroy: () => void; getSerializedFields: (recurse?: boolean) => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSourceFields", + "text": "SearchSourceFields" + }, + "; serialize: () => { searchSourceJSON: string; references: ", + "SavedObjectReference", + "[]; }; }" + ], + "path": "src/plugins/discover/public/saved_searches/legacy/types.ts", + "deprecated": false }, { "parentPluginId": "discover", - "id": "def-public.SavedSearch.lastSavedTitle", + "id": "def-public.LegacySavedSearch.description", "type": "string", "tags": [], - "label": "lastSavedTitle", + "label": "description", "description": [], "signature": [ "string | undefined" ], - "path": "src/plugins/discover/public/saved_searches/types.ts", + "path": "src/plugins/discover/public/saved_searches/legacy/types.ts", + "deprecated": false + }, + { + "parentPluginId": "discover", + "id": "def-public.LegacySavedSearch.columns", + "type": "Array", + "tags": [], + "label": "columns", + "description": [], + "signature": [ + "string[]" + ], + "path": "src/plugins/discover/public/saved_searches/legacy/types.ts", + "deprecated": false + }, + { + "parentPluginId": "discover", + "id": "def-public.LegacySavedSearch.sort", + "type": "Array", + "tags": [], + "label": "sort", + "description": [], + "signature": [ + "SortOrder", + "[]" + ], + "path": "src/plugins/discover/public/saved_searches/legacy/types.ts", "deprecated": false }, { "parentPluginId": "discover", - "id": "def-public.SavedSearch.copyOnSave", + "id": "def-public.LegacySavedSearch.grid", + "type": "Object", + "tags": [], + "label": "grid", + "description": [], + "signature": [ + "DiscoverGridSettings" + ], + "path": "src/plugins/discover/public/saved_searches/legacy/types.ts", + "deprecated": false + }, + { + "parentPluginId": "discover", + "id": "def-public.LegacySavedSearch.destroy", + "type": "Function", + "tags": [], + "label": "destroy", + "description": [], + "signature": [ + "() => void" + ], + "path": "src/plugins/discover/public/saved_searches/legacy/types.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "discover", + "id": "def-public.LegacySavedSearch.save", + "type": "Function", + "tags": [], + "label": "save", + "description": [], + "signature": [ + "(saveOptions: ", + { + "pluginId": "savedObjects", + "scope": "public", + "docId": "kibSavedObjectsPluginApi", + "section": "def-public.SavedObjectSaveOpts", + "text": "SavedObjectSaveOpts" + }, + ") => Promise" + ], + "path": "src/plugins/discover/public/saved_searches/legacy/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "discover", + "id": "def-public.LegacySavedSearch.save.$1", + "type": "Object", + "tags": [], + "label": "saveOptions", + "description": [], + "signature": [ + { + "pluginId": "savedObjects", + "scope": "public", + "docId": "kibSavedObjectsPluginApi", + "section": "def-public.SavedObjectSaveOpts", + "text": "SavedObjectSaveOpts" + } + ], + "path": "src/plugins/discover/public/saved_searches/legacy/types.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "discover", + "id": "def-public.LegacySavedSearch.copyOnSave", "type": "CompoundType", "tags": [], "label": "copyOnSave", @@ -784,6 +1111,301 @@ "signature": [ "boolean | undefined" ], + "path": "src/plugins/discover/public/saved_searches/legacy/types.ts", + "deprecated": false + }, + { + "parentPluginId": "discover", + "id": "def-public.LegacySavedSearch.hideChart", + "type": "CompoundType", + "tags": [], + "label": "hideChart", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/discover/public/saved_searches/legacy/types.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "discover", + "id": "def-public.SavedSearch", + "type": "Interface", + "tags": [], + "label": "SavedSearch", + "description": [], + "path": "src/plugins/discover/public/saved_searches/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "discover", + "id": "def-public.SavedSearch.searchSource", + "type": "Object", + "tags": [], + "label": "searchSource", + "description": [], + "signature": [ + "{ create: () => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" + }, + "; history: Record[]; setPreferredSearchStrategyId: (searchStrategyId: string) => void; setField: (field: K, value: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSourceFields", + "text": "SearchSourceFields" + }, + "[K]) => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" + }, + "; removeField: (field: K) => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" + }, + "; setFields: (newFields: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSourceFields", + "text": "SearchSourceFields" + }, + ") => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" + }, + "; getId: () => string; getFields: () => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSourceFields", + "text": "SearchSourceFields" + }, + "; getField: (field: K, recurse?: boolean) => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSourceFields", + "text": "SearchSourceFields" + }, + "[K]; getOwnField: (field: K) => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSourceFields", + "text": "SearchSourceFields" + }, + "[K]; createCopy: () => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" + }, + "; createChild: (options?: {}) => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" + }, + "; setParent: (parent?: Pick<", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" + }, + ", \"create\" | \"history\" | \"setPreferredSearchStrategyId\" | \"setField\" | \"removeField\" | \"setFields\" | \"getId\" | \"getFields\" | \"getField\" | \"getOwnField\" | \"createCopy\" | \"createChild\" | \"setParent\" | \"getParent\" | \"fetch$\" | \"fetch\" | \"onRequestStart\" | \"getSearchRequestBody\" | \"destroy\" | \"getSerializedFields\" | \"serialize\"> | undefined, options?: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSourceOptions", + "text": "SearchSourceOptions" + }, + ") => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" + }, + "; getParent: () => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" + }, + " | undefined; fetch$: (options?: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.ISearchOptions", + "text": "ISearchOptions" + }, + ") => ", + "Observable", + "<", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.IKibanaSearchResponse", + "text": "IKibanaSearchResponse" + }, + "<", + "SearchResponse", + ">>; fetch: (options?: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.ISearchOptions", + "text": "ISearchOptions" + }, + ") => Promise<", + "SearchResponse", + ">; onRequestStart: (handler: (searchSource: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" + }, + ", options?: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.ISearchOptions", + "text": "ISearchOptions" + }, + " | undefined) => Promise) => void; getSearchRequestBody: () => any; destroy: () => void; getSerializedFields: (recurse?: boolean) => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSourceFields", + "text": "SearchSourceFields" + }, + "; serialize: () => { searchSourceJSON: string; references: ", + "SavedObjectReference", + "[]; }; }" + ], + "path": "src/plugins/discover/public/saved_searches/types.ts", + "deprecated": false + }, + { + "parentPluginId": "discover", + "id": "def-public.SavedSearch.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/discover/public/saved_searches/types.ts", + "deprecated": false + }, + { + "parentPluginId": "discover", + "id": "def-public.SavedSearch.title", + "type": "string", + "tags": [], + "label": "title", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/discover/public/saved_searches/types.ts", + "deprecated": false + }, + { + "parentPluginId": "discover", + "id": "def-public.SavedSearch.sort", + "type": "Array", + "tags": [], + "label": "sort", + "description": [], + "signature": [ + "[string, string][] | undefined" + ], + "path": "src/plugins/discover/public/saved_searches/types.ts", + "deprecated": false + }, + { + "parentPluginId": "discover", + "id": "def-public.SavedSearch.columns", + "type": "Array", + "tags": [], + "label": "columns", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "src/plugins/discover/public/saved_searches/types.ts", + "deprecated": false + }, + { + "parentPluginId": "discover", + "id": "def-public.SavedSearch.description", + "type": "string", + "tags": [], + "label": "description", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/discover/public/saved_searches/types.ts", + "deprecated": false + }, + { + "parentPluginId": "discover", + "id": "def-public.SavedSearch.grid", + "type": "Object", + "tags": [], + "label": "grid", + "description": [], + "signature": [ + "{ columns?: Record | undefined; } | undefined" + ], "path": "src/plugins/discover/public/saved_searches/types.ts", "deprecated": false }, @@ -799,6 +1421,19 @@ ], "path": "src/plugins/discover/public/saved_searches/types.ts", "deprecated": false + }, + { + "parentPluginId": "discover", + "id": "def-public.SavedSearch.sharingSavedObjectProps", + "type": "Object", + "tags": [], + "label": "sharingSavedObjectProps", + "description": [], + "signature": [ + "{ outcome?: \"conflict\" | \"exactMatch\" | \"aliasMatch\" | undefined; aliasTargetId?: string | undefined; errorJSON?: string | undefined; } | undefined" + ], + "path": "src/plugins/discover/public/saved_searches/types.ts", + "deprecated": false } ], "initialIsOpen": false @@ -807,11 +1442,14 @@ "parentPluginId": "discover", "id": "def-public.SavedSearchLoader", "type": "Interface", - "tags": [], + "tags": [ + "deprecated" + ], "label": "SavedSearchLoader", "description": [], - "path": "src/plugins/discover/public/saved_searches/types.ts", - "deprecated": false, + "path": "src/plugins/discover/public/saved_searches/legacy/types.ts", + "deprecated": true, + "references": [], "children": [ { "parentPluginId": "discover", @@ -826,12 +1464,12 @@ "pluginId": "discover", "scope": "public", "docId": "kibDiscoverPluginApi", - "section": "def-public.SavedSearch", - "text": "SavedSearch" + "section": "def-public.LegacySavedSearch", + "text": "LegacySavedSearch" }, ">" ], - "path": "src/plugins/discover/public/saved_searches/types.ts", + "path": "src/plugins/discover/public/saved_searches/legacy/types.ts", "deprecated": false, "children": [ { @@ -844,7 +1482,7 @@ "signature": [ "string" ], - "path": "src/plugins/discover/public/saved_searches/types.ts", + "path": "src/plugins/discover/public/saved_searches/legacy/types.ts", "deprecated": false, "isRequired": true } @@ -861,7 +1499,7 @@ "signature": [ "(id: string) => string" ], - "path": "src/plugins/discover/public/saved_searches/types.ts", + "path": "src/plugins/discover/public/saved_searches/legacy/types.ts", "deprecated": false, "children": [ { @@ -874,7 +1512,7 @@ "signature": [ "string" ], - "path": "src/plugins/discover/public/saved_searches/types.ts", + "path": "src/plugins/discover/public/saved_searches/legacy/types.ts", "deprecated": false, "isRequired": true } @@ -1068,7 +1706,69 @@ "initialIsOpen": false } ], - "objects": [], + "objects": [ + { + "parentPluginId": "discover", + "id": "def-public.__LEGACY", + "type": "Object", + "tags": [ + "deprecated" + ], + "label": "__LEGACY", + "description": [], + "path": "src/plugins/discover/public/saved_searches/index.ts", + "deprecated": true, + "references": [ + { + "plugin": "visualizations", + "path": "src/plugins/visualizations/public/saved_visualizations/_saved_vis.ts" + }, + { + "plugin": "visualizations", + "path": "src/plugins/visualizations/public/saved_visualizations/_saved_vis.ts" + } + ], + "children": [ + { + "parentPluginId": "discover", + "id": "def-public.__LEGACY.createSavedSearchesLoader", + "type": "Function", + "tags": [], + "label": "createSavedSearchesLoader", + "description": [], + "signature": [ + "({ savedObjectsClient, savedObjects }: Services) => ", + { + "pluginId": "savedObjects", + "scope": "public", + "docId": "kibSavedObjectsPluginApi", + "section": "def-public.SavedObjectLoader", + "text": "SavedObjectLoader" + } + ], + "path": "src/plugins/discover/public/saved_searches/index.ts", + "deprecated": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "discover", + "id": "def-public.__LEGACY.createSavedSearchesLoader.$1", + "type": "Object", + "tags": [], + "label": "__0", + "description": [], + "signature": [ + "Services" + ], + "path": "src/plugins/discover/public/saved_searches/legacy/saved_searches.ts", + "deprecated": false + } + ] + } + ], + "initialIsOpen": false + } + ], "setup": { "parentPluginId": "discover", "id": "def-public.DiscoverSetup", @@ -1134,19 +1834,21 @@ "children": [ { "parentPluginId": "discover", - "id": "def-public.DiscoverStart.savedSearchLoader", + "id": "def-public.DiscoverStart.__LEGACY", "type": "Object", "tags": [], - "label": "savedSearchLoader", + "label": "__LEGACY", "description": [], "signature": [ + "{ savedSearchLoader: ", { "pluginId": "savedObjects", "scope": "public", "docId": "kibSavedObjectsPluginApi", "section": "def-public.SavedObjectLoader", "text": "SavedObjectLoader" - } + }, + "; }" ], "path": "src/plugins/discover/public/plugin.tsx", "deprecated": false diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx index aee0f4b9724c6..46e681aabc0a6 100644 --- a/api_docs/discover.mdx +++ b/api_docs/discover.mdx @@ -18,7 +18,7 @@ Contact [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-disco | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 82 | 0 | 56 | 6 | +| 103 | 0 | 77 | 7 | ## Client @@ -28,6 +28,9 @@ Contact [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-disco ### Start +### Objects + + ### Functions diff --git a/api_docs/elastic_apm_generator.json b/api_docs/elastic_apm_generator.json new file mode 100644 index 0000000000000..24f11791d92b6 --- /dev/null +++ b/api_docs/elastic_apm_generator.json @@ -0,0 +1,288 @@ +{ + "id": "@elastic/apm-generator", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [ + { + "parentPluginId": "@elastic/apm-generator", + "id": "def-server.getBreakdownMetrics", + "type": "Function", + "tags": [], + "label": "getBreakdownMetrics", + "description": [], + "signature": [ + "(events: Partial<{ '@timestamp': number; 'agent.name': string; 'agent.version': string; 'container.id': string; 'ecs.version': string; 'event.outcome': string; 'event.ingested': number; 'host.name': string; 'metricset.name': string; 'observer.version': string; 'observer.version_major': number; 'parent.id': string; 'processor.event': string; 'processor.name': string; 'trace.id': string; 'transaction.name': string; 'transaction.type': string; 'transaction.id': string; 'transaction.duration.us': number; 'transaction.duration.histogram': { values: number[]; counts: number[]; }; 'transaction.sampled': true; 'service.name': string; 'service.environment': string; 'service.node.name': string; 'span.id': string; 'span.name': string; 'span.type': string; 'span.subtype': string; 'span.duration.us': number; 'span.destination.service.name': string; 'span.destination.service.resource': string; 'span.destination.service.type': string; 'span.destination.service.response_time.sum.us': number; 'span.destination.service.response_time.count': number; 'span.self_time.count': number; 'span.self_time.sum.us': number; }>[]) => Partial<{ '@timestamp': number; 'agent.name': string; 'agent.version': string; 'container.id': string; 'ecs.version': string; 'event.outcome': string; 'event.ingested': number; 'host.name': string; 'metricset.name': string; 'observer.version': string; 'observer.version_major': number; 'parent.id': string; 'processor.event': string; 'processor.name': string; 'trace.id': string; 'transaction.name': string; 'transaction.type': string; 'transaction.id': string; 'transaction.duration.us': number; 'transaction.duration.histogram': { values: number[]; counts: number[]; }; 'transaction.sampled': true; 'service.name': string; 'service.environment': string; 'service.node.name': string; 'span.id': string; 'span.name': string; 'span.type': string; 'span.subtype': string; 'span.duration.us': number; 'span.destination.service.name': string; 'span.destination.service.resource': string; 'span.destination.service.type': string; 'span.destination.service.response_time.sum.us': number; 'span.destination.service.response_time.count': number; 'span.self_time.count': number; 'span.self_time.sum.us': number; }>[]" + ], + "path": "packages/elastic-apm-generator/src/lib/utils/get_breakdown_metrics.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@elastic/apm-generator", + "id": "def-server.getBreakdownMetrics.$1", + "type": "Array", + "tags": [], + "label": "events", + "description": [], + "signature": [ + "Partial<{ '@timestamp': number; 'agent.name': string; 'agent.version': string; 'container.id': string; 'ecs.version': string; 'event.outcome': string; 'event.ingested': number; 'host.name': string; 'metricset.name': string; 'observer.version': string; 'observer.version_major': number; 'parent.id': string; 'processor.event': string; 'processor.name': string; 'trace.id': string; 'transaction.name': string; 'transaction.type': string; 'transaction.id': string; 'transaction.duration.us': number; 'transaction.duration.histogram': { values: number[]; counts: number[]; }; 'transaction.sampled': true; 'service.name': string; 'service.environment': string; 'service.node.name': string; 'span.id': string; 'span.name': string; 'span.type': string; 'span.subtype': string; 'span.duration.us': number; 'span.destination.service.name': string; 'span.destination.service.resource': string; 'span.destination.service.type': string; 'span.destination.service.response_time.sum.us': number; 'span.destination.service.response_time.count': number; 'span.self_time.count': number; 'span.self_time.sum.us': number; }>[]" + ], + "path": "packages/elastic-apm-generator/src/lib/utils/get_breakdown_metrics.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@elastic/apm-generator", + "id": "def-server.getObserverDefaults", + "type": "Function", + "tags": [], + "label": "getObserverDefaults", + "description": [], + "signature": [ + "() => Partial<{ '@timestamp': number; 'agent.name': string; 'agent.version': string; 'container.id': string; 'ecs.version': string; 'event.outcome': string; 'event.ingested': number; 'host.name': string; 'metricset.name': string; 'observer.version': string; 'observer.version_major': number; 'parent.id': string; 'processor.event': string; 'processor.name': string; 'trace.id': string; 'transaction.name': string; 'transaction.type': string; 'transaction.id': string; 'transaction.duration.us': number; 'transaction.duration.histogram': { values: number[]; counts: number[]; }; 'transaction.sampled': true; 'service.name': string; 'service.environment': string; 'service.node.name': string; 'span.id': string; 'span.name': string; 'span.type': string; 'span.subtype': string; 'span.duration.us': number; 'span.destination.service.name': string; 'span.destination.service.resource': string; 'span.destination.service.type': string; 'span.destination.service.response_time.sum.us': number; 'span.destination.service.response_time.count': number; 'span.self_time.count': number; 'span.self_time.sum.us': number; }>" + ], + "path": "packages/elastic-apm-generator/src/lib/defaults/get_observer_defaults.ts", + "deprecated": false, + "children": [], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@elastic/apm-generator", + "id": "def-server.getSpanDestinationMetrics", + "type": "Function", + "tags": [], + "label": "getSpanDestinationMetrics", + "description": [], + "signature": [ + "(events: Partial<{ '@timestamp': number; 'agent.name': string; 'agent.version': string; 'container.id': string; 'ecs.version': string; 'event.outcome': string; 'event.ingested': number; 'host.name': string; 'metricset.name': string; 'observer.version': string; 'observer.version_major': number; 'parent.id': string; 'processor.event': string; 'processor.name': string; 'trace.id': string; 'transaction.name': string; 'transaction.type': string; 'transaction.id': string; 'transaction.duration.us': number; 'transaction.duration.histogram': { values: number[]; counts: number[]; }; 'transaction.sampled': true; 'service.name': string; 'service.environment': string; 'service.node.name': string; 'span.id': string; 'span.name': string; 'span.type': string; 'span.subtype': string; 'span.duration.us': number; 'span.destination.service.name': string; 'span.destination.service.resource': string; 'span.destination.service.type': string; 'span.destination.service.response_time.sum.us': number; 'span.destination.service.response_time.count': number; 'span.self_time.count': number; 'span.self_time.sum.us': number; }>[]) => { \"metricset.name\": string; 'span.destination.service.response_time.sum.us': number; 'span.destination.service.response_time.count': number; '@timestamp'?: number | undefined; 'agent.name'?: string | undefined; 'agent.version'?: string | undefined; 'container.id'?: string | undefined; 'ecs.version'?: string | undefined; 'event.outcome'?: string | undefined; 'event.ingested'?: number | undefined; 'host.name'?: string | undefined; 'observer.version'?: string | undefined; 'observer.version_major'?: number | undefined; 'parent.id'?: string | undefined; 'processor.event'?: string | undefined; 'processor.name'?: string | undefined; 'trace.id'?: string | undefined; 'transaction.name'?: string | undefined; 'transaction.type'?: string | undefined; 'transaction.id'?: string | undefined; 'transaction.duration.us'?: number | undefined; 'transaction.duration.histogram'?: { values: number[]; counts: number[]; } | undefined; 'transaction.sampled'?: true | undefined; 'service.name'?: string | undefined; 'service.environment'?: string | undefined; 'service.node.name'?: string | undefined; 'span.id'?: string | undefined; 'span.name'?: string | undefined; 'span.type'?: string | undefined; 'span.subtype'?: string | undefined; 'span.duration.us'?: number | undefined; 'span.destination.service.name'?: string | undefined; 'span.destination.service.resource'?: string | undefined; 'span.destination.service.type'?: string | undefined; 'span.self_time.count'?: number | undefined; 'span.self_time.sum.us'?: number | undefined; }[]" + ], + "path": "packages/elastic-apm-generator/src/lib/utils/get_span_destination_metrics.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@elastic/apm-generator", + "id": "def-server.getSpanDestinationMetrics.$1", + "type": "Array", + "tags": [], + "label": "events", + "description": [], + "signature": [ + "Partial<{ '@timestamp': number; 'agent.name': string; 'agent.version': string; 'container.id': string; 'ecs.version': string; 'event.outcome': string; 'event.ingested': number; 'host.name': string; 'metricset.name': string; 'observer.version': string; 'observer.version_major': number; 'parent.id': string; 'processor.event': string; 'processor.name': string; 'trace.id': string; 'transaction.name': string; 'transaction.type': string; 'transaction.id': string; 'transaction.duration.us': number; 'transaction.duration.histogram': { values: number[]; counts: number[]; }; 'transaction.sampled': true; 'service.name': string; 'service.environment': string; 'service.node.name': string; 'span.id': string; 'span.name': string; 'span.type': string; 'span.subtype': string; 'span.duration.us': number; 'span.destination.service.name': string; 'span.destination.service.resource': string; 'span.destination.service.type': string; 'span.destination.service.response_time.sum.us': number; 'span.destination.service.response_time.count': number; 'span.self_time.count': number; 'span.self_time.sum.us': number; }>[]" + ], + "path": "packages/elastic-apm-generator/src/lib/utils/get_span_destination_metrics.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@elastic/apm-generator", + "id": "def-server.getTransactionMetrics", + "type": "Function", + "tags": [], + "label": "getTransactionMetrics", + "description": [], + "signature": [ + "(events: Partial<{ '@timestamp': number; 'agent.name': string; 'agent.version': string; 'container.id': string; 'ecs.version': string; 'event.outcome': string; 'event.ingested': number; 'host.name': string; 'metricset.name': string; 'observer.version': string; 'observer.version_major': number; 'parent.id': string; 'processor.event': string; 'processor.name': string; 'trace.id': string; 'transaction.name': string; 'transaction.type': string; 'transaction.id': string; 'transaction.duration.us': number; 'transaction.duration.histogram': { values: number[]; counts: number[]; }; 'transaction.sampled': true; 'service.name': string; 'service.environment': string; 'service.node.name': string; 'span.id': string; 'span.name': string; 'span.type': string; 'span.subtype': string; 'span.duration.us': number; 'span.destination.service.name': string; 'span.destination.service.resource': string; 'span.destination.service.type': string; 'span.destination.service.response_time.sum.us': number; 'span.destination.service.response_time.count': number; 'span.self_time.count': number; 'span.self_time.sum.us': number; }>[]) => { 'transaction.duration.histogram': { values: number[]; counts: number[]; }; _doc_count: number; '@timestamp'?: number | undefined; 'agent.name'?: string | undefined; 'agent.version'?: string | undefined; 'container.id'?: string | undefined; 'ecs.version'?: string | undefined; 'event.outcome'?: string | undefined; 'event.ingested'?: number | undefined; 'host.name'?: string | undefined; 'metricset.name'?: string | undefined; 'observer.version'?: string | undefined; 'observer.version_major'?: number | undefined; 'parent.id'?: string | undefined; 'processor.event'?: string | undefined; 'processor.name'?: string | undefined; 'trace.id'?: string | undefined; 'transaction.name'?: string | undefined; 'transaction.type'?: string | undefined; 'transaction.id'?: string | undefined; 'transaction.duration.us'?: number | undefined; 'transaction.sampled'?: true | undefined; 'service.name'?: string | undefined; 'service.environment'?: string | undefined; 'service.node.name'?: string | undefined; 'span.id'?: string | undefined; 'span.name'?: string | undefined; 'span.type'?: string | undefined; 'span.subtype'?: string | undefined; 'span.duration.us'?: number | undefined; 'span.destination.service.name'?: string | undefined; 'span.destination.service.resource'?: string | undefined; 'span.destination.service.type'?: string | undefined; 'span.destination.service.response_time.sum.us'?: number | undefined; 'span.destination.service.response_time.count'?: number | undefined; 'span.self_time.count'?: number | undefined; 'span.self_time.sum.us'?: number | undefined; }[]" + ], + "path": "packages/elastic-apm-generator/src/lib/utils/get_transaction_metrics.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@elastic/apm-generator", + "id": "def-server.getTransactionMetrics.$1", + "type": "Array", + "tags": [], + "label": "events", + "description": [], + "signature": [ + "Partial<{ '@timestamp': number; 'agent.name': string; 'agent.version': string; 'container.id': string; 'ecs.version': string; 'event.outcome': string; 'event.ingested': number; 'host.name': string; 'metricset.name': string; 'observer.version': string; 'observer.version_major': number; 'parent.id': string; 'processor.event': string; 'processor.name': string; 'trace.id': string; 'transaction.name': string; 'transaction.type': string; 'transaction.id': string; 'transaction.duration.us': number; 'transaction.duration.histogram': { values: number[]; counts: number[]; }; 'transaction.sampled': true; 'service.name': string; 'service.environment': string; 'service.node.name': string; 'span.id': string; 'span.name': string; 'span.type': string; 'span.subtype': string; 'span.duration.us': number; 'span.destination.service.name': string; 'span.destination.service.resource': string; 'span.destination.service.type': string; 'span.destination.service.response_time.sum.us': number; 'span.destination.service.response_time.count': number; 'span.self_time.count': number; 'span.self_time.sum.us': number; }>[]" + ], + "path": "packages/elastic-apm-generator/src/lib/utils/get_transaction_metrics.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@elastic/apm-generator", + "id": "def-server.service", + "type": "Function", + "tags": [], + "label": "service", + "description": [], + "signature": [ + "(name: string, environment: string, agentName: string) => ", + "Service" + ], + "path": "packages/elastic-apm-generator/src/lib/service.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@elastic/apm-generator", + "id": "def-server.service.$1", + "type": "string", + "tags": [], + "label": "name", + "description": [], + "signature": [ + "string" + ], + "path": "packages/elastic-apm-generator/src/lib/service.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "@elastic/apm-generator", + "id": "def-server.service.$2", + "type": "string", + "tags": [], + "label": "environment", + "description": [], + "signature": [ + "string" + ], + "path": "packages/elastic-apm-generator/src/lib/service.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "@elastic/apm-generator", + "id": "def-server.service.$3", + "type": "string", + "tags": [], + "label": "agentName", + "description": [], + "signature": [ + "string" + ], + "path": "packages/elastic-apm-generator/src/lib/service.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@elastic/apm-generator", + "id": "def-server.timerange", + "type": "Function", + "tags": [], + "label": "timerange", + "description": [], + "signature": [ + "(from: number, to: number) => ", + "Timerange" + ], + "path": "packages/elastic-apm-generator/src/lib/timerange.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@elastic/apm-generator", + "id": "def-server.timerange.$1", + "type": "number", + "tags": [], + "label": "from", + "description": [], + "signature": [ + "number" + ], + "path": "packages/elastic-apm-generator/src/lib/timerange.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "@elastic/apm-generator", + "id": "def-server.timerange.$2", + "type": "number", + "tags": [], + "label": "to", + "description": [], + "signature": [ + "number" + ], + "path": "packages/elastic-apm-generator/src/lib/timerange.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@elastic/apm-generator", + "id": "def-server.toElasticsearchOutput", + "type": "Function", + "tags": [], + "label": "toElasticsearchOutput", + "description": [], + "signature": [ + "(events: Partial<{ '@timestamp': number; 'agent.name': string; 'agent.version': string; 'container.id': string; 'ecs.version': string; 'event.outcome': string; 'event.ingested': number; 'host.name': string; 'metricset.name': string; 'observer.version': string; 'observer.version_major': number; 'parent.id': string; 'processor.event': string; 'processor.name': string; 'trace.id': string; 'transaction.name': string; 'transaction.type': string; 'transaction.id': string; 'transaction.duration.us': number; 'transaction.duration.histogram': { values: number[]; counts: number[]; }; 'transaction.sampled': true; 'service.name': string; 'service.environment': string; 'service.node.name': string; 'span.id': string; 'span.name': string; 'span.type': string; 'span.subtype': string; 'span.duration.us': number; 'span.destination.service.name': string; 'span.destination.service.resource': string; 'span.destination.service.type': string; 'span.destination.service.response_time.sum.us': number; 'span.destination.service.response_time.count': number; 'span.self_time.count': number; 'span.self_time.sum.us': number; }>[], versionOverride: string | undefined) => { _index: string; _source: {}; }[]" + ], + "path": "packages/elastic-apm-generator/src/lib/output/to_elasticsearch_output.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@elastic/apm-generator", + "id": "def-server.toElasticsearchOutput.$1", + "type": "Array", + "tags": [], + "label": "events", + "description": [], + "signature": [ + "Partial<{ '@timestamp': number; 'agent.name': string; 'agent.version': string; 'container.id': string; 'ecs.version': string; 'event.outcome': string; 'event.ingested': number; 'host.name': string; 'metricset.name': string; 'observer.version': string; 'observer.version_major': number; 'parent.id': string; 'processor.event': string; 'processor.name': string; 'trace.id': string; 'transaction.name': string; 'transaction.type': string; 'transaction.id': string; 'transaction.duration.us': number; 'transaction.duration.histogram': { values: number[]; counts: number[]; }; 'transaction.sampled': true; 'service.name': string; 'service.environment': string; 'service.node.name': string; 'span.id': string; 'span.name': string; 'span.type': string; 'span.subtype': string; 'span.duration.us': number; 'span.destination.service.name': string; 'span.destination.service.resource': string; 'span.destination.service.type': string; 'span.destination.service.response_time.sum.us': number; 'span.destination.service.response_time.count': number; 'span.self_time.count': number; 'span.self_time.sum.us': number; }>[]" + ], + "path": "packages/elastic-apm-generator/src/lib/output/to_elasticsearch_output.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "@elastic/apm-generator", + "id": "def-server.toElasticsearchOutput.$2", + "type": "string", + "tags": [], + "label": "versionOverride", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/elastic-apm-generator/src/lib/output/to_elasticsearch_output.ts", + "deprecated": false, + "isRequired": false + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/elastic_apm_generator.mdx b/api_docs/elastic_apm_generator.mdx new file mode 100644 index 0000000000000..4c95050b09c28 --- /dev/null +++ b/api_docs/elastic_apm_generator.mdx @@ -0,0 +1,27 @@ +--- +id: kibElasticApmGeneratorPluginApi +slug: /kibana-dev-docs/api/elastic-apm-generator +title: "@elastic/apm-generator" +image: https://source.unsplash.com/400x175/?github +summary: API docs for the @elastic/apm-generator plugin +date: 2020-11-16 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@elastic/apm-generator'] +warning: 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. +--- +import elasticApmGeneratorObj from './elastic_apm_generator.json'; + +Elastic APM trace data generator + +Contact [Owner missing] for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 17 | 0 | 17 | 2 | + +## Server + +### Functions + + diff --git a/api_docs/es_ui_shared.json b/api_docs/es_ui_shared.json index 83d71b321cfcf..da0ba7b688c93 100644 --- a/api_docs/es_ui_shared.json +++ b/api_docs/es_ui_shared.json @@ -1175,7 +1175,7 @@ "label": "method", "description": [], "signature": [ - "\"get\" | \"post\" | \"put\" | \"delete\" | \"patch\" | \"head\"" + "\"delete\" | \"get\" | \"post\" | \"put\" | \"patch\" | \"head\"" ], "path": "src/plugins/es_ui_shared/public/request/send_request.ts", "deprecated": false diff --git a/api_docs/event_log.json b/api_docs/event_log.json index 72fa83add95c3..04212b831499b 100644 --- a/api_docs/event_log.json +++ b/api_docs/event_log.json @@ -579,7 +579,7 @@ "label": "logEvent", "description": [], "signature": [ - "(properties: DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ scheduled?: string | undefined; schedule_delay?: number | undefined; } & {}> | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; url?: string | undefined; category?: string[] | undefined; code?: string | undefined; original?: string | undefined; action?: string | undefined; kind?: string | undefined; severity?: number | undefined; outcome?: string | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined) => void" + "(properties: DeepPartial | undefined; uuid?: string | undefined; status_order?: number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; rel?: string | undefined; namespace?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ scheduled?: string | undefined; schedule_delay?: number | undefined; } & {}> | undefined; space_ids?: string[] | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; url?: string | undefined; category?: string[] | undefined; outcome?: string | undefined; code?: string | undefined; original?: string | undefined; action?: string | undefined; kind?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined) => void" ], "path": "x-pack/plugins/event_log/server/types.ts", "deprecated": false, @@ -592,7 +592,7 @@ "label": "properties", "description": [], "signature": [ - "DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ scheduled?: string | undefined; schedule_delay?: number | undefined; } & {}> | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; url?: string | undefined; category?: string[] | undefined; code?: string | undefined; original?: string | undefined; action?: string | undefined; kind?: string | undefined; severity?: number | undefined; outcome?: string | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" + "DeepPartial | undefined; uuid?: string | undefined; status_order?: number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; rel?: string | undefined; namespace?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ scheduled?: string | undefined; schedule_delay?: number | undefined; } & {}> | undefined; space_ids?: string[] | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; url?: string | undefined; category?: string[] | undefined; outcome?: string | undefined; code?: string | undefined; original?: string | undefined; action?: string | undefined; kind?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" ], "path": "x-pack/plugins/event_log/server/types.ts", "deprecated": false, @@ -609,7 +609,7 @@ "label": "startTiming", "description": [], "signature": [ - "(event: DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ scheduled?: string | undefined; schedule_delay?: number | undefined; } & {}> | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; url?: string | undefined; category?: string[] | undefined; code?: string | undefined; original?: string | undefined; action?: string | undefined; kind?: string | undefined; severity?: number | undefined; outcome?: string | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined) => void" + "(event: DeepPartial | undefined; uuid?: string | undefined; status_order?: number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; rel?: string | undefined; namespace?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ scheduled?: string | undefined; schedule_delay?: number | undefined; } & {}> | undefined; space_ids?: string[] | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; url?: string | undefined; category?: string[] | undefined; outcome?: string | undefined; code?: string | undefined; original?: string | undefined; action?: string | undefined; kind?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined) => void" ], "path": "x-pack/plugins/event_log/server/types.ts", "deprecated": false, @@ -622,7 +622,7 @@ "label": "event", "description": [], "signature": [ - "DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ scheduled?: string | undefined; schedule_delay?: number | undefined; } & {}> | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; url?: string | undefined; category?: string[] | undefined; code?: string | undefined; original?: string | undefined; action?: string | undefined; kind?: string | undefined; severity?: number | undefined; outcome?: string | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" + "DeepPartial | undefined; uuid?: string | undefined; status_order?: number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; rel?: string | undefined; namespace?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ scheduled?: string | undefined; schedule_delay?: number | undefined; } & {}> | undefined; space_ids?: string[] | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; url?: string | undefined; category?: string[] | undefined; outcome?: string | undefined; code?: string | undefined; original?: string | undefined; action?: string | undefined; kind?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" ], "path": "x-pack/plugins/event_log/server/types.ts", "deprecated": false, @@ -639,7 +639,7 @@ "label": "stopTiming", "description": [], "signature": [ - "(event: DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ scheduled?: string | undefined; schedule_delay?: number | undefined; } & {}> | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; url?: string | undefined; category?: string[] | undefined; code?: string | undefined; original?: string | undefined; action?: string | undefined; kind?: string | undefined; severity?: number | undefined; outcome?: string | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined) => void" + "(event: DeepPartial | undefined; uuid?: string | undefined; status_order?: number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; rel?: string | undefined; namespace?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ scheduled?: string | undefined; schedule_delay?: number | undefined; } & {}> | undefined; space_ids?: string[] | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; url?: string | undefined; category?: string[] | undefined; outcome?: string | undefined; code?: string | undefined; original?: string | undefined; action?: string | undefined; kind?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined) => void" ], "path": "x-pack/plugins/event_log/server/types.ts", "deprecated": false, @@ -652,7 +652,7 @@ "label": "event", "description": [], "signature": [ - "DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ scheduled?: string | undefined; schedule_delay?: number | undefined; } & {}> | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; url?: string | undefined; category?: string[] | undefined; code?: string | undefined; original?: string | undefined; action?: string | undefined; kind?: string | undefined; severity?: number | undefined; outcome?: string | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" + "DeepPartial | undefined; uuid?: string | undefined; status_order?: number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; rel?: string | undefined; namespace?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ scheduled?: string | undefined; schedule_delay?: number | undefined; } & {}> | undefined; space_ids?: string[] | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; url?: string | undefined; category?: string[] | undefined; outcome?: string | undefined; code?: string | undefined; original?: string | undefined; action?: string | undefined; kind?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" ], "path": "x-pack/plugins/event_log/server/types.ts", "deprecated": false, @@ -712,7 +712,7 @@ "label": "data", "description": [], "signature": [ - "(Readonly<{ tags?: string[] | undefined; kibana?: Readonly<{ version?: string | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; rel?: string | undefined; namespace?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ scheduled?: string | undefined; schedule_delay?: number | undefined; } & {}> | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; url?: string | undefined; category?: string[] | undefined; code?: string | undefined; original?: string | undefined; action?: string | undefined; kind?: string | undefined; severity?: number | undefined; outcome?: string | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}> | undefined)[]" + "(Readonly<{ tags?: string[] | undefined; kibana?: Readonly<{ version?: string | undefined; alert?: Readonly<{ rule?: Readonly<{ execution?: Readonly<{ status?: string | undefined; metrics?: Readonly<{ total_indexing_duration_ms?: number | undefined; total_search_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; } & {}> | undefined; uuid?: string | undefined; status_order?: number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; rel?: string | undefined; namespace?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ scheduled?: string | undefined; schedule_delay?: number | undefined; } & {}> | undefined; space_ids?: string[] | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; url?: string | undefined; category?: string[] | undefined; outcome?: string | undefined; code?: string | undefined; original?: string | undefined; action?: string | undefined; kind?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}> | undefined)[]" ], "path": "x-pack/plugins/event_log/server/es/cluster_client_adapter.ts", "deprecated": false @@ -731,7 +731,7 @@ "label": "IEvent", "description": [], "signature": [ - "DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ scheduled?: string | undefined; schedule_delay?: number | undefined; } & {}> | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; url?: string | undefined; category?: string[] | undefined; code?: string | undefined; original?: string | undefined; action?: string | undefined; kind?: string | undefined; severity?: number | undefined; outcome?: string | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" + "DeepPartial | undefined; uuid?: string | undefined; status_order?: number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; rel?: string | undefined; namespace?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ scheduled?: string | undefined; schedule_delay?: number | undefined; } & {}> | undefined; space_ids?: string[] | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; url?: string | undefined; category?: string[] | undefined; outcome?: string | undefined; code?: string | undefined; original?: string | undefined; action?: string | undefined; kind?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" ], "path": "x-pack/plugins/event_log/generated/schemas.ts", "deprecated": false, @@ -745,7 +745,7 @@ "label": "IValidatedEvent", "description": [], "signature": [ - "Readonly<{ tags?: string[] | undefined; kibana?: Readonly<{ version?: string | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; rel?: string | undefined; namespace?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ scheduled?: string | undefined; schedule_delay?: number | undefined; } & {}> | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; url?: string | undefined; category?: string[] | undefined; code?: string | undefined; original?: string | undefined; action?: string | undefined; kind?: string | undefined; severity?: number | undefined; outcome?: string | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}> | undefined" + "Readonly<{ tags?: string[] | undefined; kibana?: Readonly<{ version?: string | undefined; alert?: Readonly<{ rule?: Readonly<{ execution?: Readonly<{ status?: string | undefined; metrics?: Readonly<{ total_indexing_duration_ms?: number | undefined; total_search_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; } & {}> | undefined; uuid?: string | undefined; status_order?: number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; rel?: string | undefined; namespace?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ scheduled?: string | undefined; schedule_delay?: number | undefined; } & {}> | undefined; space_ids?: string[] | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; url?: string | undefined; category?: string[] | undefined; outcome?: string | undefined; code?: string | undefined; original?: string | undefined; action?: string | undefined; kind?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}> | undefined" ], "path": "x-pack/plugins/event_log/generated/schemas.ts", "deprecated": false, @@ -979,7 +979,7 @@ "label": "getLogger", "description": [], "signature": [ - "(properties: DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ scheduled?: string | undefined; schedule_delay?: number | undefined; } & {}> | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; url?: string | undefined; category?: string[] | undefined; code?: string | undefined; original?: string | undefined; action?: string | undefined; kind?: string | undefined; severity?: number | undefined; outcome?: string | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined) => ", + "(properties: DeepPartial | undefined; uuid?: string | undefined; status_order?: number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; rel?: string | undefined; namespace?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ scheduled?: string | undefined; schedule_delay?: number | undefined; } & {}> | undefined; space_ids?: string[] | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; url?: string | undefined; category?: string[] | undefined; outcome?: string | undefined; code?: string | undefined; original?: string | undefined; action?: string | undefined; kind?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined) => ", { "pluginId": "eventLog", "scope": "server", @@ -999,7 +999,7 @@ "label": "properties", "description": [], "signature": [ - "DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ scheduled?: string | undefined; schedule_delay?: number | undefined; } & {}> | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; url?: string | undefined; category?: string[] | undefined; code?: string | undefined; original?: string | undefined; action?: string | undefined; kind?: string | undefined; severity?: number | undefined; outcome?: string | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" + "DeepPartial | undefined; uuid?: string | undefined; status_order?: number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; rel?: string | undefined; namespace?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ scheduled?: string | undefined; schedule_delay?: number | undefined; } & {}> | undefined; space_ids?: string[] | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; end?: string | undefined; url?: string | undefined; category?: string[] | undefined; outcome?: string | undefined; code?: string | undefined; original?: string | undefined; action?: string | undefined; kind?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ id?: string | undefined; description?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" ], "path": "x-pack/plugins/event_log/server/types.ts", "deprecated": false, diff --git a/api_docs/expressions.json b/api_docs/expressions.json index 90432f7bd1c6b..6fcebfeb59446 100644 --- a/api_docs/expressions.json +++ b/api_docs/expressions.json @@ -2494,7 +2494,7 @@ "label": "types", "description": [], "signature": [ - "(string[] & (\"date\" | \"filter\" | ", + "(string[] & (\"filter\" | \"date\" | ", { "pluginId": "expressions", "scope": "common", @@ -2502,7 +2502,7 @@ "section": "def-common.KnownTypeToString", "text": "KnownTypeToString" }, - ")[]) | (string[] & (\"date\" | \"filter\" | ArrayTypeToArgumentString)[]) | (string[] & (\"date\" | \"filter\" | UnresolvedTypeToArgumentString)[]) | (string[] & (\"date\" | \"filter\" | UnresolvedArrayTypeToArgumentString)[]) | undefined" + ")[]) | (string[] & (\"filter\" | \"date\" | ArrayTypeToArgumentString)[]) | (string[] & (\"filter\" | \"date\" | UnresolvedTypeToArgumentString)[]) | (string[] & (\"filter\" | \"date\" | UnresolvedArrayTypeToArgumentString)[]) | undefined" ], "path": "src/plugins/expressions/common/expression_functions/expression_function_parameter.ts", "deprecated": false @@ -7683,7 +7683,7 @@ "\nName of type of value this function outputs." ], "signature": [ - "\"date\" | \"filter\" | ", + "\"filter\" | \"date\" | ", { "pluginId": "expressions", "scope": "common", @@ -10485,57 +10485,6 @@ } ], "initialIsOpen": false - }, - { - "parentPluginId": "expressions", - "id": "def-public.SerializedFieldFormat", - "type": "Interface", - "tags": [], - "label": "SerializedFieldFormat", - "description": [ - "\nJSON representation of a field formatter configuration.\nIs used to carry information about how to format data in\na data table as part of the column definition." - ], - "signature": [ - { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.SerializedFieldFormat", - "text": "SerializedFieldFormat" - }, - "" - ], - "path": "src/plugins/expressions/common/types/common.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "expressions", - "id": "def-public.SerializedFieldFormat.id", - "type": "string", - "tags": [], - "label": "id", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/expressions/common/types/common.ts", - "deprecated": false - }, - { - "parentPluginId": "expressions", - "id": "def-public.SerializedFieldFormat.params", - "type": "Uncategorized", - "tags": [], - "label": "params", - "description": [], - "signature": [ - "TParams | undefined" - ], - "path": "src/plugins/expressions/common/types/common.ts", - "deprecated": false - } - ], - "initialIsOpen": false } ], "enums": [ @@ -10700,7 +10649,7 @@ "\nThis type represents the `type` of any `DatatableColumn` in a `Datatable`.\nits duplicated from KBN_FIELD_TYPES" ], "signature": [ - "\"string\" | \"number\" | \"boolean\" | \"object\" | \"date\" | \"_source\" | \"attachment\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"murmur3\" | \"unknown\" | \"conflict\" | \"nested\" | \"histogram\" | \"null\"" + "\"string\" | \"number\" | \"boolean\" | \"object\" | \"_source\" | \"attachment\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"murmur3\" | \"unknown\" | \"conflict\" | \"nested\" | \"histogram\" | \"null\"" ], "path": "src/plugins/expressions/common/expression_types/specs/datatable.ts", "deprecated": false, @@ -11566,7 +11515,7 @@ "\nThis can convert a type into a known Expression string representation of\nthat type. For example, `TypeToString` will resolve to `'datatable'`.\nThis allows Expression Functions to continue to specify their type in a\nsimple string format." ], "signature": [ - "\"date\" | \"filter\" | ", + "\"filter\" | \"date\" | ", { "pluginId": "expressions", "scope": "common", @@ -11590,7 +11539,7 @@ "\nTypes used in Expressions that don't map to a primitive cleanly:\n\n`date` is typed as a number or string, and represents a date" ], "signature": [ - "\"date\" | \"filter\"" + "\"filter\" | \"date\"" ], "path": "src/plugins/expressions/common/types/common.ts", "deprecated": false, @@ -14178,7 +14127,7 @@ "label": "types", "description": [], "signature": [ - "(string[] & (\"date\" | \"filter\" | ", + "(string[] & (\"filter\" | \"date\" | ", { "pluginId": "expressions", "scope": "common", @@ -14186,7 +14135,7 @@ "section": "def-common.KnownTypeToString", "text": "KnownTypeToString" }, - ")[]) | (string[] & (\"date\" | \"filter\" | ArrayTypeToArgumentString)[]) | (string[] & (\"date\" | \"filter\" | UnresolvedTypeToArgumentString)[]) | (string[] & (\"date\" | \"filter\" | UnresolvedArrayTypeToArgumentString)[]) | undefined" + ")[]) | (string[] & (\"filter\" | \"date\" | ArrayTypeToArgumentString)[]) | (string[] & (\"filter\" | \"date\" | UnresolvedTypeToArgumentString)[]) | (string[] & (\"filter\" | \"date\" | UnresolvedArrayTypeToArgumentString)[]) | undefined" ], "path": "src/plugins/expressions/common/expression_functions/expression_function_parameter.ts", "deprecated": false @@ -17738,7 +17687,7 @@ "\nName of type of value this function outputs." ], "signature": [ - "\"date\" | \"filter\" | ", + "\"filter\" | \"date\" | ", { "pluginId": "expressions", "scope": "common", @@ -19505,57 +19454,6 @@ } ], "initialIsOpen": false - }, - { - "parentPluginId": "expressions", - "id": "def-server.SerializedFieldFormat", - "type": "Interface", - "tags": [], - "label": "SerializedFieldFormat", - "description": [ - "\nJSON representation of a field formatter configuration.\nIs used to carry information about how to format data in\na data table as part of the column definition." - ], - "signature": [ - { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.SerializedFieldFormat", - "text": "SerializedFieldFormat" - }, - "" - ], - "path": "src/plugins/expressions/common/types/common.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "expressions", - "id": "def-server.SerializedFieldFormat.id", - "type": "string", - "tags": [], - "label": "id", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/expressions/common/types/common.ts", - "deprecated": false - }, - { - "parentPluginId": "expressions", - "id": "def-server.SerializedFieldFormat.params", - "type": "Uncategorized", - "tags": [], - "label": "params", - "description": [], - "signature": [ - "TParams | undefined" - ], - "path": "src/plugins/expressions/common/types/common.ts", - "deprecated": false - } - ], - "initialIsOpen": false } ], "enums": [ @@ -19720,7 +19618,7 @@ "\nThis type represents the `type` of any `DatatableColumn` in a `Datatable`.\nits duplicated from KBN_FIELD_TYPES" ], "signature": [ - "\"string\" | \"number\" | \"boolean\" | \"object\" | \"date\" | \"_source\" | \"attachment\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"murmur3\" | \"unknown\" | \"conflict\" | \"nested\" | \"histogram\" | \"null\"" + "\"string\" | \"number\" | \"boolean\" | \"object\" | \"_source\" | \"attachment\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"murmur3\" | \"unknown\" | \"conflict\" | \"nested\" | \"histogram\" | \"null\"" ], "path": "src/plugins/expressions/common/expression_types/specs/datatable.ts", "deprecated": false, @@ -20484,7 +20382,7 @@ "\nThis can convert a type into a known Expression string representation of\nthat type. For example, `TypeToString` will resolve to `'datatable'`.\nThis allows Expression Functions to continue to specify their type in a\nsimple string format." ], "signature": [ - "\"date\" | \"filter\" | ", + "\"filter\" | \"date\" | ", { "pluginId": "expressions", "scope": "common", @@ -20508,7 +20406,7 @@ "\nTypes used in Expressions that don't map to a primitive cleanly:\n\n`date` is typed as a number or string, and represents a date" ], "signature": [ - "\"date\" | \"filter\"" + "\"filter\" | \"date\"" ], "path": "src/plugins/expressions/common/types/common.ts", "deprecated": false, @@ -23053,7 +22951,7 @@ "label": "types", "description": [], "signature": [ - "(string[] & (\"date\" | \"filter\" | ", + "(string[] & (\"filter\" | \"date\" | ", { "pluginId": "expressions", "scope": "common", @@ -23061,7 +22959,7 @@ "section": "def-common.KnownTypeToString", "text": "KnownTypeToString" }, - ")[]) | (string[] & (\"date\" | \"filter\" | ArrayTypeToArgumentString)[]) | (string[] & (\"date\" | \"filter\" | UnresolvedTypeToArgumentString)[]) | (string[] & (\"date\" | \"filter\" | UnresolvedArrayTypeToArgumentString)[]) | undefined" + ")[]) | (string[] & (\"filter\" | \"date\" | ArrayTypeToArgumentString)[]) | (string[] & (\"filter\" | \"date\" | UnresolvedTypeToArgumentString)[]) | (string[] & (\"filter\" | \"date\" | UnresolvedArrayTypeToArgumentString)[]) | undefined" ], "path": "src/plugins/expressions/common/expression_functions/expression_function_parameter.ts", "deprecated": false @@ -27545,7 +27443,7 @@ "label": "type", "description": [], "signature": [ - "\"string\" | \"number\" | \"boolean\" | \"object\" | \"date\" | \"_source\" | \"attachment\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"murmur3\" | \"unknown\" | \"conflict\" | \"nested\" | \"histogram\" | \"null\"" + "\"string\" | \"number\" | \"boolean\" | \"object\" | \"_source\" | \"attachment\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"murmur3\" | \"unknown\" | \"conflict\" | \"nested\" | \"histogram\" | \"null\"" ], "path": "src/plugins/expressions/common/expression_types/specs/datatable.ts", "deprecated": false @@ -27606,13 +27504,21 @@ ], "signature": [ { - "pluginId": "expressions", + "pluginId": "fieldFormats", "scope": "common", - "docId": "kibExpressionsPluginApi", + "docId": "kibFieldFormatsPluginApi", "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "> | undefined" + "<", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormatParams", + "text": "FieldFormatParams" + }, + "> | undefined" ], "path": "src/plugins/expressions/common/expression_types/specs/datatable.ts", "deprecated": false @@ -29673,7 +29579,7 @@ "\nName of type of value this function outputs." ], "signature": [ - "\"date\" | \"filter\" | ", + "\"filter\" | \"date\" | ", { "pluginId": "expressions", "scope": "common", @@ -32775,57 +32681,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "expressions", - "id": "def-common.SerializedFieldFormat", - "type": "Interface", - "tags": [], - "label": "SerializedFieldFormat", - "description": [ - "\nJSON representation of a field formatter configuration.\nIs used to carry information about how to format data in\na data table as part of the column definition." - ], - "signature": [ - { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.SerializedFieldFormat", - "text": "SerializedFieldFormat" - }, - "" - ], - "path": "src/plugins/expressions/common/types/common.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "expressions", - "id": "def-common.SerializedFieldFormat.id", - "type": "string", - "tags": [], - "label": "id", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/expressions/common/types/common.ts", - "deprecated": false - }, - { - "parentPluginId": "expressions", - "id": "def-common.SerializedFieldFormat.params", - "type": "Uncategorized", - "tags": [], - "label": "params", - "description": [], - "signature": [ - "TParams | undefined" - ], - "path": "src/plugins/expressions/common/types/common.ts", - "deprecated": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "expressions", "id": "def-common.UiSettingArguments", @@ -33072,7 +32927,7 @@ "\nThis type represents the `type` of any `DatatableColumn` in a `Datatable`.\nits duplicated from KBN_FIELD_TYPES" ], "signature": [ - "\"string\" | \"number\" | \"boolean\" | \"object\" | \"date\" | \"_source\" | \"attachment\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"murmur3\" | \"unknown\" | \"conflict\" | \"nested\" | \"histogram\" | \"null\"" + "\"string\" | \"number\" | \"boolean\" | \"object\" | \"_source\" | \"attachment\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"murmur3\" | \"unknown\" | \"conflict\" | \"nested\" | \"histogram\" | \"null\"" ], "path": "src/plugins/expressions/common/expression_types/specs/datatable.ts", "deprecated": false, @@ -34708,7 +34563,7 @@ "\nThis can convert a type into a known Expression string representation of\nthat type. For example, `TypeToString` will resolve to `'datatable'`.\nThis allows Expression Functions to continue to specify their type in a\nsimple string format." ], "signature": [ - "\"date\" | \"filter\" | ", + "\"filter\" | \"date\" | ", { "pluginId": "expressions", "scope": "common", @@ -34746,7 +34601,7 @@ "\nTypes used in Expressions that don't map to a primitive cleanly:\n\n`date` is typed as a number or string, and represents a date" ], "signature": [ - "\"date\" | \"filter\"" + "\"filter\" | \"date\"" ], "path": "src/plugins/expressions/common/types/common.ts", "deprecated": false, diff --git a/api_docs/expressions.mdx b/api_docs/expressions.mdx index 82b35631ddfe1..9f086cc496faf 100644 --- a/api_docs/expressions.mdx +++ b/api_docs/expressions.mdx @@ -18,7 +18,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 2095 | 27 | 1646 | 4 | +| 2086 | 27 | 1640 | 4 | ## Client diff --git a/api_docs/fleet.json b/api_docs/fleet.json index 40562c8d06e9e..540489916ba63 100644 --- a/api_docs/fleet.json +++ b/api_docs/fleet.json @@ -2624,7 +2624,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">, id: string, withPackagePolicies?: boolean) => Promise<", + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">, id: string, withPackagePolicies?: boolean) => Promise<", { "pluginId": "fleet", "scope": "common", @@ -2646,25 +2646,7 @@ "label": "soClient", "description": [], "signature": [ - "{ get: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" - }, - ") => Promise<", - "SavedObject", - ">; delete: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsDeleteOptions", - "text": "SavedObjectsDeleteOptions" - }, - ") => Promise<{}>; create: (type: string, attributes: T, options?: ", + "{ create: (type: string, attributes: T, options?: ", { "pluginId": "core", "scope": "server", @@ -2722,7 +2704,15 @@ "section": "def-server.SavedObjectsCheckConflictsResponse", "text": "SavedObjectsCheckConflictsResponse" }, - ">; find: (options: ", + ">; delete: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsDeleteOptions", + "text": "SavedObjectsDeleteOptions" + }, + ") => Promise<{}>; find: (options: ", { "pluginId": "core", "scope": "server", @@ -2786,6 +2776,16 @@ "section": "def-server.SavedObjectsBulkResolveResponse", "text": "SavedObjectsBulkResolveResponse" }, + ">; get: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsBaseOptions", + "text": "SavedObjectsBaseOptions" + }, + ") => Promise<", + "SavedObject", ">; resolve: (type: string, id: string, options?: ", { "pluginId": "core", @@ -3013,7 +3013,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">, options: Readonly<{ page?: number | undefined; perPage?: number | undefined; sortField?: string | undefined; sortOrder?: \"asc\" | \"desc\" | undefined; kuery?: any; showUpgradeable?: boolean | undefined; } & {}> & { withPackagePolicies?: boolean | undefined; }) => Promise<{ items: ", + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">, options: Readonly<{ page?: number | undefined; perPage?: number | undefined; sortField?: string | undefined; sortOrder?: \"asc\" | \"desc\" | undefined; kuery?: any; showUpgradeable?: boolean | undefined; } & {}> & { withPackagePolicies?: boolean | undefined; }) => Promise<{ items: ", { "pluginId": "fleet", "scope": "common", @@ -3035,25 +3035,7 @@ "label": "soClient", "description": [], "signature": [ - "{ get: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" - }, - ") => Promise<", - "SavedObject", - ">; delete: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsDeleteOptions", - "text": "SavedObjectsDeleteOptions" - }, - ") => Promise<{}>; create: (type: string, attributes: T, options?: ", + "{ create: (type: string, attributes: T, options?: ", { "pluginId": "core", "scope": "server", @@ -3111,7 +3093,15 @@ "section": "def-server.SavedObjectsCheckConflictsResponse", "text": "SavedObjectsCheckConflictsResponse" }, - ">; find: (options: ", + ">; delete: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsDeleteOptions", + "text": "SavedObjectsDeleteOptions" + }, + ") => Promise<{}>; find: (options: ", { "pluginId": "core", "scope": "server", @@ -3175,6 +3165,16 @@ "section": "def-server.SavedObjectsBulkResolveResponse", "text": "SavedObjectsBulkResolveResponse" }, + ">; get: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsBaseOptions", + "text": "SavedObjectsBaseOptions" + }, + ") => Promise<", + "SavedObject", ">; resolve: (type: string, id: string, options?: ", { "pluginId": "core", @@ -3395,7 +3395,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">) => Promise" + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">) => Promise" ], "path": "x-pack/plugins/fleet/server/services/index.ts", "deprecated": false, @@ -3409,25 +3409,7 @@ "label": "soClient", "description": [], "signature": [ - "{ get: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" - }, - ") => Promise<", - "SavedObject", - ">; delete: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsDeleteOptions", - "text": "SavedObjectsDeleteOptions" - }, - ") => Promise<{}>; create: (type: string, attributes: T, options?: ", + "{ create: (type: string, attributes: T, options?: ", { "pluginId": "core", "scope": "server", @@ -3485,7 +3467,15 @@ "section": "def-server.SavedObjectsCheckConflictsResponse", "text": "SavedObjectsCheckConflictsResponse" }, - ">; find: (options: ", + ">; delete: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsDeleteOptions", + "text": "SavedObjectsDeleteOptions" + }, + ") => Promise<{}>; find: (options: ", { "pluginId": "core", "scope": "server", @@ -3549,6 +3539,16 @@ "section": "def-server.SavedObjectsBulkResolveResponse", "text": "SavedObjectsBulkResolveResponse" }, + ">; get: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsBaseOptions", + "text": "SavedObjectsBaseOptions" + }, + ") => Promise<", + "SavedObject", ">; resolve: (type: string, id: string, options?: ", { "pluginId": "core", @@ -3756,7 +3756,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">, id: string, options?: { standalone: boolean; } | undefined) => Promise<", + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">, id: string, options?: { standalone: boolean; } | undefined) => Promise<", { "pluginId": "fleet", "scope": "common", @@ -3778,25 +3778,7 @@ "label": "soClient", "description": [], "signature": [ - "{ get: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" - }, - ") => Promise<", - "SavedObject", - ">; delete: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsDeleteOptions", - "text": "SavedObjectsDeleteOptions" - }, - ") => Promise<{}>; create: (type: string, attributes: T, options?: ", + "{ create: (type: string, attributes: T, options?: ", { "pluginId": "core", "scope": "server", @@ -3854,7 +3836,15 @@ "section": "def-server.SavedObjectsCheckConflictsResponse", "text": "SavedObjectsCheckConflictsResponse" }, - ">; find: (options: ", + ">; delete: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsDeleteOptions", + "text": "SavedObjectsDeleteOptions" + }, + ") => Promise<{}>; find: (options: ", { "pluginId": "core", "scope": "server", @@ -3918,6 +3908,16 @@ "section": "def-server.SavedObjectsBulkResolveResponse", "text": "SavedObjectsBulkResolveResponse" }, + ">; get: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsBaseOptions", + "text": "SavedObjectsBaseOptions" + }, + ") => Promise<", + "SavedObject", ">; resolve: (type: string, id: string, options?: ", { "pluginId": "core", @@ -4148,7 +4148,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">, ids: string[], options?: { fields?: string[] | undefined; }) => Promise<", + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">, ids: string[], options?: { fields?: string[] | undefined; }) => Promise<", { "pluginId": "fleet", "scope": "common", @@ -4170,25 +4170,7 @@ "label": "soClient", "description": [], "signature": [ - "{ get: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" - }, - ") => Promise<", - "SavedObject", - ">; delete: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsDeleteOptions", - "text": "SavedObjectsDeleteOptions" - }, - ") => Promise<{}>; create: (type: string, attributes: T, options?: ", + "{ create: (type: string, attributes: T, options?: ", { "pluginId": "core", "scope": "server", @@ -4246,7 +4228,15 @@ "section": "def-server.SavedObjectsCheckConflictsResponse", "text": "SavedObjectsCheckConflictsResponse" }, - ">; find: (options: ", + ">; delete: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsDeleteOptions", + "text": "SavedObjectsDeleteOptions" + }, + ") => Promise<{}>; find: (options: ", { "pluginId": "core", "scope": "server", @@ -4310,6 +4300,16 @@ "section": "def-server.SavedObjectsBulkResolveResponse", "text": "SavedObjectsBulkResolveResponse" }, + ">; get: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsBaseOptions", + "text": "SavedObjectsBaseOptions" + }, + ") => Promise<", + "SavedObject", ">; resolve: (type: string, id: string, options?: ", { "pluginId": "core", @@ -4584,7 +4584,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", @@ -4876,7 +4876,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", @@ -5231,7 +5231,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">, pkgName: string, datasetPath: string) => Promise" + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">, pkgName: string, datasetPath: string) => Promise" ], "path": "x-pack/plugins/fleet/server/services/index.ts", "deprecated": false, @@ -5252,7 +5252,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">" + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">" ], "path": "x-pack/plugins/fleet/server/services/index.ts", "deprecated": false, @@ -5451,7 +5451,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">; pkgName: string; }) => Promise<", + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">; pkgName: string; }) => Promise<", { "pluginId": "fleet", "scope": "common", @@ -5481,7 +5481,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">; pkgName: string; }" + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">; pkgName: string; }" ], "path": "x-pack/plugins/fleet/server/services/epm/packages/get.ts", "deprecated": false @@ -6579,7 +6579,7 @@ "section": "def-common.RegistryPackage", "text": "RegistryPackage" }, - ", \"type\" | \"title\" | \"description\" | \"icons\" | \"name\" | \"version\" | \"path\" | \"download\" | \"internal\" | \"data_streams\" | \"release\" | \"policy_templates\"> & { status: \"installed\"; savedObject: ", + ", \"type\" | \"title\" | \"description\" | \"icons\" | \"categories\" | \"name\" | \"version\" | \"path\" | \"download\" | \"internal\" | \"data_streams\" | \"release\" | \"policy_templates\"> & { status: \"installed\"; savedObject: ", "SavedObject", "<", { @@ -6597,7 +6597,7 @@ "section": "def-common.RegistryPackage", "text": "RegistryPackage" }, - ", \"type\" | \"title\" | \"description\" | \"icons\" | \"name\" | \"version\" | \"path\" | \"download\" | \"internal\" | \"data_streams\" | \"release\" | \"policy_templates\"> & { status: \"installing\"; savedObject: ", + ", \"type\" | \"title\" | \"description\" | \"icons\" | \"categories\" | \"name\" | \"version\" | \"path\" | \"download\" | \"internal\" | \"data_streams\" | \"release\" | \"policy_templates\"> & { status: \"installing\"; savedObject: ", "SavedObject", "<", { @@ -6615,7 +6615,7 @@ "section": "def-common.RegistryPackage", "text": "RegistryPackage" }, - ", \"type\" | \"title\" | \"description\" | \"icons\" | \"name\" | \"version\" | \"path\" | \"download\" | \"internal\" | \"data_streams\" | \"release\" | \"policy_templates\"> & { status: \"not_installed\"; } & { integration?: string | undefined; id: string; }) | (Pick<", + ", \"type\" | \"title\" | \"description\" | \"icons\" | \"categories\" | \"name\" | \"version\" | \"path\" | \"download\" | \"internal\" | \"data_streams\" | \"release\" | \"policy_templates\"> & { status: \"not_installed\"; } & { integration?: string | undefined; id: string; }) | (Pick<", { "pluginId": "fleet", "scope": "common", @@ -6623,7 +6623,7 @@ "section": "def-common.RegistryPackage", "text": "RegistryPackage" }, - ", \"type\" | \"title\" | \"description\" | \"icons\" | \"name\" | \"version\" | \"path\" | \"download\" | \"internal\" | \"data_streams\" | \"release\" | \"policy_templates\"> & { status: \"install_failed\"; } & { integration?: string | undefined; id: string; })) => boolean" + ", \"type\" | \"title\" | \"description\" | \"icons\" | \"categories\" | \"name\" | \"version\" | \"path\" | \"download\" | \"internal\" | \"data_streams\" | \"release\" | \"policy_templates\"> & { status: \"install_failed\"; } & { integration?: string | undefined; id: string; })) => boolean" ], "path": "x-pack/plugins/fleet/common/services/packages_with_integrations.ts", "deprecated": false, @@ -6835,7 +6835,7 @@ "section": "def-common.RegistryPackage", "text": "RegistryPackage" }, - ", \"type\" | \"title\" | \"description\" | \"icons\" | \"name\" | \"version\" | \"path\" | \"download\" | \"internal\" | \"data_streams\" | \"release\" | \"policy_templates\"> & { status: \"installed\"; savedObject: ", + ", \"type\" | \"title\" | \"description\" | \"icons\" | \"categories\" | \"name\" | \"version\" | \"path\" | \"download\" | \"internal\" | \"data_streams\" | \"release\" | \"policy_templates\"> & { status: \"installed\"; savedObject: ", "SavedObject", "<", { @@ -6853,7 +6853,7 @@ "section": "def-common.RegistryPackage", "text": "RegistryPackage" }, - ", \"type\" | \"title\" | \"description\" | \"icons\" | \"name\" | \"version\" | \"path\" | \"download\" | \"internal\" | \"data_streams\" | \"release\" | \"policy_templates\"> & { status: \"installing\"; savedObject: ", + ", \"type\" | \"title\" | \"description\" | \"icons\" | \"categories\" | \"name\" | \"version\" | \"path\" | \"download\" | \"internal\" | \"data_streams\" | \"release\" | \"policy_templates\"> & { status: \"installing\"; savedObject: ", "SavedObject", "<", { @@ -6871,7 +6871,7 @@ "section": "def-common.RegistryPackage", "text": "RegistryPackage" }, - ", \"type\" | \"title\" | \"description\" | \"icons\" | \"name\" | \"version\" | \"path\" | \"download\" | \"internal\" | \"data_streams\" | \"release\" | \"policy_templates\"> & { status: \"not_installed\"; } & { integration?: string | undefined; id: string; }) | (Pick<", + ", \"type\" | \"title\" | \"description\" | \"icons\" | \"categories\" | \"name\" | \"version\" | \"path\" | \"download\" | \"internal\" | \"data_streams\" | \"release\" | \"policy_templates\"> & { status: \"not_installed\"; } & { integration?: string | undefined; id: string; }) | (Pick<", { "pluginId": "fleet", "scope": "common", @@ -6879,7 +6879,7 @@ "section": "def-common.RegistryPackage", "text": "RegistryPackage" }, - ", \"type\" | \"title\" | \"description\" | \"icons\" | \"name\" | \"version\" | \"path\" | \"download\" | \"internal\" | \"data_streams\" | \"release\" | \"policy_templates\"> & { status: \"install_failed\"; } & { integration?: string | undefined; id: string; })" + ", \"type\" | \"title\" | \"description\" | \"icons\" | \"categories\" | \"name\" | \"version\" | \"path\" | \"download\" | \"internal\" | \"data_streams\" | \"release\" | \"policy_templates\"> & { status: \"install_failed\"; } & { integration?: string | undefined; id: string; })" ], "path": "x-pack/plugins/fleet/common/services/packages_with_integrations.ts", "deprecated": false, @@ -7854,7 +7854,7 @@ "label": "status", "description": [], "signature": [ - "\"warning\" | \"offline\" | \"online\" | \"error\" | \"inactive\" | \"enrolling\" | \"unenrolling\" | \"updating\" | \"degraded\" | undefined" + "\"offline\" | \"online\" | \"error\" | \"warning\" | \"inactive\" | \"enrolling\" | \"unenrolling\" | \"updating\" | \"degraded\" | undefined" ], "path": "x-pack/plugins/fleet/common/types/models/agent.ts", "deprecated": false @@ -11241,7 +11241,7 @@ "label": "missing_requirements", "description": [], "signature": [ - "(\"fleet_server\" | \"tls_required\" | \"api_keys\" | \"fleet_admin_user\" | \"encrypted_saved_object_encryption_key_required\")[]" + "(\"fleet_server\" | \"security_required\" | \"tls_required\" | \"api_keys\" | \"fleet_admin_user\" | \"encrypted_saved_object_encryption_key_required\")[]" ], "path": "x-pack/plugins/fleet/common/types/rest_spec/fleet_setup.ts", "deprecated": false @@ -12795,6 +12795,19 @@ "description": [], "path": "x-pack/plugins/fleet/common/types/models/epm.ts", "deprecated": false + }, + { + "parentPluginId": "fleet", + "id": "def-common.IntegrationCardItem.categories", + "type": "Array", + "tags": [], + "label": "categories", + "description": [], + "signature": [ + "string[]" + ], + "path": "x-pack/plugins/fleet/common/types/models/epm.ts", + "deprecated": false } ], "initialIsOpen": false @@ -13668,7 +13681,7 @@ "section": "def-common.NewPackagePolicy", "text": "NewPackagePolicy" }, - ", \"enabled\" | \"description\" | \"name\" | \"package\" | \"policy_id\" | \"namespace\" | \"output_id\" | \"vars\">" + ", \"description\" | \"name\" | \"enabled\" | \"package\" | \"policy_id\" | \"namespace\" | \"output_id\" | \"vars\">" ], "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", "deprecated": false, @@ -14857,7 +14870,7 @@ "section": "def-common.NewPackagePolicy", "text": "NewPackagePolicy" }, - ", \"enabled\" | \"description\" | \"name\" | \"policy_id\" | \"namespace\" | \"output_id\" | \"vars\">> & { name: string; package: Partial<", + ", \"description\" | \"name\" | \"enabled\" | \"policy_id\" | \"namespace\" | \"output_id\" | \"vars\">> & { name: string; package: Partial<", { "pluginId": "fleet", "scope": "common", @@ -17011,7 +17024,7 @@ "label": "AgentStatus", "description": [], "signature": [ - "\"warning\" | \"offline\" | \"online\" | \"error\" | \"inactive\" | \"enrolling\" | \"unenrolling\" | \"updating\" | \"degraded\"" + "\"offline\" | \"online\" | \"error\" | \"warning\" | \"inactive\" | \"enrolling\" | \"unenrolling\" | \"updating\" | \"degraded\"" ], "path": "x-pack/plugins/fleet/common/types/models/agent.ts", "deprecated": false, @@ -17662,6 +17675,20 @@ "deprecated": false, "initialIsOpen": false }, + { + "parentPluginId": "fleet", + "id": "def-common.FLEET_APM_PACKAGE", + "type": "string", + "tags": [], + "label": "FLEET_APM_PACKAGE", + "description": [], + "signature": [ + "\"apm\"" + ], + "path": "x-pack/plugins/fleet/common/constants/epm.ts", + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "fleet", "id": "def-common.FLEET_ELASTIC_AGENT_PACKAGE", @@ -17760,6 +17787,20 @@ "deprecated": false, "initialIsOpen": false }, + { + "parentPluginId": "fleet", + "id": "def-common.FLEET_SYNTHETICS_PACKAGE", + "type": "string", + "tags": [], + "label": "FLEET_SYNTHETICS_PACKAGE", + "description": [], + "signature": [ + "\"synthetics\"" + ], + "path": "x-pack/plugins/fleet/common/constants/epm.ts", + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "fleet", "id": "def-common.FLEET_SYSTEM_PACKAGE", @@ -18631,7 +18672,7 @@ "section": "def-common.RegistryPackage", "text": "RegistryPackage" }, - ", \"type\" | \"title\" | \"description\" | \"icons\" | \"name\" | \"version\" | \"path\" | \"download\" | \"internal\" | \"data_streams\" | \"release\" | \"policy_templates\"> & { status: \"installed\"; savedObject: ", + ", \"type\" | \"title\" | \"description\" | \"icons\" | \"categories\" | \"name\" | \"version\" | \"path\" | \"download\" | \"internal\" | \"data_streams\" | \"release\" | \"policy_templates\"> & { status: \"installed\"; savedObject: ", "SavedObject", "<", { @@ -18649,7 +18690,7 @@ "section": "def-common.RegistryPackage", "text": "RegistryPackage" }, - ", \"type\" | \"title\" | \"description\" | \"icons\" | \"name\" | \"version\" | \"path\" | \"download\" | \"internal\" | \"data_streams\" | \"release\" | \"policy_templates\"> & { status: \"installing\"; savedObject: ", + ", \"type\" | \"title\" | \"description\" | \"icons\" | \"categories\" | \"name\" | \"version\" | \"path\" | \"download\" | \"internal\" | \"data_streams\" | \"release\" | \"policy_templates\"> & { status: \"installing\"; savedObject: ", "SavedObject", "<", { @@ -18667,7 +18708,7 @@ "section": "def-common.RegistryPackage", "text": "RegistryPackage" }, - ", \"type\" | \"title\" | \"description\" | \"icons\" | \"name\" | \"version\" | \"path\" | \"download\" | \"internal\" | \"data_streams\" | \"release\" | \"policy_templates\"> & { status: \"not_installed\"; } & { integration?: string | undefined; id: string; }) | (Pick<", + ", \"type\" | \"title\" | \"description\" | \"icons\" | \"categories\" | \"name\" | \"version\" | \"path\" | \"download\" | \"internal\" | \"data_streams\" | \"release\" | \"policy_templates\"> & { status: \"not_installed\"; } & { integration?: string | undefined; id: string; }) | (Pick<", { "pluginId": "fleet", "scope": "common", @@ -18675,7 +18716,7 @@ "section": "def-common.RegistryPackage", "text": "RegistryPackage" }, - ", \"type\" | \"title\" | \"description\" | \"icons\" | \"name\" | \"version\" | \"path\" | \"download\" | \"internal\" | \"data_streams\" | \"release\" | \"policy_templates\"> & { status: \"install_failed\"; } & { integration?: string | undefined; id: string; })" + ", \"type\" | \"title\" | \"description\" | \"icons\" | \"categories\" | \"name\" | \"version\" | \"path\" | \"download\" | \"internal\" | \"data_streams\" | \"release\" | \"policy_templates\"> & { status: \"install_failed\"; } & { integration?: string | undefined; id: string; })" ], "path": "x-pack/plugins/fleet/common/types/models/epm.ts", "deprecated": false, @@ -18740,7 +18781,7 @@ "label": "PackagePolicySOAttributes", "description": [], "signature": [ - "{ enabled: boolean; description?: string | undefined; name: string; package?: ", + "{ description?: string | undefined; name: string; enabled: boolean; package?: ", { "pluginId": "fleet", "scope": "common", @@ -19066,7 +19107,7 @@ "section": "def-common.RegistryImage", "text": "RegistryImage" }, - "[]) | undefined; name: string; version: string; path: string; download: string; internal?: boolean | undefined; data_streams?: ", + "[]) | undefined; categories?: (\"custom\" | \"aws\" | \"azure\" | \"cloud\" | \"config_management\" | \"containers\" | \"crm\" | \"datastore\" | \"elastic_stack\" | \"google_cloud\" | \"kubernetes\" | \"languages\" | \"message_queue\" | \"monitoring\" | \"network\" | \"notification\" | \"os_system\" | \"productivity\" | \"security\" | \"support\" | \"ticketing\" | \"version_control\" | \"web\" | undefined)[] | undefined; name: string; version: string; path: string; download: string; internal?: boolean | undefined; data_streams?: ", { "pluginId": "fleet", "scope": "common", @@ -19104,7 +19145,7 @@ "section": "def-common.RegistryPackage", "text": "RegistryPackage" }, - ", \"type\" | \"title\" | \"description\" | \"icons\" | \"name\" | \"version\" | \"path\" | \"download\" | \"internal\" | \"data_streams\" | \"release\" | \"policy_templates\">[]" + ", \"type\" | \"title\" | \"description\" | \"icons\" | \"categories\" | \"name\" | \"version\" | \"path\" | \"download\" | \"internal\" | \"data_streams\" | \"release\" | \"policy_templates\">[]" ], "path": "x-pack/plugins/fleet/common/types/models/epm.ts", "deprecated": false, diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index 88d006982d0f0..3d01ccbb559a1 100644 --- a/api_docs/fleet.mdx +++ b/api_docs/fleet.mdx @@ -18,7 +18,7 @@ Contact [Fleet](https://github.com/orgs/elastic/teams/fleet) for questions regar | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 1207 | 15 | 1107 | 10 | +| 1210 | 15 | 1110 | 10 | ## Client diff --git a/api_docs/global_search.json b/api_docs/global_search.json index a8b5ca35c634e..7dd6198974f6c 100644 --- a/api_docs/global_search.json +++ b/api_docs/global_search.json @@ -625,7 +625,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">; typeRegistry: Pick<", + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">; typeRegistry: Pick<", { "pluginId": "core", "scope": "server", diff --git a/api_docs/home.json b/api_docs/home.json index 585bd6b18d07b..1bda24024cf7c 100644 --- a/api_docs/home.json +++ b/api_docs/home.json @@ -959,7 +959,7 @@ "label": "InstructionsSchema", "description": [], "signature": [ - "{ readonly params?: Readonly<{ defaultValue?: any; } & { type: \"string\" | \"number\"; label: string; id: string; }>[] | undefined; readonly instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ iconType?: string | undefined; message?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ title?: string | undefined; text?: string | undefined; error?: string | undefined; success?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { query: Record; index: string | string[]; }>; }> | undefined; } & { instructionVariants: Readonly<{} & { id: string; instructions: Readonly<{ title?: string | undefined; commands?: string[] | undefined; textPre?: string | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }" + "{ readonly params?: Readonly<{ defaultValue?: any; } & { label: string; type: \"string\" | \"number\"; id: string; }>[] | undefined; readonly instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ iconType?: string | undefined; message?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ title?: string | undefined; text?: string | undefined; error?: string | undefined; success?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { query: Record; index: string | string[]; }>; }> | undefined; } & { instructionVariants: Readonly<{} & { id: string; instructions: Readonly<{ title?: string | undefined; commands?: string[] | undefined; textPre?: string | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }" ], "path": "src/plugins/home/server/services/tutorials/lib/tutorial_schema.ts", "deprecated": false, @@ -981,7 +981,7 @@ "section": "def-server.Writable", "text": "Writable" }, - "[]; defaultIndex: string; previewImagePath: string; overviewDashboard: string; appLinks: Readonly<{} & { label: string; path: string; icon: string; }>[]; dataIndices: Readonly<{} & { id: string; fields: Record; timeFields: string[]; dataPath: string; currentTimeMarker: string; preserveDayOfWeekTimeOfDay: boolean; }>[]; }>>[]; addSavedObjectsToSampleDataset: (id: string, savedObjects: ", + "[]; previewImagePath: string; overviewDashboard: string; appLinks: Readonly<{} & { label: string; path: string; icon: string; }>[]; dataIndices: Readonly<{} & { id: string; fields: Record; timeFields: string[]; dataPath: string; currentTimeMarker: string; preserveDayOfWeekTimeOfDay: boolean; }>[]; }>>[]; addSavedObjectsToSampleDataset: (id: string, savedObjects: ", "SavedObject", "[]) => void; addAppLinksToSampleDataset: (id: string, appLinks: Readonly<{} & { label: string; path: string; icon: string; }>[]) => void; replacePanelInSampleDatasetDashboard: ({ sampleDataId, dashboardId, oldEmbeddableId, embeddableId, embeddableType, embeddableConfig, }: ", "SampleDatasetDashboardPanel", @@ -1007,7 +1007,7 @@ "section": "def-server.Writable", "text": "Writable" }, - "[]; defaultIndex: string; previewImagePath: string; overviewDashboard: string; appLinks: Readonly<{} & { label: string; path: string; icon: string; }>[]; dataIndices: Readonly<{} & { id: string; fields: Record; timeFields: string[]; dataPath: string; currentTimeMarker: string; preserveDayOfWeekTimeOfDay: boolean; }>[]; }>>" + "[]; previewImagePath: string; overviewDashboard: string; appLinks: Readonly<{} & { label: string; path: string; icon: string; }>[]; dataIndices: Readonly<{} & { id: string; fields: Record; timeFields: string[]; dataPath: string; currentTimeMarker: string; preserveDayOfWeekTimeOfDay: boolean; }>[]; }>>" ], "path": "src/plugins/home/server/services/sample_data/lib/sample_dataset_registry_types.ts", "deprecated": false, @@ -1025,7 +1025,7 @@ "signature": [ "(context: ", "TutorialContext", - ") => Readonly<{ isBeta?: boolean | undefined; savedObjects?: any[] | undefined; euiIconType?: string | undefined; previewImagePath?: string | undefined; moduleName?: string | undefined; completionTimeMinutes?: number | undefined; elasticCloud?: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { type: \"string\" | \"number\"; label: string; id: string; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ iconType?: string | undefined; message?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ title?: string | undefined; text?: string | undefined; error?: string | undefined; success?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { query: Record; index: string | string[]; }>; }> | undefined; } & { instructionVariants: Readonly<{} & { id: string; instructions: Readonly<{ title?: string | undefined; commands?: string[] | undefined; textPre?: string | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }> | undefined; onPremElasticCloud?: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { type: \"string\" | \"number\"; label: string; id: string; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ iconType?: string | undefined; message?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ title?: string | undefined; text?: string | undefined; error?: string | undefined; success?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { query: Record; index: string | string[]; }>; }> | undefined; } & { instructionVariants: Readonly<{} & { id: string; instructions: Readonly<{ title?: string | undefined; commands?: string[] | undefined; textPre?: string | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }> | undefined; artifacts?: Readonly<{ application?: Readonly<{} & { label: string; path: string; }> | undefined; exportedFields?: Readonly<{} & { documentationUrl: string; }> | undefined; } & { dashboards: Readonly<{ linkLabel?: string | undefined; } & { id: string; isOverview: boolean; }>[]; }> | undefined; savedObjectsInstallMsg?: string | undefined; customStatusCheckName?: string | undefined; integrationBrowserCategories?: string[] | undefined; eprPackageOverlap?: string | undefined; } & { id: string; name: string; category: \"security\" | \"metrics\" | \"other\" | \"logging\"; shortDescription: string; longDescription: string; onPrem: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { type: \"string\" | \"number\"; label: string; id: string; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ iconType?: string | undefined; message?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ title?: string | undefined; text?: string | undefined; error?: string | undefined; success?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { query: Record; index: string | string[]; }>; }> | undefined; } & { instructionVariants: Readonly<{} & { id: string; instructions: Readonly<{ title?: string | undefined; commands?: string[] | undefined; textPre?: string | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }>; }>" + ") => Readonly<{ isBeta?: boolean | undefined; savedObjects?: any[] | undefined; euiIconType?: string | undefined; previewImagePath?: string | undefined; moduleName?: string | undefined; completionTimeMinutes?: number | undefined; elasticCloud?: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { label: string; type: \"string\" | \"number\"; id: string; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ iconType?: string | undefined; message?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ title?: string | undefined; text?: string | undefined; error?: string | undefined; success?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { query: Record; index: string | string[]; }>; }> | undefined; } & { instructionVariants: Readonly<{} & { id: string; instructions: Readonly<{ title?: string | undefined; commands?: string[] | undefined; textPre?: string | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }> | undefined; onPremElasticCloud?: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { label: string; type: \"string\" | \"number\"; id: string; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ iconType?: string | undefined; message?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ title?: string | undefined; text?: string | undefined; error?: string | undefined; success?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { query: Record; index: string | string[]; }>; }> | undefined; } & { instructionVariants: Readonly<{} & { id: string; instructions: Readonly<{ title?: string | undefined; commands?: string[] | undefined; textPre?: string | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }> | undefined; artifacts?: Readonly<{ application?: Readonly<{} & { label: string; path: string; }> | undefined; exportedFields?: Readonly<{} & { documentationUrl: string; }> | undefined; } & { dashboards: Readonly<{ linkLabel?: string | undefined; } & { id: string; isOverview: boolean; }>[]; }> | undefined; savedObjectsInstallMsg?: string | undefined; customStatusCheckName?: string | undefined; integrationBrowserCategories?: string[] | undefined; eprPackageOverlap?: string | undefined; } & { id: string; name: string; category: \"other\" | \"security\" | \"metrics\" | \"logging\"; shortDescription: string; longDescription: string; onPrem: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { label: string; type: \"string\" | \"number\"; id: string; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ iconType?: string | undefined; message?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ title?: string | undefined; text?: string | undefined; error?: string | undefined; success?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { query: Record; index: string | string[]; }>; }> | undefined; } & { instructionVariants: Readonly<{} & { id: string; instructions: Readonly<{ title?: string | undefined; commands?: string[] | undefined; textPre?: string | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }>; }>" ], "path": "src/plugins/home/server/services/tutorials/lib/tutorials_registry_types.ts", "deprecated": false, @@ -1055,7 +1055,7 @@ "label": "TutorialSchema", "description": [], "signature": [ - "{ readonly isBeta?: boolean | undefined; readonly savedObjects?: any[] | undefined; readonly euiIconType?: string | undefined; readonly previewImagePath?: string | undefined; readonly moduleName?: string | undefined; readonly completionTimeMinutes?: number | undefined; readonly elasticCloud?: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { type: \"string\" | \"number\"; label: string; id: string; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ iconType?: string | undefined; message?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ title?: string | undefined; text?: string | undefined; error?: string | undefined; success?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { query: Record; index: string | string[]; }>; }> | undefined; } & { instructionVariants: Readonly<{} & { id: string; instructions: Readonly<{ title?: string | undefined; commands?: string[] | undefined; textPre?: string | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }> | undefined; readonly onPremElasticCloud?: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { type: \"string\" | \"number\"; label: string; id: string; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ iconType?: string | undefined; message?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ title?: string | undefined; text?: string | undefined; error?: string | undefined; success?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { query: Record; index: string | string[]; }>; }> | undefined; } & { instructionVariants: Readonly<{} & { id: string; instructions: Readonly<{ title?: string | undefined; commands?: string[] | undefined; textPre?: string | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }> | undefined; readonly artifacts?: Readonly<{ application?: Readonly<{} & { label: string; path: string; }> | undefined; exportedFields?: Readonly<{} & { documentationUrl: string; }> | undefined; } & { dashboards: Readonly<{ linkLabel?: string | undefined; } & { id: string; isOverview: boolean; }>[]; }> | undefined; readonly savedObjectsInstallMsg?: string | undefined; readonly customStatusCheckName?: string | undefined; readonly integrationBrowserCategories?: string[] | undefined; readonly eprPackageOverlap?: string | undefined; readonly id: string; readonly name: string; readonly category: \"security\" | \"metrics\" | \"other\" | \"logging\"; readonly shortDescription: string; readonly longDescription: string; readonly onPrem: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { type: \"string\" | \"number\"; label: string; id: string; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ iconType?: string | undefined; message?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ title?: string | undefined; text?: string | undefined; error?: string | undefined; success?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { query: Record; index: string | string[]; }>; }> | undefined; } & { instructionVariants: Readonly<{} & { id: string; instructions: Readonly<{ title?: string | undefined; commands?: string[] | undefined; textPre?: string | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }>; }" + "{ readonly isBeta?: boolean | undefined; readonly savedObjects?: any[] | undefined; readonly euiIconType?: string | undefined; readonly previewImagePath?: string | undefined; readonly moduleName?: string | undefined; readonly completionTimeMinutes?: number | undefined; readonly elasticCloud?: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { label: string; type: \"string\" | \"number\"; id: string; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ iconType?: string | undefined; message?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ title?: string | undefined; text?: string | undefined; error?: string | undefined; success?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { query: Record; index: string | string[]; }>; }> | undefined; } & { instructionVariants: Readonly<{} & { id: string; instructions: Readonly<{ title?: string | undefined; commands?: string[] | undefined; textPre?: string | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }> | undefined; readonly onPremElasticCloud?: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { label: string; type: \"string\" | \"number\"; id: string; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ iconType?: string | undefined; message?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ title?: string | undefined; text?: string | undefined; error?: string | undefined; success?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { query: Record; index: string | string[]; }>; }> | undefined; } & { instructionVariants: Readonly<{} & { id: string; instructions: Readonly<{ title?: string | undefined; commands?: string[] | undefined; textPre?: string | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }> | undefined; readonly artifacts?: Readonly<{ application?: Readonly<{} & { label: string; path: string; }> | undefined; exportedFields?: Readonly<{} & { documentationUrl: string; }> | undefined; } & { dashboards: Readonly<{ linkLabel?: string | undefined; } & { id: string; isOverview: boolean; }>[]; }> | undefined; readonly savedObjectsInstallMsg?: string | undefined; readonly customStatusCheckName?: string | undefined; readonly integrationBrowserCategories?: string[] | undefined; readonly eprPackageOverlap?: string | undefined; readonly id: string; readonly name: string; readonly category: \"other\" | \"security\" | \"metrics\" | \"logging\"; readonly shortDescription: string; readonly longDescription: string; readonly onPrem: Readonly<{ params?: Readonly<{ defaultValue?: any; } & { label: string; type: \"string\" | \"number\"; id: string; }>[] | undefined; } & { instructionSets: Readonly<{ title?: string | undefined; callOut?: Readonly<{ iconType?: string | undefined; message?: string | undefined; } & { title: string; }> | undefined; statusCheck?: Readonly<{ title?: string | undefined; text?: string | undefined; error?: string | undefined; success?: string | undefined; btnLabel?: string | undefined; } & { esHitsCheck: Readonly<{} & { query: Record; index: string | string[]; }>; }> | undefined; } & { instructionVariants: Readonly<{} & { id: string; instructions: Readonly<{ title?: string | undefined; commands?: string[] | undefined; textPre?: string | undefined; textPost?: string | undefined; customComponentName?: string | undefined; } & {}>[]; }>[]; }>[]; }>; }" ], "path": "src/plugins/home/server/services/tutorials/lib/tutorial_schema.ts", "deprecated": false, @@ -1314,7 +1314,7 @@ "section": "def-server.Writable", "text": "Writable" }, - "[]; defaultIndex: string; previewImagePath: string; overviewDashboard: string; appLinks: Readonly<{} & { label: string; path: string; icon: string; }>[]; dataIndices: Readonly<{} & { id: string; fields: Record; timeFields: string[]; dataPath: string; currentTimeMarker: string; preserveDayOfWeekTimeOfDay: boolean; }>[]; }>>[]; addSavedObjectsToSampleDataset: (id: string, savedObjects: ", + "[]; previewImagePath: string; overviewDashboard: string; appLinks: Readonly<{} & { label: string; path: string; icon: string; }>[]; dataIndices: Readonly<{} & { id: string; fields: Record; timeFields: string[]; dataPath: string; currentTimeMarker: string; preserveDayOfWeekTimeOfDay: boolean; }>[]; }>>[]; addSavedObjectsToSampleDataset: (id: string, savedObjects: ", "SavedObject", "[]) => void; addAppLinksToSampleDataset: (id: string, appLinks: Readonly<{} & { label: string; path: string; icon: string; }>[]) => void; replacePanelInSampleDatasetDashboard: ({ sampleDataId, dashboardId, oldEmbeddableId, embeddableId, embeddableType, embeddableConfig, }: ", "SampleDatasetDashboardPanel", diff --git a/api_docs/kbn_dev_utils.json b/api_docs/kbn_dev_utils.json index 04ce7aebc51e6..1fea3bfd21ae8 100644 --- a/api_docs/kbn_dev_utils.json +++ b/api_docs/kbn_dev_utils.json @@ -26,7 +26,9 @@ "type": "Function", "tags": [], "label": "fromEnv", - "description": [], + "description": [ + "\nCreate a CiStatsReporter by inspecting the ENV for the necessary config" + ], "signature": [ "(log: ", { @@ -92,7 +94,13 @@ "label": "config", "description": [], "signature": [ - "Config", + { + "pluginId": "@kbn/dev-utils", + "scope": "server", + "docId": "kibKbnDevUtilsPluginApi", + "section": "def-server.Config", + "text": "Config" + }, " | undefined" ], "path": "packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_reporter.ts", @@ -128,7 +136,9 @@ "type": "Function", "tags": [], "label": "isEnabled", - "description": [], + "description": [ + "\nDetermine if CI_STATS is explicitly disabled by the environment. To determine\nif the CiStatsReporter has enough information in the environment to send metrics\nfor builds use #hasBuildConfig()." + ], "signature": [ "() => boolean" ], @@ -143,7 +153,9 @@ "type": "Function", "tags": [], "label": "hasBuildConfig", - "description": [], + "description": [ + "\nDetermines if the CiStatsReporter is disabled by the environment, or properly\nconfigured and able to send stats" + ], "signature": [ "() => boolean" ], @@ -216,7 +228,15 @@ "section": "def-server.CiStatsMetric", "text": "CiStatsMetric" }, - "[]) => Promise" + "[], options?: ", + { + "pluginId": "@kbn/dev-utils", + "scope": "server", + "docId": "kibKbnDevUtilsPluginApi", + "section": "def-server.MetricsOptions", + "text": "MetricsOptions" + }, + " | undefined) => Promise" ], "path": "packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_reporter.ts", "deprecated": false, @@ -241,6 +261,27 @@ "path": "packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_reporter.ts", "deprecated": false, "isRequired": true + }, + { + "parentPluginId": "@kbn/dev-utils", + "id": "def-server.CiStatsReporter.metrics.$2", + "type": "Object", + "tags": [], + "label": "options", + "description": [], + "signature": [ + { + "pluginId": "@kbn/dev-utils", + "scope": "server", + "docId": "kibKbnDevUtilsPluginApi", + "section": "def-server.MetricsOptions", + "text": "MetricsOptions" + }, + " | undefined" + ], + "path": "packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_reporter.ts", + "deprecated": false, + "isRequired": false } ], "returnComment": [] @@ -644,19 +685,59 @@ "path": "packages/kbn-dev-utils/src/tooling_log/tooling_log.ts", "deprecated": false, "isRequired": false + }, + { + "parentPluginId": "@kbn/dev-utils", + "id": "def-server.ToolingLog.Unnamed.$2", + "type": "Object", + "tags": [], + "label": "options", + "description": [], + "signature": [ + { + "pluginId": "@kbn/dev-utils", + "scope": "server", + "docId": "kibKbnDevUtilsPluginApi", + "section": "def-server.ToolingLogOptions", + "text": "ToolingLogOptions" + }, + " | undefined" + ], + "path": "packages/kbn-dev-utils/src/tooling_log/tooling_log.ts", + "deprecated": false, + "isRequired": false } ], "returnComment": [] }, + { + "parentPluginId": "@kbn/dev-utils", + "id": "def-server.ToolingLog.getIndent", + "type": "Function", + "tags": [], + "label": "getIndent", + "description": [ + "\nGet the current indentation level of the ToolingLog" + ], + "signature": [ + "() => number" + ], + "path": "packages/kbn-dev-utils/src/tooling_log/tooling_log.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, { "parentPluginId": "@kbn/dev-utils", "id": "def-server.ToolingLog.indent", "type": "Function", "tags": [], "label": "indent", - "description": [], + "description": [ + "\nIndent the output of the ToolingLog by some character (4 is a good choice usually).\n\nIf provided, the `block` function will be executed and once it's promise is resolved\nor rejected the indentation will be reset to its original state.\n" + ], "signature": [ - "(delta?: number) => number" + "(delta?: number, block?: (() => Promise) | undefined) => Promise | undefined" ], "path": "packages/kbn-dev-utils/src/tooling_log/tooling_log.ts", "deprecated": false, @@ -667,13 +748,31 @@ "type": "number", "tags": [], "label": "delta", - "description": [], + "description": [ + "the number of spaces to increase/decrease the indentation" + ], "signature": [ "number" ], "path": "packages/kbn-dev-utils/src/tooling_log/tooling_log.ts", "deprecated": false, "isRequired": true + }, + { + "parentPluginId": "@kbn/dev-utils", + "id": "def-server.ToolingLog.indent.$2", + "type": "Function", + "tags": [], + "label": "block", + "description": [ + "a function to run and reset any indentation changes after" + ], + "signature": [ + "(() => Promise) | undefined" + ], + "path": "packages/kbn-dev-utils/src/tooling_log/tooling_log.ts", + "deprecated": false, + "isRequired": false } ], "returnComment": [] @@ -897,7 +996,13 @@ "description": [], "signature": [ "() => ", - "Writer", + { + "pluginId": "@kbn/dev-utils", + "scope": "server", + "docId": "kibKbnDevUtilsPluginApi", + "section": "def-server.Writer", + "text": "Writer" + }, "[]" ], "path": "packages/kbn-dev-utils/src/tooling_log/tooling_log.ts", @@ -914,7 +1019,13 @@ "description": [], "signature": [ "(writers: ", - "Writer", + { + "pluginId": "@kbn/dev-utils", + "scope": "server", + "docId": "kibKbnDevUtilsPluginApi", + "section": "def-server.Writer", + "text": "Writer" + }, "[]) => void" ], "path": "packages/kbn-dev-utils/src/tooling_log/tooling_log.ts", @@ -928,7 +1039,13 @@ "label": "writers", "description": [], "signature": [ - "Writer", + { + "pluginId": "@kbn/dev-utils", + "scope": "server", + "docId": "kibKbnDevUtilsPluginApi", + "section": "def-server.Writer", + "text": "Writer" + }, "[]" ], "path": "packages/kbn-dev-utils/src/tooling_log/tooling_log.ts", @@ -949,13 +1066,60 @@ "() => ", "Observable", "<", - "Message", + { + "pluginId": "@kbn/dev-utils", + "scope": "server", + "docId": "kibKbnDevUtilsPluginApi", + "section": "def-server.Message", + "text": "Message" + }, ">" ], "path": "packages/kbn-dev-utils/src/tooling_log/tooling_log.ts", "deprecated": false, "children": [], "returnComment": [] + }, + { + "parentPluginId": "@kbn/dev-utils", + "id": "def-server.ToolingLog.withType", + "type": "Function", + "tags": [], + "label": "withType", + "description": [ + "\nCreate a new ToolingLog which sets a different \"type\", allowing messages to be filtered out by \"source\"" + ], + "signature": [ + "(type: string) => ", + { + "pluginId": "@kbn/dev-utils", + "scope": "server", + "docId": "kibKbnDevUtilsPluginApi", + "section": "def-server.ToolingLog", + "text": "ToolingLog" + } + ], + "path": "packages/kbn-dev-utils/src/tooling_log/tooling_log.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/dev-utils", + "id": "def-server.ToolingLog.withType.$1", + "type": "string", + "tags": [], + "label": "type", + "description": [ + "A string that will be passed along with messages from this logger which can be used to filter messages with `ignoreSources`" + ], + "signature": [ + "string" + ], + "path": "packages/kbn-dev-utils/src/tooling_log/tooling_log.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] } ], "initialIsOpen": false @@ -1021,7 +1185,53 @@ "label": "level", "description": [], "signature": [ - "\"warning\" | \"error\" | \"info\" | \"success\" | \"debug\" | \"silent\" | \"verbose\"" + "\"error\" | \"info\" | \"success\" | \"warning\" | \"debug\" | \"silent\" | \"verbose\"" + ], + "path": "packages/kbn-dev-utils/src/tooling_log/tooling_log_collecting_writer.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/dev-utils", + "id": "def-server.ToolingLogCollectingWriter.write", + "type": "Function", + "tags": [], + "label": "write", + "description": [ + "\nCalled by ToolingLog, extends messages with the source if message includes one." + ], + "signature": [ + "(msg: ", + { + "pluginId": "@kbn/dev-utils", + "scope": "server", + "docId": "kibKbnDevUtilsPluginApi", + "section": "def-server.Message", + "text": "Message" + }, + ") => boolean" + ], + "path": "packages/kbn-dev-utils/src/tooling_log/tooling_log_collecting_writer.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/dev-utils", + "id": "def-server.ToolingLogCollectingWriter.write.$1", + "type": "Object", + "tags": [], + "label": "msg", + "description": [], + "signature": [ + { + "pluginId": "@kbn/dev-utils", + "scope": "server", + "docId": "kibKbnDevUtilsPluginApi", + "section": "def-server.Message", + "text": "Message" + } ], "path": "packages/kbn-dev-utils/src/tooling_log/tooling_log_collecting_writer.ts", "deprecated": false, @@ -1049,7 +1259,13 @@ "text": "ToolingLogTextWriter" }, " implements ", - "Writer" + { + "pluginId": "@kbn/dev-utils", + "scope": "server", + "docId": "kibKbnDevUtilsPluginApi", + "section": "def-server.Writer", + "text": "Writer" + } ], "path": "packages/kbn-dev-utils/src/tooling_log/tooling_log_text_writer.ts", "deprecated": false, @@ -1062,7 +1278,7 @@ "label": "level", "description": [], "signature": [ - "{ name: \"warning\" | \"error\" | \"info\" | \"success\" | \"debug\" | \"silent\" | \"verbose\"; flags: { warning: boolean; error: boolean; info: boolean; success: boolean; debug: boolean; silent: boolean; verbose: boolean; }; }" + "{ name: \"error\" | \"info\" | \"success\" | \"warning\" | \"debug\" | \"silent\" | \"verbose\"; flags: { error: boolean; info: boolean; success: boolean; warning: boolean; debug: boolean; silent: boolean; verbose: boolean; }; }" ], "path": "packages/kbn-dev-utils/src/tooling_log/tooling_log_text_writer.ts", "deprecated": false @@ -1125,7 +1341,13 @@ "description": [], "signature": [ "(msg: ", - "Message", + { + "pluginId": "@kbn/dev-utils", + "scope": "server", + "docId": "kibKbnDevUtilsPluginApi", + "section": "def-server.Message", + "text": "Message" + }, ") => boolean" ], "path": "packages/kbn-dev-utils/src/tooling_log/tooling_log_text_writer.ts", @@ -1139,7 +1361,13 @@ "label": "msg", "description": [], "signature": [ - "Message" + { + "pluginId": "@kbn/dev-utils", + "scope": "server", + "docId": "kibKbnDevUtilsPluginApi", + "section": "def-server.Message", + "text": "Message" + } ], "path": "packages/kbn-dev-utils/src/tooling_log/tooling_log_text_writer.ts", "deprecated": false, @@ -1157,7 +1385,13 @@ "description": [], "signature": [ "(writeTo: { write(msg: string): void; }, prefix: string, msg: ", - "Message", + { + "pluginId": "@kbn/dev-utils", + "scope": "server", + "docId": "kibKbnDevUtilsPluginApi", + "section": "def-server.Message", + "text": "Message" + }, ") => void" ], "path": "packages/kbn-dev-utils/src/tooling_log/tooling_log_text_writer.ts", @@ -1199,7 +1433,13 @@ "label": "msg", "description": [], "signature": [ - "Message" + { + "pluginId": "@kbn/dev-utils", + "scope": "server", + "docId": "kibKbnDevUtilsPluginApi", + "section": "def-server.Message", + "text": "Message" + } ], "path": "packages/kbn-dev-utils/src/tooling_log/tooling_log_text_writer.ts", "deprecated": false, @@ -2455,7 +2695,7 @@ "label": "parseLogLevel", "description": [], "signature": [ - "(name: \"warning\" | \"error\" | \"info\" | \"success\" | \"debug\" | \"silent\" | \"verbose\") => { name: \"warning\" | \"error\" | \"info\" | \"success\" | \"debug\" | \"silent\" | \"verbose\"; flags: { warning: boolean; error: boolean; info: boolean; success: boolean; debug: boolean; silent: boolean; verbose: boolean; }; }" + "(name: \"error\" | \"info\" | \"success\" | \"warning\" | \"debug\" | \"silent\" | \"verbose\") => { name: \"error\" | \"info\" | \"success\" | \"warning\" | \"debug\" | \"silent\" | \"verbose\"; flags: { error: boolean; info: boolean; success: boolean; warning: boolean; debug: boolean; silent: boolean; verbose: boolean; }; }" ], "path": "packages/kbn-dev-utils/src/tooling_log/log_levels.ts", "deprecated": false, @@ -2468,7 +2708,7 @@ "label": "name", "description": [], "signature": [ - "\"warning\" | \"error\" | \"info\" | \"success\" | \"debug\" | \"silent\" | \"verbose\"" + "\"error\" | \"info\" | \"success\" | \"warning\" | \"debug\" | \"silent\" | \"verbose\"" ], "path": "packages/kbn-dev-utils/src/tooling_log/log_levels.ts", "deprecated": false, @@ -2486,7 +2726,7 @@ "label": "pickLevelFromFlags", "description": [], "signature": [ - "(flags: Record, options: { default?: \"warning\" | \"error\" | \"info\" | \"success\" | \"debug\" | \"silent\" | \"verbose\" | undefined; }) => \"warning\" | \"error\" | \"info\" | \"success\" | \"debug\" | \"silent\" | \"verbose\"" + "(flags: Record, options: { default?: \"error\" | \"info\" | \"success\" | \"warning\" | \"debug\" | \"silent\" | \"verbose\" | undefined; }) => \"error\" | \"info\" | \"success\" | \"warning\" | \"debug\" | \"silent\" | \"verbose\"" ], "path": "packages/kbn-dev-utils/src/tooling_log/log_levels.ts", "deprecated": false, @@ -2523,7 +2763,7 @@ "label": "default", "description": [], "signature": [ - "\"warning\" | \"error\" | \"info\" | \"success\" | \"debug\" | \"silent\" | \"verbose\" | undefined" + "\"error\" | \"info\" | \"success\" | \"warning\" | \"debug\" | \"silent\" | \"verbose\" | undefined" ], "path": "packages/kbn-dev-utils/src/tooling_log/log_levels.ts", "deprecated": false @@ -2945,6 +3185,34 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/dev-utils", + "id": "def-server.CiStatsMetadata", + "type": "Interface", + "tags": [], + "label": "CiStatsMetadata", + "description": [], + "path": "packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_reporter.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/dev-utils", + "id": "def-server.CiStatsMetadata.Unnamed", + "type": "Any", + "tags": [], + "label": "Unnamed", + "description": [ + "\nArbitrary key-value pairs which can be attached to CiStatsTiming and CiStatsMetric\nobjects stored in the ci-stats service" + ], + "signature": [ + "any" + ], + "path": "packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_reporter.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/dev-utils", "id": "def-server.CiStatsMetric", @@ -2961,7 +3229,9 @@ "type": "string", "tags": [], "label": "group", - "description": [], + "description": [ + "Top-level categorization for the metric, e.g. \"page load bundle size\"" + ], "path": "packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_reporter.ts", "deprecated": false }, @@ -2971,7 +3241,9 @@ "type": "string", "tags": [], "label": "id", - "description": [], + "description": [ + "Specific sub-set of the \"group\", e.g. \"dashboard\"" + ], "path": "packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_reporter.ts", "deprecated": false }, @@ -2981,7 +3253,9 @@ "type": "number", "tags": [], "label": "value", - "description": [], + "description": [ + "integer value recorded as the value of this metric" + ], "path": "packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_reporter.ts", "deprecated": false }, @@ -2991,7 +3265,9 @@ "type": "number", "tags": [], "label": "limit", - "description": [], + "description": [ + "optional limit which will generate an error on PRs when the metric exceeds the limit" + ], "signature": [ "number | undefined" ], @@ -3004,33 +3280,59 @@ "type": "string", "tags": [], "label": "limitConfigPath", - "description": [], + "description": [ + "\npath, relative to the repo, where the config file contianing limits\nis kept. Linked from PR comments instructing contributors how to fix\ntheir PRs." + ], "signature": [ "string | undefined" ], "path": "packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_reporter.ts", "deprecated": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/dev-utils", - "id": "def-server.CiStatsTiming", - "type": "Interface", - "tags": [], - "label": "CiStatsTiming", - "description": [], - "path": "packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_reporter.ts", - "deprecated": false, - "children": [ + }, { "parentPluginId": "@kbn/dev-utils", - "id": "def-server.CiStatsTiming.group", + "id": "def-server.CiStatsMetric.meta", + "type": "Object", + "tags": [], + "label": "meta", + "description": [ + "Arbitrary key-value pairs which can be used for additional filtering/reporting" + ], + "signature": [ + { + "pluginId": "@kbn/dev-utils", + "scope": "server", + "docId": "kibKbnDevUtilsPluginApi", + "section": "def-server.CiStatsMetadata", + "text": "CiStatsMetadata" + }, + " | undefined" + ], + "path": "packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_reporter.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/dev-utils", + "id": "def-server.CiStatsTiming", + "type": "Interface", + "tags": [], + "label": "CiStatsTiming", + "description": [], + "path": "packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_reporter.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/dev-utils", + "id": "def-server.CiStatsTiming.group", "type": "string", "tags": [], "label": "group", - "description": [], + "description": [ + "Top-level categorization for the timing, e.g. \"scripts/foo\", process type, etc." + ], "path": "packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_reporter.ts", "deprecated": false }, @@ -3040,7 +3342,9 @@ "type": "string", "tags": [], "label": "id", - "description": [], + "description": [ + "Specific timing (witin the \"group\" being tracked) e.g. \"total\"" + ], "path": "packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_reporter.ts", "deprecated": false }, @@ -3050,7 +3354,9 @@ "type": "number", "tags": [], "label": "ms", - "description": [], + "description": [ + "time in milliseconds which should be recorded" + ], "path": "packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_reporter.ts", "deprecated": false }, @@ -3060,14 +3366,16 @@ "type": "Object", "tags": [], "label": "meta", - "description": [], + "description": [ + "hash of key-value pairs which will be stored with the timing for additional filtering and reporting" + ], "signature": [ { "pluginId": "@kbn/dev-utils", "scope": "server", "docId": "kibKbnDevUtilsPluginApi", - "section": "def-server.CiStatsTimingMetadata", - "text": "CiStatsTimingMetadata" + "section": "def-server.CiStatsMetadata", + "text": "CiStatsMetadata" }, " | undefined" ], @@ -3077,32 +3385,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "@kbn/dev-utils", - "id": "def-server.CiStatsTimingMetadata", - "type": "Interface", - "tags": [], - "label": "CiStatsTimingMetadata", - "description": [], - "path": "packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_reporter.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "@kbn/dev-utils", - "id": "def-server.CiStatsTimingMetadata.Unnamed", - "type": "Any", - "tags": [], - "label": "Unnamed", - "description": [], - "signature": [ - "any" - ], - "path": "packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_reporter.ts", - "deprecated": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "@kbn/dev-utils", "id": "def-server.Command", @@ -3226,6 +3508,45 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/dev-utils", + "id": "def-server.Config", + "type": "Interface", + "tags": [], + "label": "Config", + "description": [ + "\nInformation about how CiStatsReporter should talk to the ci-stats service. Normally\nit is read from a JSON environment variable using the `parseConfig()` function\nexported by this module." + ], + "path": "packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_config.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/dev-utils", + "id": "def-server.Config.apiToken", + "type": "string", + "tags": [], + "label": "apiToken", + "description": [ + "ApiToken necessary for writing build data to ci-stats service" + ], + "path": "packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_config.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/dev-utils", + "id": "def-server.Config.buildId", + "type": "string", + "tags": [], + "label": "buildId", + "description": [ + "\nuuid which should be obtained by first creating a build with the\nci-stats service and then passing it to all subsequent steps" + ], + "path": "packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_config.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/dev-utils", "id": "def-server.FlagOptions", @@ -3480,54 +3801,105 @@ }, { "parentPluginId": "@kbn/dev-utils", - "id": "def-server.ReqOptions", + "id": "def-server.Message", "type": "Interface", "tags": [], - "label": "ReqOptions", - "description": [], - "path": "packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_reporter.ts", + "label": "Message", + "description": [ + "\nThe object shape passed to ToolingLog writers each time the log is used." + ], + "path": "packages/kbn-dev-utils/src/tooling_log/message.ts", "deprecated": false, "children": [ { "parentPluginId": "@kbn/dev-utils", - "id": "def-server.ReqOptions.auth", - "type": "boolean", + "id": "def-server.Message.type", + "type": "CompoundType", "tags": [], - "label": "auth", - "description": [], - "path": "packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_reporter.ts", + "label": "type", + "description": [ + "level/type of message" + ], + "signature": [ + "\"write\" | \"error\" | \"info\" | \"success\" | \"warning\" | \"debug\" | \"verbose\"" + ], + "path": "packages/kbn-dev-utils/src/tooling_log/message.ts", "deprecated": false }, { "parentPluginId": "@kbn/dev-utils", - "id": "def-server.ReqOptions.path", - "type": "string", + "id": "def-server.Message.indent", + "type": "number", "tags": [], - "label": "path", - "description": [], - "path": "packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_reporter.ts", + "label": "indent", + "description": [ + "indentation intended when message written to a text log" + ], + "path": "packages/kbn-dev-utils/src/tooling_log/message.ts", "deprecated": false }, { "parentPluginId": "@kbn/dev-utils", - "id": "def-server.ReqOptions.body", - "type": "Any", + "id": "def-server.Message.source", + "type": "string", "tags": [], - "label": "body", - "description": [], + "label": "source", + "description": [ + "type of logger this message came from" + ], "signature": [ - "any" + "string | undefined" ], - "path": "packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_reporter.ts", + "path": "packages/kbn-dev-utils/src/tooling_log/message.ts", "deprecated": false }, { "parentPluginId": "@kbn/dev-utils", - "id": "def-server.ReqOptions.bodyDesc", - "type": "string", + "id": "def-server.Message.args", + "type": "Array", "tags": [], - "label": "bodyDesc", - "description": [], + "label": "args", + "description": [ + "args passed to the logging method" + ], + "signature": [ + "any[]" + ], + "path": "packages/kbn-dev-utils/src/tooling_log/message.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/dev-utils", + "id": "def-server.MetricsOptions", + "type": "Interface", + "tags": [], + "label": "MetricsOptions", + "description": [], + "path": "packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_reporter.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/dev-utils", + "id": "def-server.MetricsOptions.defaultMeta", + "type": "Object", + "tags": [], + "label": "defaultMeta", + "description": [ + "Default metadata to add to each metric" + ], + "signature": [ + { + "pluginId": "@kbn/dev-utils", + "scope": "server", + "docId": "kibKbnDevUtilsPluginApi", + "section": "def-server.CiStatsMetadata", + "text": "CiStatsMetadata" + }, + " | undefined" + ], "path": "packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_reporter.ts", "deprecated": false } @@ -3625,7 +3997,13 @@ "description": [], "signature": [ "(task: ", - "CleanupTask", + { + "pluginId": "@kbn/dev-utils", + "scope": "server", + "docId": "kibKbnDevUtilsPluginApi", + "section": "def-server.CleanupTask", + "text": "CleanupTask" + }, ") => void" ], "path": "packages/kbn-dev-utils/src/run/run.ts", @@ -3639,7 +4017,13 @@ "label": "task", "description": [], "signature": [ - "CleanupTask" + { + "pluginId": "@kbn/dev-utils", + "scope": "server", + "docId": "kibKbnDevUtilsPluginApi", + "section": "def-server.CleanupTask", + "text": "CleanupTask" + } ], "path": "packages/kbn-dev-utils/src/run/run.ts", "deprecated": false, @@ -3695,7 +4079,7 @@ "label": "log", "description": [], "signature": [ - "{ defaultLevel?: \"warning\" | \"error\" | \"info\" | \"success\" | \"debug\" | \"silent\" | \"verbose\" | undefined; } | undefined" + "{ defaultLevel?: \"error\" | \"info\" | \"success\" | \"warning\" | \"debug\" | \"silent\" | \"verbose\" | undefined; } | undefined" ], "path": "packages/kbn-dev-utils/src/run/run.ts", "deprecated": false @@ -3751,7 +4135,7 @@ "label": "log", "description": [], "signature": [ - "{ defaultLevel?: \"warning\" | \"error\" | \"info\" | \"success\" | \"debug\" | \"silent\" | \"verbose\" | undefined; } | undefined" + "{ defaultLevel?: \"error\" | \"info\" | \"success\" | \"warning\" | \"debug\" | \"silent\" | \"verbose\" | undefined; } | undefined" ], "path": "packages/kbn-dev-utils/src/run/run_with_commands.ts", "deprecated": false @@ -3914,6 +4298,56 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/dev-utils", + "id": "def-server.ToolingLogOptions", + "type": "Interface", + "tags": [], + "label": "ToolingLogOptions", + "description": [], + "path": "packages/kbn-dev-utils/src/tooling_log/tooling_log.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/dev-utils", + "id": "def-server.ToolingLogOptions.type", + "type": "string", + "tags": [], + "label": "type", + "description": [ + "\ntype name for this logger, will be assigned to the \"source\"\nproperties of messages produced by this logger" + ], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-dev-utils/src/tooling_log/tooling_log.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/dev-utils", + "id": "def-server.ToolingLogOptions.parent", + "type": "Object", + "tags": [], + "label": "parent", + "description": [ + "\nparent ToolingLog. When a ToolingLog has a parent they will both\nshare indent and writers state. Changing the indent width or\nwriters on either log will update the other too." + ], + "signature": [ + { + "pluginId": "@kbn/dev-utils", + "scope": "server", + "docId": "kibKbnDevUtilsPluginApi", + "section": "def-server.ToolingLog", + "text": "ToolingLog" + }, + " | undefined" + ], + "path": "packages/kbn-dev-utils/src/tooling_log/tooling_log.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/dev-utils", "id": "def-server.ToolingLogTextWriterConfig", @@ -3930,9 +4364,26 @@ "type": "CompoundType", "tags": [], "label": "level", - "description": [], + "description": [ + "\nLog level, messages below this level will be ignored" + ], "signature": [ - "\"warning\" | \"error\" | \"info\" | \"success\" | \"debug\" | \"silent\" | \"verbose\"" + "\"error\" | \"info\" | \"success\" | \"warning\" | \"debug\" | \"silent\" | \"verbose\"" + ], + "path": "packages/kbn-dev-utils/src/tooling_log/tooling_log_text_writer.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/dev-utils", + "id": "def-server.ToolingLogTextWriterConfig.ignoreSources", + "type": "Array", + "tags": [], + "label": "ignoreSources", + "description": [ + "\nList of message sources/ToolingLog types which will be ignored. Create\na logger with `ToolingLog#withType()` to create messages with a specific\nsource. Ignored messages will be dropped without writing." + ], + "signature": [ + "string[] | undefined" ], "path": "packages/kbn-dev-utils/src/tooling_log/tooling_log_text_writer.ts", "deprecated": false @@ -3943,7 +4394,9 @@ "type": "Object", "tags": [], "label": "writeTo", - "description": [], + "description": [ + "\nTarget which will receive formatted message lines, a common value for `writeTo`\nis process.stdout" + ], "signature": [ "{ write(s: string): void; }" ], @@ -3952,6 +4405,69 @@ } ], "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/dev-utils", + "id": "def-server.Writer", + "type": "Interface", + "tags": [], + "label": "Writer", + "description": [ + "\nAn object which received ToolingLog `Messages` and sends them to\nsome interface for collecting logs like stdio, or a file" + ], + "path": "packages/kbn-dev-utils/src/tooling_log/writer.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/dev-utils", + "id": "def-server.Writer.write", + "type": "Function", + "tags": [], + "label": "write", + "description": [ + "\nCalled with every log message, should return true if the message\nwas written and false if it was ignored." + ], + "signature": [ + "(msg: ", + { + "pluginId": "@kbn/dev-utils", + "scope": "server", + "docId": "kibKbnDevUtilsPluginApi", + "section": "def-server.Message", + "text": "Message" + }, + ") => boolean" + ], + "path": "packages/kbn-dev-utils/src/tooling_log/writer.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/dev-utils", + "id": "def-server.Writer.write.$1", + "type": "Object", + "tags": [], + "label": "msg", + "description": [ + "The log message to write" + ], + "signature": [ + { + "pluginId": "@kbn/dev-utils", + "scope": "server", + "docId": "kibKbnDevUtilsPluginApi", + "section": "def-server.Message", + "text": "Message" + } + ], + "path": "packages/kbn-dev-utils/src/tooling_log/writer.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false } ], "enums": [], @@ -3967,6 +4483,24 @@ "deprecated": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/dev-utils", + "id": "def-server.CleanupTask", + "type": "Type", + "tags": [], + "label": "CleanupTask", + "description": [ + "\nA function which will be called when the CLI is torn-down which should\nquickly cleanup whatever it needs." + ], + "signature": [ + "() => void" + ], + "path": "packages/kbn-dev-utils/src/run/cleanup.ts", + "deprecated": false, + "returnComment": [], + "children": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/dev-utils", "id": "def-server.CommandRunFn", @@ -4150,7 +4684,7 @@ "label": "LogLevel", "description": [], "signature": [ - "\"warning\" | \"error\" | \"info\" | \"success\" | \"debug\" | \"silent\" | \"verbose\"" + "\"error\" | \"info\" | \"success\" | \"warning\" | \"debug\" | \"silent\" | \"verbose\"" ], "path": "packages/kbn-dev-utils/src/tooling_log/log_levels.ts", "deprecated": false, @@ -4164,7 +4698,7 @@ "label": "ParsedLogLevel", "description": [], "signature": [ - "{ name: \"warning\" | \"error\" | \"info\" | \"success\" | \"debug\" | \"silent\" | \"verbose\"; flags: { warning: boolean; error: boolean; info: boolean; success: boolean; debug: boolean; silent: boolean; verbose: boolean; }; }" + "{ name: \"error\" | \"info\" | \"success\" | \"warning\" | \"debug\" | \"silent\" | \"verbose\"; flags: { error: boolean; info: boolean; success: boolean; warning: boolean; debug: boolean; silent: boolean; verbose: boolean; }; }" ], "path": "packages/kbn-dev-utils/src/tooling_log/log_levels.ts", "deprecated": false, diff --git a/api_docs/kbn_dev_utils.mdx b/api_docs/kbn_dev_utils.mdx index c959baa6fda56..775e0c03fa49c 100644 --- a/api_docs/kbn_dev_utils.mdx +++ b/api_docs/kbn_dev_utils.mdx @@ -18,7 +18,7 @@ Contact [Owner missing] for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 258 | 7 | 231 | 4 | +| 280 | 6 | 214 | 0 | ## Server diff --git a/api_docs/kbn_es_query.json b/api_docs/kbn_es_query.json index 2b76b7c39c63c..0533bd7756849 100644 --- a/api_docs/kbn_es_query.json +++ b/api_docs/kbn_es_query.json @@ -2214,60 +2214,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "@kbn/es-query", - "id": "def-common.isMissingFilter", - "type": "Function", - "tags": [], - "label": "isMissingFilter", - "description": [], - "signature": [ - "(filter: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - ") => filter is ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.MissingFilter", - "text": "MissingFilter" - } - ], - "path": "packages/kbn-es-query/src/filters/build_filters/missing_filter.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "@kbn/es-query", - "id": "def-common.isMissingFilter.$1", - "type": "Object", - "tags": [], - "label": "filter", - "description": [], - "signature": [ - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - } - ], - "path": "packages/kbn-es-query/src/filters/build_filters/missing_filter.ts", - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [ - "`true` if a filter is an `MissingFilter`" - ], - "initialIsOpen": false - }, { "parentPluginId": "@kbn/es-query", "id": "def-common.isPhraseFilter", @@ -3876,7 +3822,7 @@ "section": "def-common.FilterMeta", "text": "FilterMeta" }, - "; exists?: { field: string; } | undefined; }" + "; query: { exists?: { field: string; } | undefined; }; }" ], "path": "packages/kbn-es-query/src/filters/build_filters/exists_filter.ts", "deprecated": false, @@ -3908,14 +3854,6 @@ "text": "MatchAllFilter" }, " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.MissingFilter", - "text": "MissingFilter" - }, - " | ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -4069,43 +4007,14 @@ }, " & { meta: ", "MatchAllFilterMeta", - "; match_all: ", + "; query: { match_all: ", "QueryDslMatchAllQuery", - "; }" + "; }; }" ], "path": "packages/kbn-es-query/src/filters/build_filters/match_all_filter.ts", "deprecated": false, "initialIsOpen": false }, - { - "parentPluginId": "@kbn/es-query", - "id": "def-common.MissingFilter", - "type": "Type", - "tags": [], - "label": "MissingFilter", - "description": [], - "signature": [ - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - " & { meta: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.FilterMeta", - "text": "FilterMeta" - }, - "; missing: { field: string; }; }" - ], - "path": "packages/kbn-es-query/src/filters/build_filters/missing_filter.ts", - "deprecated": false, - "initialIsOpen": false - }, { "parentPluginId": "@kbn/es-query", "id": "def-common.PhraseFilter", @@ -4224,7 +4133,7 @@ "section": "def-common.RangeFilterMeta", "text": "RangeFilterMeta" }, - "; range: { [key: string]: ", + "; query: { range: { [key: string]: ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -4232,7 +4141,7 @@ "section": "def-common.RangeFilterParams", "text": "RangeFilterParams" }, - "; }; }" + "; }; }; }" ], "path": "packages/kbn-es-query/src/filters/build_filters/range_filter.ts", "deprecated": false, @@ -4315,9 +4224,9 @@ "section": "def-common.RangeFilterMeta", "text": "RangeFilterMeta" }, - "; script: { script: ", + "; query: { script: { script: ", "InlineScript", - "; }; }" + "; }; }; }" ], "path": "packages/kbn-es-query/src/filters/build_filters/range_filter.ts", "deprecated": false, diff --git a/api_docs/kbn_es_query.mdx b/api_docs/kbn_es_query.mdx index 471c5e8b2687a..be44bd1e5a9a4 100644 --- a/api_docs/kbn_es_query.mdx +++ b/api_docs/kbn_es_query.mdx @@ -18,7 +18,7 @@ Contact [Owner missing] for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 208 | 2 | 156 | 14 | +| 205 | 2 | 153 | 14 | ## Common diff --git a/api_docs/kbn_logging.json b/api_docs/kbn_logging.json index 32ab4bac1ffac..e6f2f3846015e 100644 --- a/api_docs/kbn_logging.json +++ b/api_docs/kbn_logging.json @@ -616,7 +616,7 @@ "label": "EcsEventCategory", "description": [], "signature": [ - "\"host\" | \"network\" | \"web\" | \"database\" | \"package\" | \"session\" | \"file\" | \"registry\" | \"process\" | \"authentication\" | \"configuration\" | \"driver\" | \"iam\" | \"intrusion_detection\" | \"malware\"" + "\"network\" | \"web\" | \"database\" | \"package\" | \"host\" | \"session\" | \"file\" | \"registry\" | \"process\" | \"authentication\" | \"configuration\" | \"driver\" | \"iam\" | \"intrusion_detection\" | \"malware\"" ], "path": "packages/kbn-logging/src/ecs/event.ts", "deprecated": false, @@ -658,7 +658,7 @@ "label": "EcsEventType", "description": [], "signature": [ - "\"start\" | \"connection\" | \"end\" | \"user\" | \"error\" | \"info\" | \"group\" | \"protocol\" | \"access\" | \"admin\" | \"allowed\" | \"change\" | \"creation\" | \"deletion\" | \"denied\" | \"installation\"" + "\"start\" | \"end\" | \"user\" | \"error\" | \"info\" | \"connection\" | \"group\" | \"protocol\" | \"access\" | \"admin\" | \"allowed\" | \"change\" | \"creation\" | \"deletion\" | \"denied\" | \"installation\"" ], "path": "packages/kbn-logging/src/ecs/event.ts", "deprecated": false, diff --git a/api_docs/kbn_monaco.json b/api_docs/kbn_monaco.json index b87619f900457..17323f36e0d89 100644 --- a/api_docs/kbn_monaco.json +++ b/api_docs/kbn_monaco.json @@ -274,7 +274,7 @@ "label": "kind", "description": [], "signature": [ - "\"type\" | \"keyword\" | \"field\" | \"property\" | \"method\" | \"class\" | \"constructor\"" + "\"keyword\" | \"type\" | \"field\" | \"property\" | \"method\" | \"class\" | \"constructor\"" ], "path": "packages/kbn-monaco/src/painless/types.ts", "deprecated": false @@ -369,7 +369,7 @@ "label": "PainlessCompletionKind", "description": [], "signature": [ - "\"type\" | \"keyword\" | \"field\" | \"property\" | \"method\" | \"class\" | \"constructor\"" + "\"keyword\" | \"type\" | \"field\" | \"property\" | \"method\" | \"class\" | \"constructor\"" ], "path": "packages/kbn-monaco/src/painless/types.ts", "deprecated": false, diff --git a/api_docs/kbn_securitysolution_autocomplete.json b/api_docs/kbn_securitysolution_autocomplete.json index 940a7d08d6155..293b1ad2f4e8d 100644 --- a/api_docs/kbn_securitysolution_autocomplete.json +++ b/api_docs/kbn_securitysolution_autocomplete.json @@ -274,7 +274,7 @@ "\nGiven an array of lists and optionally a field this will return all\nthe lists that match against the field based on the types from the field\n\nNOTE: That we support one additional property from \"FieldSpec\" located here:\nsrc/plugins/data/common/index_patterns/fields/types.ts\nThis type property is esTypes. If it exists and is on there we will read off the esTypes." ], "signature": [ - "(lists: { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[], field?: (", + "(lists: { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[], field?: (", { "pluginId": "@kbn/es-query", "scope": "common", @@ -282,7 +282,7 @@ "section": "def-common.DataViewFieldBase", "text": "DataViewFieldBase" }, - " & { esTypes?: string[] | undefined; }) | undefined) => { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]" + " & { esTypes?: string[] | undefined; }) | undefined) => { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]" ], "path": "packages/kbn-securitysolution-autocomplete/src/filter_field_to_list/index.ts", "deprecated": false, @@ -297,7 +297,7 @@ "The lists to match against the field" ], "signature": [ - "{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]" + "{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]" ], "path": "packages/kbn-securitysolution-autocomplete/src/filter_field_to_list/index.ts", "deprecated": false, diff --git a/api_docs/kbn_securitysolution_es_utils.json b/api_docs/kbn_securitysolution_es_utils.json index 680d6993530dd..3a5bb6e97e90d 100644 --- a/api_docs/kbn_securitysolution_es_utils.json +++ b/api_docs/kbn_securitysolution_es_utils.json @@ -44,7 +44,7 @@ "signature": [ "(esClient: Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">, index: string) => Promise" + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">, index: string) => Promise" ], "path": "packages/kbn-securitysolution-es-utils/src/create_boostrap_index/index.ts", "deprecated": false, @@ -59,7 +59,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">" + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">" ], "path": "packages/kbn-securitysolution-es-utils/src/create_boostrap_index/index.ts", "deprecated": false, @@ -124,7 +124,7 @@ "signature": [ "(esClient: Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">, pattern: string, maxAttempts?: number) => Promise" + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">, pattern: string, maxAttempts?: number) => Promise" ], "path": "packages/kbn-securitysolution-es-utils/src/delete_all_index/index.ts", "deprecated": false, @@ -139,7 +139,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">" + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">" ], "path": "packages/kbn-securitysolution-es-utils/src/delete_all_index/index.ts", "deprecated": false, @@ -187,7 +187,7 @@ "signature": [ "(esClient: Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">, policy: string) => Promise" + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">, policy: string) => Promise" ], "path": "packages/kbn-securitysolution-es-utils/src/delete_policy/index.ts", "deprecated": false, @@ -202,7 +202,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">" + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">" ], "path": "packages/kbn-securitysolution-es-utils/src/delete_policy/index.ts", "deprecated": false, @@ -236,7 +236,7 @@ "signature": [ "(esClient: Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">, name: string) => Promise" + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">, name: string) => Promise" ], "path": "packages/kbn-securitysolution-es-utils/src/delete_template/index.ts", "deprecated": false, @@ -251,7 +251,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">" + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">" ], "path": "packages/kbn-securitysolution-es-utils/src/delete_template/index.ts", "deprecated": false, @@ -320,7 +320,7 @@ "signature": [ "({ esClient, alias, }: { esClient: Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">; alias: string; }) => Promise" + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">; alias: string; }) => Promise" ], "path": "packages/kbn-securitysolution-es-utils/src/get_index_aliases/index.ts", "deprecated": false, @@ -343,27 +343,7 @@ "label": "esClient", "description": [], "signature": [ - "{ get: (params: ", - "GetRequest", - ", options?: ", - "TransportRequestOptions", - " | undefined) => ", - "TransportRequestPromise", - "<", - "ApiResponse", - "<", - "GetResponse", - ", TContext>>; delete: (params: ", - "DeleteRequest", - ", options?: ", - "TransportRequestOptions", - " | undefined) => ", - "TransportRequestPromise", - "<", - "ApiResponse", - "<", - "DeleteResponse", - ", TContext>>; monitoring: { bulk(params?: Record | undefined, options?: ", + "{ monitoring: { bulk(params?: Record | undefined, options?: ", "TransportRequestOptions", " | undefined): ", "TransportRequestPromise", @@ -765,7 +745,27 @@ "ApiResponse", "<", "IndexResponse", - ", TContext>>; update: (params: ", + ", TContext>>; delete: (params: ", + "DeleteRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined) => ", + "TransportRequestPromise", + "<", + "ApiResponse", + "<", + "DeleteResponse", + ", TContext>>; get: (params: ", + "GetRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined) => ", + "TransportRequestPromise", + "<", + "ApiResponse", + "<", + "GetResponse", + ", TContext>>; update: (params: ", "UpdateRequest", ", options?: ", "TransportRequestOptions", @@ -4120,7 +4120,7 @@ "signature": [ "({ esClient, index, }: { esClient: Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">; index: string; }) => Promise" + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">; index: string; }) => Promise" ], "path": "packages/kbn-securitysolution-es-utils/src/get_index_count/index.ts", "deprecated": false, @@ -4143,27 +4143,7 @@ "label": "esClient", "description": [], "signature": [ - "{ get: (params: ", - "GetRequest", - ", options?: ", - "TransportRequestOptions", - " | undefined) => ", - "TransportRequestPromise", - "<", - "ApiResponse", - "<", - "GetResponse", - ", TContext>>; delete: (params: ", - "DeleteRequest", - ", options?: ", - "TransportRequestOptions", - " | undefined) => ", - "TransportRequestPromise", - "<", - "ApiResponse", - "<", - "DeleteResponse", - ", TContext>>; monitoring: { bulk(params?: Record | undefined, options?: ", + "{ monitoring: { bulk(params?: Record | undefined, options?: ", "TransportRequestOptions", " | undefined): ", "TransportRequestPromise", @@ -4565,7 +4545,27 @@ "ApiResponse", "<", "IndexResponse", - ", TContext>>; update: (params: ", + ", TContext>>; delete: (params: ", + "DeleteRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined) => ", + "TransportRequestPromise", + "<", + "ApiResponse", + "<", + "DeleteResponse", + ", TContext>>; get: (params: ", + "GetRequest", + ", options?: ", + "TransportRequestOptions", + " | undefined) => ", + "TransportRequestPromise", + "<", + "ApiResponse", + "<", + "GetResponse", + ", TContext>>; update: (params: ", "UpdateRequest", ", options?: ", "TransportRequestOptions", @@ -7918,7 +7918,7 @@ "signature": [ "(esClient: Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">, index: string) => Promise" + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">, index: string) => Promise" ], "path": "packages/kbn-securitysolution-es-utils/src/get_index_exists/index.ts", "deprecated": false, @@ -7933,7 +7933,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">" + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">" ], "path": "packages/kbn-securitysolution-es-utils/src/get_index_exists/index.ts", "deprecated": false, @@ -7967,7 +7967,7 @@ "signature": [ "(esClient: Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">, policy: string) => Promise" + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">, policy: string) => Promise" ], "path": "packages/kbn-securitysolution-es-utils/src/get_policy_exists/index.ts", "deprecated": false, @@ -7982,7 +7982,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">" + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">" ], "path": "packages/kbn-securitysolution-es-utils/src/get_policy_exists/index.ts", "deprecated": false, @@ -8016,7 +8016,7 @@ "signature": [ "(esClient: Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">, template: string) => Promise" + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">, template: string) => Promise" ], "path": "packages/kbn-securitysolution-es-utils/src/get_template_exists/index.ts", "deprecated": false, @@ -8031,7 +8031,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">" + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">" ], "path": "packages/kbn-securitysolution-es-utils/src/get_template_exists/index.ts", "deprecated": false, @@ -8065,7 +8065,7 @@ "signature": [ "(esClient: Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">, index: string) => Promise" + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">, index: string) => Promise" ], "path": "packages/kbn-securitysolution-es-utils/src/read_index/index.ts", "deprecated": false, @@ -8080,7 +8080,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">" + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">" ], "path": "packages/kbn-securitysolution-es-utils/src/read_index/index.ts", "deprecated": false, @@ -8114,7 +8114,7 @@ "signature": [ "(esClient: Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">, index: string) => Promise" + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">, index: string) => Promise" ], "path": "packages/kbn-securitysolution-es-utils/src/read_privileges/index.ts", "deprecated": false, @@ -8129,7 +8129,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">" + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">" ], "path": "packages/kbn-securitysolution-es-utils/src/read_privileges/index.ts", "deprecated": false, @@ -8163,7 +8163,7 @@ "signature": [ "(esClient: Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">, policy: string, body: Record) => Promise" + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">, policy: string, body: Record) => Promise" ], "path": "packages/kbn-securitysolution-es-utils/src/set_policy/index.ts", "deprecated": false, @@ -8178,7 +8178,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">" + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">" ], "path": "packages/kbn-securitysolution-es-utils/src/set_policy/index.ts", "deprecated": false, @@ -8226,7 +8226,7 @@ "signature": [ "(esClient: Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">, name: string, body: Record) => Promise" + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">, name: string, body: Record) => Promise" ], "path": "packages/kbn-securitysolution-es-utils/src/set_template/index.ts", "deprecated": false, @@ -8241,7 +8241,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">" + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\">" ], "path": "packages/kbn-securitysolution-es-utils/src/set_template/index.ts", "deprecated": false, diff --git a/api_docs/kbn_securitysolution_io_ts_list_types.json b/api_docs/kbn_securitysolution_io_ts_list_types.json index 2a1efcc96c5a7..7d10a90dac167 100644 --- a/api_docs/kbn_securitysolution_io_ts_list_types.json +++ b/api_docs/kbn_securitysolution_io_ts_list_types.json @@ -27,7 +27,7 @@ "label": "updateExceptionListItemValidate", "description": [], "signature": [ - "(schema: { description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }) => string[]" + "(schema: { description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }) => string[]" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_validation/index.ts", "deprecated": false, @@ -40,7 +40,7 @@ "label": "schema", "description": [], "signature": [ - "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" + "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_validation/index.ts", "deprecated": false, @@ -58,7 +58,7 @@ "label": "validateComments", "description": [], "signature": [ - "(item: { description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }) => string[]" + "(item: { description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }) => string[]" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_validation/index.ts", "deprecated": false, @@ -71,7 +71,7 @@ "label": "item", "description": [], "signature": [ - "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" + "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_validation/index.ts", "deprecated": false, @@ -153,7 +153,7 @@ "label": "listItem", "description": [], "signature": [ - "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" + "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/typescript_types/index.ts", "deprecated": false @@ -1216,7 +1216,7 @@ "label": "listItem", "description": [], "signature": [ - "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" + "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/typescript_types/index.ts", "deprecated": false @@ -1307,7 +1307,7 @@ "label": "exceptions", "description": [], "signature": [ - "{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]" + "{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/typescript_types/index.ts", "deprecated": false @@ -1890,7 +1890,7 @@ "label": "CreateEndpointListItemSchemaDecoded", "description": [], "signature": [ - "Pick<{ description: string; entries: ({ field: string; operator: \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"included\"; type: \"match_any\"; value: string[]; } | { entries: ({ field: string; operator: \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; comments: { comment: string; }[] | undefined; item_id: string | undefined; meta: object | undefined; os_types: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags: string[] | undefined; }, \"type\" | \"description\" | \"name\" | \"meta\"> & { comments: { comment: string; }[]; tags: string[]; item_id: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; os_types: (\"windows\" | \"linux\" | \"macos\")[]; }" + "Pick<{ description: string; entries: ({ field: string; operator: \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"included\"; type: \"match_any\"; value: string[]; } | { entries: ({ field: string; operator: \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; comments: { comment: string; }[] | undefined; item_id: string | undefined; meta: object | undefined; os_types: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags: string[] | undefined; }, \"type\" | \"description\" | \"name\" | \"meta\"> & { comments: { comment: string; }[]; tags: string[]; item_id: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; os_types: (\"windows\" | \"linux\" | \"macos\")[]; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/create_endpoint_list_item_schema/index.ts", "deprecated": false, @@ -1918,7 +1918,7 @@ "label": "CreateExceptionListItemSchema", "description": [], "signature": [ - "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" + "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_item_schema/index.ts", "deprecated": false, @@ -1932,7 +1932,7 @@ "label": "CreateExceptionListItemSchemaDecoded", "description": [], "signature": [ - "Pick<{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; comments: { comment: string; }[] | undefined; item_id: string | undefined; meta: object | undefined; namespace_type: \"single\" | \"agnostic\" | undefined; os_types: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags: string[] | undefined; }, \"type\" | \"description\" | \"name\" | \"meta\" | \"list_id\" | \"os_types\"> & { comments: { comment: string; }[]; tags: string[]; item_id: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; }" + "Pick<{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; comments: { comment: string; }[] | undefined; item_id: string | undefined; meta: object | undefined; namespace_type: \"single\" | \"agnostic\" | undefined; os_types: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags: string[] | undefined; }, \"type\" | \"description\" | \"name\" | \"meta\" | \"list_id\" | \"os_types\"> & { comments: { comment: string; }[]; tags: string[]; item_id: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_item_schema/index.ts", "deprecated": false, @@ -2002,7 +2002,7 @@ "label": "CreateListSchema", "description": [], "signature": [ - "{ description: string; name: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; } & { deserializer?: string | undefined; id?: string | undefined; meta?: object | undefined; serializer?: string | undefined; version?: number | undefined; }" + "{ description: string; name: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; } & { deserializer?: string | undefined; id?: string | undefined; meta?: object | undefined; serializer?: string | undefined; version?: number | undefined; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_schema/index.ts", "deprecated": false, @@ -2016,7 +2016,7 @@ "label": "CreateListSchemaDecoded", "description": [], "signature": [ - "{ type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; id: string | undefined; description: string; name: string; meta: object | undefined; serializer: string | undefined; deserializer: string | undefined; } & { version: number; }" + "{ type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; id: string | undefined; description: string; name: string; meta: object | undefined; serializer: string | undefined; deserializer: string | undefined; } & { version: number; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_schema/index.ts", "deprecated": false, @@ -2310,7 +2310,7 @@ "label": "EntriesArray", "description": [], "signature": [ - "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]" + "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/common/entries/index.ts", "deprecated": false, @@ -2324,7 +2324,7 @@ "label": "EntriesArrayOrUndefined", "description": [], "signature": [ - "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[] | undefined" + "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[] | undefined" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/common/entries/index.ts", "deprecated": false, @@ -2338,7 +2338,7 @@ "label": "Entry", "description": [], "signature": [ - "{ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; }" + "{ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/common/entries/index.ts", "deprecated": false, @@ -2366,7 +2366,7 @@ "label": "EntryList", "description": [], "signature": [ - "{ field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; }" + "{ field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/common/entries_list/index.ts", "deprecated": false, @@ -2436,7 +2436,7 @@ "label": "ExceptionListItemSchema", "description": [], "signature": [ - "{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }" + "{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_item_schema/index.ts", "deprecated": false, @@ -2744,7 +2744,7 @@ "label": "FoundExceptionListItemSchema", "description": [], "signature": [ - "{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; }" + "{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_item_schema/index.ts", "deprecated": false, @@ -2772,7 +2772,7 @@ "label": "FoundListItemSchema", "description": [], "signature": [ - "{ cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]; page: number; per_page: number; total: number; }" + "{ cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]; page: number; per_page: number; total: number; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/response/found_list_item_schema/index.ts", "deprecated": false, @@ -2786,7 +2786,7 @@ "label": "FoundListSchema", "description": [], "signature": [ - "{ cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]; page: number; per_page: number; total: number; }" + "{ cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]; page: number; per_page: number; total: number; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/response/found_list_schema/index.ts", "deprecated": false, @@ -2856,7 +2856,7 @@ "label": "ImportListItemQuerySchema", "description": [], "signature": [ - "{ deserializer: string | undefined; list_id: string | undefined; serializer: string | undefined; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\" | undefined; }" + "{ deserializer: string | undefined; list_id: string | undefined; serializer: string | undefined; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\" | undefined; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_query_schema/index.ts", "deprecated": false, @@ -2870,7 +2870,7 @@ "label": "ImportListItemQuerySchemaEncoded", "description": [], "signature": [ - "{ deserializer?: string | undefined; list_id?: string | undefined; serializer?: string | undefined; type?: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\" | undefined; }" + "{ deserializer?: string | undefined; list_id?: string | undefined; serializer?: string | undefined; type?: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\" | undefined; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_query_schema/index.ts", "deprecated": false, @@ -2982,7 +2982,7 @@ "label": "ListArraySchema", "description": [], "signature": [ - "{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]" + "{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/response/list_schema/index.ts", "deprecated": false, @@ -3024,7 +3024,7 @@ "label": "ListItemArraySchema", "description": [], "signature": [ - "{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]" + "{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_schema/index.ts", "deprecated": false, @@ -3052,7 +3052,7 @@ "label": "ListItemSchema", "description": [], "signature": [ - "{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }" + "{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_schema/index.ts", "deprecated": false, @@ -3080,7 +3080,7 @@ "label": "ListSchema", "description": [], "signature": [ - "{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }" + "{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/response/list_schema/index.ts", "deprecated": false, @@ -3262,7 +3262,7 @@ "label": "NonEmptyEntriesArray", "description": [], "signature": [ - "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]" + "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/common/non_empty_entries_array/index.ts", "deprecated": false, @@ -3276,7 +3276,7 @@ "label": "NonEmptyEntriesArrayDecoded", "description": [], "signature": [ - "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]" + "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/common/non_empty_entries_array/index.ts", "deprecated": false, @@ -3598,7 +3598,7 @@ "label": "SearchListItemArraySchema", "description": [], "signature": [ - "{ items: { _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]; value: unknown; }[]" + "{ items: { _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]; value: unknown; }[]" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/response/search_list_item_schema/index.ts", "deprecated": false, @@ -3612,7 +3612,7 @@ "label": "SearchListItemSchema", "description": [], "signature": [ - "{ items: { _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]; value: unknown; }" + "{ items: { _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]; value: unknown; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/response/search_list_item_schema/index.ts", "deprecated": false, @@ -3752,7 +3752,7 @@ "label": "Type", "description": [], "signature": [ - "\"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"" + "\"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/common/type/index.ts", "deprecated": false, @@ -3766,7 +3766,7 @@ "label": "TypeOrUndefined", "description": [], "signature": [ - "\"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\" | undefined" + "\"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\" | undefined" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/common/type/index.ts", "deprecated": false, @@ -3822,7 +3822,7 @@ "label": "UpdateEndpointListItemSchema", "description": [], "signature": [ - "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" + "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/update_endpoint_list_item_schema/index.ts", "deprecated": false, @@ -3836,7 +3836,7 @@ "label": "UpdateEndpointListItemSchemaDecoded", "description": [], "signature": [ - "Pick<{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; _version: string | undefined; comments: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id: string | undefined; item_id: string | undefined; meta: object | undefined; os_types: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags: string[] | undefined; }, \"type\" | \"id\" | \"description\" | \"name\" | \"meta\" | \"_version\" | \"os_types\" | \"item_id\"> & { comments: ({ comment: string; } & { id?: string | undefined; })[]; tags: string[]; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; os_types: (\"windows\" | \"linux\" | \"macos\")[]; }" + "Pick<{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; _version: string | undefined; comments: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id: string | undefined; item_id: string | undefined; meta: object | undefined; os_types: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags: string[] | undefined; }, \"type\" | \"id\" | \"description\" | \"name\" | \"meta\" | \"_version\" | \"os_types\" | \"item_id\"> & { comments: ({ comment: string; } & { id?: string | undefined; })[]; tags: string[]; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; os_types: (\"windows\" | \"linux\" | \"macos\")[]; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/update_endpoint_list_item_schema/index.ts", "deprecated": false, @@ -3850,7 +3850,7 @@ "label": "UpdateExceptionListItemSchema", "description": [], "signature": [ - "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" + "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_schema/index.ts", "deprecated": false, @@ -3864,7 +3864,7 @@ "label": "UpdateExceptionListItemSchemaDecoded", "description": [], "signature": [ - "Pick<{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; _version: string | undefined; comments: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id: string | undefined; item_id: string | undefined; meta: object | undefined; namespace_type: \"single\" | \"agnostic\" | undefined; os_types: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags: string[] | undefined; }, \"type\" | \"id\" | \"description\" | \"name\" | \"meta\" | \"_version\" | \"item_id\"> & { comments: ({ comment: string; } & { id?: string | undefined; })[]; tags: string[]; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; }" + "Pick<{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; _version: string | undefined; comments: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id: string | undefined; item_id: string | undefined; meta: object | undefined; namespace_type: \"single\" | \"agnostic\" | undefined; os_types: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags: string[] | undefined; }, \"type\" | \"id\" | \"description\" | \"name\" | \"meta\" | \"_version\" | \"item_id\"> & { comments: ({ comment: string; } & { id?: string | undefined; })[]; tags: string[]; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[]; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; }" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_schema/index.ts", "deprecated": false, @@ -4341,7 +4341,7 @@ "StringC", "; entries: ", "Type", - "<({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], unknown>; list_id: ", + "<({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], unknown>; list_id: ", "Type", "; name: ", "StringC", @@ -7077,7 +7077,7 @@ ], "signature": [ "Type", - "<({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], unknown>" + "<({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], unknown>" ], "path": "packages/kbn-securitysolution-io-ts-list-types/src/common/non_empty_entries_array/index.ts", "deprecated": false, @@ -7902,7 +7902,7 @@ "StringC", "; entries: ", "Type", - "<({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], unknown>; name: ", + "<({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], unknown>; name: ", "StringC", "; type: ", "KeyofC", @@ -7955,7 +7955,7 @@ "StringC", "; entries: ", "Type", - "<({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], unknown>; name: ", + "<({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; })[]; field: string; type: \"nested\"; })[], unknown>; name: ", "StringC", "; type: ", "KeyofC", diff --git a/api_docs/kbn_securitysolution_list_api.json b/api_docs/kbn_securitysolution_list_api.json index 7d6b00cbbc328..2c930b13c33b3 100644 --- a/api_docs/kbn_securitysolution_list_api.json +++ b/api_docs/kbn_securitysolution_list_api.json @@ -80,7 +80,7 @@ "section": "def-common.AddExceptionListItemProps", "text": "AddExceptionListItemProps" }, - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" ], "path": "packages/kbn-securitysolution-list-api/src/api/index.ts", "deprecated": false, @@ -248,7 +248,7 @@ "section": "def-common.ApiCallByIdProps", "text": "ApiCallByIdProps" }, - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" ], "path": "packages/kbn-securitysolution-list-api/src/api/index.ts", "deprecated": false, @@ -287,7 +287,7 @@ "signature": [ "({ deleteReferences, http, id, ignoreReferences, signal, }: ", "DeleteListParams", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" ], "path": "packages/kbn-securitysolution-list-api/src/list_api/index.ts", "deprecated": false, @@ -453,7 +453,7 @@ "section": "def-common.ApiCallByIdProps", "text": "ApiCallByIdProps" }, - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" ], "path": "packages/kbn-securitysolution-list-api/src/api/index.ts", "deprecated": false, @@ -498,7 +498,7 @@ "section": "def-common.ApiCallByListIdProps", "text": "ApiCallByListIdProps" }, - ") => Promise<{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; }>" + ") => Promise<{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; }>" ], "path": "packages/kbn-securitysolution-list-api/src/api/index.ts", "deprecated": false, @@ -582,7 +582,7 @@ "signature": [ "({ cursor, http, pageIndex, pageSize, signal, }: ", "FindListsParams", - ") => Promise<{ cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]; page: number; per_page: number; total: number; }>" + ") => Promise<{ cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]; page: number; per_page: number; total: number; }>" ], "path": "packages/kbn-securitysolution-list-api/src/list_api/index.ts", "deprecated": false, @@ -615,7 +615,7 @@ "signature": [ "({ file, http, listId, type, signal, }: ", "ImportListParams", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" ], "path": "packages/kbn-securitysolution-list-api/src/list_api/index.ts", "deprecated": false, @@ -785,7 +785,7 @@ "section": "def-common.UpdateExceptionListItemProps", "text": "UpdateExceptionListItemProps" }, - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" ], "path": "packages/kbn-securitysolution-list-api/src/api/index.ts", "deprecated": false, diff --git a/api_docs/kbn_securitysolution_list_hooks.json b/api_docs/kbn_securitysolution_list_hooks.json index bc26e83c859ac..a6dd6a78eefae 100644 --- a/api_docs/kbn_securitysolution_list_hooks.json +++ b/api_docs/kbn_securitysolution_list_hooks.json @@ -29,7 +29,7 @@ "\nThis adds an id to the incoming exception item entries as ReactJS prefers to have\nan id added to them for use as a stable id. Later if we decide to change the data\nmodel to have id's within the array then this code should be removed. If not, then\nthis code should stay as an adapter for ReactJS.\n\nThis does break the type system slightly as we are lying a bit to the type system as we return\nthe same exceptionItem as we have previously but are augmenting the arrays with an id which TypeScript\ndoesn't mind us doing here. However, downstream you will notice that you have an id when the type\ndoes not indicate it. In that case use (ExceptionItem & { id: string }) temporarily if you're using the id. If you're not,\nyou can ignore the id and just use the normal TypeScript with ReactJS.\n" ], "signature": [ - "(exceptionItem: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }) => { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }" + "(exceptionItem: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }) => { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }" ], "path": "packages/kbn-securitysolution-list-hooks/src/transforms/index.ts", "deprecated": false, @@ -44,7 +44,7 @@ "The exceptionItem to add an id to the threat matches." ], "signature": [ - "{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }" + "{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }" ], "path": "packages/kbn-securitysolution-list-hooks/src/transforms/index.ts", "deprecated": false, @@ -66,7 +66,7 @@ "\nThis removes an id from the exceptionItem entries as ReactJS prefers to have\nan id added to them for use as a stable id. Later if we decide to change the data\nmodel to have id's within the array then this code should be removed. If not, then\nthis code should stay as an adapter for ReactJS.\n" ], "signature": [ - "(exceptionItem: T) => T" + "(exceptionItem: T) => T" ], "path": "packages/kbn-securitysolution-list-hooks/src/transforms/index.ts", "deprecated": false, @@ -103,7 +103,7 @@ "\nTransforms the output of rules to compensate for technical debt or UI concerns such as\nReactJS preferences for having ids within arrays if the data is not modeled that way.\n\nIf you add a new transform of the input called \"myNewTransform\" do it\nin the form of:\nflow(addIdToExceptionItemEntries, myNewTransform)(exceptionItem)\n" ], "signature": [ - "(exceptionItem: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }) => { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }" + "(exceptionItem: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }) => { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }" ], "path": "packages/kbn-securitysolution-list-hooks/src/transforms/index.ts", "deprecated": false, @@ -118,7 +118,7 @@ "The exceptionItem to transform the output of" ], "signature": [ - "{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }" + "{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }" ], "path": "packages/kbn-securitysolution-list-hooks/src/transforms/index.ts", "deprecated": false, @@ -138,7 +138,7 @@ "label": "transformNewItemOutput", "description": [], "signature": [ - "(exceptionItem: { description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }) => { description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" + "(exceptionItem: { description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }) => { description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" ], "path": "packages/kbn-securitysolution-list-hooks/src/transforms/index.ts", "deprecated": false, @@ -151,7 +151,7 @@ "label": "exceptionItem", "description": [], "signature": [ - "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" + "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" ], "path": "packages/kbn-securitysolution-list-hooks/src/transforms/index.ts", "deprecated": false, @@ -171,7 +171,7 @@ "\nTransforms the output of exception items to compensate for technical debt or UI concerns such as\nReactJS preferences for having ids within arrays if the data is not modeled that way.\n\nIf you add a new transform of the output called \"myNewTransform\" do it\nin the form of:\nflow(removeIdFromExceptionItemsEntries, myNewTransform)(exceptionItem)\n" ], "signature": [ - "(exceptionItem: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | ({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; })) => { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | ({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; })" + "(exceptionItem: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | ({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; })) => { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | ({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; })" ], "path": "packages/kbn-securitysolution-list-hooks/src/transforms/index.ts", "deprecated": false, @@ -186,7 +186,7 @@ "The exceptionItem to transform the output of" ], "signature": [ - "{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | ({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; })" + "{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | ({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; })" ], "path": "packages/kbn-securitysolution-list-hooks/src/transforms/index.ts", "deprecated": false, @@ -329,7 +329,7 @@ }, "<", "DeleteListParams", - ">], { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" + ">], { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" ], "path": "packages/kbn-securitysolution-list-hooks/src/use_delete_list/index.ts", "deprecated": false, @@ -493,7 +493,7 @@ }, "<", "FindListsParams", - ">], { cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]; page: number; per_page: number; total: number; }>" + ">], { cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]; page: number; per_page: number; total: number; }>" ], "path": "packages/kbn-securitysolution-list-hooks/src/use_find_lists/index.ts", "deprecated": false, @@ -521,7 +521,7 @@ }, "<", "ImportListParams", - ">], { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" + ">], { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" ], "path": "packages/kbn-securitysolution-list-hooks/src/use_import_list/index.ts", "deprecated": false, @@ -713,7 +713,7 @@ "label": "addExceptionListItem", "description": [], "signature": [ - "(arg: { listItem: { description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }; }) => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" + "(arg: { listItem: { description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }; }) => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" ], "path": "packages/kbn-securitysolution-list-hooks/src/use_api/index.ts", "deprecated": false, @@ -736,7 +736,7 @@ "label": "listItem", "description": [], "signature": [ - "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" + "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" ], "path": "packages/kbn-securitysolution-list-hooks/src/use_api/index.ts", "deprecated": false @@ -754,7 +754,7 @@ "label": "updateExceptionListItem", "description": [], "signature": [ - "(arg: { listItem: { description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }; }) => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" + "(arg: { listItem: { description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }; }) => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" ], "path": "packages/kbn-securitysolution-list-hooks/src/use_api/index.ts", "deprecated": false, @@ -777,7 +777,7 @@ "label": "listItem", "description": [], "signature": [ - "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" + "{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }" ], "path": "packages/kbn-securitysolution-list-hooks/src/use_api/index.ts", "deprecated": false @@ -891,7 +891,7 @@ "section": "def-common.ApiCallMemoProps", "text": "ApiCallMemoProps" }, - " & { onSuccess: (arg: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }) => void; }) => Promise" + " & { onSuccess: (arg: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }) => void; }) => Promise" ], "path": "packages/kbn-securitysolution-list-hooks/src/use_api/index.ts", "deprecated": false, @@ -911,7 +911,7 @@ "section": "def-common.ApiCallMemoProps", "text": "ApiCallMemoProps" }, - " & { onSuccess: (arg: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }) => void; }" + " & { onSuccess: (arg: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }) => void; }" ], "path": "packages/kbn-securitysolution-list-hooks/src/use_api/index.ts", "deprecated": false, @@ -1116,7 +1116,7 @@ "label": "ReturnExceptionListAndItems", "description": [], "signature": [ - "[boolean, { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[], ", + "[boolean, { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[], ", { "pluginId": "@kbn/securitysolution-io-ts-list-types", "scope": "common", @@ -1176,7 +1176,7 @@ "label": "ReturnPersistExceptionItem", "description": [], "signature": [ - "[PersistReturnExceptionItem, React.Dispatch<({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }) | ({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }) | null>]" + "[PersistReturnExceptionItem, React.Dispatch<({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }) | ({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; name: string; type: \"simple\"; } & { _version?: string | undefined; comments?: ({ comment: string; } & { id?: string | undefined; })[] | undefined; id?: string | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }) | null>]" ], "path": "packages/kbn-securitysolution-list-hooks/src/use_persist_exception_item/index.ts", "deprecated": false, diff --git a/api_docs/kbn_securitysolution_list_utils.json b/api_docs/kbn_securitysolution_list_utils.json index bfc009f17df0a..5177d53b2acfb 100644 --- a/api_docs/kbn_securitysolution_list_utils.json +++ b/api_docs/kbn_securitysolution_list_utils.json @@ -27,7 +27,7 @@ "label": "addIdToEntries", "description": [], "signature": [ - "(entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]) => ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]" + "(entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]) => ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]" ], "path": "packages/kbn-securitysolution-list-utils/src/helpers/index.ts", "deprecated": false, @@ -40,7 +40,7 @@ "label": "entries", "description": [], "signature": [ - "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]" + "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]" ], "path": "packages/kbn-securitysolution-list-utils/src/helpers/index.ts", "deprecated": false, @@ -58,7 +58,7 @@ "label": "buildExceptionFilter", "description": [], "signature": [ - "({ lists, excludeExceptions, chunkSize, }: { lists: ({ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | ({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }))[]; excludeExceptions: boolean; chunkSize: number; }) => ", + "({ lists, excludeExceptions, chunkSize, }: { lists: ({ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | ({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }))[]; excludeExceptions: boolean; chunkSize: number; }) => ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -89,7 +89,7 @@ "label": "lists", "description": [], "signature": [ - "({ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | ({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }))[]" + "({ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | ({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }))[]" ], "path": "packages/kbn-securitysolution-list-utils/src/build_exception_filter/index.ts", "deprecated": false @@ -696,7 +696,7 @@ "section": "def-common.ExceptionsBuilderExceptionItem", "text": "ExceptionsBuilderExceptionItem" }, - "[]) => ({ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | ({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }))[]" + "[]) => ({ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | ({ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }))[]" ], "path": "packages/kbn-securitysolution-list-utils/src/helpers/index.ts", "deprecated": false, @@ -968,7 +968,7 @@ "section": "def-common.FormattedBuilderEntry", "text": "FormattedBuilderEntry" }, - ") => ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } & { id?: string | undefined; }) | ({ field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } & { id?: string | undefined; }) | ({ field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } & { id?: string | undefined; }) | ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } & { id?: string | undefined; }) | ({ field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } & { id?: string | undefined; })" + ") => ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } & { id?: string | undefined; }) | ({ field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } & { id?: string | undefined; }) | ({ field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } & { id?: string | undefined; }) | ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } & { id?: string | undefined; }) | ({ field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } & { id?: string | undefined; })" ], "path": "packages/kbn-securitysolution-list-utils/src/helpers/index.ts", "deprecated": false, @@ -1122,7 +1122,7 @@ "section": "def-common.FormattedBuilderEntry", "text": "FormattedBuilderEntry" }, - ", newField: { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }) => { index: number; updatedEntry: ", + ", newField: { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }) => { index: number; updatedEntry: ", { "pluginId": "@kbn/securitysolution-list-utils", "scope": "common", @@ -1167,7 +1167,7 @@ "- newly selected list" ], "signature": [ - "{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }" + "{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }" ], "path": "packages/kbn-securitysolution-list-utils/src/helpers/index.ts", "deprecated": false, @@ -2635,7 +2635,7 @@ "label": "hasLargeValueList", "description": [], "signature": [ - "(entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]) => boolean" + "(entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]) => boolean" ], "path": "packages/kbn-securitysolution-list-utils/src/has_large_value_list/index.ts", "deprecated": false, @@ -2648,7 +2648,7 @@ "label": "entries", "description": [], "signature": [ - "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]" + "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]" ], "path": "packages/kbn-securitysolution-list-utils/src/has_large_value_list/index.ts", "deprecated": false, @@ -2774,7 +2774,7 @@ "label": "bool", "description": [], "signature": [ - "{ must?: unknown; must_not?: unknown; should?: unknown[] | undefined; filter?: unknown; minimum_should_match?: number | undefined; }" + "QueryDslBoolQuery" ], "path": "packages/kbn-securitysolution-list-utils/src/build_exception_filter/index.ts", "deprecated": false @@ -3265,7 +3265,7 @@ "label": "nested", "description": [], "signature": [ - "{ path: string; query: unknown; score_mode: string; }" + "QueryDslNestedQuery" ], "path": "packages/kbn-securitysolution-list-utils/src/build_exception_filter/index.ts", "deprecated": false @@ -3355,7 +3355,7 @@ "label": "BuilderEntry", "description": [], "signature": [ - "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } & { id?: string | undefined; }) | ({ field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } & { id?: string | undefined; }) | ({ field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } & { id?: string | undefined; }) | ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } & { id?: string | undefined; }) | ({ field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } & { id?: string | undefined; }) | ", + "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } & { id?: string | undefined; }) | ({ field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } & { id?: string | undefined; }) | ({ field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } & { id?: string | undefined; }) | ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } & { id?: string | undefined; }) | ({ field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } & { id?: string | undefined; }) | ", { "pluginId": "@kbn/securitysolution-list-utils", "scope": "common", @@ -3414,7 +3414,7 @@ "label": "CreateExceptionListItemBuilderSchema", "description": [], "signature": [ - "Pick<{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }, \"type\" | \"description\" | \"name\" | \"tags\" | \"comments\" | \"list_id\" | \"namespace_type\" | \"os_types\" | \"item_id\"> & { meta: { temporaryUuid: string; }; entries: ", + "Pick<{ description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; })[]; list_id: string; name: string; type: \"simple\"; } & { comments?: { comment: string; }[] | undefined; item_id?: string | undefined; meta?: object | undefined; namespace_type?: \"single\" | \"agnostic\" | undefined; os_types?: (\"windows\" | \"linux\" | \"macos\")[] | undefined; tags?: string[] | undefined; }, \"type\" | \"description\" | \"name\" | \"tags\" | \"comments\" | \"list_id\" | \"namespace_type\" | \"os_types\" | \"item_id\"> & { meta: { temporaryUuid: string; }; entries: ", { "pluginId": "@kbn/securitysolution-list-utils", "scope": "common", @@ -3548,7 +3548,7 @@ "label": "ExceptionListItemBuilderSchema", "description": [], "signature": [ - "Pick<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }, \"type\" | \"id\" | \"description\" | \"name\" | \"tags\" | \"meta\" | \"updated_at\" | \"comments\" | \"_version\" | \"created_at\" | \"created_by\" | \"updated_by\" | \"tie_breaker_id\" | \"list_id\" | \"namespace_type\" | \"os_types\" | \"item_id\"> & { entries: ", + "Pick<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }, \"type\" | \"id\" | \"description\" | \"name\" | \"tags\" | \"meta\" | \"updated_at\" | \"comments\" | \"_version\" | \"created_at\" | \"created_by\" | \"updated_by\" | \"tie_breaker_id\" | \"list_id\" | \"namespace_type\" | \"os_types\" | \"item_id\"> & { entries: ", { "pluginId": "@kbn/securitysolution-list-utils", "scope": "common", diff --git a/api_docs/kbn_securitysolution_utils.json b/api_docs/kbn_securitysolution_utils.json index fc0556f7926a0..61eda7861af56 100644 --- a/api_docs/kbn_securitysolution_utils.json +++ b/api_docs/kbn_securitysolution_utils.json @@ -76,6 +76,37 @@ ], "returnComment": [], "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/securitysolution-utils", + "id": "def-server.transformDataToNdjson", + "type": "Function", + "tags": [], + "label": "transformDataToNdjson", + "description": [], + "signature": [ + "(data: unknown[]) => string" + ], + "path": "packages/kbn-securitysolution-utils/src/transform_data_to_ndjson/index.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/securitysolution-utils", + "id": "def-server.transformDataToNdjson.$1", + "type": "Array", + "tags": [], + "label": "data", + "description": [], + "signature": [ + "unknown[]" + ], + "path": "packages/kbn-securitysolution-utils/src/transform_data_to_ndjson/index.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false } ], "interfaces": [], diff --git a/api_docs/kbn_securitysolution_utils.mdx b/api_docs/kbn_securitysolution_utils.mdx index 63039630e7c9a..23f9c42bfb9c4 100644 --- a/api_docs/kbn_securitysolution_utils.mdx +++ b/api_docs/kbn_securitysolution_utils.mdx @@ -18,7 +18,7 @@ Contact [Owner missing] for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 4 | 0 | 2 | 0 | +| 6 | 0 | 4 | 0 | ## Server diff --git a/api_docs/kibana_react.json b/api_docs/kibana_react.json index 5d7a7241dd956..be973dd7ceb10 100644 --- a/api_docs/kibana_react.json +++ b/api_docs/kibana_react.json @@ -3416,7 +3416,7 @@ "label": "color", "description": [], "signature": [ - "\"warning\" | \"primary\" | \"success\" | \"danger\" | undefined" + "\"primary\" | \"success\" | \"warning\" | \"danger\" | undefined" ], "path": "src/plugins/kibana_react/public/notifications/types.ts", "deprecated": false @@ -3807,7 +3807,7 @@ "DisambiguateSet", " & ", "DisambiguateSet", - "<{ tooltipContent: React.ReactNode; title?: string | undefined; }, { title: string; tooltipContent?: React.ReactNode; }> & { title: string; tooltipContent?: React.ReactNode; } & { label: React.ReactNode; }> | undefined; display?: \"warning\" | \"primary\" | \"success\" | \"danger\" | \"accent\" | \"transparent\" | \"plain\" | \"subdued\" | undefined; paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; selectable?: (", + "<{ tooltipContent: React.ReactNode; title?: string | undefined; }, { title: string; tooltipContent?: React.ReactNode; }> & { title: string; tooltipContent?: React.ReactNode; } & { label: React.ReactNode; }> | undefined; display?: \"primary\" | \"success\" | \"warning\" | \"danger\" | \"accent\" | \"transparent\" | \"plain\" | \"subdued\" | undefined; paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; selectable?: (", "DisambiguateSet", "<", "PropsForAnchor", @@ -3939,7 +3939,7 @@ "DisambiguateSet", " & ", "DisambiguateSet", - "<{ tooltipContent: React.ReactNode; title?: string | undefined; }, { title: string; tooltipContent?: React.ReactNode; }> & { title: string; tooltipContent?: React.ReactNode; } & { label: React.ReactNode; }> | undefined; display?: \"warning\" | \"primary\" | \"success\" | \"danger\" | \"accent\" | \"transparent\" | \"plain\" | \"subdued\" | undefined; paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; selectable?: (", + "<{ tooltipContent: React.ReactNode; title?: string | undefined; }, { title: string; tooltipContent?: React.ReactNode; }> & { title: string; tooltipContent?: React.ReactNode; } & { label: React.ReactNode; }> | undefined; display?: \"primary\" | \"success\" | \"warning\" | \"danger\" | \"accent\" | \"transparent\" | \"plain\" | \"subdued\" | undefined; paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; selectable?: (", "DisambiguateSet", "<", "PropsForAnchor", @@ -4071,7 +4071,7 @@ "DisambiguateSet", " & ", "DisambiguateSet", - "<{ tooltipContent: React.ReactNode; title?: string | undefined; }, { title: string; tooltipContent?: React.ReactNode; }> & { title: string; tooltipContent?: React.ReactNode; } & { label: React.ReactNode; }> | undefined; display?: \"warning\" | \"primary\" | \"success\" | \"danger\" | \"accent\" | \"transparent\" | \"plain\" | \"subdued\" | undefined; paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; selectable?: (", + "<{ tooltipContent: React.ReactNode; title?: string | undefined; }, { title: string; tooltipContent?: React.ReactNode; }> & { title: string; tooltipContent?: React.ReactNode; } & { label: React.ReactNode; }> | undefined; display?: \"primary\" | \"success\" | \"warning\" | \"danger\" | \"accent\" | \"transparent\" | \"plain\" | \"subdued\" | undefined; paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; selectable?: (", "DisambiguateSet", "<", "PropsForAnchor", @@ -4203,7 +4203,7 @@ "DisambiguateSet", " & ", "DisambiguateSet", - "<{ tooltipContent: React.ReactNode; title?: string | undefined; }, { title: string; tooltipContent?: React.ReactNode; }> & { title: string; tooltipContent?: React.ReactNode; } & { label: React.ReactNode; }> | undefined; display?: \"warning\" | \"primary\" | \"success\" | \"danger\" | \"accent\" | \"transparent\" | \"plain\" | \"subdued\" | undefined; paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; selectable?: (", + "<{ tooltipContent: React.ReactNode; title?: string | undefined; }, { title: string; tooltipContent?: React.ReactNode; }> & { title: string; tooltipContent?: React.ReactNode; } & { label: React.ReactNode; }> | undefined; display?: \"primary\" | \"success\" | \"warning\" | \"danger\" | \"accent\" | \"transparent\" | \"plain\" | \"subdued\" | undefined; paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; selectable?: (", "DisambiguateSet", "<", "PropsForAnchor", @@ -4349,7 +4349,7 @@ "DisambiguateSet", " & ", "DisambiguateSet", - "<{ tooltipContent: React.ReactNode; title?: string | undefined; }, { title: string; tooltipContent?: React.ReactNode; }> & { title: string; tooltipContent?: React.ReactNode; } & { label: React.ReactNode; }> | undefined; display?: \"warning\" | \"primary\" | \"success\" | \"danger\" | \"accent\" | \"transparent\" | \"plain\" | \"subdued\" | undefined; paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; selectable?: (", + "<{ tooltipContent: React.ReactNode; title?: string | undefined; }, { title: string; tooltipContent?: React.ReactNode; }> & { title: string; tooltipContent?: React.ReactNode; } & { label: React.ReactNode; }> | undefined; display?: \"primary\" | \"success\" | \"warning\" | \"danger\" | \"accent\" | \"transparent\" | \"plain\" | \"subdued\" | undefined; paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; selectable?: (", "DisambiguateSet", "<", "PropsForAnchor", @@ -4481,7 +4481,7 @@ "DisambiguateSet", " & ", "DisambiguateSet", - "<{ tooltipContent: React.ReactNode; title?: string | undefined; }, { title: string; tooltipContent?: React.ReactNode; }> & { title: string; tooltipContent?: React.ReactNode; } & { label: React.ReactNode; }> | undefined; display?: \"warning\" | \"primary\" | \"success\" | \"danger\" | \"accent\" | \"transparent\" | \"plain\" | \"subdued\" | undefined; paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; selectable?: (", + "<{ tooltipContent: React.ReactNode; title?: string | undefined; }, { title: string; tooltipContent?: React.ReactNode; }> & { title: string; tooltipContent?: React.ReactNode; } & { label: React.ReactNode; }> | undefined; display?: \"primary\" | \"success\" | \"warning\" | \"danger\" | \"accent\" | \"transparent\" | \"plain\" | \"subdued\" | undefined; paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; selectable?: (", "DisambiguateSet", "<", "PropsForAnchor", @@ -4613,7 +4613,7 @@ "DisambiguateSet", " & ", "DisambiguateSet", - "<{ tooltipContent: React.ReactNode; title?: string | undefined; }, { title: string; tooltipContent?: React.ReactNode; }> & { title: string; tooltipContent?: React.ReactNode; } & { label: React.ReactNode; }> | undefined; display?: \"warning\" | \"primary\" | \"success\" | \"danger\" | \"accent\" | \"transparent\" | \"plain\" | \"subdued\" | undefined; paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; selectable?: (", + "<{ tooltipContent: React.ReactNode; title?: string | undefined; }, { title: string; tooltipContent?: React.ReactNode; }> & { title: string; tooltipContent?: React.ReactNode; } & { label: React.ReactNode; }> | undefined; display?: \"primary\" | \"success\" | \"warning\" | \"danger\" | \"accent\" | \"transparent\" | \"plain\" | \"subdued\" | undefined; paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; selectable?: (", "DisambiguateSet", "<", "PropsForAnchor", @@ -4745,7 +4745,7 @@ "DisambiguateSet", " & ", "DisambiguateSet", - "<{ tooltipContent: React.ReactNode; title?: string | undefined; }, { title: string; tooltipContent?: React.ReactNode; }> & { title: string; tooltipContent?: React.ReactNode; } & { label: React.ReactNode; }> | undefined; display?: \"warning\" | \"primary\" | \"success\" | \"danger\" | \"accent\" | \"transparent\" | \"plain\" | \"subdued\" | undefined; paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; selectable?: (", + "<{ tooltipContent: React.ReactNode; title?: string | undefined; }, { title: string; tooltipContent?: React.ReactNode; }> & { title: string; tooltipContent?: React.ReactNode; } & { label: React.ReactNode; }> | undefined; display?: \"primary\" | \"success\" | \"warning\" | \"danger\" | \"accent\" | \"transparent\" | \"plain\" | \"subdued\" | undefined; paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; selectable?: (", "DisambiguateSet", "<", "PropsForAnchor", @@ -5064,7 +5064,7 @@ "DisambiguateSet", " & ", "DisambiguateSet", - "<{ tooltipContent: React.ReactNode; title?: string | undefined; }, { title: string; tooltipContent?: React.ReactNode; }> & { title: string; tooltipContent?: React.ReactNode; } & { label: React.ReactNode; }> | undefined; display?: \"warning\" | \"primary\" | \"success\" | \"danger\" | \"accent\" | \"transparent\" | \"plain\" | \"subdued\" | undefined; paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; selectable?: (", + "<{ tooltipContent: React.ReactNode; title?: string | undefined; }, { title: string; tooltipContent?: React.ReactNode; }> & { title: string; tooltipContent?: React.ReactNode; } & { label: React.ReactNode; }> | undefined; display?: \"primary\" | \"success\" | \"warning\" | \"danger\" | \"accent\" | \"transparent\" | \"plain\" | \"subdued\" | undefined; paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; selectable?: (", "DisambiguateSet", "<", "PropsForAnchor", @@ -5196,7 +5196,7 @@ "DisambiguateSet", " & ", "DisambiguateSet", - "<{ tooltipContent: React.ReactNode; title?: string | undefined; }, { title: string; tooltipContent?: React.ReactNode; }> & { title: string; tooltipContent?: React.ReactNode; } & { label: React.ReactNode; }> | undefined; display?: \"warning\" | \"primary\" | \"success\" | \"danger\" | \"accent\" | \"transparent\" | \"plain\" | \"subdued\" | undefined; paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; selectable?: (", + "<{ tooltipContent: React.ReactNode; title?: string | undefined; }, { title: string; tooltipContent?: React.ReactNode; }> & { title: string; tooltipContent?: React.ReactNode; } & { label: React.ReactNode; }> | undefined; display?: \"primary\" | \"success\" | \"warning\" | \"danger\" | \"accent\" | \"transparent\" | \"plain\" | \"subdued\" | undefined; paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; selectable?: (", "DisambiguateSet", "<", "PropsForAnchor", @@ -5328,7 +5328,7 @@ "DisambiguateSet", " & ", "DisambiguateSet", - "<{ tooltipContent: React.ReactNode; title?: string | undefined; }, { title: string; tooltipContent?: React.ReactNode; }> & { title: string; tooltipContent?: React.ReactNode; } & { label: React.ReactNode; }> | undefined; display?: \"warning\" | \"primary\" | \"success\" | \"danger\" | \"accent\" | \"transparent\" | \"plain\" | \"subdued\" | undefined; paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; selectable?: (", + "<{ tooltipContent: React.ReactNode; title?: string | undefined; }, { title: string; tooltipContent?: React.ReactNode; }> & { title: string; tooltipContent?: React.ReactNode; } & { label: React.ReactNode; }> | undefined; display?: \"primary\" | \"success\" | \"warning\" | \"danger\" | \"accent\" | \"transparent\" | \"plain\" | \"subdued\" | undefined; paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; selectable?: (", "DisambiguateSet", "<", "PropsForAnchor", @@ -5460,7 +5460,7 @@ "DisambiguateSet", " & ", "DisambiguateSet", - "<{ tooltipContent: React.ReactNode; title?: string | undefined; }, { title: string; tooltipContent?: React.ReactNode; }> & { title: string; tooltipContent?: React.ReactNode; } & { label: React.ReactNode; }> | undefined; display?: \"warning\" | \"primary\" | \"success\" | \"danger\" | \"accent\" | \"transparent\" | \"plain\" | \"subdued\" | undefined; paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; selectable?: (", + "<{ tooltipContent: React.ReactNode; title?: string | undefined; }, { title: string; tooltipContent?: React.ReactNode; }> & { title: string; tooltipContent?: React.ReactNode; } & { label: React.ReactNode; }> | undefined; display?: \"primary\" | \"success\" | \"warning\" | \"danger\" | \"accent\" | \"transparent\" | \"plain\" | \"subdued\" | undefined; paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; selectable?: (", "DisambiguateSet", "<", "PropsForAnchor", diff --git a/api_docs/kibana_utils.json b/api_docs/kibana_utils.json index 744c735e94d68..71174e6eafe3f 100644 --- a/api_docs/kibana_utils.json +++ b/api_docs/kibana_utils.json @@ -6895,7 +6895,7 @@ "signature": [ "(history: Pick<", "History", - ", \"location\" | \"replace\">) => void" + ", \"replace\" | \"location\">) => void" ], "path": "src/plugins/kibana_utils/public/plugin.ts", "deprecated": false, @@ -6910,7 +6910,7 @@ "signature": [ "Pick<", "History", - ", \"location\" | \"replace\">" + ", \"replace\" | \"location\">" ], "path": "src/plugins/kibana_utils/public/plugin.ts", "deprecated": false, diff --git a/api_docs/lens.json b/api_docs/lens.json index 9d9591af006ac..7dc468fcad234 100644 --- a/api_docs/lens.json +++ b/api_docs/lens.json @@ -332,7 +332,7 @@ "label": "operationType", "description": [], "signature": [ - "\"range\" | \"filters\" | \"max\" | \"min\" | \"count\" | \"date_histogram\" | \"sum\" | \"average\" | \"percentile\" | \"terms\" | \"median\" | \"cumulative_sum\" | \"moving_average\" | \"math\" | \"overall_sum\" | \"overall_min\" | \"overall_max\" | \"overall_average\" | \"counter_rate\" | \"differences\" | \"unique_count\" | \"last_value\" | \"formula\" | \"static_value\" | undefined" + "\"filters\" | \"max\" | \"min\" | \"count\" | \"date_histogram\" | \"sum\" | \"average\" | \"percentile\" | \"range\" | \"terms\" | \"median\" | \"cumulative_sum\" | \"moving_average\" | \"math\" | \"overall_sum\" | \"overall_min\" | \"overall_max\" | \"overall_average\" | \"counter_rate\" | \"differences\" | \"unique_count\" | \"last_value\" | \"formula\" | \"static_value\" | undefined" ], "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/column_types.ts", "deprecated": false @@ -1807,6 +1807,19 @@ ], "path": "x-pack/plugins/lens/common/expressions/xy_chart/axis_config.ts", "deprecated": false + }, + { + "parentPluginId": "lens", + "id": "def-public.YConfig.textVisibility", + "type": "CompoundType", + "tags": [], + "label": "textVisibility", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/plugins/lens/common/expressions/xy_chart/axis_config.ts", + "deprecated": false } ], "initialIsOpen": false @@ -2277,7 +2290,7 @@ "\nA union type of all available operation types. The operation type is a unique id of an operation.\nEach column is assigned to exactly one operation type." ], "signature": [ - "\"range\" | \"filters\" | \"max\" | \"min\" | \"count\" | \"date_histogram\" | \"sum\" | \"average\" | \"percentile\" | \"terms\" | \"median\" | \"cumulative_sum\" | \"moving_average\" | \"math\" | \"overall_sum\" | \"overall_min\" | \"overall_max\" | \"overall_average\" | \"counter_rate\" | \"differences\" | \"unique_count\" | \"last_value\" | \"formula\" | \"static_value\"" + "\"filters\" | \"max\" | \"min\" | \"count\" | \"date_histogram\" | \"sum\" | \"average\" | \"percentile\" | \"range\" | \"terms\" | \"median\" | \"cumulative_sum\" | \"moving_average\" | \"math\" | \"overall_sum\" | \"overall_min\" | \"overall_max\" | \"overall_average\" | \"counter_rate\" | \"differences\" | \"unique_count\" | \"last_value\" | \"formula\" | \"static_value\"" ], "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/index.ts", "deprecated": false, @@ -2898,7 +2911,7 @@ "label": "state", "description": [], "signature": [ - "{ datasourceMetaData: { filterableIndexPatterns: { id: string; title: string; }[]; }; datasourceStates: { indexpattern: { currentIndexPatternId: string; layers: Record; }>; }; }; visualization: VisualizationState; query: ", + "{ datasourceMetaData: { filterableIndexPatterns: { id: string; title: string; }[]; }; datasourceStates: { indexpattern: { currentIndexPatternId: string; layers: Record; }>; }; }; visualization: VisualizationState; query: ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -3199,7 +3212,7 @@ "section": "def-server.LensDocShapePost712", "text": "LensDocShapePost712" }, - ", \"title\" | \"expression\" | \"visualizationType\"> & { state: Pick<{ datasourceMetaData: { filterableIndexPatterns: { id: string; title: string; }[]; }; datasourceStates: { indexpattern: { currentIndexPatternId: string; layers: Record; }>; }; }; visualization: unknown; query: ", + ", \"title\" | \"expression\" | \"visualizationType\"> & { state: Pick<{ datasourceMetaData: { filterableIndexPatterns: { id: string; title: string; }[]; }; datasourceStates: { indexpattern: { currentIndexPatternId: string; layers: Record; }>; }; }; visualization: unknown; query: ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -3215,7 +3228,7 @@ "section": "def-common.Filter", "text": "Filter" }, - "[]; }, \"filters\" | \"query\" | \"visualization\" | \"datasourceMetaData\"> & { datasourceStates: { indexpattern: Pick<{ currentIndexPatternId: string; layers: Record; }>; }, \"currentIndexPatternId\"> & { layers: Record; }, never> & { columns: Record; }>; }; }; }; }" + "[]; }, \"filters\" | \"query\" | \"visualization\" | \"datasourceMetaData\"> & { datasourceStates: { indexpattern: Pick<{ currentIndexPatternId: string; layers: Record; }>; }, \"currentIndexPatternId\"> & { layers: Record; }, never> & { columns: Record; }>; }; }; }; }" ], "path": "x-pack/plugins/lens/server/migrations/types.ts", "deprecated": false, @@ -3237,7 +3250,7 @@ "section": "def-server.LensDocShapePost712", "text": "LensDocShapePost712" }, - ", \"title\" | \"expression\" | \"visualizationType\"> & { state: Pick<{ datasourceMetaData: { filterableIndexPatterns: { id: string; title: string; }[]; }; datasourceStates: { indexpattern: { currentIndexPatternId: string; layers: Record; }>; }; }; visualization: unknown; query: ", + ", \"title\" | \"expression\" | \"visualizationType\"> & { state: Pick<{ datasourceMetaData: { filterableIndexPatterns: { id: string; title: string; }[]; }; datasourceStates: { indexpattern: { currentIndexPatternId: string; layers: Record; }>; }; }; visualization: unknown; query: ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -3253,7 +3266,7 @@ "section": "def-common.Filter", "text": "Filter" }, - "[]; }, \"filters\" | \"query\" | \"visualization\" | \"datasourceMetaData\"> & { datasourceStates: { indexpattern: Pick<{ currentIndexPatternId: string; layers: Record; }>; }, \"currentIndexPatternId\"> & { layers: Record; }, never> & { columns: Record; }>; }; }; }; }" + "[]; }, \"filters\" | \"query\" | \"visualization\" | \"datasourceMetaData\"> & { datasourceStates: { indexpattern: Pick<{ currentIndexPatternId: string; layers: Record; }>; }, \"currentIndexPatternId\"> & { layers: Record; }, never> & { columns: Record; }>; }; }; }; }" ], "path": "x-pack/plugins/lens/server/migrations/types.ts", "deprecated": false, @@ -3267,7 +3280,7 @@ "label": "OperationTypePost712", "description": [], "signature": [ - "\"range\" | \"filters\" | \"max\" | \"min\" | \"count\" | \"date_histogram\" | \"sum\" | \"average\" | \"percentile\" | \"terms\" | \"median\" | \"cumulative_sum\" | \"moving_average\" | \"counter_rate\" | \"differences\" | \"unique_count\" | \"last_value\"" + "\"filters\" | \"max\" | \"min\" | \"count\" | \"date_histogram\" | \"sum\" | \"average\" | \"percentile\" | \"range\" | \"terms\" | \"median\" | \"cumulative_sum\" | \"moving_average\" | \"counter_rate\" | \"differences\" | \"unique_count\" | \"last_value\"" ], "path": "x-pack/plugins/lens/server/migrations/types.ts", "deprecated": false, @@ -3281,7 +3294,7 @@ "label": "OperationTypePre712", "description": [], "signature": [ - "\"range\" | \"filters\" | \"max\" | \"min\" | \"count\" | \"date_histogram\" | \"sum\" | \"percentile\" | \"terms\" | \"avg\" | \"median\" | \"cumulative_sum\" | \"derivative\" | \"moving_average\" | \"cardinality\" | \"counter_rate\" | \"last_value\"" + "\"filters\" | \"max\" | \"min\" | \"count\" | \"date_histogram\" | \"sum\" | \"percentile\" | \"range\" | \"terms\" | \"avg\" | \"median\" | \"cumulative_sum\" | \"derivative\" | \"moving_average\" | \"cardinality\" | \"counter_rate\" | \"last_value\"" ], "path": "x-pack/plugins/lens/server/migrations/types.ts", "deprecated": false, @@ -4231,13 +4244,21 @@ "signature": [ "(mapping?: ", { - "pluginId": "expressions", + "pluginId": "fieldFormats", "scope": "common", - "docId": "kibExpressionsPluginApi", + "docId": "kibFieldFormatsPluginApi", "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "> | undefined) => ", + "<", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormatParams", + "text": "FieldFormatParams" + }, + "> | undefined) => ", { "pluginId": "fieldFormats", "scope": "common", @@ -4259,13 +4280,21 @@ "description": [], "signature": [ { - "pluginId": "expressions", + "pluginId": "fieldFormats", "scope": "common", - "docId": "kibExpressionsPluginApi", + "docId": "kibFieldFormatsPluginApi", "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "> | undefined" + "<", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormatParams", + "text": "FieldFormatParams" + }, + "> | undefined" ], "path": "x-pack/plugins/lens/common/types.ts", "deprecated": false diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx index 6165c3ec65d5d..9232e5da09428 100644 --- a/api_docs/lens.mdx +++ b/api_docs/lens.mdx @@ -18,7 +18,7 @@ Contact [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 252 | 0 | 234 | 24 | +| 253 | 0 | 235 | 24 | ## Client diff --git a/api_docs/lists.json b/api_docs/lists.json index d6e2a97fa78ab..b3d498a4532d3 100644 --- a/api_docs/lists.json +++ b/api_docs/lists.json @@ -410,7 +410,7 @@ "signature": [ "({ itemId, id, namespaceType, }: ", "GetExceptionListItemOptions", - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, @@ -480,7 +480,7 @@ "signature": [ "({ comments, description, entries, itemId, meta, name, osTypes, tags, type, }: ", "CreateEndpointListItemOptions", - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, @@ -514,7 +514,7 @@ "signature": [ "({ _version, comments, description, entries, id, itemId, meta, name, osTypes, tags, type, }: ", "UpdateEndpointListItemOptions", - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, @@ -548,7 +548,7 @@ "signature": [ "({ itemId, id, }: ", "GetEndpointListItemOptions", - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, @@ -682,7 +682,7 @@ "section": "def-server.CreateExceptionListItemOptions", "text": "CreateExceptionListItemOptions" }, - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, @@ -726,7 +726,7 @@ "section": "def-server.UpdateExceptionListItemOptions", "text": "UpdateExceptionListItemOptions" }, - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, @@ -764,7 +764,7 @@ "signature": [ "({ id, itemId, namespaceType, }: ", "DeleteExceptionListItemOptions", - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, @@ -830,7 +830,7 @@ "signature": [ "({ id, itemId, }: ", "DeleteEndpointListItemOptions", - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, @@ -862,7 +862,7 @@ "signature": [ "({ listId, filter, perPage, page, sortField, sortOrder, namespaceType, }: ", "FindExceptionListItemOptions", - ") => Promise<{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } | null>" + ") => Promise<{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } | null>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, @@ -894,7 +894,7 @@ "signature": [ "({ listId, filter, perPage, page, sortField, sortOrder, namespaceType, }: ", "FindExceptionListsItemOptions", - ") => Promise<{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } | null>" + ") => Promise<{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } | null>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, @@ -926,7 +926,7 @@ "signature": [ "({ perPage, page, sortField, sortOrder, valueListId, }: ", "FindValueListExceptionListsItems", - ") => Promise<{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } | null>" + ") => Promise<{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } | null>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, @@ -992,7 +992,7 @@ "signature": [ "({ filter, perPage, page, sortField, sortOrder, }: ", "FindEndpointListItemOptions", - ") => Promise<{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } | null>" + ") => Promise<{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } | null>" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", "deprecated": false, @@ -1097,7 +1097,7 @@ "signature": [ "({ id }: ", "GetListOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -1129,7 +1129,7 @@ "signature": [ "({ id, deserializer, immutable, serializer, name, description, type, meta, version, }: ", "CreateListOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -1161,7 +1161,7 @@ "signature": [ "({ id, deserializer, serializer, name, description, immutable, type, meta, version, }: ", "CreateListIfItDoesNotExistOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -1493,7 +1493,7 @@ "signature": [ "({ id }: ", "DeleteListItemOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -1525,7 +1525,7 @@ "signature": [ "({ listId, value, type, }: ", "DeleteListItemByValueOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -1557,7 +1557,7 @@ "signature": [ "({ id }: ", "DeleteListOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -1621,7 +1621,7 @@ "signature": [ "({ deserializer, serializer, type, listId, stream, meta, version, }: ", "ImportListItemsToStreamOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -1653,7 +1653,7 @@ "signature": [ "({ listId, value, type, }: ", "GetListItemByValueOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -1685,7 +1685,7 @@ "signature": [ "({ id, deserializer, serializer, listId, value, type, meta, }: ", "CreateListItemOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -1717,7 +1717,7 @@ "signature": [ "({ _version, id, value, meta, }: ", "UpdateListItemOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -1749,7 +1749,7 @@ "signature": [ "({ _version, id, name, description, meta, version, }: ", "UpdateListOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -1781,7 +1781,7 @@ "signature": [ "({ id }: ", "GetListItemOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -1813,7 +1813,7 @@ "signature": [ "({ type, listId, value, }: ", "GetListItemsByValueOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -1845,7 +1845,7 @@ "signature": [ "({ type, listId, value, }: ", "SearchListItemByValuesOptions", - ") => Promise<{ items: { _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]; value: unknown; }[]>" + ") => Promise<{ items: { _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]; value: unknown; }[]>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -1877,7 +1877,7 @@ "signature": [ "({ filter, currentIndexPosition, perPage, page, sortField, sortOrder, searchAfter, }: ", "FindListOptions", - ") => Promise<{ cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]; page: number; per_page: number; total: number; }>" + ") => Promise<{ cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]; page: number; per_page: number; total: number; }>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -1909,7 +1909,7 @@ "signature": [ "({ listId, filter, currentIndexPosition, perPage, page, sortField, sortOrder, searchAfter, }: ", "FindListItemOptions", - ") => Promise<{ cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]; page: number; per_page: number; total: number; } | null>" + ") => Promise<{ cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]; page: number; per_page: number; total: number; } | null>" ], "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", "deprecated": false, @@ -1968,7 +1968,7 @@ "label": "entries", "description": [], "signature": [ - "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]" + "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", "deprecated": false @@ -2182,7 +2182,7 @@ "label": "entries", "description": [], "signature": [ - "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]" + "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"keyword\" | \"ip_range\" | \"date_range\" | \"date\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"long\" | \"double\" | \"text\" | \"date_nanos\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]" ], "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", "deprecated": false @@ -2337,7 +2337,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">, user: string) => ", + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">, user: string) => ", { "pluginId": "lists", "scope": "server", @@ -2358,25 +2358,7 @@ "label": "savedObjectsClient", "description": [], "signature": [ - "{ get: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" - }, - ") => Promise<", - "SavedObject", - ">; delete: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsDeleteOptions", - "text": "SavedObjectsDeleteOptions" - }, - ") => Promise<{}>; create: (type: string, attributes: T, options?: ", + "{ create: (type: string, attributes: T, options?: ", { "pluginId": "core", "scope": "server", @@ -2434,7 +2416,15 @@ "section": "def-server.SavedObjectsCheckConflictsResponse", "text": "SavedObjectsCheckConflictsResponse" }, - ">; find: (options: ", + ">; delete: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsDeleteOptions", + "text": "SavedObjectsDeleteOptions" + }, + ") => Promise<{}>; find: (options: ", { "pluginId": "core", "scope": "server", @@ -2498,6 +2488,16 @@ "section": "def-server.SavedObjectsBulkResolveResponse", "text": "SavedObjectsBulkResolveResponse" }, + ">; get: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsBaseOptions", + "text": "SavedObjectsBaseOptions" + }, + ") => Promise<", + "SavedObject", ">; resolve: (type: string, id: string, options?: ", { "pluginId": "core", @@ -2738,7 +2738,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", diff --git a/api_docs/maps_ems.json b/api_docs/maps_ems.json index 89614d49bb38f..f2ad59aae42ef 100644 --- a/api_docs/maps_ems.json +++ b/api_docs/maps_ems.json @@ -922,7 +922,7 @@ "label": "DEFAULT_EMS_LANDING_PAGE_URL", "description": [], "signature": [ - "\"https://maps.elastic.co/v7.15\"" + "\"https://maps.elastic.co/v7.16\"" ], "path": "src/plugins/maps_ems/common/index.ts", "deprecated": false, diff --git a/api_docs/metrics_entities.json b/api_docs/metrics_entities.json index 6b7d685b46939..601c41a282257 100644 --- a/api_docs/metrics_entities.json +++ b/api_docs/metrics_entities.json @@ -58,7 +58,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", diff --git a/api_docs/ml.json b/api_docs/ml.json index 102e433e4600e..d5f9d552690c1 100644 --- a/api_docs/ml.json +++ b/api_docs/ml.json @@ -1055,7 +1055,7 @@ }, "<", "MlAnomalyDetectionAlertParams", - ">, \"enabled\" | \"id\" | \"name\" | \"tags\" | \"params\" | \"actions\" | \"throttle\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">[] | undefined" + ">, \"id\" | \"name\" | \"tags\" | \"enabled\" | \"params\" | \"actions\" | \"throttle\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">[] | undefined" ], "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/summary_job.ts", "deprecated": false @@ -2890,7 +2890,7 @@ }, "<", "MlAnomalyDetectionAlertParams", - ">, \"enabled\" | \"id\" | \"name\" | \"tags\" | \"params\" | \"actions\" | \"throttle\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">[] | undefined" + ">, \"id\" | \"name\" | \"tags\" | \"enabled\" | \"params\" | \"actions\" | \"throttle\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">[] | undefined" ], "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/summary_job.ts", "deprecated": false @@ -3434,7 +3434,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">, request: ", + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">, request: ", { "pluginId": "core", "scope": "server", diff --git a/api_docs/monitoring.json b/api_docs/monitoring.json index ddeba9737dc2d..0de686a2108eb 100644 --- a/api_docs/monitoring.json +++ b/api_docs/monitoring.json @@ -149,7 +149,7 @@ "signature": [ "{ ui: { elasticsearch: ", "MonitoringElasticsearchConfig", - "; enabled: boolean; container: Readonly<{} & { logstash: Readonly<{} & { enabled: boolean; }>; apm: Readonly<{} & { enabled: boolean; }>; elasticsearch: Readonly<{} & { enabled: boolean; }>; }>; logs: Readonly<{} & { index: string; }>; metricbeat: Readonly<{} & { index: string; }>; debug_mode: boolean; debug_log_path: string; ccs: Readonly<{} & { enabled: boolean; }>; max_bucket_size: number; min_interval_seconds: number; show_license_expiration: boolean; render_react_app: boolean; }; enabled: boolean; kibana: Readonly<{} & { collection: Readonly<{} & { enabled: boolean; interval: number; }>; }>; licensing: Readonly<{} & { api_polling_frequency: moment.Duration; }>; agent: Readonly<{} & { interval: string; }>; cluster_alerts: Readonly<{} & { enabled: boolean; allowedSpaces: string[]; email_notifications: Readonly<{} & { enabled: boolean; email_address: string; }>; }>; tests: Readonly<{} & { cloud_detector: Readonly<{} & { enabled: boolean; }>; }>; }" + "; enabled: boolean; container: Readonly<{} & { logstash: Readonly<{} & { enabled: boolean; }>; apm: Readonly<{} & { enabled: boolean; }>; elasticsearch: Readonly<{} & { enabled: boolean; }>; }>; logs: Readonly<{} & { index: string; }>; metricbeat: Readonly<{} & { index: string; }>; debug_mode: boolean; debug_log_path: string; ccs: Readonly<{} & { enabled: boolean; }>; max_bucket_size: number; min_interval_seconds: number; show_license_expiration: boolean; render_react_app: boolean; }; tests: Readonly<{} & { cloud_detector: Readonly<{} & { enabled: boolean; }>; }>; enabled: boolean; kibana: Readonly<{} & { collection: Readonly<{} & { interval: number; enabled: boolean; }>; }>; licensing: Readonly<{} & { api_polling_frequency: moment.Duration; }>; agent: Readonly<{} & { interval: string; }>; cluster_alerts: Readonly<{} & { enabled: boolean; allowedSpaces: string[]; email_notifications: Readonly<{} & { enabled: boolean; email_address: string; }>; }>; }" ], "path": "x-pack/plugins/monitoring/server/config.ts", "deprecated": false, diff --git a/api_docs/observability.json b/api_docs/observability.json index 5887895476e3e..3889631a20bec 100644 --- a/api_docs/observability.json +++ b/api_docs/observability.json @@ -238,9 +238,11 @@ "label": "FilterValueLabel", "description": [], "signature": [ - "({\n label,\n field,\n value,\n negate,\n indexPattern,\n invertFilter,\n removeFilter,\n allowExclusion = true,\n}: Props) => JSX.Element | null" + "(props: ", + "FilterValueLabelProps", + ") => JSX.Element" ], - "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx", + "path": "x-pack/plugins/observability/public/components/shared/index.tsx", "deprecated": false, "children": [ { @@ -248,12 +250,12 @@ "id": "def-public.FilterValueLabel.$1", "type": "Object", "tags": [], - "label": "{\n label,\n field,\n value,\n negate,\n indexPattern,\n invertFilter,\n removeFilter,\n allowExclusion = true,\n}", + "label": "props", "description": [], "signature": [ - "Props" + "FilterValueLabelProps" ], - "path": "x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx", + "path": "x-pack/plugins/observability/public/components/shared/index.tsx", "deprecated": false, "isRequired": true } @@ -386,6 +388,48 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "observability", + "id": "def-public.InspectorContextProvider", + "type": "Function", + "tags": [], + "label": "InspectorContextProvider", + "description": [], + "signature": [ + "({ children }: { children: React.ReactNode; }) => JSX.Element" + ], + "path": "x-pack/plugins/observability/public/context/inspector/inspector_context.tsx", + "deprecated": false, + "children": [ + { + "parentPluginId": "observability", + "id": "def-public.InspectorContextProvider.$1", + "type": "Object", + "tags": [], + "label": "{ children }", + "description": [], + "path": "x-pack/plugins/observability/public/context/inspector/inspector_context.tsx", + "deprecated": false, + "children": [ + { + "parentPluginId": "observability", + "id": "def-public.InspectorContextProvider.$1.children", + "type": "CompoundType", + "tags": [], + "label": "children", + "description": [], + "signature": [ + "string | number | boolean | {} | React.ReactElement React.ReactElement React.Component)> | null) | (new (props: any) => React.Component)> | React.ReactNodeArray | React.ReactPortal | null | undefined" + ], + "path": "x-pack/plugins/observability/public/context/inspector/inspector_context.tsx", + "deprecated": false + } + ] + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "observability", "id": "def-public.LazyAlertsFlyout", @@ -394,7 +438,7 @@ "label": "LazyAlertsFlyout", "description": [], "signature": [ - "React.ExoticComponent & { ref?: React.RefObject | ((instance: HTMLDivElement | null) => void) | null | undefined; }> & { readonly _result: ({ alert, alerts, isInApp, observabilityRuleTypeRegistry, onClose, selectedAlertId, }: AlertsFlyoutProps) => JSX.Element | null; }" + "React.ExoticComponent & { ref?: React.RefObject | ((instance: HTMLDivElement | null) => void) | null | undefined; }> & { readonly _result: ({ alert, alerts, isInApp, observabilityRuleTypeRegistry, onClose, selectedAlertId, }: AlertsFlyoutProps) => JSX.Element | null; }" ], "path": "x-pack/plugins/observability/public/index.ts", "deprecated": false, @@ -833,6 +877,23 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "observability", + "id": "def-public.useInspectorContext", + "type": "Function", + "tags": [], + "label": "useInspectorContext", + "description": [], + "signature": [ + "() => ", + "InspectorContextValue" + ], + "path": "x-pack/plugins/observability/public/context/inspector/use_inspector_context.tsx", + "deprecated": false, + "children": [], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "observability", "id": "def-public.useTheme", @@ -968,7 +1029,7 @@ "label": "useUiTracker", "description": [], "signature": [ - "({\n app: defaultApp,\n}: { app?: \"fleet\" | \"apm\" | \"infra_metrics\" | \"infra_logs\" | \"uptime\" | \"synthetics\" | \"observability-overview\" | \"stack_monitoring\" | \"ux\" | undefined; }) => ({ app, metric, metricType }: ", + "({\n app: defaultApp,\n}: { app?: \"fleet\" | \"apm\" | \"synthetics\" | \"infra_metrics\" | \"infra_logs\" | \"uptime\" | \"observability-overview\" | \"stack_monitoring\" | \"ux\" | undefined; }) => ({ app, metric, metricType }: ", { "pluginId": "observability", "scope": "public", @@ -999,7 +1060,7 @@ "label": "app", "description": [], "signature": [ - "\"fleet\" | \"apm\" | \"infra_metrics\" | \"infra_logs\" | \"uptime\" | \"synthetics\" | \"observability-overview\" | \"stack_monitoring\" | \"ux\" | undefined" + "\"fleet\" | \"apm\" | \"synthetics\" | \"infra_metrics\" | \"infra_logs\" | \"uptime\" | \"observability-overview\" | \"stack_monitoring\" | \"ux\" | undefined" ], "path": "x-pack/plugins/observability/public/hooks/use_track_metric.tsx", "deprecated": false @@ -2456,7 +2517,7 @@ "label": "operationType", "description": [], "signature": [ - "\"range\" | \"filters\" | \"max\" | \"min\" | \"count\" | \"date_histogram\" | \"sum\" | \"average\" | \"percentile\" | \"terms\" | \"median\" | \"cumulative_sum\" | \"moving_average\" | \"math\" | \"overall_sum\" | \"overall_min\" | \"overall_max\" | \"overall_average\" | \"counter_rate\" | \"differences\" | \"unique_count\" | \"last_value\" | \"formula\" | \"static_value\" | undefined" + "\"filters\" | \"max\" | \"min\" | \"count\" | \"date_histogram\" | \"sum\" | \"average\" | \"percentile\" | \"range\" | \"terms\" | \"median\" | \"cumulative_sum\" | \"moving_average\" | \"math\" | \"overall_sum\" | \"overall_min\" | \"overall_max\" | \"overall_average\" | \"counter_rate\" | \"differences\" | \"unique_count\" | \"last_value\" | \"formula\" | \"static_value\" | undefined" ], "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts", "deprecated": false @@ -2469,7 +2530,7 @@ "label": "dataType", "description": [], "signature": [ - "\"mobile\" | \"apm\" | \"infra_metrics\" | \"infra_logs\" | \"synthetics\" | \"ux\"" + "\"mobile\" | \"apm\" | \"synthetics\" | \"infra_metrics\" | \"infra_logs\" | \"ux\"" ], "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts", "deprecated": false @@ -3172,7 +3233,7 @@ "label": "ObservabilityFetchDataPlugins", "description": [], "signature": [ - "\"apm\" | \"infra_metrics\" | \"infra_logs\" | \"synthetics\" | \"ux\"" + "\"apm\" | \"synthetics\" | \"infra_metrics\" | \"infra_logs\" | \"ux\"" ], "path": "x-pack/plugins/observability/public/typings/fetch_overview_data/index.ts", "deprecated": false, @@ -3255,27 +3316,27 @@ "DisambiguateSet", "<(", "DisambiguateSet", - ", Pick, \"children\" | \"type\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"id\" | \"title\" | \"security\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"media\" | \"target\" | \"download\" | \"ping\" | \"hrefLang\" | \"rel\" | \"referrerPolicy\">> & Pick, \"children\" | \"type\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"id\" | \"title\" | \"security\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"media\" | \"target\" | \"download\" | \"ping\" | \"hrefLang\" | \"rel\" | \"referrerPolicy\">) | (", + ", Pick, \"children\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"type\" | \"id\" | \"title\" | \"security\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"media\" | \"target\" | \"download\" | \"ping\" | \"hrefLang\" | \"rel\" | \"referrerPolicy\">> & Pick, \"children\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"type\" | \"id\" | \"title\" | \"security\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"media\" | \"target\" | \"download\" | \"ping\" | \"hrefLang\" | \"rel\" | \"referrerPolicy\">) | (", "DisambiguateSet", - ", \"children\" | \"type\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"id\" | \"title\" | \"security\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"media\" | \"target\" | \"download\" | \"ping\" | \"hrefLang\" | \"rel\" | \"referrerPolicy\">, React.ButtonHTMLAttributes> & React.ButtonHTMLAttributes), React.HTMLAttributes> & React.HTMLAttributes) | (", + ", \"children\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"type\" | \"id\" | \"title\" | \"security\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"media\" | \"target\" | \"download\" | \"ping\" | \"hrefLang\" | \"rel\" | \"referrerPolicy\">, React.ButtonHTMLAttributes> & React.ButtonHTMLAttributes), React.HTMLAttributes> & React.HTMLAttributes) | (", "DisambiguateSet", ", (", "DisambiguateSet", - ", Pick, \"children\" | \"type\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"id\" | \"title\" | \"security\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"media\" | \"target\" | \"download\" | \"ping\" | \"hrefLang\" | \"rel\" | \"referrerPolicy\">> & Pick, \"children\" | \"type\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"id\" | \"title\" | \"security\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"media\" | \"target\" | \"download\" | \"ping\" | \"hrefLang\" | \"rel\" | \"referrerPolicy\">) | (", + ", Pick, \"children\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"type\" | \"id\" | \"title\" | \"security\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"media\" | \"target\" | \"download\" | \"ping\" | \"hrefLang\" | \"rel\" | \"referrerPolicy\">> & Pick, \"children\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"type\" | \"id\" | \"title\" | \"security\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"media\" | \"target\" | \"download\" | \"ping\" | \"hrefLang\" | \"rel\" | \"referrerPolicy\">) | (", "DisambiguateSet", - ", \"children\" | \"type\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"id\" | \"title\" | \"security\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"media\" | \"target\" | \"download\" | \"ping\" | \"hrefLang\" | \"rel\" | \"referrerPolicy\">, React.ButtonHTMLAttributes> & React.ButtonHTMLAttributes)> & ", + ", \"children\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"type\" | \"id\" | \"title\" | \"security\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"media\" | \"target\" | \"download\" | \"ping\" | \"hrefLang\" | \"rel\" | \"referrerPolicy\">, React.ButtonHTMLAttributes> & React.ButtonHTMLAttributes)> & ", "DisambiguateSet", - ", Pick, \"children\" | \"type\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"id\" | \"title\" | \"security\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"media\" | \"target\" | \"download\" | \"ping\" | \"hrefLang\" | \"rel\" | \"referrerPolicy\">> & Pick, \"children\" | \"type\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"id\" | \"title\" | \"security\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"media\" | \"target\" | \"download\" | \"ping\" | \"hrefLang\" | \"rel\" | \"referrerPolicy\">) | (", + ", Pick, \"children\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"type\" | \"id\" | \"title\" | \"security\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"media\" | \"target\" | \"download\" | \"ping\" | \"hrefLang\" | \"rel\" | \"referrerPolicy\">> & Pick, \"children\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"type\" | \"id\" | \"title\" | \"security\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"media\" | \"target\" | \"download\" | \"ping\" | \"hrefLang\" | \"rel\" | \"referrerPolicy\">) | (", "DisambiguateSet", ", (", "DisambiguateSet", - ", Pick, \"children\" | \"type\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"id\" | \"title\" | \"security\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"media\" | \"target\" | \"download\" | \"ping\" | \"hrefLang\" | \"rel\" | \"referrerPolicy\">> & Pick, \"children\" | \"type\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"id\" | \"title\" | \"security\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"media\" | \"target\" | \"download\" | \"ping\" | \"hrefLang\" | \"rel\" | \"referrerPolicy\">) | (", + ", Pick, \"children\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"type\" | \"id\" | \"title\" | \"security\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"media\" | \"target\" | \"download\" | \"ping\" | \"hrefLang\" | \"rel\" | \"referrerPolicy\">> & Pick, \"children\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"type\" | \"id\" | \"title\" | \"security\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"media\" | \"target\" | \"download\" | \"ping\" | \"hrefLang\" | \"rel\" | \"referrerPolicy\">) | (", "DisambiguateSet", - ", \"children\" | \"type\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"id\" | \"title\" | \"security\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"media\" | \"target\" | \"download\" | \"ping\" | \"hrefLang\" | \"rel\" | \"referrerPolicy\">, React.ButtonHTMLAttributes> & React.ButtonHTMLAttributes)> & ", + ", \"children\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"type\" | \"id\" | \"title\" | \"security\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"media\" | \"target\" | \"download\" | \"ping\" | \"hrefLang\" | \"rel\" | \"referrerPolicy\">, React.ButtonHTMLAttributes> & React.ButtonHTMLAttributes)> & ", "DisambiguateSet", - ", \"children\" | \"type\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"id\" | \"title\" | \"security\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"media\" | \"target\" | \"download\" | \"ping\" | \"hrefLang\" | \"rel\" | \"referrerPolicy\">, React.ButtonHTMLAttributes> & React.ButtonHTMLAttributes), \"children\" | \"type\" | \"onChange\" | \"onKeyDown\" | \"id\" | \"title\" | \"security\" | \"name\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"autoFocus\" | \"disabled\" | \"form\" | \"formAction\" | \"formEncType\" | \"formMethod\" | \"formNoValidate\" | \"formTarget\" | \"value\" | \"media\" | \"download\" | \"ping\" | \"hrefLang\" | \"referrerPolicy\"> & { size?: \"m\" | \"s\" | \"l\" | \"xs\" | undefined; color?: \"text\" | \"primary\" | \"inherit\" | \"ghost\" | \"subdued\" | undefined; label: React.ReactNode; isActive?: boolean | undefined; isDisabled?: boolean | undefined; href?: string | undefined; target?: string | undefined; rel?: string | undefined; iconType?: string | React.ComponentClass<{}, any> | React.FunctionComponent<{}> | undefined; iconProps?: Pick<", + ", \"children\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"type\" | \"id\" | \"title\" | \"security\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"media\" | \"target\" | \"download\" | \"ping\" | \"hrefLang\" | \"rel\" | \"referrerPolicy\">, React.ButtonHTMLAttributes> & React.ButtonHTMLAttributes), \"children\" | \"onChange\" | \"onKeyDown\" | \"type\" | \"id\" | \"title\" | \"security\" | \"name\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"autoFocus\" | \"disabled\" | \"form\" | \"formAction\" | \"formEncType\" | \"formMethod\" | \"formNoValidate\" | \"formTarget\" | \"value\" | \"media\" | \"download\" | \"ping\" | \"hrefLang\" | \"referrerPolicy\"> & { size?: \"m\" | \"s\" | \"l\" | \"xs\" | undefined; color?: \"text\" | \"primary\" | \"inherit\" | \"ghost\" | \"subdued\" | undefined; label: React.ReactNode; isActive?: boolean | undefined; isDisabled?: boolean | undefined; href?: string | undefined; target?: string | undefined; rel?: string | undefined; iconType?: string | React.ComponentClass<{}, any> | React.FunctionComponent<{}> | undefined; iconProps?: Pick<", "EuiIconProps", - ", \"string\" | \"children\" | \"from\" | \"origin\" | \"cursor\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"y\" | \"d\" | \"x\" | \"id\" | \"title\" | \"operator\" | \"name\" | \"version\" | \"filter\" | \"size\" | \"format\" | \"order\" | \"className\" | \"lang\" | \"style\" | \"tabIndex\" | \"role\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"data-test-subj\" | \"height\" | \"max\" | \"media\" | \"method\" | \"min\" | \"target\" | \"width\" | \"crossOrigin\" | \"accentHeight\" | \"accumulate\" | \"additive\" | \"alignmentBaseline\" | \"allowReorder\" | \"alphabetic\" | \"amplitude\" | \"arabicForm\" | \"ascent\" | \"attributeName\" | \"attributeType\" | \"autoReverse\" | \"azimuth\" | \"baseFrequency\" | \"baselineShift\" | \"baseProfile\" | \"bbox\" | \"begin\" | \"bias\" | \"by\" | \"calcMode\" | \"capHeight\" | \"clip\" | \"clipPath\" | \"clipPathUnits\" | \"clipRule\" | \"colorInterpolation\" | \"colorInterpolationFilters\" | \"colorProfile\" | \"colorRendering\" | \"contentScriptType\" | \"contentStyleType\" | \"cx\" | \"cy\" | \"decelerate\" | \"descent\" | \"diffuseConstant\" | \"direction\" | \"display\" | \"divisor\" | \"dominantBaseline\" | \"dur\" | \"dx\" | \"dy\" | \"edgeMode\" | \"elevation\" | \"enableBackground\" | \"end\" | \"exponent\" | \"externalResourcesRequired\" | \"fill\" | \"fillOpacity\" | \"fillRule\" | \"filterRes\" | \"filterUnits\" | \"floodColor\" | \"floodOpacity\" | \"focusable\" | \"fontFamily\" | \"fontSize\" | \"fontSizeAdjust\" | \"fontStretch\" | \"fontStyle\" | \"fontVariant\" | \"fontWeight\" | \"fx\" | \"fy\" | \"g1\" | \"g2\" | \"glyphName\" | \"glyphOrientationHorizontal\" | \"glyphOrientationVertical\" | \"glyphRef\" | \"gradientTransform\" | \"gradientUnits\" | \"hanging\" | \"horizAdvX\" | \"horizOriginX\" | \"href\" | \"ideographic\" | \"imageRendering\" | \"in2\" | \"in\" | \"intercept\" | \"k1\" | \"k2\" | \"k3\" | \"k4\" | \"k\" | \"kernelMatrix\" | \"kernelUnitLength\" | \"kerning\" | \"keyPoints\" | \"keySplines\" | \"keyTimes\" | \"lengthAdjust\" | \"letterSpacing\" | \"lightingColor\" | \"limitingConeAngle\" | \"local\" | \"markerEnd\" | \"markerHeight\" | \"markerMid\" | \"markerStart\" | \"markerUnits\" | \"markerWidth\" | \"mask\" | \"maskContentUnits\" | \"maskUnits\" | \"mathematical\" | \"mode\" | \"numOctaves\" | \"offset\" | \"opacity\" | \"orient\" | \"orientation\" | \"overflow\" | \"overlinePosition\" | \"overlineThickness\" | \"paintOrder\" | \"panose1\" | \"path\" | \"pathLength\" | \"patternContentUnits\" | \"patternTransform\" | \"patternUnits\" | \"pointerEvents\" | \"points\" | \"pointsAtX\" | \"pointsAtY\" | \"pointsAtZ\" | \"preserveAlpha\" | \"preserveAspectRatio\" | \"primitiveUnits\" | \"r\" | \"radius\" | \"refX\" | \"refY\" | \"renderingIntent\" | \"repeatCount\" | \"repeatDur\" | \"requiredExtensions\" | \"requiredFeatures\" | \"restart\" | \"result\" | \"rotate\" | \"rx\" | \"ry\" | \"scale\" | \"seed\" | \"shapeRendering\" | \"slope\" | \"spacing\" | \"specularConstant\" | \"specularExponent\" | \"speed\" | \"spreadMethod\" | \"startOffset\" | \"stdDeviation\" | \"stemh\" | \"stemv\" | \"stitchTiles\" | \"stopColor\" | \"stopOpacity\" | \"strikethroughPosition\" | \"strikethroughThickness\" | \"stroke\" | \"strokeDasharray\" | \"strokeDashoffset\" | \"strokeLinecap\" | \"strokeLinejoin\" | \"strokeMiterlimit\" | \"strokeOpacity\" | \"strokeWidth\" | \"surfaceScale\" | \"systemLanguage\" | \"tableValues\" | \"targetX\" | \"targetY\" | \"textAnchor\" | \"textDecoration\" | \"textLength\" | \"textRendering\" | \"to\" | \"transform\" | \"u1\" | \"u2\" | \"underlinePosition\" | \"underlineThickness\" | \"unicode\" | \"unicodeBidi\" | \"unicodeRange\" | \"unitsPerEm\" | \"vAlphabetic\" | \"values\" | \"vectorEffect\" | \"vertAdvY\" | \"vertOriginX\" | \"vertOriginY\" | \"vHanging\" | \"vIdeographic\" | \"viewBox\" | \"viewTarget\" | \"visibility\" | \"vMathematical\" | \"widths\" | \"wordSpacing\" | \"writingMode\" | \"x1\" | \"x2\" | \"xChannelSelector\" | \"xHeight\" | \"xlinkActuate\" | \"xlinkArcrole\" | \"xlinkHref\" | \"xlinkRole\" | \"xlinkShow\" | \"xlinkTitle\" | \"xlinkType\" | \"xmlBase\" | \"xmlLang\" | \"xmlns\" | \"xmlnsXlink\" | \"xmlSpace\" | \"y1\" | \"y2\" | \"yChannelSelector\" | \"z\" | \"zoomAndPan\" | \"titleId\" | \"onIconLoad\"> | undefined; icon?: React.ReactElement React.ReactElement React.Component)> | null) | (new (props: any) => React.Component)> | undefined; showToolTip?: boolean | undefined; extraAction?: ({ type?: \"reset\" | \"button\" | \"submit\" | undefined; } & ", + ", \"string\" | \"children\" | \"cursor\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"y\" | \"d\" | \"x\" | \"id\" | \"title\" | \"operator\" | \"name\" | \"version\" | \"filter\" | \"from\" | \"size\" | \"format\" | \"order\" | \"className\" | \"lang\" | \"style\" | \"tabIndex\" | \"role\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"data-test-subj\" | \"height\" | \"max\" | \"media\" | \"method\" | \"min\" | \"target\" | \"width\" | \"crossOrigin\" | \"accentHeight\" | \"accumulate\" | \"additive\" | \"alignmentBaseline\" | \"allowReorder\" | \"alphabetic\" | \"amplitude\" | \"arabicForm\" | \"ascent\" | \"attributeName\" | \"attributeType\" | \"autoReverse\" | \"azimuth\" | \"baseFrequency\" | \"baselineShift\" | \"baseProfile\" | \"bbox\" | \"begin\" | \"bias\" | \"by\" | \"calcMode\" | \"capHeight\" | \"clip\" | \"clipPath\" | \"clipPathUnits\" | \"clipRule\" | \"colorInterpolation\" | \"colorInterpolationFilters\" | \"colorProfile\" | \"colorRendering\" | \"contentScriptType\" | \"contentStyleType\" | \"cx\" | \"cy\" | \"decelerate\" | \"descent\" | \"diffuseConstant\" | \"direction\" | \"display\" | \"divisor\" | \"dominantBaseline\" | \"dur\" | \"dx\" | \"dy\" | \"edgeMode\" | \"elevation\" | \"enableBackground\" | \"end\" | \"exponent\" | \"externalResourcesRequired\" | \"fill\" | \"fillOpacity\" | \"fillRule\" | \"filterRes\" | \"filterUnits\" | \"floodColor\" | \"floodOpacity\" | \"focusable\" | \"fontFamily\" | \"fontSize\" | \"fontSizeAdjust\" | \"fontStretch\" | \"fontStyle\" | \"fontVariant\" | \"fontWeight\" | \"fx\" | \"fy\" | \"g1\" | \"g2\" | \"glyphName\" | \"glyphOrientationHorizontal\" | \"glyphOrientationVertical\" | \"glyphRef\" | \"gradientTransform\" | \"gradientUnits\" | \"hanging\" | \"horizAdvX\" | \"horizOriginX\" | \"href\" | \"ideographic\" | \"imageRendering\" | \"in2\" | \"in\" | \"intercept\" | \"k1\" | \"k2\" | \"k3\" | \"k4\" | \"k\" | \"kernelMatrix\" | \"kernelUnitLength\" | \"kerning\" | \"keyPoints\" | \"keySplines\" | \"keyTimes\" | \"lengthAdjust\" | \"letterSpacing\" | \"lightingColor\" | \"limitingConeAngle\" | \"local\" | \"markerEnd\" | \"markerHeight\" | \"markerMid\" | \"markerStart\" | \"markerUnits\" | \"markerWidth\" | \"mask\" | \"maskContentUnits\" | \"maskUnits\" | \"mathematical\" | \"mode\" | \"numOctaves\" | \"offset\" | \"opacity\" | \"orient\" | \"orientation\" | \"origin\" | \"overflow\" | \"overlinePosition\" | \"overlineThickness\" | \"paintOrder\" | \"panose1\" | \"path\" | \"pathLength\" | \"patternContentUnits\" | \"patternTransform\" | \"patternUnits\" | \"pointerEvents\" | \"points\" | \"pointsAtX\" | \"pointsAtY\" | \"pointsAtZ\" | \"preserveAlpha\" | \"preserveAspectRatio\" | \"primitiveUnits\" | \"r\" | \"radius\" | \"refX\" | \"refY\" | \"renderingIntent\" | \"repeatCount\" | \"repeatDur\" | \"requiredExtensions\" | \"requiredFeatures\" | \"restart\" | \"result\" | \"rotate\" | \"rx\" | \"ry\" | \"scale\" | \"seed\" | \"shapeRendering\" | \"slope\" | \"spacing\" | \"specularConstant\" | \"specularExponent\" | \"speed\" | \"spreadMethod\" | \"startOffset\" | \"stdDeviation\" | \"stemh\" | \"stemv\" | \"stitchTiles\" | \"stopColor\" | \"stopOpacity\" | \"strikethroughPosition\" | \"strikethroughThickness\" | \"stroke\" | \"strokeDasharray\" | \"strokeDashoffset\" | \"strokeLinecap\" | \"strokeLinejoin\" | \"strokeMiterlimit\" | \"strokeOpacity\" | \"strokeWidth\" | \"surfaceScale\" | \"systemLanguage\" | \"tableValues\" | \"targetX\" | \"targetY\" | \"textAnchor\" | \"textDecoration\" | \"textLength\" | \"textRendering\" | \"to\" | \"transform\" | \"u1\" | \"u2\" | \"underlinePosition\" | \"underlineThickness\" | \"unicode\" | \"unicodeBidi\" | \"unicodeRange\" | \"unitsPerEm\" | \"vAlphabetic\" | \"values\" | \"vectorEffect\" | \"vertAdvY\" | \"vertOriginX\" | \"vertOriginY\" | \"vHanging\" | \"vIdeographic\" | \"viewBox\" | \"viewTarget\" | \"visibility\" | \"vMathematical\" | \"widths\" | \"wordSpacing\" | \"writingMode\" | \"x1\" | \"x2\" | \"xChannelSelector\" | \"xHeight\" | \"xlinkActuate\" | \"xlinkArcrole\" | \"xlinkHref\" | \"xlinkRole\" | \"xlinkShow\" | \"xlinkTitle\" | \"xlinkType\" | \"xmlBase\" | \"xmlLang\" | \"xmlns\" | \"xmlnsXlink\" | \"xmlSpace\" | \"y1\" | \"y2\" | \"yChannelSelector\" | \"z\" | \"zoomAndPan\" | \"titleId\" | \"onIconLoad\"> | undefined; icon?: React.ReactElement React.ReactElement React.Component)> | null) | (new (props: any) => React.Component)> | undefined; showToolTip?: boolean | undefined; extraAction?: ({ type?: \"reset\" | \"button\" | \"submit\" | undefined; } & ", "EuiButtonIconProps", " & { onClick?: ((event: React.MouseEvent) => void) | undefined; } & React.ButtonHTMLAttributes & { buttonRef?: ((instance: HTMLButtonElement | null) => void) | React.RefObject | null | undefined; } & { alwaysShow?: boolean | undefined; }) | undefined; onClick?: ((event: React.MouseEvent) => void) | undefined; wrapText?: boolean | undefined; buttonRef?: ((instance: HTMLButtonElement | null) => void) | React.RefObject | null | undefined; }" ], @@ -3359,7 +3420,7 @@ "label": "ObservabilityPublicSetup", "description": [], "signature": [ - "{ dashboard: { register: ({ appName, fetchData, hasData, }: { appName: T; } & ", + "{ dashboard: { register: ({ appName, fetchData, hasData, }: { appName: T; } & ", { "pluginId": "observability", "scope": "public", @@ -3622,7 +3683,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", @@ -3660,6 +3721,173 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "observability", + "id": "def-server.getInspectResponse", + "type": "Function", + "tags": [], + "label": "getInspectResponse", + "description": [ + "\nCreate a formatted response to be sent in the _inspect key for use in the\ninspector." + ], + "signature": [ + "({\n esError,\n esRequestParams,\n esRequestStatus,\n esResponse,\n kibanaRequest,\n operationName,\n startTime,\n}: { esError: ", + { + "pluginId": "observability", + "scope": "server", + "docId": "kibObservabilityPluginApi", + "section": "def-server.WrappedElasticsearchClientError", + "text": "WrappedElasticsearchClientError" + }, + " | null; esRequestParams: Record; esRequestStatus: ", + { + "pluginId": "inspector", + "scope": "common", + "docId": "kibInspectorPluginApi", + "section": "def-common.RequestStatus", + "text": "RequestStatus" + }, + "; esResponse: any; kibanaRequest: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.KibanaRequest", + "text": "KibanaRequest" + }, + "; operationName: string; startTime: number; }) => ", + { + "pluginId": "inspector", + "scope": "common", + "docId": "kibInspectorPluginApi", + "section": "def-common.Request", + "text": "Request" + } + ], + "path": "x-pack/plugins/observability/server/utils/get_inspect_response.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "observability", + "id": "def-server.getInspectResponse.$1", + "type": "Object", + "tags": [], + "label": "{\n esError,\n esRequestParams,\n esRequestStatus,\n esResponse,\n kibanaRequest,\n operationName,\n startTime,\n}", + "description": [], + "path": "x-pack/plugins/observability/server/utils/get_inspect_response.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "observability", + "id": "def-server.getInspectResponse.$1.esError", + "type": "CompoundType", + "tags": [], + "label": "esError", + "description": [], + "signature": [ + { + "pluginId": "observability", + "scope": "server", + "docId": "kibObservabilityPluginApi", + "section": "def-server.WrappedElasticsearchClientError", + "text": "WrappedElasticsearchClientError" + }, + " | null" + ], + "path": "x-pack/plugins/observability/server/utils/get_inspect_response.ts", + "deprecated": false + }, + { + "parentPluginId": "observability", + "id": "def-server.getInspectResponse.$1.esRequestParams", + "type": "Object", + "tags": [], + "label": "esRequestParams", + "description": [], + "signature": [ + "{ [x: string]: any; }" + ], + "path": "x-pack/plugins/observability/server/utils/get_inspect_response.ts", + "deprecated": false + }, + { + "parentPluginId": "observability", + "id": "def-server.getInspectResponse.$1.esRequestStatus", + "type": "Enum", + "tags": [], + "label": "esRequestStatus", + "description": [], + "signature": [ + { + "pluginId": "inspector", + "scope": "common", + "docId": "kibInspectorPluginApi", + "section": "def-common.RequestStatus", + "text": "RequestStatus" + } + ], + "path": "x-pack/plugins/observability/server/utils/get_inspect_response.ts", + "deprecated": false + }, + { + "parentPluginId": "observability", + "id": "def-server.getInspectResponse.$1.esResponse", + "type": "Any", + "tags": [], + "label": "esResponse", + "description": [], + "signature": [ + "any" + ], + "path": "x-pack/plugins/observability/server/utils/get_inspect_response.ts", + "deprecated": false + }, + { + "parentPluginId": "observability", + "id": "def-server.getInspectResponse.$1.kibanaRequest", + "type": "Object", + "tags": [], + "label": "kibanaRequest", + "description": [], + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.KibanaRequest", + "text": "KibanaRequest" + }, + "" + ], + "path": "x-pack/plugins/observability/server/utils/get_inspect_response.ts", + "deprecated": false + }, + { + "parentPluginId": "observability", + "id": "def-server.getInspectResponse.$1.operationName", + "type": "string", + "tags": [], + "label": "operationName", + "description": [], + "path": "x-pack/plugins/observability/server/utils/get_inspect_response.ts", + "deprecated": false + }, + { + "parentPluginId": "observability", + "id": "def-server.getInspectResponse.$1.startTime", + "type": "number", + "tags": [], + "label": "startTime", + "description": [], + "path": "x-pack/plugins/observability/server/utils/get_inspect_response.ts", + "deprecated": false + } + ] + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "observability", "id": "def-server.kqlQuery", diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index 4b7ac03a70e14..57228c938c386 100644 --- a/api_docs/observability.mdx +++ b/api_docs/observability.mdx @@ -18,7 +18,7 @@ Contact [Observability UI](https://github.com/orgs/elastic/teams/observability-u | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 245 | 0 | 245 | 10 | +| 258 | 1 | 257 | 12 | ## Client diff --git a/api_docs/plugin_directory.mdx b/api_docs/plugin_directory.mdx index 5d1046efd3287..f9d2e4f935252 100644 --- a/api_docs/plugin_directory.mdx +++ b/api_docs/plugin_directory.mdx @@ -18,7 +18,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 24449 | 276 | 19869 | 1578 | +| 24551 | 276 | 19924 | 1583 | ## Plugin Directory @@ -26,29 +26,28 @@ warning: This document is auto-generated and is meant to be viewed inside our ex |--------------|----------------|-----------|--------------|----------|---------------|--------| | | [Kibana Alerting](https://github.com/orgs/elastic/teams/kibana-alerting-services) | - | 125 | 0 | 125 | 8 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | - | 23 | 0 | 22 | 1 | -| | [Kibana Alerting](https://github.com/orgs/elastic/teams/kibana-alerting-services) | - | 249 | 0 | 241 | 16 | -| | [APM UI](https://github.com/orgs/elastic/teams/apm-ui) | The user interface for Elastic APM | 42 | 0 | 42 | 37 | -| | [APM UI](https://github.com/orgs/elastic/teams/apm-ui) | - | 6 | 0 | 6 | 0 | +| | [Kibana Alerting](https://github.com/orgs/elastic/teams/kibana-alerting-services) | - | 257 | 0 | 249 | 16 | +| | [APM UI](https://github.com/orgs/elastic/teams/apm-ui) | The user interface for Elastic APM | 39 | 0 | 39 | 37 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 9 | 0 | 9 | 0 | -| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Considering using bfetch capabilities when fetching large amounts of data. This services supports batching HTTP requests and streaming responses back. | 77 | 1 | 66 | 2 | +| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Considering using bfetch capabilities when fetching large amounts of data. This services supports batching HTTP requests and streaming responses back. | 76 | 1 | 67 | 2 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds Canvas application to Kibana | 9 | 0 | 8 | 3 | -| | [Security Solution Threat Hunting](https://github.com/orgs/elastic/teams/security-threat-hunting) | The Case management system in Kibana | 475 | 0 | 431 | 14 | +| | [Security Solution Threat Hunting](https://github.com/orgs/elastic/teams/security-threat-hunting) | The Case management system in Kibana | 476 | 0 | 432 | 14 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | - | 285 | 4 | 253 | 3 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 22 | 0 | 22 | 0 | | code | [Kibana Operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 0 | 0 | 0 | 0 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 9 | 0 | 9 | 1 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 2302 | 27 | 1020 | 30 | | crossClusterReplication | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | -| | [Fleet](https://github.com/orgs/elastic/teams/fleet) | Add custom data integrations so they can be displayed in the Fleet integrations app | 85 | 1 | 78 | 1 | +| | [Fleet](https://github.com/orgs/elastic/teams/fleet) | Add custom data integrations so they can be displayed in the Fleet integrations app | 91 | 1 | 75 | 1 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds the Dashboard app to Kibana | 145 | 1 | 132 | 10 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 51 | 0 | 50 | 0 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 11 | 0 | 11 | 0 | -| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 3210 | 43 | 2825 | 48 | +| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 3206 | 43 | 2820 | 48 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Enhanced data plugin. (See src/plugins/data.) Enhances the main data plugin with a search session management UI. Includes a reusable search session indicator component to use in other applications. Exposes routes for managing search sessions. Includes a service that monitors, updates, and cleans up search session saved objects. | 16 | 0 | 16 | 2 | -| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 695 | 6 | 555 | 5 | +| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 697 | 6 | 555 | 5 | | | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | The Data Visualizer tools help you understand your data, by analyzing the metrics and fields in a log file or an existing Elasticsearch index. | 80 | 5 | 80 | 0 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 10 | 0 | 8 | 2 | -| | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin contains the Discover application and the saved search embeddable. | 82 | 0 | 56 | 6 | +| | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin contains the Discover application and the saved search embeddable. | 103 | 0 | 77 | 7 | | | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 39 | 0 | 37 | 2 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds embeddables service to Kibana | 469 | 5 | 393 | 3 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Extends embeddable plugin with more functionality | 14 | 0 | 14 | 0 | @@ -64,11 +63,11 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'revealImage' function and renderer to expressions | 12 | 0 | 12 | 3 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'shape' function and renderer to expressions | 143 | 0 | 143 | 0 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Expression Tagcloud plugin adds a `tagcloud` renderer and function to the expression plugin. The renderer will display the `Wordcloud` chart. | 5 | 0 | 5 | 0 | -| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds expression runtime to Kibana | 2095 | 27 | 1646 | 4 | +| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds expression runtime to Kibana | 2086 | 27 | 1640 | 4 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 216 | 0 | 98 | 2 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Index pattern fields and ambiguous values formatters | 288 | 7 | 250 | 3 | | | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | 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. | 129 | 4 | 129 | 1 | -| | [Fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1207 | 15 | 1107 | 10 | +| | [Fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1210 | 15 | 1110 | 10 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 68 | 0 | 14 | 5 | | globalSearchBar | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | | globalSearchProviders | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | @@ -89,7 +88,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 297 | 8 | 260 | 5 | | kibanaUsageCollection | [Kibana Telemtry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 0 | 0 | 0 | 0 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 606 | 3 | 413 | 8 | -| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Visualization editor allowing to quickly and easily configure compelling visualizations to use on dashboards and canvas workpads. Exposes components to embed visualizations and link into the Lens editor from within other apps in Kibana. | 252 | 0 | 234 | 24 | +| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Visualization editor allowing to quickly and easily configure compelling visualizations to use on dashboards and canvas workpads. Exposes components to embed visualizations and link into the Lens editor from within other apps in Kibana. | 253 | 0 | 235 | 24 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 8 | 0 | 8 | 0 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 3 | 0 | 3 | 0 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 117 | 0 | 42 | 8 | @@ -104,7 +103,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Stack Monitoring](https://github.com/orgs/elastic/teams/stack-monitoring-ui) | - | 10 | 0 | 10 | 2 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 31 | 0 | 31 | 2 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 17 | 0 | 17 | 0 | -| | [Observability UI](https://github.com/orgs/elastic/teams/observability-ui) | - | 245 | 0 | 245 | 10 | +| | [Observability UI](https://github.com/orgs/elastic/teams/observability-ui) | - | 258 | 1 | 257 | 12 | | | [Security asset management](https://github.com/orgs/elastic/teams/security-asset-management) | - | 11 | 0 | 11 | 0 | | painlessLab | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | The Presentation Utility Plugin is a set of common, shared components and toolkits for solutions within the Presentation space, (e.g. Dashboards, Canvas). | 178 | 3 | 151 | 5 | @@ -112,7 +111,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 4 | 0 | 4 | 0 | | | [Kibana Reporting Services](https://github.com/orgs/elastic/teams/kibana-reporting-services) | Reporting Services enables applications to feature reports that the user can automate with Watcher and download later. | 135 | 0 | 134 | 12 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 20 | 0 | 20 | 0 | -| | [RAC](https://github.com/orgs/elastic/teams/rac) | - | 132 | 0 | 109 | 7 | +| | [RAC](https://github.com/orgs/elastic/teams/rac) | - | 136 | 0 | 113 | 7 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 24 | 0 | 19 | 2 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 221 | 3 | 207 | 4 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 111 | 0 | 98 | 0 | @@ -121,7 +120,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 22 | 0 | 17 | 1 | | searchprofiler | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | | | [Platform 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. | 113 | 0 | 51 | 7 | -| | [Security solution](https://github.com/orgs/elastic/teams/security-solution) | - | 1361 | 8 | 1307 | 29 | +| | [Security solution](https://github.com/orgs/elastic/teams/security-solution) | - | 1361 | 8 | 1307 | 30 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds URL Service and sharing capabilities to Kibana | 143 | 1 | 90 | 10 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 23 | 1 | 22 | 1 | | | [Platform Security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides the Spaces feature, which allows saved objects to be organized into meaningful categories. | 208 | 0 | 21 | 1 | @@ -135,7 +134,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Security solution](https://github.com/orgs/elastic/teams/security-solution) | - | 968 | 6 | 847 | 25 | | | [Machine Learning 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 | [Kibana Localization](https://github.com/orgs/elastic/teams/kibana-localization) | - | 0 | 0 | 0 | 0 | -| | [Kibana Alerting](https://github.com/orgs/elastic/teams/kibana-alerting-services) | - | 239 | 1 | 230 | 18 | +| | [Kibana Alerting](https://github.com/orgs/elastic/teams/kibana-alerting-services) | - | 238 | 1 | 229 | 18 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds UI Actions service to Kibana | 127 | 0 | 88 | 11 | | | [Kibana App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Extends UI Actions plugin with more functionality | 203 | 2 | 145 | 9 | | upgradeAssistant | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | @@ -154,7 +153,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Registers the vega visualization. Is the elastic version of vega and vega-lite libraries. | 2 | 0 | 2 | 0 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Contains the vislib visualizations. These are the classical area/line/bar, pie, gauge/goal and heatmap charts. We want to replace them with elastic-charts. | 27 | 0 | 26 | 1 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Contains the new xy-axis chart using the elastic-charts library, which will eventually replace the vislib xy-axis charts including bar, area, and line. | 57 | 0 | 51 | 5 | -| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Contains the shared architecture among all the legacy visualizations, e.g. the visualization type registry or the visualization embeddable. | 275 | 13 | 257 | 15 | +| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Contains the shared architecture among all the legacy visualizations, e.g. the visualization type registry or the visualization embeddable. | 304 | 13 | 286 | 16 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Contains the visualize application which includes the listing page and the app frame, which will load the visualization's editor. | 24 | 0 | 23 | 1 | | watcher | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | | xpackLegacy | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | @@ -163,6 +162,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Package name           | Maintaining team | Description | API Cnt | Any Cnt | Missing
comments | Missing
exports | |--------------|----------------|-----------|--------------|----------|---------------|--------| +| | [Owner missing] | Elastic APM trace data generator | 17 | 0 | 17 | 2 | | | [Owner missing] | elasticsearch datemath parser, used in kibana | 44 | 0 | 43 | 0 | | | [Owner missing] | - | 11 | 5 | 11 | 0 | | | [Owner missing] | Alerts components and hooks | 9 | 1 | 9 | 0 | @@ -173,10 +173,10 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Owner missing] | - | 73 | 0 | 52 | 1 | | | [Owner missing] | - | 109 | 3 | 107 | 18 | | | [Owner missing] | - | 13 | 0 | 7 | 0 | -| | [Owner missing] | - | 258 | 7 | 231 | 4 | +| | [Owner missing] | - | 280 | 6 | 214 | 0 | | | [Owner missing] | - | 1 | 0 | 1 | 0 | | | [Owner missing] | - | 25 | 0 | 12 | 1 | -| | [Owner missing] | - | 208 | 2 | 156 | 14 | +| | [Owner missing] | - | 205 | 2 | 153 | 14 | | | [Owner missing] | - | 20 | 0 | 16 | 0 | | | [Owner missing] | - | 2 | 0 | 2 | 2 | | | [Owner missing] | - | 18 | 0 | 18 | 2 | @@ -201,7 +201,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Owner missing] | Security solution list ReactJS hooks | 56 | 0 | 44 | 0 | | | [Owner missing] | security solution list utilities | 222 | 0 | 177 | 0 | | | [Owner missing] | security solution t-grid packages will allow sharing components between timelines and security_solution plugin until we transfer all functionality to timelines plugin | 120 | 0 | 116 | 0 | -| | [Owner missing] | security solution utilities to use across plugins such lists, security_solution, cases, etc... | 4 | 0 | 2 | 0 | +| | [Owner missing] | security solution utilities to use across plugins such lists, security_solution, cases, etc... | 6 | 0 | 4 | 0 | | | [Owner missing] | - | 53 | 0 | 50 | 1 | | | [Owner missing] | - | 28 | 0 | 27 | 1 | | | [Owner missing] | - | 96 | 1 | 63 | 2 | diff --git a/api_docs/reporting.json b/api_docs/reporting.json index bcfce7a152416..9636c7c8d5ddf 100644 --- a/api_docs/reporting.json +++ b/api_docs/reporting.json @@ -925,7 +925,7 @@ "section": "def-server.PluginInitializerContext", "text": "PluginInitializerContext" }, - "; }>; autoDownload: boolean; }>; zoom: number; timeouts: Readonly<{} & { openUrl: number | moment.Duration; waitForElements: number | moment.Duration; renderComplete: number | moment.Duration; }>; networkPolicy: Readonly<{} & { enabled: boolean; rules: Readonly<{ host?: string | undefined; protocol?: string | undefined; } & { allow: boolean; }>[]; }>; viewport: Readonly<{} & { height: number; width: number; }>; loadDelay: number | moment.Duration; maxAttempts: number; }>; roles: Readonly<{} & { enabled: boolean; allow: string[]; }>; kibanaServer: Readonly<{ hostname?: string | undefined; port?: number | undefined; protocol?: string | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; csv: Readonly<{} & { scroll: Readonly<{} & { size: number; duration: string; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; enablePanelActionDownload: boolean; maxSizeBytes: number | ", + "; }>; autoDownload: boolean; }>; zoom: number; timeouts: Readonly<{} & { openUrl: number | moment.Duration; waitForElements: number | moment.Duration; renderComplete: number | moment.Duration; }>; networkPolicy: Readonly<{} & { enabled: boolean; rules: Readonly<{ host?: string | undefined; protocol?: string | undefined; } & { allow: boolean; }>[]; }>; loadDelay: number | moment.Duration; maxAttempts: number; }>; roles: Readonly<{} & { enabled: boolean; allow: string[]; }>; kibanaServer: Readonly<{ hostname?: string | undefined; port?: number | undefined; protocol?: string | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; csv: Readonly<{} & { scroll: Readonly<{} & { size: number; duration: string; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; enablePanelActionDownload: boolean; maxSizeBytes: number | ", { "pluginId": "@kbn/config-schema", "scope": "server", @@ -1323,7 +1323,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">) => Promise<", + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">) => Promise<", { "pluginId": "core", "scope": "server", @@ -1352,7 +1352,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">" + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">" ], "path": "x-pack/plugins/reporting/server/core.ts", "deprecated": false, @@ -1771,7 +1771,7 @@ "section": "def-server.PluginInitializerContext", "text": "PluginInitializerContext" }, - "; }>; autoDownload: boolean; }>; zoom: number; timeouts: Readonly<{} & { openUrl: number | moment.Duration; waitForElements: number | moment.Duration; renderComplete: number | moment.Duration; }>; networkPolicy: Readonly<{} & { enabled: boolean; rules: Readonly<{ host?: string | undefined; protocol?: string | undefined; } & { allow: boolean; }>[]; }>; viewport: Readonly<{} & { height: number; width: number; }>; loadDelay: number | moment.Duration; maxAttempts: number; }>; roles: Readonly<{} & { enabled: boolean; allow: string[]; }>; kibanaServer: Readonly<{ hostname?: string | undefined; port?: number | undefined; protocol?: string | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; csv: Readonly<{} & { scroll: Readonly<{} & { size: number; duration: string; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; enablePanelActionDownload: boolean; maxSizeBytes: number | ", + "; }>; autoDownload: boolean; }>; zoom: number; timeouts: Readonly<{} & { openUrl: number | moment.Duration; waitForElements: number | moment.Duration; renderComplete: number | moment.Duration; }>; networkPolicy: Readonly<{} & { enabled: boolean; rules: Readonly<{ host?: string | undefined; protocol?: string | undefined; } & { allow: boolean; }>[]; }>; loadDelay: number | moment.Duration; maxAttempts: number; }>; roles: Readonly<{} & { enabled: boolean; allow: string[]; }>; kibanaServer: Readonly<{ hostname?: string | undefined; port?: number | undefined; protocol?: string | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; csv: Readonly<{} & { scroll: Readonly<{} & { size: number; duration: string; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; enablePanelActionDownload: boolean; maxSizeBytes: number | ", { "pluginId": "@kbn/config-schema", "scope": "server", @@ -1968,7 +1968,7 @@ "section": "def-server.ReportingConfig", "text": "ReportingConfig" }, - " extends Config; }>; autoDownload: boolean; }>; zoom: number; timeouts: Readonly<{} & { openUrl: number | moment.Duration; waitForElements: number | moment.Duration; renderComplete: number | moment.Duration; }>; networkPolicy: Readonly<{} & { enabled: boolean; rules: Readonly<{ host?: string | undefined; protocol?: string | undefined; } & { allow: boolean; }>[]; }>; viewport: Readonly<{} & { height: number; width: number; }>; loadDelay: number | moment.Duration; maxAttempts: number; }>; roles: Readonly<{} & { enabled: boolean; allow: string[]; }>; kibanaServer: Readonly<{ hostname?: string | undefined; port?: number | undefined; protocol?: string | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; csv: Readonly<{} & { scroll: Readonly<{} & { size: number; duration: string; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; enablePanelActionDownload: boolean; maxSizeBytes: number | ", + " extends Config; }>; autoDownload: boolean; }>; zoom: number; timeouts: Readonly<{} & { openUrl: number | moment.Duration; waitForElements: number | moment.Duration; renderComplete: number | moment.Duration; }>; networkPolicy: Readonly<{} & { enabled: boolean; rules: Readonly<{ host?: string | undefined; protocol?: string | undefined; } & { allow: boolean; }>[]; }>; loadDelay: number | moment.Duration; maxAttempts: number; }>; roles: Readonly<{} & { enabled: boolean; allow: string[]; }>; kibanaServer: Readonly<{ hostname?: string | undefined; port?: number | undefined; protocol?: string | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; csv: Readonly<{} & { scroll: Readonly<{} & { size: number; duration: string; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; enablePanelActionDownload: boolean; maxSizeBytes: number | ", { "pluginId": "@kbn/config-schema", "scope": "server", @@ -2187,7 +2187,7 @@ "TaskScheduling", ", \"schedule\" | \"runNow\" | \"ephemeralRunNow\" | \"ensureScheduled\"> & Pick<", "TaskStore", - ", \"remove\" | \"get\" | \"fetch\"> & { removeIfExists: (id: string) => Promise; } & { supportsEphemeralTasks: () => boolean; }" + ", \"remove\" | \"fetch\" | \"get\"> & { removeIfExists: (id: string) => Promise; } & { supportsEphemeralTasks: () => boolean; }" ], "path": "x-pack/plugins/reporting/server/types.ts", "deprecated": false diff --git a/api_docs/rule_registry.json b/api_docs/rule_registry.json index 2d9e79f727c0e..89c359461c72f 100644 --- a/api_docs/rule_registry.json +++ b/api_docs/rule_registry.json @@ -878,6 +878,87 @@ } ], "initialIsOpen": false + }, + { + "parentPluginId": "ruleRegistry", + "id": "def-server.RuleDataWriterInitializationError", + "type": "Class", + "tags": [], + "label": "RuleDataWriterInitializationError", + "description": [], + "signature": [ + { + "pluginId": "ruleRegistry", + "scope": "server", + "docId": "kibRuleRegistryPluginApi", + "section": "def-server.RuleDataWriterInitializationError", + "text": "RuleDataWriterInitializationError" + }, + " extends Error" + ], + "path": "x-pack/plugins/rule_registry/server/rule_data_plugin_service/errors.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "ruleRegistry", + "id": "def-server.RuleDataWriterInitializationError.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [], + "signature": [ + "any" + ], + "path": "x-pack/plugins/rule_registry/server/rule_data_plugin_service/errors.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "ruleRegistry", + "id": "def-server.RuleDataWriterInitializationError.Unnamed.$1", + "type": "CompoundType", + "tags": [], + "label": "resourceType", + "description": [], + "signature": [ + "\"index\" | \"namespace\"" + ], + "path": "x-pack/plugins/rule_registry/server/rule_data_plugin_service/errors.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "ruleRegistry", + "id": "def-server.RuleDataWriterInitializationError.Unnamed.$2", + "type": "string", + "tags": [], + "label": "registrationContext", + "description": [], + "signature": [ + "string" + ], + "path": "x-pack/plugins/rule_registry/server/rule_data_plugin_service/errors.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "ruleRegistry", + "id": "def-server.RuleDataWriterInitializationError.Unnamed.$3", + "type": "CompoundType", + "tags": [], + "label": "error", + "description": [], + "signature": [ + "string | Error" + ], + "path": "x-pack/plugins/rule_registry/server/rule_data_plugin_service/errors.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false } ], "functions": [ @@ -1085,10 +1166,10 @@ }, { "parentPluginId": "ruleRegistry", - "id": "def-server.createPersistenceRuleTypeFactory", + "id": "def-server.createPersistenceRuleTypeWrapper", "type": "Function", "tags": [], - "label": "createPersistenceRuleTypeFactory", + "label": "createPersistenceRuleTypeWrapper", "description": [], "signature": [ "({ logger, ruleDataClient }: { ruleDataClient: ", @@ -1107,23 +1188,15 @@ "section": "def-server.Logger", "text": "Logger" }, - "; }) => , TParams extends Record, TServices extends ", + "; }) => , TState extends Record, TInstanceContext extends { [x: string]: unknown; } = {}, TActionGroupIds extends string = never>(type: ", { "pluginId": "ruleRegistry", "scope": "server", "docId": "kibRuleRegistryPluginApi", - "section": "def-server.PersistenceServices", - "text": "PersistenceServices" + "section": "def-server.PersistenceAlertType", + "text": "PersistenceAlertType" }, - ", TAlertInstanceContext extends { [x: string]: unknown; } = {}>(type: ", - { - "pluginId": "ruleRegistry", - "scope": "server", - "docId": "kibRuleRegistryPluginApi", - "section": "def-server.AlertTypeWithExecutor", - "text": "AlertTypeWithExecutor" - }, - ") => { executor: (options: ", + ") => { executor: (options: ", { "pluginId": "alerting", "scope": "server", @@ -1131,7 +1204,15 @@ "section": "def-server.AlertExecutorOptions", "text": "AlertExecutorOptions" }, - " & { services: TServices; }) => Promise; id: string; name: string; validate?: { params?: ", + ">) => Promise; id: string; name: string; validate?: { params?: ", "AlertTypeParamsValidator", " | undefined; } | undefined; actionGroups: ", { @@ -1141,7 +1222,7 @@ "section": "def-common.ActionGroup", "text": "ActionGroup" }, - "[]; defaultActionGroupId: string; recoveryActionGroup?: ", + "[]; defaultActionGroupId: TActionGroupIds; recoveryActionGroup?: ", { "pluginId": "alerting", "scope": "common", @@ -1149,7 +1230,7 @@ "section": "def-common.ActionGroup", "text": "ActionGroup" }, - " | undefined; producer: string; actionVariables?: { context?: ", + " | undefined; producer: string; actionVariables?: { context?: ", { "pluginId": "alerting", "scope": "common", @@ -1183,14 +1264,14 @@ }, "; injectReferences: (params: TParams, references: ", "SavedObjectReference", - "[]) => TParams; } | undefined; isExportable: boolean; ruleTaskTimeout?: string | undefined; }" + "[]) => TParams; } | undefined; isExportable: boolean; defaultScheduleInterval?: string | undefined; minimumScheduleInterval?: string | undefined; ruleTaskTimeout?: string | undefined; }" ], - "path": "x-pack/plugins/rule_registry/server/utils/create_persistence_rule_type_factory.ts", + "path": "x-pack/plugins/rule_registry/server/utils/create_persistence_rule_type_wrapper.ts", "deprecated": false, "children": [ { "parentPluginId": "ruleRegistry", - "id": "def-server.createPersistenceRuleTypeFactory.$1", + "id": "def-server.createPersistenceRuleTypeWrapper.$1", "type": "Object", "tags": [], "label": "{ logger, ruleDataClient }", @@ -1214,7 +1295,7 @@ }, "; }" ], - "path": "x-pack/plugins/rule_registry/server/utils/create_persistence_rule_type_factory.ts", + "path": "x-pack/plugins/rule_registry/server/utils/create_persistence_rule_type_wrapper.ts", "deprecated": false, "isRequired": true } @@ -1725,7 +1806,7 @@ "ApiResponse", "<", "BulkResponse", - ", unknown>>" + ", unknown> | undefined>" ], "path": "x-pack/plugins/rule_registry/server/rule_data_client/types.ts", "deprecated": false, @@ -1812,16 +1893,6 @@ "tags": [], "label": "PersistenceServices", "description": [], - "signature": [ - { - "pluginId": "ruleRegistry", - "scope": "server", - "docId": "kibRuleRegistryPluginApi", - "section": "def-server.PersistenceServices", - "text": "PersistenceServices" - }, - "" - ], "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", "deprecated": false, "children": [ @@ -1839,7 +1910,7 @@ "ApiResponse", "<", "BulkResponse", - ", unknown>>" + ", unknown> | undefined>" ], "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", "deprecated": false, @@ -1945,7 +2016,7 @@ "section": "def-server.AlertType", "text": "AlertType" }, - ", \"id\" | \"name\" | \"validate\" | \"actionGroups\" | \"defaultActionGroupId\" | \"recoveryActionGroup\" | \"producer\" | \"actionVariables\" | \"minimumLicenseRequired\" | \"useSavedObjectReferences\" | \"isExportable\" | \"ruleTaskTimeout\"> & { executor: ", + ", \"id\" | \"name\" | \"validate\" | \"actionGroups\" | \"defaultActionGroupId\" | \"recoveryActionGroup\" | \"producer\" | \"actionVariables\" | \"minimumLicenseRequired\" | \"useSavedObjectReferences\" | \"isExportable\" | \"defaultScheduleInterval\" | \"minimumScheduleInterval\" | \"ruleTaskTimeout\"> & { executor: ", "AlertTypeExecutor", "; }" ], @@ -1955,10 +2026,10 @@ }, { "parentPluginId": "ruleRegistry", - "id": "def-server.CreatePersistenceRuleTypeFactory", + "id": "def-server.CreatePersistenceRuleTypeWrapper", "type": "Type", "tags": [], - "label": "CreatePersistenceRuleTypeFactory", + "label": "CreatePersistenceRuleTypeWrapper", "description": [], "signature": [ "(options: { ruleDataClient: ", @@ -1977,31 +2048,23 @@ "section": "def-server.Logger", "text": "Logger" }, - "; }) => , TParams extends Record, TServices extends ", - { - "pluginId": "ruleRegistry", - "scope": "server", - "docId": "kibRuleRegistryPluginApi", - "section": "def-server.PersistenceServices", - "text": "PersistenceServices" - }, - ", TAlertInstanceContext extends { [x: string]: unknown; } = {}>(type: ", + "; }) => , TState extends Record, TInstanceContext extends { [x: string]: unknown; } = {}, TActionGroupIds extends string = never>(type: ", { "pluginId": "ruleRegistry", "scope": "server", "docId": "kibRuleRegistryPluginApi", - "section": "def-server.AlertTypeWithExecutor", - "text": "AlertTypeWithExecutor" + "section": "def-server.PersistenceAlertType", + "text": "PersistenceAlertType" }, - ") => ", + ") => ", { - "pluginId": "ruleRegistry", + "pluginId": "alerting", "scope": "server", - "docId": "kibRuleRegistryPluginApi", - "section": "def-server.AlertTypeWithExecutor", - "text": "AlertTypeWithExecutor" + "docId": "kibAlertingPluginApi", + "section": "def-server.AlertType", + "text": "AlertType" }, - "" + "" ], "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", "deprecated": false, @@ -2009,7 +2072,7 @@ "children": [ { "parentPluginId": "ruleRegistry", - "id": "def-server.CreatePersistenceRuleTypeFactory.$1", + "id": "def-server.CreatePersistenceRuleTypeWrapper.$1", "type": "Object", "tags": [], "label": "options", @@ -2209,38 +2272,6 @@ "deprecated": false, "initialIsOpen": false }, - { - "parentPluginId": "ruleRegistry", - "id": "def-server.PersistenceAlertQueryService", - "type": "Type", - "tags": [], - "label": "PersistenceAlertQueryService", - "description": [], - "signature": [ - "(query: ", - "SearchRequest", - ") => Promise[]>" - ], - "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", - "deprecated": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "ruleRegistry", - "id": "def-server.PersistenceAlertQueryService.$1", - "type": "Object", - "tags": [], - "label": "query", - "description": [], - "signature": [ - "SearchRequest" - ], - "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", - "deprecated": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "ruleRegistry", "id": "def-server.PersistenceAlertService", @@ -2255,7 +2286,7 @@ "ApiResponse", "<", "BulkResponse", - ", unknown>>" + ", unknown> | undefined>" ], "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", "deprecated": false, @@ -2290,6 +2321,52 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "ruleRegistry", + "id": "def-server.PersistenceAlertType", + "type": "Type", + "tags": [], + "label": "PersistenceAlertType", + "description": [], + "signature": [ + "Pick<", + { + "pluginId": "alerting", + "scope": "server", + "docId": "kibAlertingPluginApi", + "section": "def-server.AlertType", + "text": "AlertType" + }, + ", \"id\" | \"name\" | \"validate\" | \"actionGroups\" | \"defaultActionGroupId\" | \"recoveryActionGroup\" | \"producer\" | \"actionVariables\" | \"minimumLicenseRequired\" | \"useSavedObjectReferences\" | \"isExportable\" | \"defaultScheduleInterval\" | \"minimumScheduleInterval\" | \"ruleTaskTimeout\"> & { executor: (options: ", + { + "pluginId": "alerting", + "scope": "server", + "docId": "kibAlertingPluginApi", + "section": "def-server.AlertExecutorOptions", + "text": "AlertExecutorOptions" + }, + "> & { services: ", + { + "pluginId": "ruleRegistry", + "scope": "server", + "docId": "kibRuleRegistryPluginApi", + "section": "def-server.PersistenceServices", + "text": "PersistenceServices" + }, + "; }) => Promise; }" + ], + "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "ruleRegistry", "id": "def-server.RuleRegistryPluginConfig", diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index 5bd8aeff7d1b2..7e05924fca263 100644 --- a/api_docs/rule_registry.mdx +++ b/api_docs/rule_registry.mdx @@ -18,7 +18,7 @@ Contact [RAC](https://github.com/orgs/elastic/teams/rac) for questions regarding | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 132 | 0 | 109 | 7 | +| 136 | 0 | 113 | 7 | ## Server diff --git a/api_docs/runtime_fields.json b/api_docs/runtime_fields.json index 83618b64aca36..e89ac78622778 100644 --- a/api_docs/runtime_fields.json +++ b/api_docs/runtime_fields.json @@ -330,7 +330,7 @@ "label": "type", "description": [], "signature": [ - "\"boolean\" | \"date\" | \"keyword\" | \"ip\" | \"long\" | \"double\"" + "\"boolean\" | \"keyword\" | \"date\" | \"ip\" | \"long\" | \"double\"" ], "path": "x-pack/plugins/runtime_fields/public/types.ts", "deprecated": false @@ -363,7 +363,7 @@ "description": [], "signature": [ "ComboBoxOption", - "<\"boolean\" | \"date\" | \"keyword\" | \"ip\" | \"long\" | \"double\">[]" + "<\"boolean\" | \"keyword\" | \"date\" | \"ip\" | \"long\" | \"double\">[]" ], "path": "x-pack/plugins/runtime_fields/public/constants.ts", "deprecated": false, @@ -377,7 +377,7 @@ "label": "RuntimeType", "description": [], "signature": [ - "\"boolean\" | \"date\" | \"keyword\" | \"ip\" | \"long\" | \"double\"" + "\"boolean\" | \"keyword\" | \"date\" | \"ip\" | \"long\" | \"double\"" ], "path": "x-pack/plugins/runtime_fields/public/types.ts", "deprecated": false, diff --git a/api_docs/saved_objects.json b/api_docs/saved_objects.json index 3af0a34fee5d4..208ff3ea7064a 100644 --- a/api_docs/saved_objects.json +++ b/api_docs/saved_objects.json @@ -562,11 +562,11 @@ "references": [ { "plugin": "discover", - "path": "src/plugins/discover/public/saved_searches/saved_searches.ts" + "path": "src/plugins/discover/public/saved_searches/legacy/saved_searches.ts" }, { "plugin": "discover", - "path": "src/plugins/discover/public/saved_searches/saved_searches.ts" + "path": "src/plugins/discover/public/saved_searches/legacy/saved_searches.ts" }, { "plugin": "discover", @@ -596,14 +596,6 @@ "plugin": "visualizations", "path": "src/plugins/visualizations/public/saved_visualizations/saved_visualizations.ts" }, - { - "plugin": "visualizations", - "path": "src/plugins/visualizations/public/services.ts" - }, - { - "plugin": "visualizations", - "path": "src/plugins/visualizations/public/services.ts" - }, { "plugin": "dashboard", "path": "src/plugins/dashboard/public/services/saved_objects.ts" @@ -786,7 +778,7 @@ "section": "def-public.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"bulkUpdate\">" + ", \"create\" | \"bulkCreate\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"bulkUpdate\">" ], "path": "src/plugins/saved_objects/public/saved_object/saved_object_loader.ts", "deprecated": false, @@ -1539,7 +1531,7 @@ "section": "def-public.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"bulkUpdate\">; overlays: ", + ", \"create\" | \"bulkCreate\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"bulkUpdate\">; overlays: ", { "pluginId": "core", "scope": "public", @@ -1665,17 +1657,7 @@ "label": "savedObjectsClient", "description": [], "signature": [ - "{ get: (type: string, id: string) => Promise<", - { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-public.SimpleSavedObject", - "text": "SimpleSavedObject" - }, - ">; delete: (type: string, id: string, options?: ", - "SavedObjectsDeleteOptions", - " | undefined) => Promise<{}>; create: (type: string, attributes: T, options?: ", + "{ create: (type: string, attributes: T, options?: ", { "pluginId": "core", "scope": "public", @@ -1715,7 +1697,9 @@ "section": "def-public.SavedObjectsBatchResponse", "text": "SavedObjectsBatchResponse" }, - ">; find: (options: Pick<", + ">; delete: (type: string, id: string, options?: ", + "SavedObjectsDeleteOptions", + " | undefined) => Promise<{}>; find: (options: Pick<", { "pluginId": "core", "scope": "server", @@ -1747,7 +1731,15 @@ "section": "def-public.ResolvedSimpleSavedObject", "text": "ResolvedSimpleSavedObject" }, - "[]; }>; resolve: (type: string, id: string) => Promise<", + "[]; }>; get: (type: string, id: string) => Promise<", + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SimpleSavedObject", + "text": "SimpleSavedObject" + }, + ">; resolve: (type: string, id: string) => Promise<", { "pluginId": "core", "scope": "public", @@ -2146,37 +2138,17 @@ "path": "src/plugins/saved_objects/public/types.ts", "deprecated": true, "references": [ - { - "plugin": "discover", - "path": "src/plugins/discover/public/application/apps/main/discover_main_route.tsx" - }, { "plugin": "savedObjectsTaggingOss", "path": "src/plugins/saved_objects_tagging_oss/public/api.ts" }, { "plugin": "discover", - "path": "src/plugins/discover/public/saved_searches/_saved_search.ts" + "path": "src/plugins/discover/public/saved_searches/legacy/_saved_search.ts" }, { "plugin": "discover", - "path": "src/plugins/discover/public/saved_searches/_saved_search.ts" - }, - { - "plugin": "discover", - "path": "src/plugins/discover/public/application/apps/main/discover_main_route.tsx" - }, - { - "plugin": "discover", - "path": "src/plugins/discover/public/application/apps/main/discover_main_route.tsx" - }, - { - "plugin": "visualizations", - "path": "src/plugins/visualizations/public/types.ts" - }, - { - "plugin": "visualizations", - "path": "src/plugins/visualizations/public/types.ts" + "path": "src/plugins/discover/public/saved_searches/legacy/_saved_search.ts" }, { "plugin": "visualizations", @@ -2242,50 +2214,6 @@ "plugin": "dashboard", "path": "src/plugins/dashboard/public/application/actions/clone_panel_action.tsx" }, - { - "plugin": "visualize", - "path": "src/plugins/visualize/public/application/types.ts" - }, - { - "plugin": "visualize", - "path": "src/plugins/visualize/public/application/types.ts" - }, - { - "plugin": "visualize", - "path": "src/plugins/visualize/public/application/types.ts" - }, - { - "plugin": "visualize", - "path": "src/plugins/visualize/public/application/types.ts" - }, - { - "plugin": "visualize", - "path": "src/plugins/visualize/public/application/utils/get_visualization_instance.ts" - }, - { - "plugin": "visualize", - "path": "src/plugins/visualize/public/application/utils/get_visualization_instance.ts" - }, - { - "plugin": "visDefaultEditor", - "path": "src/plugins/vis_default_editor/public/components/sidebar/sidebar_title.tsx" - }, - { - "plugin": "visDefaultEditor", - "path": "src/plugins/vis_default_editor/public/components/sidebar/sidebar_title.tsx" - }, - { - "plugin": "visDefaultEditor", - "path": "src/plugins/vis_default_editor/public/components/sidebar/sidebar_title.tsx" - }, - { - "plugin": "visDefaultEditor", - "path": "src/plugins/vis_default_editor/public/components/sidebar/sidebar.tsx" - }, - { - "plugin": "visDefaultEditor", - "path": "src/plugins/vis_default_editor/public/components/sidebar/sidebar.tsx" - }, { "plugin": "savedObjectsManagement", "path": "src/plugins/saved_objects_management/public/lib/resolve_saved_objects.ts" @@ -2325,54 +2253,6 @@ { "plugin": "savedObjectsManagement", "path": "src/plugins/saved_objects_management/public/lib/resolve_saved_objects.test.ts" - }, - { - "plugin": "visualize", - "path": "src/plugins/visualize/target/types/public/application/types.d.ts" - }, - { - "plugin": "visualize", - "path": "src/plugins/visualize/target/types/public/application/types.d.ts" - }, - { - "plugin": "visualize", - "path": "src/plugins/visualize/target/types/public/application/types.d.ts" - }, - { - "plugin": "visualize", - "path": "src/plugins/visualize/target/types/public/application/types.d.ts" - }, - { - "plugin": "visDefaultEditor", - "path": "src/plugins/vis_default_editor/target/types/public/components/sidebar/sidebar.d.ts" - }, - { - "plugin": "visDefaultEditor", - "path": "src/plugins/vis_default_editor/target/types/public/components/sidebar/sidebar.d.ts" - }, - { - "plugin": "visDefaultEditor", - "path": "src/plugins/vis_default_editor/target/types/public/components/sidebar/sidebar_title.d.ts" - }, - { - "plugin": "visDefaultEditor", - "path": "src/plugins/vis_default_editor/target/types/public/components/sidebar/sidebar_title.d.ts" - }, - { - "plugin": "visDefaultEditor", - "path": "src/plugins/vis_default_editor/target/types/public/components/sidebar/sidebar_title.d.ts" - }, - { - "plugin": "visualize", - "path": "src/plugins/visualize/target/types/public/application/utils/get_visualization_instance.d.ts" - }, - { - "plugin": "visualize", - "path": "src/plugins/visualize/target/types/public/application/utils/get_visualization_instance.d.ts" - }, - { - "plugin": "visualize", - "path": "src/plugins/visualize/target/types/public/application/utils/get_visualization_instance.d.ts" } ], "children": [ @@ -3919,7 +3799,7 @@ "references": [ { "plugin": "discover", - "path": "src/plugins/discover/public/saved_searches/_saved_search.ts" + "path": "src/plugins/discover/public/saved_searches/legacy/_saved_search.ts" }, { "plugin": "visualizations", diff --git a/api_docs/saved_objects_management.json b/api_docs/saved_objects_management.json index c7ce9aa1c8bdf..2dd33093befd5 100644 --- a/api_docs/saved_objects_management.json +++ b/api_docs/saved_objects_management.json @@ -845,7 +845,7 @@ "label": "euiColumn", "description": [], "signature": [ - "{ children?: React.ReactNode; headers?: string | undefined; onClick?: ((event: React.MouseEvent) => void) | undefined; onChange?: ((event: React.FormEvent) => void) | undefined; color?: string | undefined; onKeyDown?: ((event: React.KeyboardEvent) => void) | undefined; id?: string | undefined; title?: string | undefined; description?: string | undefined; security?: string | undefined; name: React.ReactNode; field: string; defaultChecked?: boolean | undefined; defaultValue?: string | number | string[] | undefined; suppressContentEditableWarning?: boolean | undefined; suppressHydrationWarning?: boolean | undefined; accessKey?: string | undefined; className?: string | undefined; contentEditable?: boolean | \"true\" | \"false\" | \"inherit\" | undefined; contextMenu?: string | undefined; dir?: string | undefined; draggable?: boolean | \"true\" | \"false\" | undefined; hidden?: boolean | undefined; lang?: string | undefined; placeholder?: string | undefined; slot?: string | undefined; spellCheck?: boolean | \"true\" | \"false\" | undefined; style?: React.CSSProperties | undefined; tabIndex?: number | undefined; translate?: \"yes\" | \"no\" | undefined; radioGroup?: string | undefined; role?: string | undefined; about?: string | undefined; datatype?: string | undefined; inlist?: any; prefix?: string | undefined; property?: string | undefined; resource?: string | undefined; typeof?: string | undefined; vocab?: string | undefined; autoCapitalize?: string | undefined; autoCorrect?: string | undefined; autoSave?: string | undefined; itemProp?: string | undefined; itemScope?: boolean | undefined; itemType?: string | undefined; itemID?: string | undefined; itemRef?: string | undefined; results?: number | undefined; unselectable?: \"on\" | \"off\" | undefined; inputMode?: \"none\" | \"search\" | \"email\" | \"text\" | \"tel\" | \"url\" | \"numeric\" | \"decimal\" | undefined; is?: string | undefined; 'aria-activedescendant'?: string | undefined; 'aria-atomic'?: boolean | \"true\" | \"false\" | undefined; 'aria-autocomplete'?: \"none\" | \"list\" | \"inline\" | \"both\" | undefined; 'aria-busy'?: boolean | \"true\" | \"false\" | undefined; 'aria-checked'?: boolean | \"mixed\" | \"true\" | \"false\" | undefined; 'aria-colcount'?: number | undefined; 'aria-colindex'?: number | undefined; 'aria-colspan'?: number | undefined; 'aria-controls'?: string | undefined; 'aria-current'?: boolean | \"date\" | \"location\" | \"page\" | \"time\" | \"true\" | \"false\" | \"step\" | undefined; 'aria-describedby'?: string | undefined; 'aria-details'?: string | undefined; 'aria-disabled'?: boolean | \"true\" | \"false\" | undefined; 'aria-dropeffect'?: \"none\" | \"copy\" | \"link\" | \"execute\" | \"move\" | \"popup\" | undefined; 'aria-errormessage'?: string | undefined; 'aria-expanded'?: boolean | \"true\" | \"false\" | undefined; 'aria-flowto'?: string | undefined; 'aria-grabbed'?: boolean | \"true\" | \"false\" | undefined; 'aria-haspopup'?: boolean | \"grid\" | \"menu\" | \"true\" | \"false\" | \"listbox\" | \"tree\" | \"dialog\" | undefined; 'aria-hidden'?: boolean | \"true\" | \"false\" | undefined; 'aria-invalid'?: boolean | \"true\" | \"false\" | \"grammar\" | \"spelling\" | undefined; 'aria-keyshortcuts'?: string | undefined; 'aria-label'?: string | undefined; 'aria-labelledby'?: string | undefined; 'aria-level'?: number | undefined; 'aria-live'?: \"off\" | \"assertive\" | \"polite\" | undefined; 'aria-modal'?: boolean | \"true\" | \"false\" | undefined; 'aria-multiline'?: boolean | \"true\" | \"false\" | undefined; 'aria-multiselectable'?: boolean | \"true\" | \"false\" | undefined; 'aria-orientation'?: \"horizontal\" | \"vertical\" | undefined; 'aria-owns'?: string | undefined; 'aria-placeholder'?: string | undefined; 'aria-posinset'?: number | undefined; 'aria-pressed'?: boolean | \"mixed\" | \"true\" | \"false\" | undefined; 'aria-readonly'?: boolean | \"true\" | \"false\" | undefined; 'aria-relevant'?: \"all\" | \"text\" | \"additions\" | \"additions text\" | \"removals\" | undefined; 'aria-required'?: boolean | \"true\" | \"false\" | undefined; 'aria-roledescription'?: string | undefined; 'aria-rowcount'?: number | undefined; 'aria-rowindex'?: number | undefined; 'aria-rowspan'?: number | undefined; 'aria-selected'?: boolean | \"true\" | \"false\" | undefined; 'aria-setsize'?: number | undefined; 'aria-sort'?: \"none\" | \"ascending\" | \"descending\" | \"other\" | undefined; 'aria-valuemax'?: number | undefined; 'aria-valuemin'?: number | undefined; 'aria-valuenow'?: number | undefined; 'aria-valuetext'?: string | undefined; dangerouslySetInnerHTML?: { __html: string; } | undefined; onCopy?: ((event: React.ClipboardEvent) => void) | undefined; onCopyCapture?: ((event: React.ClipboardEvent) => void) | undefined; onCut?: ((event: React.ClipboardEvent) => void) | undefined; onCutCapture?: ((event: React.ClipboardEvent) => void) | undefined; onPaste?: ((event: React.ClipboardEvent) => void) | undefined; onPasteCapture?: ((event: React.ClipboardEvent) => void) | undefined; onCompositionEnd?: ((event: React.CompositionEvent) => void) | undefined; onCompositionEndCapture?: ((event: React.CompositionEvent) => void) | undefined; onCompositionStart?: ((event: React.CompositionEvent) => void) | undefined; onCompositionStartCapture?: ((event: React.CompositionEvent) => void) | undefined; onCompositionUpdate?: ((event: React.CompositionEvent) => void) | undefined; onCompositionUpdateCapture?: ((event: React.CompositionEvent) => void) | undefined; onFocus?: ((event: React.FocusEvent) => void) | undefined; onFocusCapture?: ((event: React.FocusEvent) => void) | undefined; onBlur?: ((event: React.FocusEvent) => void) | undefined; onBlurCapture?: ((event: React.FocusEvent) => void) | undefined; onChangeCapture?: ((event: React.FormEvent) => void) | undefined; onBeforeInput?: ((event: React.FormEvent) => void) | undefined; onBeforeInputCapture?: ((event: React.FormEvent) => void) | undefined; onInput?: ((event: React.FormEvent) => void) | undefined; onInputCapture?: ((event: React.FormEvent) => void) | undefined; onReset?: ((event: React.FormEvent) => void) | undefined; onResetCapture?: ((event: React.FormEvent) => void) | undefined; onSubmit?: ((event: React.FormEvent) => void) | undefined; onSubmitCapture?: ((event: React.FormEvent) => void) | undefined; onInvalid?: ((event: React.FormEvent) => void) | undefined; onInvalidCapture?: ((event: React.FormEvent) => void) | undefined; onLoad?: ((event: React.SyntheticEvent) => void) | undefined; onLoadCapture?: ((event: React.SyntheticEvent) => void) | undefined; onError?: ((event: React.SyntheticEvent) => void) | undefined; onErrorCapture?: ((event: React.SyntheticEvent) => void) | undefined; onKeyDownCapture?: ((event: React.KeyboardEvent) => void) | undefined; onKeyPress?: ((event: React.KeyboardEvent) => void) | undefined; onKeyPressCapture?: ((event: React.KeyboardEvent) => void) | undefined; onKeyUp?: ((event: React.KeyboardEvent) => void) | undefined; onKeyUpCapture?: ((event: React.KeyboardEvent) => void) | undefined; onAbort?: ((event: React.SyntheticEvent) => void) | undefined; onAbortCapture?: ((event: React.SyntheticEvent) => void) | undefined; onCanPlay?: ((event: React.SyntheticEvent) => void) | undefined; onCanPlayCapture?: ((event: React.SyntheticEvent) => void) | undefined; onCanPlayThrough?: ((event: React.SyntheticEvent) => void) | undefined; onCanPlayThroughCapture?: ((event: React.SyntheticEvent) => void) | undefined; onDurationChange?: ((event: React.SyntheticEvent) => void) | undefined; onDurationChangeCapture?: ((event: React.SyntheticEvent) => void) | undefined; onEmptied?: ((event: React.SyntheticEvent) => void) | undefined; onEmptiedCapture?: ((event: React.SyntheticEvent) => void) | undefined; onEncrypted?: ((event: React.SyntheticEvent) => void) | undefined; onEncryptedCapture?: ((event: React.SyntheticEvent) => void) | undefined; onEnded?: ((event: React.SyntheticEvent) => void) | undefined; onEndedCapture?: ((event: React.SyntheticEvent) => void) | undefined; onLoadedData?: ((event: React.SyntheticEvent) => void) | undefined; onLoadedDataCapture?: ((event: React.SyntheticEvent) => void) | undefined; onLoadedMetadata?: ((event: React.SyntheticEvent) => void) | undefined; onLoadedMetadataCapture?: ((event: React.SyntheticEvent) => void) | undefined; onLoadStart?: ((event: React.SyntheticEvent) => void) | undefined; onLoadStartCapture?: ((event: React.SyntheticEvent) => void) | undefined; onPause?: ((event: React.SyntheticEvent) => void) | undefined; onPauseCapture?: ((event: React.SyntheticEvent) => void) | undefined; onPlay?: ((event: React.SyntheticEvent) => void) | undefined; onPlayCapture?: ((event: React.SyntheticEvent) => void) | undefined; onPlaying?: ((event: React.SyntheticEvent) => void) | undefined; onPlayingCapture?: ((event: React.SyntheticEvent) => void) | undefined; onProgress?: ((event: React.SyntheticEvent) => void) | undefined; onProgressCapture?: ((event: React.SyntheticEvent) => void) | undefined; onRateChange?: ((event: React.SyntheticEvent) => void) | undefined; onRateChangeCapture?: ((event: React.SyntheticEvent) => void) | undefined; onSeeked?: ((event: React.SyntheticEvent) => void) | undefined; onSeekedCapture?: ((event: React.SyntheticEvent) => void) | undefined; onSeeking?: ((event: React.SyntheticEvent) => void) | undefined; onSeekingCapture?: ((event: React.SyntheticEvent) => void) | undefined; onStalled?: ((event: React.SyntheticEvent) => void) | undefined; onStalledCapture?: ((event: React.SyntheticEvent) => void) | undefined; onSuspend?: ((event: React.SyntheticEvent) => void) | undefined; onSuspendCapture?: ((event: React.SyntheticEvent) => void) | undefined; onTimeUpdate?: ((event: React.SyntheticEvent) => void) | undefined; onTimeUpdateCapture?: ((event: React.SyntheticEvent) => void) | undefined; onVolumeChange?: ((event: React.SyntheticEvent) => void) | undefined; onVolumeChangeCapture?: ((event: React.SyntheticEvent) => void) | undefined; onWaiting?: ((event: React.SyntheticEvent) => void) | undefined; onWaitingCapture?: ((event: React.SyntheticEvent) => void) | undefined; onAuxClick?: ((event: React.MouseEvent) => void) | undefined; onAuxClickCapture?: ((event: React.MouseEvent) => void) | undefined; onClickCapture?: ((event: React.MouseEvent) => void) | undefined; onContextMenu?: ((event: React.MouseEvent) => void) | undefined; onContextMenuCapture?: ((event: React.MouseEvent) => void) | undefined; onDoubleClick?: ((event: React.MouseEvent) => void) | undefined; onDoubleClickCapture?: ((event: React.MouseEvent) => void) | undefined; onDrag?: ((event: React.DragEvent) => void) | undefined; onDragCapture?: ((event: React.DragEvent) => void) | undefined; onDragEnd?: ((event: React.DragEvent) => void) | undefined; onDragEndCapture?: ((event: React.DragEvent) => void) | undefined; onDragEnter?: ((event: React.DragEvent) => void) | undefined; onDragEnterCapture?: ((event: React.DragEvent) => void) | undefined; onDragExit?: ((event: React.DragEvent) => void) | undefined; onDragExitCapture?: ((event: React.DragEvent) => void) | undefined; onDragLeave?: ((event: React.DragEvent) => void) | undefined; onDragLeaveCapture?: ((event: React.DragEvent) => void) | undefined; onDragOver?: ((event: React.DragEvent) => void) | undefined; onDragOverCapture?: ((event: React.DragEvent) => void) | undefined; onDragStart?: ((event: React.DragEvent) => void) | undefined; onDragStartCapture?: ((event: React.DragEvent) => void) | undefined; onDrop?: ((event: React.DragEvent) => void) | undefined; onDropCapture?: ((event: React.DragEvent) => void) | undefined; onMouseDown?: ((event: React.MouseEvent) => void) | undefined; onMouseDownCapture?: ((event: React.MouseEvent) => void) | undefined; onMouseEnter?: ((event: React.MouseEvent) => void) | undefined; onMouseLeave?: ((event: React.MouseEvent) => void) | undefined; onMouseMove?: ((event: React.MouseEvent) => void) | undefined; onMouseMoveCapture?: ((event: React.MouseEvent) => void) | undefined; onMouseOut?: ((event: React.MouseEvent) => void) | undefined; onMouseOutCapture?: ((event: React.MouseEvent) => void) | undefined; onMouseOver?: ((event: React.MouseEvent) => void) | undefined; onMouseOverCapture?: ((event: React.MouseEvent) => void) | undefined; onMouseUp?: ((event: React.MouseEvent) => void) | undefined; onMouseUpCapture?: ((event: React.MouseEvent) => void) | undefined; onSelect?: ((event: React.SyntheticEvent) => void) | undefined; onSelectCapture?: ((event: React.SyntheticEvent) => void) | undefined; onTouchCancel?: ((event: React.TouchEvent) => void) | undefined; onTouchCancelCapture?: ((event: React.TouchEvent) => void) | undefined; onTouchEnd?: ((event: React.TouchEvent) => void) | undefined; onTouchEndCapture?: ((event: React.TouchEvent) => void) | undefined; onTouchMove?: ((event: React.TouchEvent) => void) | undefined; onTouchMoveCapture?: ((event: React.TouchEvent) => void) | undefined; onTouchStart?: ((event: React.TouchEvent) => void) | undefined; onTouchStartCapture?: ((event: React.TouchEvent) => void) | undefined; onPointerDown?: ((event: React.PointerEvent) => void) | undefined; onPointerDownCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerMove?: ((event: React.PointerEvent) => void) | undefined; onPointerMoveCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerUp?: ((event: React.PointerEvent) => void) | undefined; onPointerUpCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerCancel?: ((event: React.PointerEvent) => void) | undefined; onPointerCancelCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerEnter?: ((event: React.PointerEvent) => void) | undefined; onPointerEnterCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerLeave?: ((event: React.PointerEvent) => void) | undefined; onPointerLeaveCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerOver?: ((event: React.PointerEvent) => void) | undefined; onPointerOverCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerOut?: ((event: React.PointerEvent) => void) | undefined; onPointerOutCapture?: ((event: React.PointerEvent) => void) | undefined; onGotPointerCapture?: ((event: React.PointerEvent) => void) | undefined; onGotPointerCaptureCapture?: ((event: React.PointerEvent) => void) | undefined; onLostPointerCapture?: ((event: React.PointerEvent) => void) | undefined; onLostPointerCaptureCapture?: ((event: React.PointerEvent) => void) | undefined; onScroll?: ((event: React.UIEvent) => void) | undefined; onScrollCapture?: ((event: React.UIEvent) => void) | undefined; onWheel?: ((event: React.WheelEvent) => void) | undefined; onWheelCapture?: ((event: React.WheelEvent) => void) | undefined; onAnimationStart?: ((event: React.AnimationEvent) => void) | undefined; onAnimationStartCapture?: ((event: React.AnimationEvent) => void) | undefined; onAnimationEnd?: ((event: React.AnimationEvent) => void) | undefined; onAnimationEndCapture?: ((event: React.AnimationEvent) => void) | undefined; onAnimationIteration?: ((event: React.AnimationEvent) => void) | undefined; onAnimationIterationCapture?: ((event: React.AnimationEvent) => void) | undefined; onTransitionEnd?: ((event: React.TransitionEvent) => void) | undefined; onTransitionEndCapture?: ((event: React.TransitionEvent) => void) | undefined; 'data-test-subj'?: string | undefined; width?: string | undefined; readOnly?: boolean | undefined; render?: ((value: any, record: ", + "{ children?: React.ReactNode; onClick?: ((event: React.MouseEvent) => void) | undefined; onChange?: ((event: React.FormEvent) => void) | undefined; color?: string | undefined; onKeyDown?: ((event: React.KeyboardEvent) => void) | undefined; id?: string | undefined; title?: string | undefined; description?: string | undefined; security?: string | undefined; name: React.ReactNode; field: string; defaultChecked?: boolean | undefined; defaultValue?: string | number | string[] | undefined; suppressContentEditableWarning?: boolean | undefined; suppressHydrationWarning?: boolean | undefined; accessKey?: string | undefined; className?: string | undefined; contentEditable?: boolean | \"true\" | \"false\" | \"inherit\" | undefined; contextMenu?: string | undefined; dir?: string | undefined; draggable?: boolean | \"true\" | \"false\" | undefined; hidden?: boolean | undefined; lang?: string | undefined; placeholder?: string | undefined; slot?: string | undefined; spellCheck?: boolean | \"true\" | \"false\" | undefined; style?: React.CSSProperties | undefined; tabIndex?: number | undefined; translate?: \"yes\" | \"no\" | undefined; radioGroup?: string | undefined; role?: string | undefined; about?: string | undefined; datatype?: string | undefined; inlist?: any; prefix?: string | undefined; property?: string | undefined; resource?: string | undefined; typeof?: string | undefined; vocab?: string | undefined; autoCapitalize?: string | undefined; autoCorrect?: string | undefined; autoSave?: string | undefined; itemProp?: string | undefined; itemScope?: boolean | undefined; itemType?: string | undefined; itemID?: string | undefined; itemRef?: string | undefined; results?: number | undefined; unselectable?: \"on\" | \"off\" | undefined; inputMode?: \"none\" | \"search\" | \"email\" | \"text\" | \"tel\" | \"url\" | \"numeric\" | \"decimal\" | undefined; is?: string | undefined; 'aria-activedescendant'?: string | undefined; 'aria-atomic'?: boolean | \"true\" | \"false\" | undefined; 'aria-autocomplete'?: \"none\" | \"list\" | \"inline\" | \"both\" | undefined; 'aria-busy'?: boolean | \"true\" | \"false\" | undefined; 'aria-checked'?: boolean | \"mixed\" | \"true\" | \"false\" | undefined; 'aria-colcount'?: number | undefined; 'aria-colindex'?: number | undefined; 'aria-colspan'?: number | undefined; 'aria-controls'?: string | undefined; 'aria-current'?: boolean | \"date\" | \"page\" | \"time\" | \"true\" | \"false\" | \"step\" | \"location\" | undefined; 'aria-describedby'?: string | undefined; 'aria-details'?: string | undefined; 'aria-disabled'?: boolean | \"true\" | \"false\" | undefined; 'aria-dropeffect'?: \"none\" | \"copy\" | \"link\" | \"execute\" | \"move\" | \"popup\" | undefined; 'aria-errormessage'?: string | undefined; 'aria-expanded'?: boolean | \"true\" | \"false\" | undefined; 'aria-flowto'?: string | undefined; 'aria-grabbed'?: boolean | \"true\" | \"false\" | undefined; 'aria-haspopup'?: boolean | \"grid\" | \"menu\" | \"true\" | \"false\" | \"listbox\" | \"tree\" | \"dialog\" | undefined; 'aria-hidden'?: boolean | \"true\" | \"false\" | undefined; 'aria-invalid'?: boolean | \"true\" | \"false\" | \"grammar\" | \"spelling\" | undefined; 'aria-keyshortcuts'?: string | undefined; 'aria-label'?: string | undefined; 'aria-labelledby'?: string | undefined; 'aria-level'?: number | undefined; 'aria-live'?: \"off\" | \"assertive\" | \"polite\" | undefined; 'aria-modal'?: boolean | \"true\" | \"false\" | undefined; 'aria-multiline'?: boolean | \"true\" | \"false\" | undefined; 'aria-multiselectable'?: boolean | \"true\" | \"false\" | undefined; 'aria-orientation'?: \"horizontal\" | \"vertical\" | undefined; 'aria-owns'?: string | undefined; 'aria-placeholder'?: string | undefined; 'aria-posinset'?: number | undefined; 'aria-pressed'?: boolean | \"mixed\" | \"true\" | \"false\" | undefined; 'aria-readonly'?: boolean | \"true\" | \"false\" | undefined; 'aria-relevant'?: \"all\" | \"text\" | \"additions\" | \"additions text\" | \"removals\" | undefined; 'aria-required'?: boolean | \"true\" | \"false\" | undefined; 'aria-roledescription'?: string | undefined; 'aria-rowcount'?: number | undefined; 'aria-rowindex'?: number | undefined; 'aria-rowspan'?: number | undefined; 'aria-selected'?: boolean | \"true\" | \"false\" | undefined; 'aria-setsize'?: number | undefined; 'aria-sort'?: \"none\" | \"other\" | \"ascending\" | \"descending\" | undefined; 'aria-valuemax'?: number | undefined; 'aria-valuemin'?: number | undefined; 'aria-valuenow'?: number | undefined; 'aria-valuetext'?: string | undefined; dangerouslySetInnerHTML?: { __html: string; } | undefined; onCopy?: ((event: React.ClipboardEvent) => void) | undefined; onCopyCapture?: ((event: React.ClipboardEvent) => void) | undefined; onCut?: ((event: React.ClipboardEvent) => void) | undefined; onCutCapture?: ((event: React.ClipboardEvent) => void) | undefined; onPaste?: ((event: React.ClipboardEvent) => void) | undefined; onPasteCapture?: ((event: React.ClipboardEvent) => void) | undefined; onCompositionEnd?: ((event: React.CompositionEvent) => void) | undefined; onCompositionEndCapture?: ((event: React.CompositionEvent) => void) | undefined; onCompositionStart?: ((event: React.CompositionEvent) => void) | undefined; onCompositionStartCapture?: ((event: React.CompositionEvent) => void) | undefined; onCompositionUpdate?: ((event: React.CompositionEvent) => void) | undefined; onCompositionUpdateCapture?: ((event: React.CompositionEvent) => void) | undefined; onFocus?: ((event: React.FocusEvent) => void) | undefined; onFocusCapture?: ((event: React.FocusEvent) => void) | undefined; onBlur?: ((event: React.FocusEvent) => void) | undefined; onBlurCapture?: ((event: React.FocusEvent) => void) | undefined; onChangeCapture?: ((event: React.FormEvent) => void) | undefined; onBeforeInput?: ((event: React.FormEvent) => void) | undefined; onBeforeInputCapture?: ((event: React.FormEvent) => void) | undefined; onInput?: ((event: React.FormEvent) => void) | undefined; onInputCapture?: ((event: React.FormEvent) => void) | undefined; onReset?: ((event: React.FormEvent) => void) | undefined; onResetCapture?: ((event: React.FormEvent) => void) | undefined; onSubmit?: ((event: React.FormEvent) => void) | undefined; onSubmitCapture?: ((event: React.FormEvent) => void) | undefined; onInvalid?: ((event: React.FormEvent) => void) | undefined; onInvalidCapture?: ((event: React.FormEvent) => void) | undefined; onLoad?: ((event: React.SyntheticEvent) => void) | undefined; onLoadCapture?: ((event: React.SyntheticEvent) => void) | undefined; onError?: ((event: React.SyntheticEvent) => void) | undefined; onErrorCapture?: ((event: React.SyntheticEvent) => void) | undefined; onKeyDownCapture?: ((event: React.KeyboardEvent) => void) | undefined; onKeyPress?: ((event: React.KeyboardEvent) => void) | undefined; onKeyPressCapture?: ((event: React.KeyboardEvent) => void) | undefined; onKeyUp?: ((event: React.KeyboardEvent) => void) | undefined; onKeyUpCapture?: ((event: React.KeyboardEvent) => void) | undefined; onAbort?: ((event: React.SyntheticEvent) => void) | undefined; onAbortCapture?: ((event: React.SyntheticEvent) => void) | undefined; onCanPlay?: ((event: React.SyntheticEvent) => void) | undefined; onCanPlayCapture?: ((event: React.SyntheticEvent) => void) | undefined; onCanPlayThrough?: ((event: React.SyntheticEvent) => void) | undefined; onCanPlayThroughCapture?: ((event: React.SyntheticEvent) => void) | undefined; onDurationChange?: ((event: React.SyntheticEvent) => void) | undefined; onDurationChangeCapture?: ((event: React.SyntheticEvent) => void) | undefined; onEmptied?: ((event: React.SyntheticEvent) => void) | undefined; onEmptiedCapture?: ((event: React.SyntheticEvent) => void) | undefined; onEncrypted?: ((event: React.SyntheticEvent) => void) | undefined; onEncryptedCapture?: ((event: React.SyntheticEvent) => void) | undefined; onEnded?: ((event: React.SyntheticEvent) => void) | undefined; onEndedCapture?: ((event: React.SyntheticEvent) => void) | undefined; onLoadedData?: ((event: React.SyntheticEvent) => void) | undefined; onLoadedDataCapture?: ((event: React.SyntheticEvent) => void) | undefined; onLoadedMetadata?: ((event: React.SyntheticEvent) => void) | undefined; onLoadedMetadataCapture?: ((event: React.SyntheticEvent) => void) | undefined; onLoadStart?: ((event: React.SyntheticEvent) => void) | undefined; onLoadStartCapture?: ((event: React.SyntheticEvent) => void) | undefined; onPause?: ((event: React.SyntheticEvent) => void) | undefined; onPauseCapture?: ((event: React.SyntheticEvent) => void) | undefined; onPlay?: ((event: React.SyntheticEvent) => void) | undefined; onPlayCapture?: ((event: React.SyntheticEvent) => void) | undefined; onPlaying?: ((event: React.SyntheticEvent) => void) | undefined; onPlayingCapture?: ((event: React.SyntheticEvent) => void) | undefined; onProgress?: ((event: React.SyntheticEvent) => void) | undefined; onProgressCapture?: ((event: React.SyntheticEvent) => void) | undefined; onRateChange?: ((event: React.SyntheticEvent) => void) | undefined; onRateChangeCapture?: ((event: React.SyntheticEvent) => void) | undefined; onSeeked?: ((event: React.SyntheticEvent) => void) | undefined; onSeekedCapture?: ((event: React.SyntheticEvent) => void) | undefined; onSeeking?: ((event: React.SyntheticEvent) => void) | undefined; onSeekingCapture?: ((event: React.SyntheticEvent) => void) | undefined; onStalled?: ((event: React.SyntheticEvent) => void) | undefined; onStalledCapture?: ((event: React.SyntheticEvent) => void) | undefined; onSuspend?: ((event: React.SyntheticEvent) => void) | undefined; onSuspendCapture?: ((event: React.SyntheticEvent) => void) | undefined; onTimeUpdate?: ((event: React.SyntheticEvent) => void) | undefined; onTimeUpdateCapture?: ((event: React.SyntheticEvent) => void) | undefined; onVolumeChange?: ((event: React.SyntheticEvent) => void) | undefined; onVolumeChangeCapture?: ((event: React.SyntheticEvent) => void) | undefined; onWaiting?: ((event: React.SyntheticEvent) => void) | undefined; onWaitingCapture?: ((event: React.SyntheticEvent) => void) | undefined; onAuxClick?: ((event: React.MouseEvent) => void) | undefined; onAuxClickCapture?: ((event: React.MouseEvent) => void) | undefined; onClickCapture?: ((event: React.MouseEvent) => void) | undefined; onContextMenu?: ((event: React.MouseEvent) => void) | undefined; onContextMenuCapture?: ((event: React.MouseEvent) => void) | undefined; onDoubleClick?: ((event: React.MouseEvent) => void) | undefined; onDoubleClickCapture?: ((event: React.MouseEvent) => void) | undefined; onDrag?: ((event: React.DragEvent) => void) | undefined; onDragCapture?: ((event: React.DragEvent) => void) | undefined; onDragEnd?: ((event: React.DragEvent) => void) | undefined; onDragEndCapture?: ((event: React.DragEvent) => void) | undefined; onDragEnter?: ((event: React.DragEvent) => void) | undefined; onDragEnterCapture?: ((event: React.DragEvent) => void) | undefined; onDragExit?: ((event: React.DragEvent) => void) | undefined; onDragExitCapture?: ((event: React.DragEvent) => void) | undefined; onDragLeave?: ((event: React.DragEvent) => void) | undefined; onDragLeaveCapture?: ((event: React.DragEvent) => void) | undefined; onDragOver?: ((event: React.DragEvent) => void) | undefined; onDragOverCapture?: ((event: React.DragEvent) => void) | undefined; onDragStart?: ((event: React.DragEvent) => void) | undefined; onDragStartCapture?: ((event: React.DragEvent) => void) | undefined; onDrop?: ((event: React.DragEvent) => void) | undefined; onDropCapture?: ((event: React.DragEvent) => void) | undefined; onMouseDown?: ((event: React.MouseEvent) => void) | undefined; onMouseDownCapture?: ((event: React.MouseEvent) => void) | undefined; onMouseEnter?: ((event: React.MouseEvent) => void) | undefined; onMouseLeave?: ((event: React.MouseEvent) => void) | undefined; onMouseMove?: ((event: React.MouseEvent) => void) | undefined; onMouseMoveCapture?: ((event: React.MouseEvent) => void) | undefined; onMouseOut?: ((event: React.MouseEvent) => void) | undefined; onMouseOutCapture?: ((event: React.MouseEvent) => void) | undefined; onMouseOver?: ((event: React.MouseEvent) => void) | undefined; onMouseOverCapture?: ((event: React.MouseEvent) => void) | undefined; onMouseUp?: ((event: React.MouseEvent) => void) | undefined; onMouseUpCapture?: ((event: React.MouseEvent) => void) | undefined; onSelect?: ((event: React.SyntheticEvent) => void) | undefined; onSelectCapture?: ((event: React.SyntheticEvent) => void) | undefined; onTouchCancel?: ((event: React.TouchEvent) => void) | undefined; onTouchCancelCapture?: ((event: React.TouchEvent) => void) | undefined; onTouchEnd?: ((event: React.TouchEvent) => void) | undefined; onTouchEndCapture?: ((event: React.TouchEvent) => void) | undefined; onTouchMove?: ((event: React.TouchEvent) => void) | undefined; onTouchMoveCapture?: ((event: React.TouchEvent) => void) | undefined; onTouchStart?: ((event: React.TouchEvent) => void) | undefined; onTouchStartCapture?: ((event: React.TouchEvent) => void) | undefined; onPointerDown?: ((event: React.PointerEvent) => void) | undefined; onPointerDownCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerMove?: ((event: React.PointerEvent) => void) | undefined; onPointerMoveCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerUp?: ((event: React.PointerEvent) => void) | undefined; onPointerUpCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerCancel?: ((event: React.PointerEvent) => void) | undefined; onPointerCancelCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerEnter?: ((event: React.PointerEvent) => void) | undefined; onPointerEnterCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerLeave?: ((event: React.PointerEvent) => void) | undefined; onPointerLeaveCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerOver?: ((event: React.PointerEvent) => void) | undefined; onPointerOverCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerOut?: ((event: React.PointerEvent) => void) | undefined; onPointerOutCapture?: ((event: React.PointerEvent) => void) | undefined; onGotPointerCapture?: ((event: React.PointerEvent) => void) | undefined; onGotPointerCaptureCapture?: ((event: React.PointerEvent) => void) | undefined; onLostPointerCapture?: ((event: React.PointerEvent) => void) | undefined; onLostPointerCaptureCapture?: ((event: React.PointerEvent) => void) | undefined; onScroll?: ((event: React.UIEvent) => void) | undefined; onScrollCapture?: ((event: React.UIEvent) => void) | undefined; onWheel?: ((event: React.WheelEvent) => void) | undefined; onWheelCapture?: ((event: React.WheelEvent) => void) | undefined; onAnimationStart?: ((event: React.AnimationEvent) => void) | undefined; onAnimationStartCapture?: ((event: React.AnimationEvent) => void) | undefined; onAnimationEnd?: ((event: React.AnimationEvent) => void) | undefined; onAnimationEndCapture?: ((event: React.AnimationEvent) => void) | undefined; onAnimationIteration?: ((event: React.AnimationEvent) => void) | undefined; onAnimationIterationCapture?: ((event: React.AnimationEvent) => void) | undefined; onTransitionEnd?: ((event: React.TransitionEvent) => void) | undefined; onTransitionEndCapture?: ((event: React.TransitionEvent) => void) | undefined; 'data-test-subj'?: string | undefined; width?: string | undefined; readOnly?: boolean | undefined; render?: ((value: any, record: ", { "pluginId": "savedObjectsManagement", "scope": "public", @@ -863,7 +863,7 @@ "section": "def-public.SavedObjectsManagementRecord", "text": "SavedObjectsManagementRecord" }, - ">) => React.ReactNode) | undefined; colSpan?: number | undefined; rowSpan?: number | undefined; scope?: string | undefined; valign?: \"top\" | \"bottom\" | \"baseline\" | \"middle\" | undefined; dataType?: \"string\" | \"number\" | \"boolean\" | \"date\" | \"auto\" | undefined; isExpander?: boolean | undefined; textOnly?: boolean | undefined; truncateText?: boolean | undefined; isMobileHeader?: boolean | undefined; mobileOptions?: { show?: boolean | undefined; only?: boolean | undefined; render?: ((item: ", + ">) => React.ReactNode) | undefined; colSpan?: number | undefined; headers?: string | undefined; rowSpan?: number | undefined; scope?: string | undefined; valign?: \"top\" | \"bottom\" | \"baseline\" | \"middle\" | undefined; dataType?: \"string\" | \"number\" | \"boolean\" | \"date\" | \"auto\" | undefined; isExpander?: boolean | undefined; textOnly?: boolean | undefined; truncateText?: boolean | undefined; isMobileHeader?: boolean | undefined; mobileOptions?: { show?: boolean | undefined; only?: boolean | undefined; render?: ((item: ", { "pluginId": "savedObjectsManagement", "scope": "public", @@ -1121,7 +1121,7 @@ "label": "ISavedObjectsManagementServiceRegistry", "description": [], "signature": [ - "{ get: (id: string) => ", + "{ all: () => ", { "pluginId": "savedObjectsManagement", "scope": "public", @@ -1129,7 +1129,7 @@ "section": "def-public.SavedObjectsManagementServiceRegistryEntry", "text": "SavedObjectsManagementServiceRegistryEntry" }, - " | undefined; all: () => ", + "[]; get: (id: string) => ", { "pluginId": "savedObjectsManagement", "scope": "public", @@ -1137,7 +1137,7 @@ "section": "def-public.SavedObjectsManagementServiceRegistryEntry", "text": "SavedObjectsManagementServiceRegistryEntry" }, - "[]; register: (entry: ", + " | undefined; register: (entry: ", { "pluginId": "savedObjectsManagement", "scope": "public", @@ -1234,7 +1234,7 @@ "label": "serviceRegistry", "description": [], "signature": [ - "{ get: (id: string) => ", + "{ all: () => ", { "pluginId": "savedObjectsManagement", "scope": "public", @@ -1242,7 +1242,7 @@ "section": "def-public.SavedObjectsManagementServiceRegistryEntry", "text": "SavedObjectsManagementServiceRegistryEntry" }, - " | undefined; all: () => ", + "[]; get: (id: string) => ", { "pluginId": "savedObjectsManagement", "scope": "public", @@ -1250,7 +1250,7 @@ "section": "def-public.SavedObjectsManagementServiceRegistryEntry", "text": "SavedObjectsManagementServiceRegistryEntry" }, - "[]; register: (entry: ", + " | undefined; register: (entry: ", { "pluginId": "savedObjectsManagement", "scope": "public", diff --git a/api_docs/security_solution.json b/api_docs/security_solution.json index 821fa9bb98ec3..b16ae8334f1b0 100644 --- a/api_docs/security_solution.json +++ b/api_docs/security_solution.json @@ -412,7 +412,9 @@ "label": "config", "description": [], "signature": [ - "Readonly<{} & { enabled: boolean; signalsIndex: string; maxRuleImportExportSize: number; maxRuleImportPayloadBytes: number; maxTimelineImportExportSize: number; maxTimelineImportPayloadBytes: number; alertMergeStrategy: \"allFields\" | \"missingFields\" | \"noFields\"; alertIgnoreFields: string[]; enableExperimental: string[]; endpointResultListDefaultFirstPageIndex: number; endpointResultListDefaultPageSize: number; packagerTaskInterval: string; prebuiltRulesFromFileSystem: boolean; prebuiltRulesFromSavedObjects: boolean; }>" + "Readonly<{} & { enabled: boolean; signalsIndex: string; maxRuleImportExportSize: number; maxRuleImportPayloadBytes: number; maxTimelineImportExportSize: number; maxTimelineImportPayloadBytes: number; alertMergeStrategy: \"allFields\" | \"missingFields\" | \"noFields\"; alertIgnoreFields: string[]; enableExperimental: string[]; ruleExecutionLog: Readonly<{} & { underlyingClient: ", + "UnderlyingLogClient", + "; }>; endpointResultListDefaultFirstPageIndex: number; endpointResultListDefaultPageSize: number; packagerTaskInterval: string; prebuiltRulesFromFileSystem: boolean; prebuiltRulesFromSavedObjects: boolean; }>" ], "path": "x-pack/plugins/security_solution/server/client/client.ts", "deprecated": false, @@ -845,7 +847,9 @@ "label": "ConfigType", "description": [], "signature": [ - "{ readonly enabled: boolean; readonly signalsIndex: string; readonly maxRuleImportExportSize: number; readonly maxRuleImportPayloadBytes: number; readonly maxTimelineImportExportSize: number; readonly maxTimelineImportPayloadBytes: number; readonly alertMergeStrategy: \"allFields\" | \"missingFields\" | \"noFields\"; readonly alertIgnoreFields: string[]; readonly enableExperimental: string[]; readonly endpointResultListDefaultFirstPageIndex: number; readonly endpointResultListDefaultPageSize: number; readonly packagerTaskInterval: string; readonly prebuiltRulesFromFileSystem: boolean; readonly prebuiltRulesFromSavedObjects: boolean; }" + "{ readonly enabled: boolean; readonly signalsIndex: string; readonly maxRuleImportExportSize: number; readonly maxRuleImportPayloadBytes: number; readonly maxTimelineImportExportSize: number; readonly maxTimelineImportPayloadBytes: number; readonly alertMergeStrategy: \"allFields\" | \"missingFields\" | \"noFields\"; readonly alertIgnoreFields: string[]; readonly enableExperimental: string[]; readonly ruleExecutionLog: Readonly<{} & { underlyingClient: ", + "UnderlyingLogClient", + "; }>; readonly endpointResultListDefaultFirstPageIndex: number; readonly endpointResultListDefaultPageSize: number; readonly packagerTaskInterval: string; readonly prebuiltRulesFromFileSystem: boolean; readonly prebuiltRulesFromSavedObjects: boolean; }" ], "path": "x-pack/plugins/security_solution/server/config.ts", "deprecated": false, @@ -2437,12 +2441,15 @@ { "parentPluginId": "securitySolution", "id": "def-common.BrowserField.subType", - "type": "Object", + "type": "CompoundType", "tags": [], "label": "subType", "description": [], "signature": [ - "{ [key: string]: unknown; nested?: { path: string; } | undefined; } | undefined" + "IFieldSubTypeMultiOptional", + " | ", + "IFieldSubTypeNestedOptional", + " | undefined" ], "path": "x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts", "deprecated": false @@ -3155,7 +3162,7 @@ "section": "def-common.DataProvider", "text": "DataProvider" }, - ", \"type\" | \"enabled\" | \"id\" | \"name\" | \"excluded\" | \"kqlQuery\" | \"queryMatch\">[]" + ", \"type\" | \"id\" | \"name\" | \"enabled\" | \"excluded\" | \"kqlQuery\" | \"queryMatch\">[]" ], "path": "x-pack/plugins/timelines/common/types/timeline/data_provider/index.ts", "deprecated": false @@ -10221,7 +10228,7 @@ "section": "def-common.RequestBasicOptions", "text": "RequestBasicOptions" }, - ", \"id\" | \"params\" | \"defaultIndex\" | \"filterQuery\" | \"docValueFields\" | \"factoryQueryType\" | \"indexType\">" + ", \"id\" | \"defaultIndex\" | \"params\" | \"filterQuery\" | \"docValueFields\" | \"factoryQueryType\" | \"indexType\">" ], "path": "x-pack/plugins/security_solution/common/search_strategy/security_solution/network/details/index.ts", "deprecated": false, @@ -15651,7 +15658,7 @@ "section": "def-common.TimelineEventsAllRequestOptions", "text": "TimelineEventsAllRequestOptions" }, - ", \"id\" | \"sort\" | \"fields\" | \"timerange\" | \"language\" | \"defaultIndex\" | \"pagination\" | \"filterQuery\" | \"docValueFields\" | \"factoryQueryType\" | \"indexType\" | \"entityType\" | \"fieldRequested\" | \"excludeEcsData\" | \"authFilter\">" + ", \"id\" | \"sort\" | \"fields\" | \"defaultIndex\" | \"timerange\" | \"language\" | \"pagination\" | \"filterQuery\" | \"docValueFields\" | \"factoryQueryType\" | \"indexType\" | \"entityType\" | \"fieldRequested\" | \"excludeEcsData\" | \"authFilter\">" ], "path": "x-pack/plugins/timelines/common/search_strategy/timeline/events/eql/index.ts", "deprecated": false, @@ -16273,7 +16280,7 @@ "section": "def-common.TimelineRequestBasicOptions", "text": "TimelineRequestBasicOptions" }, - ", \"id\" | \"params\" | \"defaultIndex\" | \"docValueFields\" | \"factoryQueryType\" | \"indexType\" | \"entityType\">" + ", \"id\" | \"defaultIndex\" | \"params\" | \"docValueFields\" | \"factoryQueryType\" | \"indexType\" | \"entityType\">" ], "path": "x-pack/plugins/timelines/common/search_strategy/timeline/events/last_event_time/index.ts", "deprecated": false, @@ -19502,7 +19509,7 @@ "section": "def-common.DataProviderType", "text": "DataProviderType" }, - " | undefined; enabled: boolean; id: string; name: string; excluded: boolean; kqlQuery: string; queryMatch: ", + " | undefined; id: string; name: string; enabled: boolean; excluded: boolean; kqlQuery: string; queryMatch: ", { "pluginId": "timelines", "scope": "common", @@ -19954,7 +19961,7 @@ "section": "def-common.HostsKpiAuthenticationsStrategyResponse", "text": "HostsKpiAuthenticationsStrategyResponse" }, - ", \"warning\" | \"id\" | \"inspect\" | \"total\" | \"authenticationsSuccess\" | \"authenticationsSuccessHistogram\" | \"authenticationsFailure\" | \"authenticationsFailureHistogram\" | \"loaded\" | \"isRunning\" | \"isPartial\" | \"isRestored\"> | Pick<", + ", \"id\" | \"inspect\" | \"warning\" | \"total\" | \"authenticationsSuccess\" | \"authenticationsSuccessHistogram\" | \"authenticationsFailure\" | \"authenticationsFailureHistogram\" | \"loaded\" | \"isRunning\" | \"isPartial\" | \"isRestored\"> | Pick<", { "pluginId": "securitySolution", "scope": "common", @@ -19962,7 +19969,7 @@ "section": "def-common.HostsKpiHostsStrategyResponse", "text": "HostsKpiHostsStrategyResponse" }, - ", \"warning\" | \"id\" | \"inspect\" | \"total\" | \"hosts\" | \"loaded\" | \"isRunning\" | \"isPartial\" | \"isRestored\" | \"hostsHistogram\"> | Pick<", + ", \"id\" | \"inspect\" | \"warning\" | \"total\" | \"hosts\" | \"loaded\" | \"isRunning\" | \"isPartial\" | \"isRestored\" | \"hostsHistogram\"> | Pick<", { "pluginId": "securitySolution", "scope": "common", @@ -19970,7 +19977,7 @@ "section": "def-common.HostsKpiUniqueIpsStrategyResponse", "text": "HostsKpiUniqueIpsStrategyResponse" }, - ", \"warning\" | \"id\" | \"inspect\" | \"total\" | \"loaded\" | \"isRunning\" | \"isPartial\" | \"isRestored\" | \"uniqueSourceIps\" | \"uniqueSourceIpsHistogram\" | \"uniqueDestinationIps\" | \"uniqueDestinationIpsHistogram\">" + ", \"id\" | \"inspect\" | \"warning\" | \"total\" | \"loaded\" | \"isRunning\" | \"isPartial\" | \"isRestored\" | \"uniqueSourceIps\" | \"uniqueSourceIpsHistogram\" | \"uniqueDestinationIps\" | \"uniqueDestinationIpsHistogram\">" ], "path": "x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/kpi/index.ts", "deprecated": false, @@ -20479,7 +20486,7 @@ "section": "def-common.NetworkKpiDnsStrategyResponse", "text": "NetworkKpiDnsStrategyResponse" }, - ", \"warning\" | \"id\" | \"inspect\" | \"total\" | \"loaded\" | \"isRunning\" | \"isPartial\" | \"isRestored\" | \"dnsQueries\"> | Pick<", + ", \"id\" | \"inspect\" | \"warning\" | \"total\" | \"loaded\" | \"isRunning\" | \"isPartial\" | \"isRestored\" | \"dnsQueries\"> | Pick<", { "pluginId": "securitySolution", "scope": "common", @@ -20487,7 +20494,7 @@ "section": "def-common.NetworkKpiNetworkEventsStrategyResponse", "text": "NetworkKpiNetworkEventsStrategyResponse" }, - ", \"warning\" | \"id\" | \"inspect\" | \"total\" | \"loaded\" | \"isRunning\" | \"isPartial\" | \"isRestored\" | \"networkEvents\"> | Pick<", + ", \"id\" | \"inspect\" | \"warning\" | \"total\" | \"loaded\" | \"isRunning\" | \"isPartial\" | \"isRestored\" | \"networkEvents\"> | Pick<", { "pluginId": "securitySolution", "scope": "common", @@ -20495,7 +20502,7 @@ "section": "def-common.NetworkKpiTlsHandshakesStrategyResponse", "text": "NetworkKpiTlsHandshakesStrategyResponse" }, - ", \"warning\" | \"id\" | \"inspect\" | \"total\" | \"loaded\" | \"isRunning\" | \"isPartial\" | \"isRestored\" | \"tlsHandshakes\"> | Pick<", + ", \"id\" | \"inspect\" | \"warning\" | \"total\" | \"loaded\" | \"isRunning\" | \"isPartial\" | \"isRestored\" | \"tlsHandshakes\"> | Pick<", { "pluginId": "securitySolution", "scope": "common", @@ -20503,7 +20510,7 @@ "section": "def-common.NetworkKpiUniqueFlowsStrategyResponse", "text": "NetworkKpiUniqueFlowsStrategyResponse" }, - ", \"warning\" | \"id\" | \"inspect\" | \"total\" | \"loaded\" | \"isRunning\" | \"isPartial\" | \"isRestored\" | \"uniqueFlowId\"> | Pick<", + ", \"id\" | \"inspect\" | \"warning\" | \"total\" | \"loaded\" | \"isRunning\" | \"isPartial\" | \"isRestored\" | \"uniqueFlowId\"> | Pick<", { "pluginId": "securitySolution", "scope": "common", @@ -20511,7 +20518,7 @@ "section": "def-common.NetworkKpiUniquePrivateIpsStrategyResponse", "text": "NetworkKpiUniquePrivateIpsStrategyResponse" }, - ", \"warning\" | \"id\" | \"inspect\" | \"total\" | \"loaded\" | \"isRunning\" | \"isPartial\" | \"isRestored\" | \"uniqueSourcePrivateIps\" | \"uniqueSourcePrivateIpsHistogram\" | \"uniqueDestinationPrivateIps\" | \"uniqueDestinationPrivateIpsHistogram\">" + ", \"id\" | \"inspect\" | \"warning\" | \"total\" | \"loaded\" | \"isRunning\" | \"isPartial\" | \"isRestored\" | \"uniqueSourcePrivateIps\" | \"uniqueSourcePrivateIpsHistogram\" | \"uniqueDestinationPrivateIps\" | \"uniqueDestinationPrivateIpsHistogram\">" ], "path": "x-pack/plugins/security_solution/common/search_strategy/security_solution/network/kpi/index.ts", "deprecated": false, diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index 3ff1efc0bce56..fec34843bbcdb 100644 --- a/api_docs/security_solution.mdx +++ b/api_docs/security_solution.mdx @@ -18,7 +18,7 @@ Contact [Security solution](https://github.com/orgs/elastic/teams/security-solut | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 1361 | 8 | 1307 | 29 | +| 1361 | 8 | 1307 | 30 | ## Client diff --git a/api_docs/spaces.json b/api_docs/spaces.json index b391ca6ea0dbb..fc7550b607c66 100644 --- a/api_docs/spaces.json +++ b/api_docs/spaces.json @@ -3185,7 +3185,7 @@ "section": "def-server.SavedObjectsRepository", "text": "SavedObjectsRepository" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"deleteByNamespace\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"incrementCounter\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\">" + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"deleteByNamespace\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"incrementCounter\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\">" ], "path": "x-pack/plugins/spaces/server/spaces_client/spaces_client_service.ts", "deprecated": false, diff --git a/api_docs/task_manager.json b/api_docs/task_manager.json index 4b7f6dc95e740..4542cdc6fe3f1 100644 --- a/api_docs/task_manager.json +++ b/api_docs/task_manager.json @@ -1245,7 +1245,7 @@ "TaskScheduling", ", \"schedule\" | \"runNow\" | \"ephemeralRunNow\" | \"ensureScheduled\"> & Pick<", "TaskStore", - ", \"remove\" | \"get\" | \"fetch\"> & { removeIfExists: (id: string) => Promise; } & { supportsEphemeralTasks: () => boolean; }" + ", \"remove\" | \"fetch\" | \"get\"> & { removeIfExists: (id: string) => Promise; } & { supportsEphemeralTasks: () => boolean; }" ], "path": "x-pack/plugins/task_manager/server/plugin.ts", "deprecated": false, diff --git a/api_docs/telemetry_collection_manager.json b/api_docs/telemetry_collection_manager.json index 39189b20705ae..7b8178d4499b7 100644 --- a/api_docs/telemetry_collection_manager.json +++ b/api_docs/telemetry_collection_manager.json @@ -74,7 +74,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"monitoring\" | \"security\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"monitoring\" | \"security\" | \"create\" | \"index\" | \"delete\" | \"get\" | \"update\" | \"closePointInTime\" | \"search\" | \"transform\" | \"eql\" | \"helpers\" | \"emit\" | \"on\" | \"once\" | \"off\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"count\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", @@ -95,25 +95,7 @@ "label": "soClient", "description": [], "signature": [ - "{ get: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" - }, - ") => Promise<", - "SavedObject", - ">; delete: (type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsDeleteOptions", - "text": "SavedObjectsDeleteOptions" - }, - ") => Promise<{}>; create: (type: string, attributes: T, options?: ", + "{ create: (type: string, attributes: T, options?: ", { "pluginId": "core", "scope": "server", @@ -171,7 +153,15 @@ "section": "def-server.SavedObjectsCheckConflictsResponse", "text": "SavedObjectsCheckConflictsResponse" }, - ">; find: (options: ", + ">; delete: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsDeleteOptions", + "text": "SavedObjectsDeleteOptions" + }, + ") => Promise<{}>; find: (options: ", { "pluginId": "core", "scope": "server", @@ -235,6 +225,16 @@ "section": "def-server.SavedObjectsBulkResolveResponse", "text": "SavedObjectsBulkResolveResponse" }, + ">; get: (type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsBaseOptions", + "text": "SavedObjectsBaseOptions" + }, + ") => Promise<", + "SavedObject", ">; resolve: (type: string, id: string, options?: ", { "pluginId": "core", diff --git a/api_docs/timelines.json b/api_docs/timelines.json index 2d7e2bb04f9d2..f9ae6f615d1a7 100644 --- a/api_docs/timelines.json +++ b/api_docs/timelines.json @@ -1724,15 +1724,15 @@ "section": "def-common.RowRendererId", "text": "RowRendererId" }, - "[]; expandedDetail: ", + "[]; expandedDetail: Partial>; footerText?: React.ReactNode; graphEventId?: string | undefined; kqlQuery: { filterQuery: ", { "pluginId": "timelines", "scope": "common", @@ -5574,12 +5574,15 @@ { "parentPluginId": "timelines", "id": "def-common.BrowserField.subType", - "type": "Object", + "type": "CompoundType", "tags": [], "label": "subType", "description": [], "signature": [ - "{ [key: string]: unknown; nested?: { path: string; } | undefined; } | undefined" + "IFieldSubTypeMultiOptional", + " | ", + "IFieldSubTypeNestedOptional", + " | undefined" ], "path": "x-pack/plugins/timelines/common/search_strategy/index_fields/index.ts", "deprecated": false @@ -6358,7 +6361,7 @@ "section": "def-common.DataProvider", "text": "DataProvider" }, - ", \"type\" | \"enabled\" | \"id\" | \"name\" | \"excluded\" | \"kqlQuery\" | \"queryMatch\">[]" + ", \"type\" | \"id\" | \"name\" | \"enabled\" | \"excluded\" | \"kqlQuery\" | \"queryMatch\">[]" ], "path": "x-pack/plugins/timelines/common/types/timeline/data_provider/index.ts", "deprecated": false @@ -9921,7 +9924,7 @@ "section": "def-common.TimelineEventsAllRequestOptions", "text": "TimelineEventsAllRequestOptions" }, - ", \"id\" | \"sort\" | \"fields\" | \"timerange\" | \"language\" | \"defaultIndex\" | \"pagination\" | \"filterQuery\" | \"docValueFields\" | \"factoryQueryType\" | \"indexType\" | \"entityType\" | \"fieldRequested\" | \"excludeEcsData\" | \"authFilter\">" + ", \"id\" | \"sort\" | \"fields\" | \"defaultIndex\" | \"timerange\" | \"language\" | \"pagination\" | \"filterQuery\" | \"docValueFields\" | \"factoryQueryType\" | \"indexType\" | \"entityType\" | \"fieldRequested\" | \"excludeEcsData\" | \"authFilter\">" ], "path": "x-pack/plugins/timelines/common/search_strategy/timeline/events/eql/index.ts", "deprecated": false, @@ -10543,7 +10546,7 @@ "section": "def-common.TimelineRequestBasicOptions", "text": "TimelineRequestBasicOptions" }, - ", \"id\" | \"params\" | \"defaultIndex\" | \"docValueFields\" | \"factoryQueryType\" | \"indexType\" | \"entityType\">" + ", \"id\" | \"defaultIndex\" | \"params\" | \"docValueFields\" | \"factoryQueryType\" | \"indexType\" | \"entityType\">" ], "path": "x-pack/plugins/timelines/common/search_strategy/timeline/events/last_event_time/index.ts", "deprecated": false, @@ -11257,14 +11260,15 @@ "label": "expandedDetail", "description": [], "signature": [ + "Partial> | undefined" ], "path": "x-pack/plugins/timelines/common/types/timeline/store.ts", "deprecated": false @@ -12803,7 +12807,7 @@ "section": "def-common.DataProviderType", "text": "DataProviderType" }, - " | undefined; enabled: boolean; id: string; name: string; excluded: boolean; kqlQuery: string; queryMatch: ", + " | undefined; id: string; name: string; enabled: boolean; excluded: boolean; kqlQuery: string; queryMatch: ", { "pluginId": "timelines", "scope": "common", @@ -14363,17 +14367,9 @@ "label": "TimelineExpandedDetail", "description": [], "signature": [ - "{ query?: Record | { panelView?: \"eventDetail\" | undefined; params?: { eventId: string; indexName: string; ecsData?: ", - "Ecs", - " | undefined; } | undefined; } | { panelView?: \"hostDetail\" | undefined; params?: { hostName: string; } | undefined; } | { panelView?: \"networkDetail\" | undefined; params?: { ip: string; flowTarget: FlowTarget; } | undefined; } | undefined; graph?: Record | { panelView?: \"eventDetail\" | undefined; params?: { eventId: string; indexName: string; ecsData?: ", + "{ [x: string]: { panelView?: \"eventDetail\" | undefined; params?: { eventId: string; indexName: string; ecsData?: ", "Ecs", - " | undefined; } | undefined; } | { panelView?: \"hostDetail\" | undefined; params?: { hostName: string; } | undefined; } | { panelView?: \"networkDetail\" | undefined; params?: { ip: string; flowTarget: FlowTarget; } | undefined; } | undefined; notes?: Record | { panelView?: \"eventDetail\" | undefined; params?: { eventId: string; indexName: string; ecsData?: ", - "Ecs", - " | undefined; } | undefined; } | { panelView?: \"hostDetail\" | undefined; params?: { hostName: string; } | undefined; } | { panelView?: \"networkDetail\" | undefined; params?: { ip: string; flowTarget: FlowTarget; } | undefined; } | undefined; pinned?: Record | { panelView?: \"eventDetail\" | undefined; params?: { eventId: string; indexName: string; ecsData?: ", - "Ecs", - " | undefined; } | undefined; } | { panelView?: \"hostDetail\" | undefined; params?: { hostName: string; } | undefined; } | { panelView?: \"networkDetail\" | undefined; params?: { ip: string; flowTarget: FlowTarget; } | undefined; } | undefined; eql?: Record | { panelView?: \"eventDetail\" | undefined; params?: { eventId: string; indexName: string; ecsData?: ", - "Ecs", - " | undefined; } | undefined; } | { panelView?: \"hostDetail\" | undefined; params?: { hostName: string; } | undefined; } | { panelView?: \"networkDetail\" | undefined; params?: { ip: string; flowTarget: FlowTarget; } | undefined; } | undefined; }" + " | undefined; } | undefined; } | Partial> | { panelView?: \"hostDetail\" | undefined; params?: { hostName: string; } | undefined; } | { panelView?: \"networkDetail\" | undefined; params?: { ip: string; flowTarget: FlowTarget; } | undefined; } | undefined; }" ], "path": "x-pack/plugins/timelines/common/types/timeline/index.ts", "deprecated": false, @@ -14387,9 +14383,9 @@ "label": "TimelineExpandedDetailType", "description": [], "signature": [ - "Record | { panelView?: \"eventDetail\" | undefined; params?: { eventId: string; indexName: string; ecsData?: ", + "{ panelView?: \"eventDetail\" | undefined; params?: { eventId: string; indexName: string; ecsData?: ", "Ecs", - " | undefined; } | undefined; } | { panelView?: \"hostDetail\" | undefined; params?: { hostName: string; } | undefined; } | { panelView?: \"networkDetail\" | undefined; params?: { ip: string; flowTarget: FlowTarget; } | undefined; }" + " | undefined; } | undefined; } | Partial> | { panelView?: \"hostDetail\" | undefined; params?: { hostName: string; } | undefined; } | { panelView?: \"networkDetail\" | undefined; params?: { ip: string; flowTarget: FlowTarget; } | undefined; }" ], "path": "x-pack/plugins/timelines/common/types/timeline/index.ts", "deprecated": false, @@ -14403,9 +14399,9 @@ "label": "TimelineExpandedEventType", "description": [], "signature": [ - "Record | { panelView?: \"eventDetail\" | undefined; params?: { eventId: string; indexName: string; ecsData?: ", + "{ panelView?: \"eventDetail\" | undefined; params?: { eventId: string; indexName: string; ecsData?: ", "Ecs", - " | undefined; } | undefined; }" + " | undefined; } | undefined; } | Partial>" ], "path": "x-pack/plugins/timelines/common/types/timeline/index.ts", "deprecated": false, @@ -14419,7 +14415,7 @@ "label": "TimelineExpandedHostType", "description": [], "signature": [ - "Record | { panelView?: \"hostDetail\" | undefined; params?: { hostName: string; } | undefined; }" + "Partial> | { panelView?: \"hostDetail\" | undefined; params?: { hostName: string; } | undefined; }" ], "path": "x-pack/plugins/timelines/common/types/timeline/index.ts", "deprecated": false, @@ -14433,7 +14429,7 @@ "label": "TimelineExpandedNetworkType", "description": [], "signature": [ - "Record | { panelView?: \"networkDetail\" | undefined; params?: { ip: string; flowTarget: FlowTarget; } | undefined; }" + "Partial> | { panelView?: \"networkDetail\" | undefined; params?: { ip: string; flowTarget: FlowTarget; } | undefined; }" ], "path": "x-pack/plugins/timelines/common/types/timeline/index.ts", "deprecated": false, @@ -14874,7 +14870,9 @@ "label": "ToggleDetailPanel", "description": [], "signature": [ - "(Record & { tabType?: ", + "({ panelView?: \"eventDetail\" | undefined; params?: { eventId: string; indexName: string; ecsData?: ", + "Ecs", + " | undefined; } | undefined; } & { tabType?: ", { "pluginId": "timelines", "scope": "common", @@ -14882,9 +14880,7 @@ "section": "def-common.TimelineTabs", "text": "TimelineTabs" }, - " | undefined; timelineId: string; }) | ({ panelView?: \"eventDetail\" | undefined; params?: { eventId: string; indexName: string; ecsData?: ", - "Ecs", - " | undefined; } | undefined; } & { tabType?: ", + " | undefined; timelineId: string; }) | (Partial> & { tabType?: ", { "pluginId": "timelines", "scope": "common", diff --git a/api_docs/triggers_actions_ui.json b/api_docs/triggers_actions_ui.json index b7e953917aaad..3b5de759e97ee 100644 --- a/api_docs/triggers_actions_ui.json +++ b/api_docs/triggers_actions_ui.json @@ -1353,7 +1353,7 @@ "label": "setAlertProperty", "description": [], "signature": [ - "(key: Prop, value: Pick<", + "(key: Prop, value: Pick<", { "pluginId": "alerting", "scope": "common", @@ -1361,7 +1361,7 @@ "section": "def-common.Alert", "text": "Alert" }, - ", \"enabled\" | \"id\" | \"name\" | \"tags\" | \"params\" | \"actions\" | \"throttle\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">[Prop] | null) => void" + ", \"id\" | \"name\" | \"tags\" | \"enabled\" | \"params\" | \"actions\" | \"throttle\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">[Prop] | null) => void" ], "path": "x-pack/plugins/triggers_actions_ui/public/types.ts", "deprecated": false, @@ -1396,7 +1396,7 @@ "section": "def-common.Alert", "text": "Alert" }, - ", \"enabled\" | \"id\" | \"name\" | \"tags\" | \"params\" | \"actions\" | \"throttle\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">[Prop] | null" + ", \"id\" | \"name\" | \"tags\" | \"enabled\" | \"params\" | \"actions\" | \"throttle\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">[Prop] | null" ], "path": "x-pack/plugins/triggers_actions_ui/public/types.ts", "deprecated": false, @@ -2115,7 +2115,7 @@ "label": "Alert", "description": [], "signature": [ - "{ enabled: boolean; id: string; name: string; tags: string[]; params: Record; actions: ", + "{ id: string; name: string; tags: string[]; enabled: boolean; params: Record; actions: ", { "pluginId": "alerting", "scope": "common", @@ -2187,20 +2187,6 @@ "deprecated": false, "initialIsOpen": false }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.DEFAULT_HIDDEN_ONLY_ON_ALERTS_ACTION_TYPES", - "type": "Array", - "tags": [], - "label": "DEFAULT_HIDDEN_ONLY_ON_ALERTS_ACTION_TYPES", - "description": [], - "signature": [ - "string[]" - ], - "path": "x-pack/plugins/triggers_actions_ui/public/common/constants/index.ts", - "deprecated": false, - "initialIsOpen": false - }, { "parentPluginId": "triggersActionsUi", "id": "def-public.RuleTypeRegistryContract", @@ -3216,7 +3202,7 @@ "signature": [ "(props: Pick<", "AlertAddProps", - ">, \"onClose\" | \"metadata\" | \"onSave\" | \"alertTypeId\" | \"consumer\" | \"canChangeTrigger\" | \"initialValues\" | \"reloadAlerts\">) => React.ReactElement<", + ">, \"onClose\" | \"metadata\" | \"onSave\" | \"alertTypeId\" | \"consumer\" | \"canChangeTrigger\" | \"initialValues\" | \"reloadAlerts\" | \"ruleTypeIndex\">) => React.ReactElement<", "AlertAddProps", ">, string | ((props: any) => React.ReactElement React.Component)> | null) | (new (props: any) => React.Component)>" ], @@ -3233,7 +3219,7 @@ "signature": [ "Pick<", "AlertAddProps", - ">, \"onClose\" | \"metadata\" | \"onSave\" | \"alertTypeId\" | \"consumer\" | \"canChangeTrigger\" | \"initialValues\" | \"reloadAlerts\">" + ">, \"onClose\" | \"metadata\" | \"onSave\" | \"alertTypeId\" | \"consumer\" | \"canChangeTrigger\" | \"initialValues\" | \"reloadAlerts\" | \"ruleTypeIndex\">" ], "path": "x-pack/plugins/triggers_actions_ui/public/plugin.ts", "deprecated": false, @@ -3252,7 +3238,7 @@ "signature": [ "(props: Pick<", "AlertEditProps", - ">, \"onClose\" | \"metadata\" | \"onSave\" | \"reloadAlerts\" | \"initialAlert\">) => React.ReactElement<", + ">, \"onClose\" | \"metadata\" | \"onSave\" | \"reloadAlerts\" | \"initialAlert\" | \"ruleType\">) => React.ReactElement<", "AlertEditProps", ">, string | ((props: any) => React.ReactElement React.Component)> | null) | (new (props: any) => React.Component)>" ], @@ -3269,7 +3255,7 @@ "signature": [ "Pick<", "AlertEditProps", - ">, \"onClose\" | \"metadata\" | \"onSave\" | \"reloadAlerts\" | \"initialAlert\">" + ">, \"onClose\" | \"metadata\" | \"onSave\" | \"reloadAlerts\" | \"initialAlert\" | \"ruleType\">" ], "path": "x-pack/plugins/triggers_actions_ui/public/plugin.ts", "deprecated": false, diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index 0b6139e8ae9db..e626b24432246 100644 --- a/api_docs/triggers_actions_ui.mdx +++ b/api_docs/triggers_actions_ui.mdx @@ -18,7 +18,7 @@ Contact [Kibana Alerting](https://github.com/orgs/elastic/teams/kibana-alerting- | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 239 | 1 | 230 | 18 | +| 238 | 1 | 229 | 18 | ## Client diff --git a/api_docs/usage_collection.json b/api_docs/usage_collection.json index d091924dd664f..c7fb02b1dc378 100644 --- a/api_docs/usage_collection.json +++ b/api_docs/usage_collection.json @@ -461,7 +461,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">; } & (WithKibanaRequest extends true ? { kibanaRequest?: ", + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">; } & (WithKibanaRequest extends true ? { kibanaRequest?: ", { "pluginId": "core", "scope": "server", @@ -701,7 +701,7 @@ "\nPossible type values in the schema" ], "signature": [ - "\"boolean\" | \"date\" | \"keyword\" | \"long\" | \"double\" | \"text\" | \"short\" | \"float\" | \"integer\" | \"byte\"" + "\"boolean\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"text\" | \"short\" | \"float\" | \"integer\" | \"byte\"" ], "path": "src/plugins/usage_collection/server/collector/types.ts", "deprecated": false, @@ -733,7 +733,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">; } & (WithKibanaRequest extends true ? { kibanaRequest?: ", + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">; } & (WithKibanaRequest extends true ? { kibanaRequest?: ", { "pluginId": "core", "scope": "server", @@ -803,7 +803,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">; } & (WithKibanaRequest extends true ? { kibanaRequest?: ", + ", \"create\" | \"bulkCreate\" | \"checkConflicts\" | \"delete\" | \"find\" | \"bulkGet\" | \"bulkResolve\" | \"get\" | \"resolve\" | \"update\" | \"collectMultiNamespaceReferences\" | \"updateObjectsSpaces\" | \"bulkUpdate\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"createPointInTimeFinder\" | \"errors\">; } & (WithKibanaRequest extends true ? { kibanaRequest?: ", { "pluginId": "core", "scope": "server", diff --git a/api_docs/vis_type_pie.json b/api_docs/vis_type_pie.json index 66f8da4dc56fc..0bb24caeb5558 100644 --- a/api_docs/vis_type_pie.json +++ b/api_docs/vis_type_pie.json @@ -78,9 +78,9 @@ "signature": [ "{ id?: string | undefined; params?: ", { - "pluginId": "expressions", + "pluginId": "fieldFormats", "scope": "common", - "docId": "kibExpressionsPluginApi", + "docId": "kibFieldFormatsPluginApi", "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, diff --git a/api_docs/visualizations.json b/api_docs/visualizations.json index e93eec8a07ee8..9877a9bc18321 100644 --- a/api_docs/visualizations.json +++ b/api_docs/visualizations.json @@ -1012,7 +1012,7 @@ "section": "def-public.SerializedVisData", "text": "SerializedVisData" }, - ">; }, never>, \"type\" | \"data\" | \"id\" | \"title\" | \"description\" | \"params\" | \"uiState\">) => Promise" + ">; }, never>, \"data\" | \"type\" | \"id\" | \"title\" | \"description\" | \"params\" | \"uiState\">) => Promise" ], "path": "src/plugins/visualizations/public/vis.ts", "deprecated": false, @@ -1057,7 +1057,7 @@ "section": "def-public.SerializedVisData", "text": "SerializedVisData" }, - ">; }, never>, \"type\" | \"data\" | \"id\" | \"title\" | \"description\" | \"params\" | \"uiState\">" + ">; }, never>, \"data\" | \"type\" | \"id\" | \"title\" | \"description\" | \"params\" | \"uiState\">" ], "path": "src/plugins/visualizations/public/vis.ts", "deprecated": false, @@ -1140,6 +1140,37 @@ } ], "functions": [ + { + "parentPluginId": "visualizations", + "id": "def-public.getFullPath", + "type": "Function", + "tags": [], + "label": "getFullPath", + "description": [], + "signature": [ + "(id: string) => string" + ], + "path": "src/plugins/visualizations/public/utils/saved_visualize_utils.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "visualizations", + "id": "def-public.getFullPath.$1", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/visualizations/public/utils/saved_visualize_utils.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "visualizations", "id": "def-public.getVisSchemas", @@ -1249,13 +1280,21 @@ }, "; field?: string | undefined; index?: string | undefined; params?: ", { - "pluginId": "expressions", + "pluginId": "fieldFormats", "scope": "common", - "docId": "kibExpressionsPluginApi", + "docId": "kibFieldFormatsPluginApi", "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "> | undefined; source?: string | undefined; sourceParams?: ", + "<", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormatParams", + "text": "FieldFormatParams" + }, + "> | undefined; source?: string | undefined; sourceParams?: ", { "pluginId": "@kbn/utility-types", "scope": "server", @@ -1360,6 +1399,37 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "visualizations", + "id": "def-public.urlFor", + "type": "Function", + "tags": [], + "label": "urlFor", + "description": [], + "signature": [ + "(id: string) => string" + ], + "path": "src/plugins/visualizations/public/utils/saved_visualize_utils.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "visualizations", + "id": "def-public.urlFor.$1", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/visualizations/public/utils/saved_visualize_utils.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "visualizations", "id": "def-public.VisualizationContainer", @@ -1494,6 +1564,98 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "visualizations", + "id": "def-public.GetVisOptions", + "type": "Interface", + "tags": [], + "label": "GetVisOptions", + "description": [], + "path": "src/plugins/visualizations/public/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "visualizations", + "id": "def-public.GetVisOptions.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/visualizations/public/types.ts", + "deprecated": false + }, + { + "parentPluginId": "visualizations", + "id": "def-public.GetVisOptions.searchSource", + "type": "CompoundType", + "tags": [], + "label": "searchSource", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/visualizations/public/types.ts", + "deprecated": false + }, + { + "parentPluginId": "visualizations", + "id": "def-public.GetVisOptions.migrationVersion", + "type": "Object", + "tags": [], + "label": "migrationVersion", + "description": [], + "signature": [ + "SavedObjectsMigrationVersion", + " | undefined" + ], + "path": "src/plugins/visualizations/public/types.ts", + "deprecated": false + }, + { + "parentPluginId": "visualizations", + "id": "def-public.GetVisOptions.savedSearchId", + "type": "string", + "tags": [], + "label": "savedSearchId", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/visualizations/public/types.ts", + "deprecated": false + }, + { + "parentPluginId": "visualizations", + "id": "def-public.GetVisOptions.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/visualizations/public/types.ts", + "deprecated": false + }, + { + "parentPluginId": "visualizations", + "id": "def-public.GetVisOptions.indexPattern", + "type": "string", + "tags": [], + "label": "indexPattern", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/visualizations/public/types.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "visualizations", "id": "def-public.HistogramParams", @@ -1640,6 +1802,19 @@ ], "path": "src/plugins/visualizations/public/types.ts", "deprecated": false + }, + { + "parentPluginId": "visualizations", + "id": "def-public.ISavedVis.sharingSavedObjectProps", + "type": "Object", + "tags": [], + "label": "sharingSavedObjectProps", + "description": [], + "signature": [ + "{ outcome?: \"conflict\" | \"exactMatch\" | \"aliasMatch\" | undefined; aliasTargetId?: string | undefined; errorJSON?: string | undefined; } | undefined" + ], + "path": "src/plugins/visualizations/public/types.ts", + "deprecated": false } ], "initialIsOpen": false @@ -1933,13 +2108,21 @@ "description": [], "signature": [ { - "pluginId": "expressions", + "pluginId": "fieldFormats", "scope": "common", - "docId": "kibExpressionsPluginApi", + "docId": "kibFieldFormatsPluginApi", "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - ">" + "<", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormatParams", + "text": "FieldFormatParams" + }, + ">" ], "path": "src/plugins/visualizations/public/vis_schemas.ts", "deprecated": false @@ -2531,14 +2714,6 @@ "text": "VisSavedObject" }, " extends ", - { - "pluginId": "savedObjects", - "scope": "public", - "docId": "kibSavedObjectsPluginApi", - "section": "def-public.SavedObject", - "text": "SavedObject" - }, - ",", { "pluginId": "visualizations", "scope": "public", @@ -2549,7 +2724,119 @@ ], "path": "src/plugins/visualizations/public/types.ts", "deprecated": false, - "children": [], + "children": [ + { + "parentPluginId": "visualizations", + "id": "def-public.VisSavedObject.lastSavedTitle", + "type": "string", + "tags": [], + "label": "lastSavedTitle", + "description": [], + "path": "src/plugins/visualizations/public/types.ts", + "deprecated": false + }, + { + "parentPluginId": "visualizations", + "id": "def-public.VisSavedObject.getEsType", + "type": "Function", + "tags": [], + "label": "getEsType", + "description": [], + "signature": [ + "() => string" + ], + "path": "src/plugins/visualizations/public/types.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "visualizations", + "id": "def-public.VisSavedObject.getDisplayName", + "type": "Function", + "tags": [], + "label": "getDisplayName", + "description": [], + "signature": [ + "(() => string) | undefined" + ], + "path": "src/plugins/visualizations/public/types.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "visualizations", + "id": "def-public.VisSavedObject.displayName", + "type": "string", + "tags": [], + "label": "displayName", + "description": [], + "path": "src/plugins/visualizations/public/types.ts", + "deprecated": false + }, + { + "parentPluginId": "visualizations", + "id": "def-public.VisSavedObject.migrationVersion", + "type": "Object", + "tags": [], + "label": "migrationVersion", + "description": [], + "signature": [ + "SavedObjectsMigrationVersion", + " | undefined" + ], + "path": "src/plugins/visualizations/public/types.ts", + "deprecated": false + }, + { + "parentPluginId": "visualizations", + "id": "def-public.VisSavedObject.searchSource", + "type": "Object", + "tags": [], + "label": "searchSource", + "description": [], + "signature": [ + "Pick<", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" + }, + ", \"create\" | \"history\" | \"setPreferredSearchStrategyId\" | \"setField\" | \"removeField\" | \"setFields\" | \"getId\" | \"getFields\" | \"getField\" | \"getOwnField\" | \"createCopy\" | \"createChild\" | \"setParent\" | \"getParent\" | \"fetch$\" | \"fetch\" | \"onRequestStart\" | \"getSearchRequestBody\" | \"destroy\" | \"getSerializedFields\" | \"serialize\"> | undefined" + ], + "path": "src/plugins/visualizations/public/types.ts", + "deprecated": false + }, + { + "parentPluginId": "visualizations", + "id": "def-public.VisSavedObject.version", + "type": "string", + "tags": [], + "label": "version", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/visualizations/public/types.ts", + "deprecated": false + }, + { + "parentPluginId": "visualizations", + "id": "def-public.VisSavedObject.tags", + "type": "Array", + "tags": [], + "label": "tags", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "src/plugins/visualizations/public/types.ts", + "deprecated": false + } + ], "initialIsOpen": false }, { @@ -3909,13 +4196,21 @@ }, "; format: ", { - "pluginId": "expressions", + "pluginId": "fieldFormats", "scope": "common", - "docId": "kibExpressionsPluginApi", + "docId": "kibFieldFormatsPluginApi", "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - ">; }>)[] | undefined, string]" + "<", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormatParams", + "text": "FieldFormatParams" + }, + ">; }>)[] | undefined, string]" ], "path": "src/plugins/visualizations/common/prepare_log_table.ts", "deprecated": false, @@ -3967,13 +4262,21 @@ }, "; format: ", { - "pluginId": "expressions", + "pluginId": "fieldFormats", "scope": "common", - "docId": "kibExpressionsPluginApi", + "docId": "kibFieldFormatsPluginApi", "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - ">; }" + "<", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormatParams", + "text": "FieldFormatParams" + }, + ">; }" ], "path": "src/plugins/visualizations/common/expression_functions/xy_dimension.ts", "deprecated": false, @@ -4331,7 +4634,7 @@ "label": "VisualizeEmbeddableFactoryContract", "description": [], "signature": [ - "{ readonly type: \"visualization\"; inject: (_state: ", + "{ inject: (_state: ", { "pluginId": "embeddable", "scope": "common", @@ -4367,7 +4670,7 @@ }, "; references: ", "SavedObjectReference", - "[]; }; create: (input: ", + "[]; }; readonly type: \"visualization\"; create: (input: ", { "pluginId": "visualizations", "scope": "public", @@ -4788,8 +5091,8 @@ "pluginId": "visualizations", "scope": "public", "docId": "kibVisualizationsPluginApi", - "section": "def-public.ISavedVis", - "text": "ISavedVis" + "section": "def-public.VisSavedObject", + "text": "VisSavedObject" }, ") => ", { @@ -4825,11 +5128,11 @@ "pluginId": "visualizations", "scope": "public", "docId": "kibVisualizationsPluginApi", - "section": "def-public.ISavedVis", - "text": "ISavedVis" + "section": "def-public.VisSavedObject", + "text": "VisSavedObject" } ], - "path": "src/plugins/visualizations/public/saved_visualizations/_saved_vis.ts", + "path": "src/plugins/visualizations/public/utils/saved_visualize_utils.ts", "deprecated": false } ] @@ -4896,7 +5199,7 @@ }, ">" ], - "path": "src/plugins/visualizations/public/saved_visualizations/_saved_vis.ts", + "path": "src/plugins/visualizations/public/utils/saved_visualize_utils.ts", "deprecated": false } ] @@ -4932,6 +5235,193 @@ } ] }, + { + "parentPluginId": "visualizations", + "id": "def-public.VisualizationsStart.getSavedVisualization", + "type": "Function", + "tags": [], + "label": "getSavedVisualization", + "description": [], + "signature": [ + "(opts?: string | ", + { + "pluginId": "visualizations", + "scope": "public", + "docId": "kibVisualizationsPluginApi", + "section": "def-public.GetVisOptions", + "text": "GetVisOptions" + }, + " | undefined) => Promise<", + { + "pluginId": "visualizations", + "scope": "public", + "docId": "kibVisualizationsPluginApi", + "section": "def-public.VisSavedObject", + "text": "VisSavedObject" + }, + ">" + ], + "path": "src/plugins/visualizations/public/plugin.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "visualizations", + "id": "def-public.VisualizationsStart.getSavedVisualization.$1", + "type": "CompoundType", + "tags": [], + "label": "opts", + "description": [], + "signature": [ + "string | ", + { + "pluginId": "visualizations", + "scope": "public", + "docId": "kibVisualizationsPluginApi", + "section": "def-public.GetVisOptions", + "text": "GetVisOptions" + }, + " | undefined" + ], + "path": "src/plugins/visualizations/public/plugin.ts", + "deprecated": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "visualizations", + "id": "def-public.VisualizationsStart.saveVisualization", + "type": "Function", + "tags": [], + "label": "saveVisualization", + "description": [], + "signature": [ + "(savedVis: ", + { + "pluginId": "visualizations", + "scope": "public", + "docId": "kibVisualizationsPluginApi", + "section": "def-public.VisSavedObject", + "text": "VisSavedObject" + }, + ", saveOptions: ", + "SaveVisOptions", + ") => Promise" + ], + "path": "src/plugins/visualizations/public/plugin.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "visualizations", + "id": "def-public.VisualizationsStart.saveVisualization.$1", + "type": "Object", + "tags": [], + "label": "savedVis", + "description": [], + "signature": [ + { + "pluginId": "visualizations", + "scope": "public", + "docId": "kibVisualizationsPluginApi", + "section": "def-public.VisSavedObject", + "text": "VisSavedObject" + } + ], + "path": "src/plugins/visualizations/public/plugin.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "visualizations", + "id": "def-public.VisualizationsStart.saveVisualization.$2", + "type": "Object", + "tags": [], + "label": "saveOptions", + "description": [], + "signature": [ + "SaveVisOptions" + ], + "path": "src/plugins/visualizations/public/plugin.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "visualizations", + "id": "def-public.VisualizationsStart.findListItems", + "type": "Function", + "tags": [], + "label": "findListItems", + "description": [], + "signature": [ + "(searchTerm: string, listingLimit: number, references?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsFindOptionsReference", + "text": "SavedObjectsFindOptionsReference" + }, + "[] | undefined) => Promise<{ hits: Record[]; total: number; }>" + ], + "path": "src/plugins/visualizations/public/plugin.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "visualizations", + "id": "def-public.VisualizationsStart.findListItems.$1", + "type": "string", + "tags": [], + "label": "searchTerm", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/visualizations/public/plugin.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "visualizations", + "id": "def-public.VisualizationsStart.findListItems.$2", + "type": "number", + "tags": [], + "label": "listingLimit", + "description": [], + "signature": [ + "number" + ], + "path": "src/plugins/visualizations/public/plugin.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "visualizations", + "id": "def-public.VisualizationsStart.findListItems.$3", + "type": "Array", + "tags": [], + "label": "references", + "description": [], + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsFindOptionsReference", + "text": "SavedObjectsFindOptionsReference" + }, + "[] | undefined" + ], + "path": "src/plugins/visualizations/public/plugin.ts", + "deprecated": false, + "isRequired": false + } + ], + "returnComment": [] + }, { "parentPluginId": "visualizations", "id": "def-public.VisualizationsStart.__LEGACY", @@ -4964,17 +5454,7 @@ "section": "def-public.VisualizeInput", "text": "VisualizeInput" }, - "> & { id: string; }, savedVisualizationsLoader?: (", - { - "pluginId": "savedObjects", - "scope": "public", - "docId": "kibSavedObjectsPluginApi", - "section": "def-public.SavedObjectLoader", - "text": "SavedObjectLoader" - }, - " & { findListItems: (search: string, sizeOrOptions?: number | ", - "FindListItemsOptions", - " | undefined) => any; }) | undefined, attributeService?: ", + "> & { id: string; }, attributeService?: ", { "pluginId": "embeddable", "scope": "public", @@ -5120,13 +5600,21 @@ }, "; field?: string | undefined; index?: string | undefined; params?: ", { - "pluginId": "expressions", + "pluginId": "fieldFormats", "scope": "common", - "docId": "kibExpressionsPluginApi", + "docId": "kibFieldFormatsPluginApi", "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "> | undefined; source?: string | undefined; sourceParams?: ", + "<", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormatParams", + "text": "FieldFormatParams" + }, + "> | undefined; source?: string | undefined; sourceParams?: ", { "pluginId": "@kbn/utility-types", "scope": "server", @@ -5546,13 +6034,21 @@ }, "; format: ", { - "pluginId": "expressions", + "pluginId": "fieldFormats", "scope": "common", - "docId": "kibExpressionsPluginApi", + "docId": "kibFieldFormatsPluginApi", "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - ">; }>)[] | undefined, string]" + "<", + { + "pluginId": "fieldFormats", + "scope": "common", + "docId": "kibFieldFormatsPluginApi", + "section": "def-common.FieldFormatParams", + "text": "FieldFormatParams" + }, + ">; }>)[] | undefined, string]" ], "path": "src/plugins/visualizations/common/prepare_log_table.ts", "deprecated": false, diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index a9501b59a1a55..5253bcdcd57e0 100644 --- a/api_docs/visualizations.mdx +++ b/api_docs/visualizations.mdx @@ -18,7 +18,7 @@ Contact [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 275 | 13 | 257 | 15 | +| 304 | 13 | 286 | 16 | ## Client diff --git a/api_docs/visualize.json b/api_docs/visualize.json index 86196b0ba34c0..e1a0a134cde94 100644 --- a/api_docs/visualize.json +++ b/api_docs/visualize.json @@ -114,11 +114,11 @@ "description": [], "signature": [ { - "pluginId": "savedObjects", + "pluginId": "discover", "scope": "public", - "docId": "kibSavedObjectsPluginApi", - "section": "def-public.SavedObject", - "text": "SavedObject" + "docId": "kibDiscoverPluginApi", + "section": "def-public.SavedSearch", + "text": "SavedSearch" }, " | undefined" ], diff --git a/dev_docs/key_concepts/kibana_platform_plugin_intro.mdx b/dev_docs/key_concepts/kibana_platform_plugin_intro.mdx index 133b96f44da88..737b9d8708f29 100644 --- a/dev_docs/key_concepts/kibana_platform_plugin_intro.mdx +++ b/dev_docs/key_concepts/kibana_platform_plugin_intro.mdx @@ -33,13 +33,28 @@ At a super high-level, Kibana is composed of **plugins**, **core**, and **Kibana -If it's stateful, it has to go in a plugin, but packages are often a good choices for stateless utilities. Stateless code exported publicly from a plugin will increase the page load bundle size of _every single page_, even if none of those plugin's services are actually needed. With packages, however, only code that is needed for the current page is downloaded. +When the [Bazel migration](https://github.com/elastic/kibana/blob/master/legacy_rfcs/text/0015_bazel.md) is complete, all code, including plugins, will be a package. With that, packages won't be required to be in the `packages/` directory and can be located somewhere that makes more sense structurally. -The downside however is that the packages folder is far away from the plugins folder so having a part of your code in a plugin and the rest in a package may make it hard to find, leading to duplication. +In the meantime, the following can be used to determine whether it makes sense to add code to a package inside the `packages` folder, or a plugin inside `src/plugins` or `x-pack/plugins`. -The Operations team hopes to resolve this conundrum by supporting co-located packages and plugins and automatically putting all stateless code inside a package. You can track this work by following [this issue](https://github.com/elastic/kibana/issues/112886). -Until then, consider whether it makes sense to logically separate the code, and consider the size of the exports, when determining whether you should put stateless public exports in a package or a plugin. +**If the code is stateful, it has to be exposed from a plugin's . Do not statically export stateful code.** + +Benefits to packages: + +1. _Potentially_ reduced page load time. All code that is statically exported from plugins will be downloaded on _every single page load_, even if that code isn't needed. With packages, only code that is imported is downloaded, which can be minimized by using async imports. +2. Puts the consumer is in charge of how and when to async import. If a consumer async imports code exported from a plugin, it makes no difference, because of the above point. It's already been downloaded. However, simply moving code into a package is _not_ a guaranteed performance improvement. It does give the consumer the power to make smart performance choices, however. If they require code from multiple packages, the consumer can async import from multiple packages at the same time. Read more in our . + +Downsides to packages: + +1. It's not . The packages folder is far away from the plugins folder. Having your stateless code in a plugin and the rest in a package may make it hard to find, leading to duplication. The Operations team hopes to fix this by supporting packages and plugins existing in the same folder. You can track this work by following [this issue](https://github.com/elastic/kibana/issues/112886). + +2. Development overhead. Developers have to run `yarn kbn watch` to have changes rebuilt automatically. [Phase II](https://github.com/elastic/kibana/blob/master/legacy_rfcs/text/0015_bazel.md#phase-ii---docs-developer-experience) of the Bazel migration work will bring the development experience on par with plugin development. This work can be tracked [here](https://github.com/elastic/kibana/issues/104519). + +3. Development performance. Rebuild time is typically longer than it would be for the same code in a plugin. The reasons are captured in [this issue](https://github.com/elastic/kibana/issues/107648). The ops team is actively working to reduce this performance increase. + + +As you can see, the answer to "Should I put my code in a plugin or a package" is 'It Depends'. If you are still having a hard time determining what the best path location is, reach out to the Kibana Operations Team (#kibana-operations) for help. diff --git a/docs/CHANGELOG.asciidoc b/docs/CHANGELOG.asciidoc index efa6c1700b522..275086ece1951 100644 --- a/docs/CHANGELOG.asciidoc +++ b/docs/CHANGELOG.asciidoc @@ -13,6 +13,7 @@ Review important information about the {kib} 7.x releases. // Best practices: // * When there are changes to kibana.yml settings, include the links to the new settings. +* <> * <> * <> * <> @@ -63,6 +64,74 @@ Review important information about the {kib} 7.x releases. * <> -- +[[release-notes-7.15.1]] +== {kib} 7.15.1 + +Review the following information about the 7.15.1 release. + +[float] +[[breaking-changes-v7.15.1]] +=== Breaking changes +Breaking changes can prevent your application from optimal operation and performance. Before you upgrade to 7.15.1, review the <>. + +To review the breaking changes in previous versions, refer to the following: + +{kibana-ref-all}/7.14/release-notes-7.14.0.html#breaking-changes-7.14.0[7.14] | {kibana-ref-all}/7.13/release-notes-7.13.0.html#breaking-changes-7.13.0[7.13] | +{kibana-ref-all}/7.12/release-notes-7.12.0.html#breaking-changes-7.12.0[7.12] | {kibana-ref-all}/7.11/breaking-changes-7.11.html[7.11] | +{kibana-ref-all}/7.10/breaking-changes-7.10.html[7.10] | {kibana-ref-all}/7.9/breaking-changes-7.9.html[7.9] | {kibana-ref-all}/7.8/breaking-changes-7.8.html[7.8] | +{kibana-ref-all}/7.7/breaking-changes-7.7.html[7.7] | {kibana-ref-all}/7.6/breaking-changes-7.6.html[7.6] | {kibana-ref-all}/7.5/breaking-changes-7.5.html[7.5] | +{kibana-ref-all}/7.4/breaking-changes-7.4.html[7.4] | {kibana-ref-all}/7.3/breaking-changes-7.3.html[7.3] | {kibana-ref-all}/7.2/breaking-changes-7.2.html[7.2] | +{kibana-ref-all}/7.1/breaking-changes-7.1.html[7.1] | {kibana-ref-all}/7.0/breaking-changes-7.0.html[7.0] + +[float] +[[enhancement-v7.15.1]] +=== Enhancement +Management:: +* Adds `max_primary_shard_size` input to shrink action {kibana-pull}111394[#111394] + +[float] +[[fixes-v7.15.1]] +=== Bug Fixes +APM:: +* Return 200 instead of 404 when agent configuration does not exist {kibana-pull}113273[#113273] +* Use oldest exit span instead of newest {kibana-pull}113133[#113133] +Canvas:: +* Hide dashed border on embeddable panel {kibana-pull}113985[#113985] +Discover:: +* Fixes CSV export problem with _source column {kibana-pull}114178[#114178] +* Fixes too narrow columns when viewing document {kibana-pull}113124[#113124] +* Fixes old saved query from becoming active when switching index patterns or creating new saved search {kibana-pull}112262[#112262] +* Fixes `discover:searchOnPageLoad` not working correctly {kibana-pull}112262[#112262] +Elastic Security:: +For the Elastic Security 7.15.1 release information, refer to {security-guide}/release-notes.html[_Elastic Security Solution Release Notes_]. +Fleet:: +* Fixes policy upgrades for packages with multiple policy templates {kibana-pull}114011[#114011] +* Fixes Step 1 in policy editor not loading when agent policy already contains an integration that can only be added once (such as Endpoint Security) {kibana-pull}113883[#113883] +* Sets code editor height to solve an overlap in default policy settings {kibana-pull}113763[#113763] +* Fixes issue where some variables from `xpack.fleet.agentPolicies` were not added to package policies {kibana-pull}113204[#113204] +Lens & Visualizations:: +* Updates the series and metrics IDs that are numbers to strings in *TSVB* {kibana-pull}113619[#113619] +* Fixes infinite loop when loading rejected data view in *Lens* {kibana-pull}113375[#113375] +* Fixes error with percentiles on index with many docs {kibana-pull}113216[#113216] +* Fixes map validation errors crashing *Vega* {kibana-pull}112700[#112700] +* Fixes heatmap in dashboard with numeric color stops in *Lens* {kibana-pull}111117[#111117] +* Fixes transition to custom palette inconsistency when in number mode in *Lens* {kibana-pull}110852[#110852] +Management:: +* Transforms: Align privileges checks with ML plugin {kibana-pull}112970[#112970] +* Don't show incomplete warning if search requests aren't in session {kibana-pull}112364[#112364] +Maps:: +* Adds license querystring to EMS requests in Vega {kibana-pull}112765[#112765] +* Fixes saved object (map) switching issue {kibana-pull}112001[#112001] +Metrics:: +* Fixes metric threshold alert reason message for gte/lte comparator {kibana-pull}114080[#114080] +* Removes rounding from Metric Threshold start time {kibana-pull}111634[#111634] +* Fixes No Data alerts on Metric Threshold with groupBy {kibana-pull}111465[#111465] +* Filter out APM nodes from the inventory view {kibana-pull}110300[#110300] +Platform:: +* Removes executionLog to reduce memory consumption {kibana-pull}111911[#111911] +Uptime:: +* Fixes waterfall chart top axis {kibana-pull}113281[#113281] + [[release-notes-7.15.0]] == {kib} 7.15.0 diff --git a/docs/apm/api.asciidoc b/docs/apm/api.asciidoc index fe4c8a9280158..5f81a41e93df8 100644 --- a/docs/apm/api.asciidoc +++ b/docs/apm/api.asciidoc @@ -484,8 +484,7 @@ An example is below. [[api-create-apm-index-pattern]] ==== Customize the APM index pattern -As an alternative to updating <> in your `kibana.yml` configuration file, -you can use Kibana's <> to update the default APM index pattern on the fly. +Use Kibana's <> to update the default APM index pattern on the fly. The following example sets the default APM app index pattern to `some-other-pattern-*`: diff --git a/docs/apm/troubleshooting.asciidoc b/docs/apm/troubleshooting.asciidoc index 3736d21f44a5b..84cdb9876dc63 100644 --- a/docs/apm/troubleshooting.asciidoc +++ b/docs/apm/troubleshooting.asciidoc @@ -76,7 +76,7 @@ If you change the default, you must also configure the `setup.template.name` and See {apm-server-ref}/configuration-template.html[Load the Elasticsearch index template]. If the Elasticsearch index template has already been successfully loaded to the index, you can customize the indices that the APM app uses to display data. -Navigate to *APM* > *Settings* > *Indices*, and change all `xpack.apm.*Pattern` values to +Navigate to *APM* > *Settings* > *Indices*, and change all `xpack.apm.indices.*` values to include the new index pattern. For example: `customIndexName-*`. [float] diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index 6f678b494c2b6..03ea196f49837 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -26,10 +26,6 @@ NOTE: |WARNING: Missing README. -|{kib-repo}blob/{branch}/src/plugins/apm_oss/README.asciidoc[apmOss] -|undefined - - |{kib-repo}blob/{branch}/src/plugins/bfetch/README.md[bfetch] |bfetch allows to batch HTTP requests and streams responses back. diff --git a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.links.md b/docs/development/core/public/kibana-plugin-core-public.doclinksstart.links.md index 430cfa975020d..32b70e4e8fbbb 100644 --- a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.links.md +++ b/docs/development/core/public/kibana-plugin-core-public.doclinksstart.links.md @@ -9,6 +9,7 @@ ```typescript readonly links: { readonly settings: string; + readonly elasticStackGetStarted: string; readonly apm: { readonly kibanaSettings: string; readonly supportedServiceMaps: string; @@ -148,6 +149,9 @@ readonly links: { readonly networkMap: string; readonly troubleshootGaps: string; }; + readonly securitySolution: { + readonly trustedApps: string; + }; readonly query: { readonly eql: string; readonly kueryQuerySyntax: string; @@ -239,6 +243,7 @@ readonly links: { upgradeElasticAgent: string; upgradeElasticAgent712lower: string; learnMoreBlog: string; + apiKeysLearnMore: string; }>; readonly ecs: { readonly guide: string; diff --git a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md b/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md index 2d9026724ee29..d90972d327041 100644 --- a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md +++ b/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md @@ -17,5 +17,5 @@ export interface DocLinksStart | --- | --- | --- | | [DOC\_LINK\_VERSION](./kibana-plugin-core-public.doclinksstart.doc_link_version.md) | string | | | [ELASTIC\_WEBSITE\_URL](./kibana-plugin-core-public.doclinksstart.elastic_website_url.md) | string | | -| [links](./kibana-plugin-core-public.doclinksstart.links.md) | {
readonly settings: string;
readonly apm: {
readonly kibanaSettings: string;
readonly supportedServiceMaps: string;
readonly customLinks: string;
readonly droppedTransactionSpans: string;
readonly upgrading: string;
readonly metaData: string;
};
readonly canvas: {
readonly guide: string;
};
readonly dashboard: {
readonly guide: string;
readonly drilldowns: string;
readonly drilldownsTriggerPicker: string;
readonly urlDrilldownTemplateSyntax: string;
readonly urlDrilldownVariables: string;
};
readonly discover: Record<string, string>;
readonly filebeat: {
readonly base: string;
readonly installation: string;
readonly configuration: string;
readonly elasticsearchOutput: string;
readonly elasticsearchModule: string;
readonly startup: string;
readonly exportedFields: string;
readonly suricataModule: string;
readonly zeekModule: string;
};
readonly auditbeat: {
readonly base: string;
readonly auditdModule: string;
readonly systemModule: string;
};
readonly metricbeat: {
readonly base: string;
readonly configure: string;
readonly httpEndpoint: string;
readonly install: string;
readonly start: string;
};
readonly enterpriseSearch: {
readonly base: string;
readonly appSearchBase: string;
readonly workplaceSearchBase: string;
};
readonly heartbeat: {
readonly base: string;
};
readonly libbeat: {
readonly getStarted: string;
};
readonly logstash: {
readonly base: string;
};
readonly functionbeat: {
readonly base: string;
};
readonly winlogbeat: {
readonly base: string;
};
readonly aggs: {
readonly composite: string;
readonly composite_missing_bucket: string;
readonly date_histogram: string;
readonly date_range: string;
readonly date_format_pattern: string;
readonly filter: string;
readonly filters: string;
readonly geohash_grid: string;
readonly histogram: string;
readonly ip_range: string;
readonly range: string;
readonly significant_terms: string;
readonly terms: string;
readonly avg: string;
readonly avg_bucket: string;
readonly max_bucket: string;
readonly min_bucket: string;
readonly sum_bucket: string;
readonly cardinality: string;
readonly count: string;
readonly cumulative_sum: string;
readonly derivative: string;
readonly geo_bounds: string;
readonly geo_centroid: string;
readonly max: string;
readonly median: string;
readonly min: string;
readonly moving_avg: string;
readonly percentile_ranks: string;
readonly serial_diff: string;
readonly std_dev: string;
readonly sum: string;
readonly top_hits: string;
};
readonly runtimeFields: {
readonly overview: string;
readonly mapping: string;
};
readonly scriptedFields: {
readonly scriptFields: string;
readonly scriptAggs: string;
readonly painless: string;
readonly painlessApi: string;
readonly painlessLangSpec: string;
readonly painlessSyntax: string;
readonly painlessWalkthrough: string;
readonly luceneExpressions: string;
};
readonly search: {
readonly sessions: string;
readonly sessionLimits: string;
};
readonly indexPatterns: {
readonly introduction: string;
readonly fieldFormattersNumber: string;
readonly fieldFormattersString: string;
readonly runtimeFields: string;
};
readonly addData: string;
readonly kibana: string;
readonly upgradeAssistant: {
readonly overview: string;
readonly batchReindex: string;
};
readonly rollupJobs: string;
readonly elasticsearch: Record<string, string>;
readonly siem: {
readonly privileges: string;
readonly guide: string;
readonly gettingStarted: string;
readonly ml: string;
readonly ruleChangeLog: string;
readonly detectionsReq: string;
readonly networkMap: string;
};
readonly query: {
readonly eql: string;
readonly kueryQuerySyntax: string;
readonly luceneQuerySyntax: string;
readonly percolate: string;
readonly queryDsl: string;
readonly autocompleteChanges: string;
};
readonly date: {
readonly dateMath: string;
readonly dateMathIndexNames: string;
};
readonly management: Record<string, string>;
readonly ml: Record<string, string>;
readonly transforms: Record<string, string>;
readonly visualize: Record<string, string>;
readonly apis: Readonly<{
bulkIndexAlias: string;
byteSizeUnits: string;
createAutoFollowPattern: string;
createFollower: string;
createIndex: string;
createSnapshotLifecyclePolicy: string;
createRoleMapping: string;
createRoleMappingTemplates: string;
createRollupJobsRequest: string;
createApiKey: string;
createPipeline: string;
createTransformRequest: string;
cronExpressions: string;
executeWatchActionModes: string;
indexExists: string;
openIndex: string;
putComponentTemplate: string;
painlessExecute: string;
painlessExecuteAPIContexts: string;
putComponentTemplateMetadata: string;
putSnapshotLifecyclePolicy: string;
putIndexTemplateV1: string;
putWatch: string;
simulatePipeline: string;
timeUnits: string;
updateTransform: string;
}>;
readonly observability: Readonly<{
guide: string;
infrastructureThreshold: string;
logsThreshold: string;
metricsThreshold: string;
monitorStatus: string;
monitorUptime: string;
tlsCertificate: string;
uptimeDurationAnomaly: string;
}>;
readonly alerting: Record<string, string>;
readonly maps: Record<string, string>;
readonly monitoring: Record<string, string>;
readonly security: Readonly<{
apiKeyServiceSettings: string;
clusterPrivileges: string;
elasticsearchSettings: string;
elasticsearchEnableSecurity: string;
indicesPrivileges: string;
kibanaTLS: string;
kibanaPrivileges: string;
mappingRoles: string;
mappingRolesFieldRules: string;
runAsPrivilege: string;
}>;
readonly spaces: Readonly<{
kibanaLegacyUrlAliases: string;
kibanaDisableLegacyUrlAliasesApi: string;
}>;
readonly watcher: Record<string, string>;
readonly ccs: Record<string, string>;
readonly plugins: Record<string, string>;
readonly snapshotRestore: Record<string, string>;
readonly ingest: Record<string, string>;
readonly fleet: Readonly<{
guide: string;
fleetServer: string;
fleetServerAddFleetServer: string;
settings: string;
settingsFleetServerHostSettings: string;
troubleshooting: string;
elasticAgent: string;
datastreams: string;
datastreamsNamingScheme: string;
upgradeElasticAgent: string;
upgradeElasticAgent712lower: string;
}>;
readonly ecs: {
readonly guide: string;
};
readonly clients: {
readonly guide: string;
readonly goOverview: string;
readonly javaIndex: string;
readonly jsIntro: string;
readonly netGuide: string;
readonly perlGuide: string;
readonly phpGuide: string;
readonly pythonGuide: string;
readonly rubyOverview: string;
readonly rustGuide: string;
};
} | | +| [links](./kibana-plugin-core-public.doclinksstart.links.md) | {
readonly settings: string;
readonly elasticStackGetStarted: string;
readonly apm: {
readonly kibanaSettings: string;
readonly supportedServiceMaps: string;
readonly customLinks: string;
readonly droppedTransactionSpans: string;
readonly upgrading: string;
readonly metaData: string;
};
readonly canvas: {
readonly guide: string;
};
readonly dashboard: {
readonly guide: string;
readonly drilldowns: string;
readonly drilldownsTriggerPicker: string;
readonly urlDrilldownTemplateSyntax: string;
readonly urlDrilldownVariables: string;
};
readonly discover: Record<string, string>;
readonly filebeat: {
readonly base: string;
readonly installation: string;
readonly configuration: string;
readonly elasticsearchOutput: string;
readonly elasticsearchModule: string;
readonly startup: string;
readonly exportedFields: string;
readonly suricataModule: string;
readonly zeekModule: string;
};
readonly auditbeat: {
readonly base: string;
readonly auditdModule: string;
readonly systemModule: string;
};
readonly metricbeat: {
readonly base: string;
readonly configure: string;
readonly httpEndpoint: string;
readonly install: string;
readonly start: string;
};
readonly enterpriseSearch: {
readonly base: string;
readonly appSearchBase: string;
readonly workplaceSearchBase: string;
};
readonly heartbeat: {
readonly base: string;
};
readonly libbeat: {
readonly getStarted: string;
};
readonly logstash: {
readonly base: string;
};
readonly functionbeat: {
readonly base: string;
};
readonly winlogbeat: {
readonly base: string;
};
readonly aggs: {
readonly composite: string;
readonly composite_missing_bucket: string;
readonly date_histogram: string;
readonly date_range: string;
readonly date_format_pattern: string;
readonly filter: string;
readonly filters: string;
readonly geohash_grid: string;
readonly histogram: string;
readonly ip_range: string;
readonly range: string;
readonly significant_terms: string;
readonly terms: string;
readonly avg: string;
readonly avg_bucket: string;
readonly max_bucket: string;
readonly min_bucket: string;
readonly sum_bucket: string;
readonly cardinality: string;
readonly count: string;
readonly cumulative_sum: string;
readonly derivative: string;
readonly geo_bounds: string;
readonly geo_centroid: string;
readonly max: string;
readonly median: string;
readonly min: string;
readonly moving_avg: string;
readonly percentile_ranks: string;
readonly serial_diff: string;
readonly std_dev: string;
readonly sum: string;
readonly top_hits: string;
};
readonly runtimeFields: {
readonly overview: string;
readonly mapping: string;
};
readonly scriptedFields: {
readonly scriptFields: string;
readonly scriptAggs: string;
readonly painless: string;
readonly painlessApi: string;
readonly painlessLangSpec: string;
readonly painlessSyntax: string;
readonly painlessWalkthrough: string;
readonly luceneExpressions: string;
};
readonly search: {
readonly sessions: string;
readonly sessionLimits: string;
};
readonly indexPatterns: {
readonly introduction: string;
readonly fieldFormattersNumber: string;
readonly fieldFormattersString: string;
readonly runtimeFields: string;
};
readonly addData: string;
readonly kibana: string;
readonly upgradeAssistant: string;
readonly rollupJobs: string;
readonly elasticsearch: Record<string, string>;
readonly siem: {
readonly privileges: string;
readonly guide: string;
readonly gettingStarted: string;
readonly ml: string;
readonly ruleChangeLog: string;
readonly detectionsReq: string;
readonly networkMap: string;
readonly troubleshootGaps: string;
};
readonly securitySolution: {
readonly trustedApps: string;
};
readonly query: {
readonly eql: string;
readonly kueryQuerySyntax: string;
readonly luceneQuerySyntax: string;
readonly percolate: string;
readonly queryDsl: string;
readonly autocompleteChanges: string;
};
readonly date: {
readonly dateMath: string;
readonly dateMathIndexNames: string;
};
readonly management: Record<string, string>;
readonly ml: Record<string, string>;
readonly transforms: Record<string, string>;
readonly visualize: Record<string, string>;
readonly apis: Readonly<{
bulkIndexAlias: string;
byteSizeUnits: string;
createAutoFollowPattern: string;
createFollower: string;
createIndex: string;
createSnapshotLifecyclePolicy: string;
createRoleMapping: string;
createRoleMappingTemplates: string;
createRollupJobsRequest: string;
createApiKey: string;
createPipeline: string;
createTransformRequest: string;
cronExpressions: string;
executeWatchActionModes: string;
indexExists: string;
openIndex: string;
putComponentTemplate: string;
painlessExecute: string;
painlessExecuteAPIContexts: string;
putComponentTemplateMetadata: string;
putSnapshotLifecyclePolicy: string;
putIndexTemplateV1: string;
putWatch: string;
simulatePipeline: string;
timeUnits: string;
updateTransform: string;
}>;
readonly observability: Readonly<{
guide: string;
infrastructureThreshold: string;
logsThreshold: string;
metricsThreshold: string;
monitorStatus: string;
monitorUptime: string;
tlsCertificate: string;
uptimeDurationAnomaly: string;
}>;
readonly alerting: Record<string, string>;
readonly maps: Record<string, string>;
readonly monitoring: Record<string, string>;
readonly security: Readonly<{
apiKeyServiceSettings: string;
clusterPrivileges: string;
elasticsearchSettings: string;
elasticsearchEnableSecurity: string;
indicesPrivileges: string;
kibanaTLS: string;
kibanaPrivileges: string;
mappingRoles: string;
mappingRolesFieldRules: string;
runAsPrivilege: string;
}>;
readonly spaces: Readonly<{
kibanaLegacyUrlAliases: string;
kibanaDisableLegacyUrlAliasesApi: string;
}>;
readonly watcher: Record<string, string>;
readonly ccs: Record<string, string>;
readonly plugins: Record<string, string>;
readonly snapshotRestore: Record<string, string>;
readonly ingest: Record<string, string>;
readonly fleet: Readonly<{
guide: string;
fleetServer: string;
fleetServerAddFleetServer: string;
settings: string;
settingsFleetServerHostSettings: string;
troubleshooting: string;
elasticAgent: string;
datastreams: string;
datastreamsNamingScheme: string;
upgradeElasticAgent: string;
upgradeElasticAgent712lower: string;
learnMoreBlog: string;
apiKeysLearnMore: string;
}>;
readonly ecs: {
readonly guide: string;
};
readonly clients: {
readonly guide: string;
readonly goOverview: string;
readonly javaIndex: string;
readonly jsIntro: string;
readonly netGuide: string;
readonly perlGuide: string;
readonly phpGuide: string;
readonly pythonGuide: string;
readonly rubyOverview: string;
readonly rustGuide: string;
};
} | | diff --git a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.correctiveactions.md b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.correctiveactions.md similarity index 66% rename from docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.correctiveactions.md rename to docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.correctiveactions.md index d7d10651033bf..273945166735b 100644 --- a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.correctiveactions.md +++ b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.correctiveactions.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) > [correctiveActions](./kibana-plugin-core-server.deprecationsdetails.correctiveactions.md) +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [BaseDeprecationDetails](./kibana-plugin-core-server.basedeprecationdetails.md) > [correctiveActions](./kibana-plugin-core-server.basedeprecationdetails.correctiveactions.md) -## DeprecationsDetails.correctiveActions property +## BaseDeprecationDetails.correctiveActions property corrective action needed to fix this deprecation. diff --git a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.deprecationtype.md b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.deprecationtype.md similarity index 70% rename from docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.deprecationtype.md rename to docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.deprecationtype.md index 3a76bc60ee630..072dfd17418f9 100644 --- a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.deprecationtype.md +++ b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.deprecationtype.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) > [deprecationType](./kibana-plugin-core-server.deprecationsdetails.deprecationtype.md) +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [BaseDeprecationDetails](./kibana-plugin-core-server.basedeprecationdetails.md) > [deprecationType](./kibana-plugin-core-server.basedeprecationdetails.deprecationtype.md) -## DeprecationsDetails.deprecationType property +## BaseDeprecationDetails.deprecationType property (optional) Used to identify between different deprecation types. Example use case: in Upgrade Assistant, we may want to allow the user to sort by deprecation type or show each type in a separate tab. diff --git a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.documentationurl.md b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.documentationurl.md similarity index 53% rename from docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.documentationurl.md rename to docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.documentationurl.md index 457cf7b61dac8..c8f0762acdce6 100644 --- a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.documentationurl.md +++ b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.documentationurl.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) > [documentationUrl](./kibana-plugin-core-server.deprecationsdetails.documentationurl.md) +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [BaseDeprecationDetails](./kibana-plugin-core-server.basedeprecationdetails.md) > [documentationUrl](./kibana-plugin-core-server.basedeprecationdetails.documentationurl.md) -## DeprecationsDetails.documentationUrl property +## BaseDeprecationDetails.documentationUrl property (optional) link to the documentation for more details on the deprecation. diff --git a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.level.md b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.level.md similarity index 66% rename from docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.level.md rename to docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.level.md index 64ad22e2c87fb..ad755805d00b9 100644 --- a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.level.md +++ b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.level.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) > [level](./kibana-plugin-core-server.deprecationsdetails.level.md) +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [BaseDeprecationDetails](./kibana-plugin-core-server.basedeprecationdetails.md) > [level](./kibana-plugin-core-server.basedeprecationdetails.level.md) -## DeprecationsDetails.level property +## BaseDeprecationDetails.level property levels: - warning: will not break deployment upon upgrade - critical: needs to be addressed before upgrade. - fetch\_error: Deprecations service failed to grab the deprecation details for the domain. diff --git a/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.md b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.md new file mode 100644 index 0000000000000..3e47865062352 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.md @@ -0,0 +1,26 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [BaseDeprecationDetails](./kibana-plugin-core-server.basedeprecationdetails.md) + +## BaseDeprecationDetails interface + +Base properties shared by all types of deprecations + +Signature: + +```typescript +export interface BaseDeprecationDetails +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [correctiveActions](./kibana-plugin-core-server.basedeprecationdetails.correctiveactions.md) | {
api?: {
path: string;
method: 'POST' | 'PUT';
body?: {
[key: string]: any;
};
omitContextFromBody?: boolean;
};
manualSteps: string[];
} | corrective action needed to fix this deprecation. | +| [deprecationType](./kibana-plugin-core-server.basedeprecationdetails.deprecationtype.md) | 'config' | 'feature' | (optional) Used to identify between different deprecation types. Example use case: in Upgrade Assistant, we may want to allow the user to sort by deprecation type or show each type in a separate tab.Feel free to add new types if necessary. Predefined types are necessary to reduce having similar definitions with different keywords across kibana deprecations. | +| [documentationUrl](./kibana-plugin-core-server.basedeprecationdetails.documentationurl.md) | string | (optional) link to the documentation for more details on the deprecation. | +| [level](./kibana-plugin-core-server.basedeprecationdetails.level.md) | 'warning' | 'critical' | 'fetch_error' | levels: - warning: will not break deployment upon upgrade - critical: needs to be addressed before upgrade. - fetch\_error: Deprecations service failed to grab the deprecation details for the domain. | +| [message](./kibana-plugin-core-server.basedeprecationdetails.message.md) | string | The description message to be displayed for the deprecation. Check the README for writing deprecations in src/core/server/deprecations/README.mdx | +| [requireRestart](./kibana-plugin-core-server.basedeprecationdetails.requirerestart.md) | boolean | (optional) specify the fix for this deprecation requires a full kibana restart. | +| [title](./kibana-plugin-core-server.basedeprecationdetails.title.md) | string | The title of the deprecation. Check the README for writing deprecations in src/core/server/deprecations/README.mdx | + diff --git a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.message.md b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.message.md similarity index 60% rename from docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.message.md rename to docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.message.md index 906ce8118f95b..5802bc316cc08 100644 --- a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.message.md +++ b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.message.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) > [message](./kibana-plugin-core-server.deprecationsdetails.message.md) +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [BaseDeprecationDetails](./kibana-plugin-core-server.basedeprecationdetails.md) > [message](./kibana-plugin-core-server.basedeprecationdetails.message.md) -## DeprecationsDetails.message property +## BaseDeprecationDetails.message property The description message to be displayed for the deprecation. Check the README for writing deprecations in `src/core/server/deprecations/README.mdx` diff --git a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.requirerestart.md b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.requirerestart.md similarity index 54% rename from docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.requirerestart.md rename to docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.requirerestart.md index 85bddd9436e73..3f589600d0458 100644 --- a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.requirerestart.md +++ b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.requirerestart.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) > [requireRestart](./kibana-plugin-core-server.deprecationsdetails.requirerestart.md) +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [BaseDeprecationDetails](./kibana-plugin-core-server.basedeprecationdetails.md) > [requireRestart](./kibana-plugin-core-server.basedeprecationdetails.requirerestart.md) -## DeprecationsDetails.requireRestart property +## BaseDeprecationDetails.requireRestart property (optional) specify the fix for this deprecation requires a full kibana restart. diff --git a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.title.md b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.title.md similarity index 59% rename from docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.title.md rename to docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.title.md index e8907688f6e5e..b6788a4faa7c5 100644 --- a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.title.md +++ b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.title.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) > [title](./kibana-plugin-core-server.deprecationsdetails.title.md) +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [BaseDeprecationDetails](./kibana-plugin-core-server.basedeprecationdetails.md) > [title](./kibana-plugin-core-server.basedeprecationdetails.title.md) -## DeprecationsDetails.title property +## BaseDeprecationDetails.title property The title of the deprecation. Check the README for writing deprecations in `src/core/server/deprecations/README.mdx` diff --git a/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.configpath.md b/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.configpath.md new file mode 100644 index 0000000000000..7af6c16d86e4a --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.configpath.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [ConfigDeprecationDetails](./kibana-plugin-core-server.configdeprecationdetails.md) > [configPath](./kibana-plugin-core-server.configdeprecationdetails.configpath.md) + +## ConfigDeprecationDetails.configPath property + +Signature: + +```typescript +configPath: string; +``` diff --git a/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.deprecationtype.md b/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.deprecationtype.md new file mode 100644 index 0000000000000..fb3737062f986 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.deprecationtype.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [ConfigDeprecationDetails](./kibana-plugin-core-server.configdeprecationdetails.md) > [deprecationType](./kibana-plugin-core-server.configdeprecationdetails.deprecationtype.md) + +## ConfigDeprecationDetails.deprecationType property + +Signature: + +```typescript +deprecationType: 'config'; +``` diff --git a/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.md b/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.md new file mode 100644 index 0000000000000..d1ccbb0b6164a --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [ConfigDeprecationDetails](./kibana-plugin-core-server.configdeprecationdetails.md) + +## ConfigDeprecationDetails interface + + +Signature: + +```typescript +export interface ConfigDeprecationDetails extends BaseDeprecationDetails +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [configPath](./kibana-plugin-core-server.configdeprecationdetails.configpath.md) | string | | +| [deprecationType](./kibana-plugin-core-server.configdeprecationdetails.deprecationtype.md) | 'config' | | + diff --git a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.md b/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.md index 2ff9f4b792f5d..d8ced1da62416 100644 --- a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.md +++ b/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.md @@ -2,24 +2,11 @@ [Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) -## DeprecationsDetails interface +## DeprecationsDetails type Signature: ```typescript -export interface DeprecationsDetails +export declare type DeprecationsDetails = ConfigDeprecationDetails | FeatureDeprecationDetails; ``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [correctiveActions](./kibana-plugin-core-server.deprecationsdetails.correctiveactions.md) | {
api?: {
path: string;
method: 'POST' | 'PUT';
body?: {
[key: string]: any;
};
omitContextFromBody?: boolean;
};
manualSteps: string[];
} | corrective action needed to fix this deprecation. | -| [deprecationType](./kibana-plugin-core-server.deprecationsdetails.deprecationtype.md) | 'config' | 'feature' | (optional) Used to identify between different deprecation types. Example use case: in Upgrade Assistant, we may want to allow the user to sort by deprecation type or show each type in a separate tab.Feel free to add new types if necessary. Predefined types are necessary to reduce having similar definitions with different keywords across kibana deprecations. | -| [documentationUrl](./kibana-plugin-core-server.deprecationsdetails.documentationurl.md) | string | (optional) link to the documentation for more details on the deprecation. | -| [level](./kibana-plugin-core-server.deprecationsdetails.level.md) | 'warning' | 'critical' | 'fetch_error' | levels: - warning: will not break deployment upon upgrade - critical: needs to be addressed before upgrade. - fetch\_error: Deprecations service failed to grab the deprecation details for the domain. | -| [message](./kibana-plugin-core-server.deprecationsdetails.message.md) | string | The description message to be displayed for the deprecation. Check the README for writing deprecations in src/core/server/deprecations/README.mdx | -| [requireRestart](./kibana-plugin-core-server.deprecationsdetails.requirerestart.md) | boolean | (optional) specify the fix for this deprecation requires a full kibana restart. | -| [title](./kibana-plugin-core-server.deprecationsdetails.title.md) | string | The title of the deprecation. Check the README for writing deprecations in src/core/server/deprecations/README.mdx | - diff --git a/docs/development/core/server/kibana-plugin-core-server.featuredeprecationdetails.deprecationtype.md b/docs/development/core/server/kibana-plugin-core-server.featuredeprecationdetails.deprecationtype.md new file mode 100644 index 0000000000000..b530874d3678b --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.featuredeprecationdetails.deprecationtype.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [FeatureDeprecationDetails](./kibana-plugin-core-server.featuredeprecationdetails.md) > [deprecationType](./kibana-plugin-core-server.featuredeprecationdetails.deprecationtype.md) + +## FeatureDeprecationDetails.deprecationType property + +Signature: + +```typescript +deprecationType?: 'feature' | undefined; +``` diff --git a/docs/development/core/server/kibana-plugin-core-server.featuredeprecationdetails.md b/docs/development/core/server/kibana-plugin-core-server.featuredeprecationdetails.md new file mode 100644 index 0000000000000..bed3356e36129 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.featuredeprecationdetails.md @@ -0,0 +1,19 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [FeatureDeprecationDetails](./kibana-plugin-core-server.featuredeprecationdetails.md) + +## FeatureDeprecationDetails interface + + +Signature: + +```typescript +export interface FeatureDeprecationDetails extends BaseDeprecationDetails +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [deprecationType](./kibana-plugin-core-server.featuredeprecationdetails.deprecationtype.md) | 'feature' | undefined | | + diff --git a/docs/development/core/server/kibana-plugin-core-server.md b/docs/development/core/server/kibana-plugin-core-server.md index 89203cb94d573..20b4b43776f21 100644 --- a/docs/development/core/server/kibana-plugin-core-server.md +++ b/docs/development/core/server/kibana-plugin-core-server.md @@ -53,9 +53,11 @@ The plugin integrates with the core system via lifecycle events: `setup` | [AuthRedirectedParams](./kibana-plugin-core-server.authredirectedparams.md) | Result of auth redirection. | | [AuthResultParams](./kibana-plugin-core-server.authresultparams.md) | Result of successful authentication. | | [AuthToolkit](./kibana-plugin-core-server.authtoolkit.md) | A tool set defining an outcome of Auth interceptor for incoming request. | +| [BaseDeprecationDetails](./kibana-plugin-core-server.basedeprecationdetails.md) | Base properties shared by all types of deprecations | | [Capabilities](./kibana-plugin-core-server.capabilities.md) | The read-only set of capabilities available for the current UI session. Capabilities are simple key-value pairs of (string, boolean), where the string denotes the capability ID, and the boolean is a flag indicating if the capability is enabled or disabled. | | [CapabilitiesSetup](./kibana-plugin-core-server.capabilitiessetup.md) | APIs to manage the [Capabilities](./kibana-plugin-core-server.capabilities.md) that will be used by the application.Plugins relying on capabilities to toggle some of their features should register them during the setup phase using the registerProvider method.Plugins having the responsibility to restrict capabilities depending on a given context should register their capabilities switcher using the registerSwitcher method.Refers to the methods documentation for complete description and examples. | | [CapabilitiesStart](./kibana-plugin-core-server.capabilitiesstart.md) | APIs to access the application [Capabilities](./kibana-plugin-core-server.capabilities.md). | +| [ConfigDeprecationDetails](./kibana-plugin-core-server.configdeprecationdetails.md) | | | [ContextSetup](./kibana-plugin-core-server.contextsetup.md) | An object that handles registration of context providers and configuring handlers with context. | | [CorePreboot](./kibana-plugin-core-server.corepreboot.md) | Context passed to the setup method of preboot plugins. | | [CoreSetup](./kibana-plugin-core-server.coresetup.md) | Context passed to the setup method of standard plugins. | @@ -65,7 +67,6 @@ The plugin integrates with the core system via lifecycle events: `setup` | [CustomHttpResponseOptions](./kibana-plugin-core-server.customhttpresponseoptions.md) | HTTP response parameters for a response with adjustable status code. | | [DeleteDocumentResponse](./kibana-plugin-core-server.deletedocumentresponse.md) | | | [DeprecationsClient](./kibana-plugin-core-server.deprecationsclient.md) | Server-side client that provides access to fetch all Kibana deprecations | -| [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) | | | [DeprecationSettings](./kibana-plugin-core-server.deprecationsettings.md) | UiSettings deprecation field options. | | [DeprecationsServiceSetup](./kibana-plugin-core-server.deprecationsservicesetup.md) | The deprecations service provides a way for the Kibana platform to communicate deprecated features and configs with its users. These deprecations are only communicated if the deployment is using these features. Allowing for a user tailored experience for upgrading the stack version.The Deprecation service is consumed by the upgrade assistant to assist with the upgrade experience.If a deprecated feature can be resolved without manual user intervention. Using correctiveActions.api allows the Upgrade Assistant to use this api to correct the deprecation upon a user trigger. | | [DiscoveredPlugin](./kibana-plugin-core-server.discoveredplugin.md) | Small container object used to expose information about discovered plugins that may or may not have been started. | @@ -77,6 +78,7 @@ The plugin integrates with the core system via lifecycle events: `setup` | [ErrorHttpResponseOptions](./kibana-plugin-core-server.errorhttpresponseoptions.md) | HTTP response parameters | | [ExecutionContextSetup](./kibana-plugin-core-server.executioncontextsetup.md) | | | [FakeRequest](./kibana-plugin-core-server.fakerequest.md) | Fake request object created manually by Kibana plugins. | +| [FeatureDeprecationDetails](./kibana-plugin-core-server.featuredeprecationdetails.md) | | | [GetDeprecationsContext](./kibana-plugin-core-server.getdeprecationscontext.md) | | | [GetResponse](./kibana-plugin-core-server.getresponse.md) | | | [HttpAuth](./kibana-plugin-core-server.httpauth.md) | | @@ -246,6 +248,7 @@ The plugin integrates with the core system via lifecycle events: `setup` | [AuthResult](./kibana-plugin-core-server.authresult.md) | | | [CapabilitiesProvider](./kibana-plugin-core-server.capabilitiesprovider.md) | See [CapabilitiesSetup](./kibana-plugin-core-server.capabilitiessetup.md) | | [CapabilitiesSwitcher](./kibana-plugin-core-server.capabilitiesswitcher.md) | See [CapabilitiesSetup](./kibana-plugin-core-server.capabilitiessetup.md) | +| [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) | | | [DestructiveRouteMethod](./kibana-plugin-core-server.destructiveroutemethod.md) | Set of HTTP methods changing the state of the server. | | [ElasticsearchClient](./kibana-plugin-core-server.elasticsearchclient.md) | Client used to query the elasticsearch cluster. | | [ElasticsearchClientConfig](./kibana-plugin-core-server.elasticsearchclientconfig.md) | Configuration options to be used to create a [cluster client](./kibana-plugin-core-server.iclusterclient.md) using the [createClient API](./kibana-plugin-core-server.elasticsearchservicestart.createclient.md) | diff --git a/docs/settings/spaces-settings.asciidoc b/docs/settings/spaces-settings.asciidoc index 30b7beceb70ba..969adb93185d0 100644 --- a/docs/settings/spaces-settings.asciidoc +++ b/docs/settings/spaces-settings.asciidoc @@ -5,20 +5,23 @@ Spaces settings ++++ -By default, Spaces is enabled in Kibana, and you can secure Spaces using -roles when Security is enabled. - -[float] -[[spaces-settings]] -==== Spaces settings +By default, spaces is enabled in {kib}. To secure spaces, <>. `xpack.spaces.enabled`:: -deprecated:[7.16.0,"In 8.0 and later, this setting will no longer be supported."] -Set to `true` (default) to enable Spaces in {kib}. -This setting is deprecated. Starting in 8.0, it will not be possible to disable this plugin. +deprecated:[7.16.0,"In 8.0 and later, this setting will no longer be supported and it will not be possible to disable this plugin."] +To enable spaces, set to `true`. +The default is `true`. `xpack.spaces.maxSpaces`:: -The maximum amount of Spaces that can be used with this instance of {kib}. Some operations -in {kib} return all spaces using a single `_search` from {es}, so this must be -set lower than the `index.max_result_window` in {es}. -Defaults to `1000`. +The maximum number of spaces that you can use with the {kib} instance. Some {kib} operations +return all spaces using a single `_search` from {es}, so you must +configure this setting lower than the `index.max_result_window` in {es}. +The default is `1000`. + +`monitoring.cluster_alerts-allowedSpaces` {ess-icon}:: +Specifies the spaces where cluster alerts are automatically generated. +You must specify all spaces where you want to generate alerts, including the default space. +When the default space is unspecified, {kib} is unable to generate an alert for the default space. +{es} clusters that run on {es} services are all containers. To send monitoring data +from your self-managed {es} installation to {es} services, set to `false`. +The default is `true`. diff --git a/package.json b/package.json index ea7f52c347f5d..60c1fee7bf192 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,7 @@ "@elastic/charts": "37.0.0", "@elastic/datemath": "link:bazel-bin/packages/elastic-datemath", "@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@^7.16.0-canary.4", - "@elastic/ems-client": "7.15.0", + "@elastic/ems-client": "7.16.0", "@elastic/eui": "39.0.0", "@elastic/filesaver": "1.1.2", "@elastic/good": "^9.0.1-kibana3", @@ -168,7 +168,7 @@ "@mapbox/mapbox-gl-draw": "1.3.0", "@mapbox/mapbox-gl-rtl-text": "0.2.3", "@mapbox/vector-tile": "1.3.1", - "@reduxjs/toolkit": "^1.5.1", + "@reduxjs/toolkit": "^1.6.1", "@slack/webhook": "^5.0.4", "@turf/along": "6.0.1", "@turf/area": "6.0.1", @@ -252,7 +252,7 @@ "i18n-iso-countries": "^4.3.1", "icalendar": "0.7.1", "idx": "^2.5.6", - "immer": "^8.0.1", + "immer": "^9.0.6", "inline-style": "^2.0.0", "intl": "^1.2.5", "intl-format-cache": "^2.1.0", @@ -361,7 +361,7 @@ "reactcss": "1.2.3", "recompose": "^0.26.0", "reduce-reducers": "^1.0.4", - "redux": "^4.0.5", + "redux": "^4.1.0", "redux-actions": "^2.6.5", "redux-devtools-extension": "^2.13.8", "redux-logger": "^3.0.6", @@ -836,4 +836,4 @@ "yargs": "^15.4.1", "zlib": "^1.0.5" } -} \ No newline at end of file +} diff --git a/packages/elastic-apm-generator/src/index.ts b/packages/elastic-apm-generator/src/index.ts index fd83ce483ad4f..7007e92012a66 100644 --- a/packages/elastic-apm-generator/src/index.ts +++ b/packages/elastic-apm-generator/src/index.ts @@ -12,3 +12,4 @@ export { getTransactionMetrics } from './lib/utils/get_transaction_metrics'; export { getSpanDestinationMetrics } from './lib/utils/get_span_destination_metrics'; export { getObserverDefaults } from './lib/defaults/get_observer_defaults'; export { toElasticsearchOutput } from './lib/output/to_elasticsearch_output'; +export { getBreakdownMetrics } from './lib/utils/get_breakdown_metrics'; diff --git a/packages/elastic-apm-generator/src/lib/base_span.ts b/packages/elastic-apm-generator/src/lib/base_span.ts index 24a51282687f4..6288c16d339b6 100644 --- a/packages/elastic-apm-generator/src/lib/base_span.ts +++ b/packages/elastic-apm-generator/src/lib/base_span.ts @@ -8,10 +8,12 @@ import { Fields } from './entity'; import { Serializable } from './serializable'; +import { Span } from './span'; +import { Transaction } from './transaction'; import { generateTraceId } from './utils/generate_id'; export class BaseSpan extends Serializable { - private _children: BaseSpan[] = []; + private readonly _children: BaseSpan[] = []; constructor(fields: Fields) { super({ @@ -22,20 +24,29 @@ export class BaseSpan extends Serializable { }); } - traceId(traceId: string) { - this.fields['trace.id'] = traceId; + parent(span: BaseSpan) { + this.fields['trace.id'] = span.fields['trace.id']; + this.fields['parent.id'] = span.isSpan() + ? span.fields['span.id'] + : span.fields['transaction.id']; + + if (this.isSpan()) { + this.fields['transaction.id'] = span.fields['transaction.id']; + } this._children.forEach((child) => { - child.fields['trace.id'] = traceId; + child.parent(this); }); + return this; } children(...children: BaseSpan[]) { - this._children.push(...children); children.forEach((child) => { - child.traceId(this.fields['trace.id']!); + child.parent(this); }); + this._children.push(...children); + return this; } @@ -52,4 +63,12 @@ export class BaseSpan extends Serializable { serialize(): Fields[] { return [this.fields, ...this._children.flatMap((child) => child.serialize())]; } + + isSpan(): this is Span { + return this.fields['processor.event'] === 'span'; + } + + isTransaction(): this is Transaction { + return this.fields['processor.event'] === 'transaction'; + } } diff --git a/packages/elastic-apm-generator/src/lib/entity.ts b/packages/elastic-apm-generator/src/lib/entity.ts index e0a048c876213..2a4beee652cf7 100644 --- a/packages/elastic-apm-generator/src/lib/entity.ts +++ b/packages/elastic-apm-generator/src/lib/entity.ts @@ -10,9 +10,11 @@ export type Fields = Partial<{ '@timestamp': number; 'agent.name': string; 'agent.version': string; + 'container.id': string; 'ecs.version': string; 'event.outcome': string; 'event.ingested': number; + 'host.name': string; 'metricset.name': string; 'observer.version': string; 'observer.version_major': number; @@ -42,6 +44,8 @@ export type Fields = Partial<{ 'span.destination.service.type': string; 'span.destination.service.response_time.sum.us': number; 'span.destination.service.response_time.count': number; + 'span.self_time.count': number; + 'span.self_time.sum.us': number; }>; export class Entity { diff --git a/packages/elastic-apm-generator/src/lib/output/to_elasticsearch_output.ts b/packages/elastic-apm-generator/src/lib/output/to_elasticsearch_output.ts index ded94f9ad2276..b4cae1b41b9a6 100644 --- a/packages/elastic-apm-generator/src/lib/output/to_elasticsearch_output.ts +++ b/packages/elastic-apm-generator/src/lib/output/to_elasticsearch_output.ts @@ -14,10 +14,12 @@ export function toElasticsearchOutput(events: Fields[], versionOverride?: string return events.map((event) => { const values = { ...event, + ...getObserverDefaults(), '@timestamp': new Date(event['@timestamp']!).toISOString(), 'timestamp.us': event['@timestamp']! * 1000, 'ecs.version': '1.4', - ...getObserverDefaults(), + 'service.node.name': + event['service.node.name'] || event['container.id'] || event['host.name'], }; const document = {}; diff --git a/packages/elastic-apm-generator/src/lib/service.ts b/packages/elastic-apm-generator/src/lib/service.ts index 8ddbd827e842e..859afa18aab03 100644 --- a/packages/elastic-apm-generator/src/lib/service.ts +++ b/packages/elastic-apm-generator/src/lib/service.ts @@ -14,6 +14,7 @@ export class Service extends Entity { return new Instance({ ...this.fields, ['service.node.name']: instanceName, + 'container.id': instanceName, }); } } diff --git a/packages/elastic-apm-generator/src/lib/span.ts b/packages/elastic-apm-generator/src/lib/span.ts index da9ba9cdff722..36f7f44816d01 100644 --- a/packages/elastic-apm-generator/src/lib/span.ts +++ b/packages/elastic-apm-generator/src/lib/span.ts @@ -19,18 +19,6 @@ export class Span extends BaseSpan { }); } - children(...children: BaseSpan[]) { - super.children(...children); - - children.forEach((child) => - child.defaults({ - 'parent.id': this.fields['span.id'], - }) - ); - - return this; - } - duration(duration: number) { this.fields['span.duration.us'] = duration * 1000; return this; diff --git a/packages/elastic-apm-generator/src/lib/transaction.ts b/packages/elastic-apm-generator/src/lib/transaction.ts index 14ed6ac1ea85e..f615f46710996 100644 --- a/packages/elastic-apm-generator/src/lib/transaction.ts +++ b/packages/elastic-apm-generator/src/lib/transaction.ts @@ -11,6 +11,8 @@ import { Fields } from './entity'; import { generateEventId } from './utils/generate_id'; export class Transaction extends BaseSpan { + private _sampled: boolean = true; + constructor(fields: Fields) { super({ ...fields, @@ -19,19 +21,25 @@ export class Transaction extends BaseSpan { 'transaction.sampled': true, }); } - children(...children: BaseSpan[]) { - super.children(...children); - children.forEach((child) => - child.defaults({ - 'transaction.id': this.fields['transaction.id'], - 'parent.id': this.fields['transaction.id'], - }) - ); - return this; - } duration(duration: number) { this.fields['transaction.duration.us'] = duration * 1000; return this; } + + sample(sampled: boolean = true) { + this._sampled = sampled; + return this; + } + + serialize() { + const [transaction, ...spans] = super.serialize(); + + const events = [transaction]; + if (this._sampled) { + events.push(...spans); + } + + return events; + } } diff --git a/packages/elastic-apm-generator/src/lib/utils/aggregate.ts b/packages/elastic-apm-generator/src/lib/utils/aggregate.ts new file mode 100644 index 0000000000000..81b72f6fa01e9 --- /dev/null +++ b/packages/elastic-apm-generator/src/lib/utils/aggregate.ts @@ -0,0 +1,45 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +import moment from 'moment'; +import { pickBy } from 'lodash'; +import objectHash from 'object-hash'; +import { Fields } from '../entity'; +import { createPicker } from './create_picker'; + +export function aggregate(events: Fields[], fields: string[]) { + const picker = createPicker(fields); + + const metricsets = new Map(); + + function getMetricsetKey(span: Fields) { + const timestamp = moment(span['@timestamp']).valueOf(); + return { + '@timestamp': timestamp - (timestamp % (60 * 1000)), + ...pickBy(span, picker), + }; + } + + for (const event of events) { + const key = getMetricsetKey(event); + const id = objectHash(key); + + let metricset = metricsets.get(id); + + if (!metricset) { + metricset = { + key: { ...key, 'processor.event': 'metric', 'processor.name': 'metric' }, + events: [], + }; + metricsets.set(id, metricset); + } + + metricset.events.push(event); + } + + return Array.from(metricsets.values()); +} diff --git a/src/plugins/apm_oss/public/types.ts b/packages/elastic-apm-generator/src/lib/utils/create_picker.ts similarity index 52% rename from src/plugins/apm_oss/public/types.ts rename to packages/elastic-apm-generator/src/lib/utils/create_picker.ts index 16a1fe8be8004..7fce23b6fc966 100644 --- a/src/plugins/apm_oss/public/types.ts +++ b/packages/elastic-apm-generator/src/lib/utils/create_picker.ts @@ -5,12 +5,12 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ +export function createPicker(fields: string[]) { + const wildcards = fields + .filter((field) => field.endsWith('.*')) + .map((field) => field.replace('*', '')); -// eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface ApmOssPluginSetup {} - -// eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface ApmOssPluginStart {} - -// eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface AppPluginStartDependencies {} + return (value: unknown, key: string) => { + return fields.includes(key) || wildcards.some((field) => key.startsWith(field)); + }; +} diff --git a/packages/elastic-apm-generator/src/lib/utils/get_breakdown_metrics.ts b/packages/elastic-apm-generator/src/lib/utils/get_breakdown_metrics.ts new file mode 100644 index 0000000000000..8eae0941c6bdd --- /dev/null +++ b/packages/elastic-apm-generator/src/lib/utils/get_breakdown_metrics.ts @@ -0,0 +1,145 @@ +/* + * Copyright 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 objectHash from 'object-hash'; +import { groupBy, pickBy } from 'lodash'; +import { Fields } from '../entity'; +import { createPicker } from './create_picker'; + +const instanceFields = [ + 'container.*', + 'kubernetes.*', + 'agent.*', + 'process.*', + 'cloud.*', + 'service.*', + 'host.*', +]; + +const instancePicker = createPicker(instanceFields); + +const metricsetPicker = createPicker([ + 'transaction.type', + 'transaction.name', + 'span.type', + 'span.subtype', +]); + +export function getBreakdownMetrics(events: Fields[]) { + const txWithSpans = groupBy( + events.filter( + (event) => event['processor.event'] === 'span' || event['processor.event'] === 'transaction' + ), + (event) => event['transaction.id'] + ); + + const metricsets: Map = new Map(); + + Object.keys(txWithSpans).forEach((transactionId) => { + const txEvents = txWithSpans[transactionId]; + const transaction = txEvents.find((event) => event['processor.event'] === 'transaction')!; + + const eventsById: Record = {}; + const activityByParentId: Record> = {}; + for (const event of txEvents) { + const id = + event['processor.event'] === 'transaction' ? event['transaction.id'] : event['span.id']; + eventsById[id!] = event; + + const parentId = event['parent.id']; + + if (!parentId) { + continue; + } + + if (!activityByParentId[parentId]) { + activityByParentId[parentId] = []; + } + + const from = event['@timestamp']! * 1000; + const to = + from + + (event['processor.event'] === 'transaction' + ? event['transaction.duration.us']! + : event['span.duration.us']!); + + activityByParentId[parentId].push({ from, to }); + } + + // eslint-disable-next-line guard-for-in + for (const id in eventsById) { + const event = eventsById[id]; + const activities = activityByParentId[id] || []; + + const timeStart = event['@timestamp']! * 1000; + + let selfTime = 0; + let lastMeasurement = timeStart; + const changeTimestamps = [ + ...new Set([ + timeStart, + ...activities.flatMap((activity) => [activity.from, activity.to]), + timeStart + + (event['processor.event'] === 'transaction' + ? event['transaction.duration.us']! + : event['span.duration.us']!), + ]), + ]; + + for (const timestamp of changeTimestamps) { + const hasActiveChildren = activities.some( + (activity) => activity.from < timestamp && activity.to >= timestamp + ); + + if (!hasActiveChildren) { + selfTime += timestamp - lastMeasurement; + } + + lastMeasurement = timestamp; + } + + const key = { + '@timestamp': event['@timestamp']! - (event['@timestamp']! % (30 * 1000)), + 'transaction.type': transaction['transaction.type'], + 'transaction.name': transaction['transaction.name'], + ...pickBy(event, metricsetPicker), + }; + + const instance = pickBy(event, instancePicker); + + const metricsetId = objectHash(key); + + let metricset = metricsets.get(metricsetId); + + if (!metricset) { + metricset = { + ...key, + ...instance, + 'processor.event': 'metric', + 'processor.name': 'metric', + 'metricset.name': `span_breakdown`, + 'span.self_time.count': 0, + 'span.self_time.sum.us': 0, + }; + + if (event['processor.event'] === 'transaction') { + metricset['span.type'] = 'app'; + } else { + metricset['span.type'] = event['span.type']; + metricset['span.subtype'] = event['span.subtype']; + } + + metricsets.set(metricsetId, metricset); + } + + metricset['span.self_time.count']!++; + metricset['span.self_time.sum.us']! += selfTime; + } + }); + + return Array.from(metricsets.values()); +} diff --git a/packages/elastic-apm-generator/src/lib/utils/get_span_destination_metrics.ts b/packages/elastic-apm-generator/src/lib/utils/get_span_destination_metrics.ts index 3740ad685735e..decf2f71a9be4 100644 --- a/packages/elastic-apm-generator/src/lib/utils/get_span_destination_metrics.ts +++ b/packages/elastic-apm-generator/src/lib/utils/get_span_destination_metrics.ts @@ -6,46 +6,34 @@ * Side Public License, v 1. */ -import { pick } from 'lodash'; -import moment from 'moment'; -import objectHash from 'object-hash'; import { Fields } from '../entity'; +import { aggregate } from './aggregate'; export function getSpanDestinationMetrics(events: Fields[]) { const exitSpans = events.filter((event) => !!event['span.destination.service.resource']); - const metricsets = new Map(); + const metricsets = aggregate(exitSpans, [ + 'event.outcome', + 'agent.name', + 'service.environment', + 'service.name', + 'span.destination.service.resource', + ]); - function getSpanBucketKey(span: Fields) { - return { - '@timestamp': moment(span['@timestamp']).startOf('minute').valueOf(), - ...pick(span, [ - 'event.outcome', - 'agent.name', - 'service.environment', - 'service.name', - 'span.destination.service.resource', - ]), - }; - } - - for (const span of exitSpans) { - const key = getSpanBucketKey(span); - const id = objectHash(key); + return metricsets.map((metricset) => { + let count = 0; + let sum = 0; - let metricset = metricsets.get(id); - if (!metricset) { - metricset = { - ['processor.event']: 'metric', - ...key, - 'span.destination.service.response_time.sum.us': 0, - 'span.destination.service.response_time.count': 0, - }; - metricsets.set(id, metricset); + for (const event of metricset.events) { + count++; + sum += event['span.duration.us']!; } - metricset['span.destination.service.response_time.count']! += 1; - metricset['span.destination.service.response_time.sum.us']! += span['span.duration.us']!; - } - return [...Array.from(metricsets.values())]; + return { + ...metricset.key, + ['metricset.name']: 'span_destination', + 'span.destination.service.response_time.sum.us': sum, + 'span.destination.service.response_time.count': count, + }; + }); } diff --git a/packages/elastic-apm-generator/src/lib/utils/get_transaction_metrics.ts b/packages/elastic-apm-generator/src/lib/utils/get_transaction_metrics.ts index 62ecb9e20006f..4d46461c6dcc9 100644 --- a/packages/elastic-apm-generator/src/lib/utils/get_transaction_metrics.ts +++ b/packages/elastic-apm-generator/src/lib/utils/get_transaction_metrics.ts @@ -6,10 +6,9 @@ * Side Public License, v 1. */ -import { pick, sortBy } from 'lodash'; -import moment from 'moment'; -import objectHash from 'object-hash'; +import { sortBy } from 'lodash'; import { Fields } from '../entity'; +import { aggregate } from './aggregate'; function sortAndCompressHistogram(histogram?: { values: number[]; counts: number[] }) { return sortBy(histogram?.values).reduce( @@ -30,60 +29,45 @@ function sortAndCompressHistogram(histogram?: { values: number[]; counts: number } export function getTransactionMetrics(events: Fields[]) { - const transactions = events.filter((event) => event['processor.event'] === 'transaction'); + const transactions = events + .filter((event) => event['processor.event'] === 'transaction') + .map((transaction) => { + return { + ...transaction, + ['trace.root']: transaction['parent.id'] === undefined, + }; + }); - const metricsets = new Map(); + const metricsets = aggregate(transactions, [ + 'trace.root', + 'transaction.name', + 'transaction.type', + 'event.outcome', + 'transaction.result', + 'agent.name', + 'service.environment', + 'service.name', + 'service.version', + 'host.name', + 'container.id', + 'kubernetes.pod.name', + ]); - function getTransactionBucketKey(transaction: Fields) { - return { - '@timestamp': moment(transaction['@timestamp']).startOf('minute').valueOf(), - 'trace.root': transaction['parent.id'] === undefined, - ...pick(transaction, [ - 'transaction.name', - 'transaction.type', - 'event.outcome', - 'transaction.result', - 'agent.name', - 'service.environment', - 'service.name', - 'service.version', - 'host.name', - 'container.id', - 'kubernetes.pod.name', - ]), + return metricsets.map((metricset) => { + const histogram = { + values: [] as number[], + counts: [] as number[], }; - } - for (const transaction of transactions) { - const key = getTransactionBucketKey(transaction); - const id = objectHash(key); - let metricset = metricsets.get(id); - if (!metricset) { - metricset = { - ...key, - ['processor.event']: 'metric', - 'transaction.duration.histogram': { - values: [], - counts: [], - }, - }; - metricsets.set(id, metricset); + for (const transaction of metricset.events) { + histogram.counts.push(1); + histogram.values.push(Number(transaction['transaction.duration.us'])); } - metricset['transaction.duration.histogram']?.counts.push(1); - metricset['transaction.duration.histogram']?.values.push( - Number(transaction['transaction.duration.us']) - ); - } - return [ - ...Array.from(metricsets.values()).map((metricset) => { - return { - ...metricset, - ['transaction.duration.histogram']: sortAndCompressHistogram( - metricset['transaction.duration.histogram'] - ), - _doc_count: metricset['transaction.duration.histogram']!.values.length, - }; - }), - ]; + return { + ...metricset.key, + 'transaction.duration.histogram': sortAndCompressHistogram(histogram), + _doc_count: metricset.events.length, + }; + }); } diff --git a/packages/elastic-apm-generator/src/scripts/examples/01_simple_trace.ts b/packages/elastic-apm-generator/src/scripts/examples/01_simple_trace.ts index eef3e6cc40560..7aae2986919c8 100644 --- a/packages/elastic-apm-generator/src/scripts/examples/01_simple_trace.ts +++ b/packages/elastic-apm-generator/src/scripts/examples/01_simple_trace.ts @@ -7,17 +7,18 @@ */ import { service, timerange, getTransactionMetrics, getSpanDestinationMetrics } from '../..'; +import { getBreakdownMetrics } from '../../lib/utils/get_breakdown_metrics'; export function simpleTrace(from: number, to: number) { const instance = service('opbeans-go', 'production', 'go').instance('instance'); const range = timerange(from, to); - const transactionName = '100rpm (75% success) failed 1000ms'; + const transactionName = '100rpm (80% success) failed 1000ms'; const successfulTraceEvents = range - .interval('1m') - .rate(75) + .interval('30s') + .rate(40) .flatMap((timestamp) => instance .transaction(transactionName) @@ -31,14 +32,14 @@ export function simpleTrace(from: number, to: number) { .success() .destination('elasticsearch') .timestamp(timestamp), - instance.span('custom_operation', 'app').duration(50).success().timestamp(timestamp) + instance.span('custom_operation', 'custom').duration(100).success().timestamp(timestamp) ) .serialize() ); const failedTraceEvents = range - .interval('1m') - .rate(25) + .interval('30s') + .rate(10) .flatMap((timestamp) => instance .transaction(transactionName) @@ -50,5 +51,10 @@ export function simpleTrace(from: number, to: number) { const events = successfulTraceEvents.concat(failedTraceEvents); - return events.concat(getTransactionMetrics(events)).concat(getSpanDestinationMetrics(events)); + return [ + ...events, + ...getTransactionMetrics(events), + ...getSpanDestinationMetrics(events), + ...getBreakdownMetrics(events), + ]; } diff --git a/packages/elastic-apm-generator/src/test/scenarios/01_simple_trace.test.ts b/packages/elastic-apm-generator/src/test/scenarios/01_simple_trace.test.ts index 6bae70507dcbe..733093ce0a71c 100644 --- a/packages/elastic-apm-generator/src/test/scenarios/01_simple_trace.test.ts +++ b/packages/elastic-apm-generator/src/test/scenarios/01_simple_trace.test.ts @@ -68,6 +68,7 @@ describe('simple trace', () => { expect(transaction).toEqual({ '@timestamp': 1609459200000, 'agent.name': 'java', + 'container.id': 'instance-1', 'event.outcome': 'success', 'processor.event': 'transaction', 'processor.name': 'transaction', @@ -89,6 +90,7 @@ describe('simple trace', () => { expect(span).toEqual({ '@timestamp': 1609459200050, 'agent.name': 'java', + 'container.id': 'instance-1', 'event.outcome': 'success', 'parent.id': 'e7433020f2745625', 'processor.event': 'span', diff --git a/packages/elastic-apm-generator/src/test/scenarios/04_breakdown_metrics.test.ts b/packages/elastic-apm-generator/src/test/scenarios/04_breakdown_metrics.test.ts new file mode 100644 index 0000000000000..aeb944f35faf6 --- /dev/null +++ b/packages/elastic-apm-generator/src/test/scenarios/04_breakdown_metrics.test.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 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 { sumBy } from 'lodash'; +import { Fields } from '../../lib/entity'; +import { service } from '../../lib/service'; +import { timerange } from '../../lib/timerange'; +import { getBreakdownMetrics } from '../../lib/utils/get_breakdown_metrics'; + +describe('breakdown metrics', () => { + let events: Fields[]; + + const LIST_RATE = 2; + const LIST_SPANS = 2; + const ID_RATE = 4; + const ID_SPANS = 2; + const INTERVALS = 6; + + beforeEach(() => { + const javaService = service('opbeans-java', 'production', 'java'); + const javaInstance = javaService.instance('instance-1'); + + const start = new Date('2021-01-01T00:00:00.000Z').getTime(); + + const range = timerange(start, start + INTERVALS * 30 * 1000 - 1); + + events = getBreakdownMetrics([ + ...range + .interval('30s') + .rate(LIST_RATE) + .flatMap((timestamp) => + javaInstance + .transaction('GET /api/product/list') + .timestamp(timestamp) + .duration(1000) + .children( + javaInstance + .span('GET apm-*/_search', 'db', 'elasticsearch') + .timestamp(timestamp + 150) + .duration(500), + javaInstance.span('GET foo', 'db', 'redis').timestamp(timestamp).duration(100) + ) + .serialize() + ), + ...range + .interval('30s') + .rate(ID_RATE) + .flatMap((timestamp) => + javaInstance + .transaction('GET /api/product/:id') + .timestamp(timestamp) + .duration(1000) + .children( + javaInstance + .span('GET apm-*/_search', 'db', 'elasticsearch') + .duration(500) + .timestamp(timestamp + 100) + .children( + javaInstance + .span('bar', 'external', 'http') + .timestamp(timestamp + 200) + .duration(100) + ) + ) + .serialize() + ), + ]).filter((event) => event['processor.event'] === 'metric'); + }); + + it('generates the right amount of breakdown metrics', () => { + expect(events.length).toBe(INTERVALS * (LIST_SPANS + 1 + ID_SPANS + 1)); + }); + + it('calculates breakdown metrics for the right amount of transactions and spans', () => { + expect(sumBy(events, (event) => event['span.self_time.count']!)).toBe( + INTERVALS * LIST_RATE * (LIST_SPANS + 1) + INTERVALS * ID_RATE * (ID_SPANS + 1) + ); + }); + + it('generates app metricsets for transaction self time', () => { + expect(events.some((event) => event['span.type'] === 'app' && !event['span.subtype'])).toBe( + true + ); + }); + + it('generates the right statistic', () => { + const elasticsearchSets = events.filter((event) => event['span.subtype'] === 'elasticsearch'); + + const expectedCountFromListTransaction = INTERVALS * LIST_RATE; + + const expectedCountFromIdTransaction = INTERVALS * ID_RATE; + + const expectedCount = expectedCountFromIdTransaction + expectedCountFromListTransaction; + + expect(sumBy(elasticsearchSets, (set) => set['span.self_time.count']!)).toBe(expectedCount); + + expect(sumBy(elasticsearchSets, (set) => set['span.self_time.sum.us']!)).toBe( + expectedCountFromListTransaction * 500 * 1000 + expectedCountFromIdTransaction * 400 * 1000 + ); + }); +}); diff --git a/packages/elastic-apm-generator/src/test/scenarios/__snapshots__/01_simple_trace.test.ts.snap b/packages/elastic-apm-generator/src/test/scenarios/__snapshots__/01_simple_trace.test.ts.snap index 6eec0ce38ba30..00a55cb87b125 100644 --- a/packages/elastic-apm-generator/src/test/scenarios/__snapshots__/01_simple_trace.test.ts.snap +++ b/packages/elastic-apm-generator/src/test/scenarios/__snapshots__/01_simple_trace.test.ts.snap @@ -5,6 +5,7 @@ Array [ Object { "@timestamp": 1609459200000, "agent.name": "java", + "container.id": "instance-1", "event.outcome": "success", "processor.event": "transaction", "processor.name": "transaction", @@ -21,6 +22,7 @@ Array [ Object { "@timestamp": 1609459200050, "agent.name": "java", + "container.id": "instance-1", "event.outcome": "success", "parent.id": "36c16f18e75058f8", "processor.event": "span", @@ -39,6 +41,7 @@ Array [ Object { "@timestamp": 1609459260000, "agent.name": "java", + "container.id": "instance-1", "event.outcome": "success", "processor.event": "transaction", "processor.name": "transaction", @@ -55,6 +58,7 @@ Array [ Object { "@timestamp": 1609459260050, "agent.name": "java", + "container.id": "instance-1", "event.outcome": "success", "parent.id": "65ce74106eb050be", "processor.event": "span", @@ -73,6 +77,7 @@ Array [ Object { "@timestamp": 1609459320000, "agent.name": "java", + "container.id": "instance-1", "event.outcome": "success", "processor.event": "transaction", "processor.name": "transaction", @@ -89,6 +94,7 @@ Array [ Object { "@timestamp": 1609459320050, "agent.name": "java", + "container.id": "instance-1", "event.outcome": "success", "parent.id": "91fa709d90625fff", "processor.event": "span", @@ -107,6 +113,7 @@ Array [ Object { "@timestamp": 1609459380000, "agent.name": "java", + "container.id": "instance-1", "event.outcome": "success", "processor.event": "transaction", "processor.name": "transaction", @@ -123,6 +130,7 @@ Array [ Object { "@timestamp": 1609459380050, "agent.name": "java", + "container.id": "instance-1", "event.outcome": "success", "parent.id": "6c500d1d19835e68", "processor.event": "span", @@ -141,6 +149,7 @@ Array [ Object { "@timestamp": 1609459440000, "agent.name": "java", + "container.id": "instance-1", "event.outcome": "success", "processor.event": "transaction", "processor.name": "transaction", @@ -157,6 +166,7 @@ Array [ Object { "@timestamp": 1609459440050, "agent.name": "java", + "container.id": "instance-1", "event.outcome": "success", "parent.id": "1b3246cc83595869", "processor.event": "span", @@ -175,6 +185,7 @@ Array [ Object { "@timestamp": 1609459500000, "agent.name": "java", + "container.id": "instance-1", "event.outcome": "success", "processor.event": "transaction", "processor.name": "transaction", @@ -191,6 +202,7 @@ Array [ Object { "@timestamp": 1609459500050, "agent.name": "java", + "container.id": "instance-1", "event.outcome": "success", "parent.id": "12b49e3c83fe58d5", "processor.event": "span", @@ -209,6 +221,7 @@ Array [ Object { "@timestamp": 1609459560000, "agent.name": "java", + "container.id": "instance-1", "event.outcome": "success", "processor.event": "transaction", "processor.name": "transaction", @@ -225,6 +238,7 @@ Array [ Object { "@timestamp": 1609459560050, "agent.name": "java", + "container.id": "instance-1", "event.outcome": "success", "parent.id": "d9272009dd4354a1", "processor.event": "span", @@ -243,6 +257,7 @@ Array [ Object { "@timestamp": 1609459620000, "agent.name": "java", + "container.id": "instance-1", "event.outcome": "success", "processor.event": "transaction", "processor.name": "transaction", @@ -259,6 +274,7 @@ Array [ Object { "@timestamp": 1609459620050, "agent.name": "java", + "container.id": "instance-1", "event.outcome": "success", "parent.id": "bc52ca08063c505b", "processor.event": "span", @@ -277,6 +293,7 @@ Array [ Object { "@timestamp": 1609459680000, "agent.name": "java", + "container.id": "instance-1", "event.outcome": "success", "processor.event": "transaction", "processor.name": "transaction", @@ -293,6 +310,7 @@ Array [ Object { "@timestamp": 1609459680050, "agent.name": "java", + "container.id": "instance-1", "event.outcome": "success", "parent.id": "186858dd88b75d59", "processor.event": "span", @@ -311,6 +329,7 @@ Array [ Object { "@timestamp": 1609459740000, "agent.name": "java", + "container.id": "instance-1", "event.outcome": "success", "processor.event": "transaction", "processor.name": "transaction", @@ -327,6 +346,7 @@ Array [ Object { "@timestamp": 1609459740050, "agent.name": "java", + "container.id": "instance-1", "event.outcome": "success", "parent.id": "0d5f44d48189546c", "processor.event": "span", @@ -345,6 +365,7 @@ Array [ Object { "@timestamp": 1609459800000, "agent.name": "java", + "container.id": "instance-1", "event.outcome": "success", "processor.event": "transaction", "processor.name": "transaction", @@ -361,6 +382,7 @@ Array [ Object { "@timestamp": 1609459800050, "agent.name": "java", + "container.id": "instance-1", "event.outcome": "success", "parent.id": "7483e0606e435c83", "processor.event": "span", @@ -379,6 +401,7 @@ Array [ Object { "@timestamp": 1609459860000, "agent.name": "java", + "container.id": "instance-1", "event.outcome": "success", "processor.event": "transaction", "processor.name": "transaction", @@ -395,6 +418,7 @@ Array [ Object { "@timestamp": 1609459860050, "agent.name": "java", + "container.id": "instance-1", "event.outcome": "success", "parent.id": "f142c4cbc7f3568e", "processor.event": "span", @@ -413,6 +437,7 @@ Array [ Object { "@timestamp": 1609459920000, "agent.name": "java", + "container.id": "instance-1", "event.outcome": "success", "processor.event": "transaction", "processor.name": "transaction", @@ -429,6 +454,7 @@ Array [ Object { "@timestamp": 1609459920050, "agent.name": "java", + "container.id": "instance-1", "event.outcome": "success", "parent.id": "2e3a47fa2d905519", "processor.event": "span", @@ -447,6 +473,7 @@ Array [ Object { "@timestamp": 1609459980000, "agent.name": "java", + "container.id": "instance-1", "event.outcome": "success", "processor.event": "transaction", "processor.name": "transaction", @@ -463,6 +490,7 @@ Array [ Object { "@timestamp": 1609459980050, "agent.name": "java", + "container.id": "instance-1", "event.outcome": "success", "parent.id": "de5eaa1e47dc56b1", "processor.event": "span", @@ -481,6 +509,7 @@ Array [ Object { "@timestamp": 1609460040000, "agent.name": "java", + "container.id": "instance-1", "event.outcome": "success", "processor.event": "transaction", "processor.name": "transaction", @@ -497,6 +526,7 @@ Array [ Object { "@timestamp": 1609460040050, "agent.name": "java", + "container.id": "instance-1", "event.outcome": "success", "parent.id": "af7eac7ae61e576a", "processor.event": "span", diff --git a/packages/kbn-config/src/config_service.test.ts b/packages/kbn-config/src/config_service.test.ts index e8fd7ab187596..4a8164b100626 100644 --- a/packages/kbn-config/src/config_service.test.ts +++ b/packages/kbn-config/src/config_service.test.ts @@ -382,6 +382,7 @@ test('logs deprecation if schema is not present and "enabled" is used', async () "foo", Array [ Object { + "configPath": "foo.enabled", "correctiveActions": Object { "manualSteps": Array [ "Remove \\"foo.enabled\\" from the Kibana config file, CLI flag, or environment variable (in Docker only) before upgrading to 8.0.0.", @@ -452,10 +453,12 @@ test('logs deprecation warning during validation', async () => { mockApplyDeprecations.mockImplementationOnce((config, deprecations, createAddDeprecation) => { const addDeprecation = createAddDeprecation!(''); addDeprecation({ + configPath: 'test1', message: 'some deprecation message', correctiveActions: { manualSteps: ['do X'] }, }); addDeprecation({ + configPath: 'test2', message: 'another deprecation message', correctiveActions: { manualSteps: ['do Y'] }, }); @@ -521,11 +524,13 @@ test('does not log warnings for silent deprecations during validation', async () .mockImplementationOnce((config, deprecations, createAddDeprecation) => { const addDeprecation = createAddDeprecation!(''); addDeprecation({ + configPath: 'test1', message: 'some deprecation message', correctiveActions: { manualSteps: ['do X'] }, silent: true, }); addDeprecation({ + configPath: 'test2', message: 'another deprecation message', correctiveActions: { manualSteps: ['do Y'] }, }); @@ -534,6 +539,7 @@ test('does not log warnings for silent deprecations during validation', async () .mockImplementationOnce((config, deprecations, createAddDeprecation) => { const addDeprecation = createAddDeprecation!(''); addDeprecation({ + configPath: 'silent', message: 'I am silent', silent: true, correctiveActions: { manualSteps: ['do Z'] }, @@ -617,6 +623,7 @@ describe('getHandledDeprecatedConfigs', () => { deprecations.forEach((deprecation) => { const addDeprecation = createAddDeprecation!(deprecation.path); addDeprecation({ + configPath: 'test1', message: `some deprecation message`, documentationUrl: 'some-url', correctiveActions: { manualSteps: ['do X'] }, @@ -633,6 +640,7 @@ describe('getHandledDeprecatedConfigs', () => { "base", Array [ Object { + "configPath": "test1", "correctiveActions": Object { "manualSteps": Array [ "do X", diff --git a/packages/kbn-config/src/config_service.ts b/packages/kbn-config/src/config_service.ts index d99d4bd410743..f087b3fff8612 100644 --- a/packages/kbn-config/src/config_service.ts +++ b/packages/kbn-config/src/config_service.ts @@ -184,6 +184,7 @@ export class ConfigService { if (validatedConfig?.enabled === undefined && isEnabled !== undefined) { const deprecationPath = pathToString(enabledPath); const deprecatedConfigDetails: DeprecatedConfigDetails = { + configPath: deprecationPath, title: `Setting "${deprecationPath}" is deprecated`, message: `Configuring "${deprecationPath}" is deprecated and will be removed in 8.0.0.`, correctiveActions: { diff --git a/packages/kbn-config/src/deprecation/deprecation_factory.test.ts b/packages/kbn-config/src/deprecation/deprecation_factory.test.ts index 415c8fb9f0610..d9fe90ff711ed 100644 --- a/packages/kbn-config/src/deprecation/deprecation_factory.test.ts +++ b/packages/kbn-config/src/deprecation/deprecation_factory.test.ts @@ -43,6 +43,7 @@ describe('DeprecationFactory', () => { Array [ Array [ Object { + "configPath": "myplugin.deprecated", "correctiveActions": Object { "manualSteps": Array [ "Remove \\"myplugin.deprecated\\" from the Kibana config file, CLI flag, or environment variable (in Docker only) before upgrading to 8.0.0.", @@ -79,6 +80,7 @@ describe('DeprecationFactory', () => { Array [ Array [ Object { + "configPath": "myplugin.section.deprecated", "correctiveActions": Object { "manualSteps": Array [ "Remove \\"myplugin.section.deprecated\\" from the Kibana config file, CLI flag, or environment variable (in Docker only) before upgrading to 8.0.0.", @@ -134,6 +136,7 @@ describe('DeprecationFactory', () => { Array [ Array [ Object { + "configPath": "myplugin.deprecated", "correctiveActions": Object { "manualSteps": Array [ "Remove \\"myplugin.deprecated\\" from the Kibana config file, CLI flag, or environment variable (in Docker only) before upgrading to 8.0.0.", @@ -197,6 +200,7 @@ describe('DeprecationFactory', () => { Array [ Array [ Object { + "configPath": "myplugin.deprecated", "correctiveActions": Object { "manualSteps": Array [ "Replace \\"myplugin.deprecated\\" with \\"myplugin.renamed\\" in the Kibana config file, CLI flag, or environment variable (in Docker only).", @@ -254,6 +258,7 @@ describe('DeprecationFactory', () => { Array [ Array [ Object { + "configPath": "myplugin.oldsection.deprecated", "correctiveActions": Object { "manualSteps": Array [ "Replace \\"myplugin.oldsection.deprecated\\" with \\"myplugin.newsection.renamed\\" in the Kibana config file, CLI flag, or environment variable (in Docker only).", @@ -286,6 +291,7 @@ describe('DeprecationFactory', () => { Array [ Array [ Object { + "configPath": "myplugin.deprecated", "correctiveActions": Object { "manualSteps": Array [ "Make sure \\"myplugin.renamed\\" contains the correct value in the config file, CLI flag, or environment variable (in Docker only).", @@ -331,6 +337,7 @@ describe('DeprecationFactory', () => { Array [ Array [ Object { + "configPath": "myplugin.deprecated", "correctiveActions": Object { "manualSteps": Array [ "Replace \\"myplugin.deprecated\\" with \\"myplugin.renamed\\" in the Kibana config file, CLI flag, or environment variable (in Docker only).", @@ -373,6 +380,7 @@ describe('DeprecationFactory', () => { Array [ Array [ Object { + "configPath": "oldplugin.deprecated", "correctiveActions": Object { "manualSteps": Array [ "Replace \\"oldplugin.deprecated\\" with \\"newplugin.renamed\\" in the Kibana config file, CLI flag, or environment variable (in Docker only).", @@ -427,6 +435,7 @@ describe('DeprecationFactory', () => { Array [ Array [ Object { + "configPath": "myplugin.deprecated", "correctiveActions": Object { "manualSteps": Array [ "Make sure \\"myplugin.renamed\\" contains the correct value in the config file, CLI flag, or environment variable (in Docker only).", @@ -461,6 +470,7 @@ describe('DeprecationFactory', () => { Array [ Array [ Object { + "configPath": "myplugin.deprecated", "correctiveActions": Object { "manualSteps": Array [ "Remove \\"myplugin.deprecated\\" from the Kibana config file, CLI flag, or environment variable (in Docker only).", @@ -494,6 +504,7 @@ describe('DeprecationFactory', () => { Array [ Array [ Object { + "configPath": "myplugin.section.deprecated", "correctiveActions": Object { "manualSteps": Array [ "Remove \\"myplugin.section.deprecated\\" from the Kibana config file, CLI flag, or environment variable (in Docker only).", @@ -546,6 +557,7 @@ describe('DeprecationFactory', () => { Array [ Array [ Object { + "configPath": "myplugin.deprecated", "correctiveActions": Object { "manualSteps": Array [ "Remove \\"myplugin.deprecated\\" from the Kibana config file, CLI flag, or environment variable (in Docker only).", diff --git a/packages/kbn-config/src/deprecation/deprecation_factory.ts b/packages/kbn-config/src/deprecation/deprecation_factory.ts index 1d61733715bd9..ea4db280e915b 100644 --- a/packages/kbn-config/src/deprecation/deprecation_factory.ts +++ b/packages/kbn-config/src/deprecation/deprecation_factory.ts @@ -37,6 +37,7 @@ const _deprecate = ( return; } addDeprecation({ + configPath: fullPath, title: getDeprecationTitle(fullPath), message: i18n.translate('kbnConfig.deprecations.deprecatedSettingMessage', { defaultMessage: 'Configuring "{fullPath}" is deprecated and will be removed in {removeBy}.', @@ -73,6 +74,7 @@ const _rename = ( const newValue = get(config, fullNewPath); if (newValue === undefined) { addDeprecation({ + configPath: fullOldPath, title: getDeprecationTitle(fullOldPath), message: i18n.translate('kbnConfig.deprecations.replacedSettingMessage', { defaultMessage: `Setting "{fullOldPath}" has been replaced by "{fullNewPath}"`, @@ -95,6 +97,7 @@ const _rename = ( }; } else { addDeprecation({ + configPath: fullOldPath, title: getDeprecationTitle(fullOldPath), message: i18n.translate('kbnConfig.deprecations.conflictSettingMessage', { defaultMessage: @@ -135,6 +138,7 @@ const _unused = ( return; } addDeprecation({ + configPath: fullPath, title: getDeprecationTitle(fullPath), message: i18n.translate('kbnConfig.deprecations.unusedSettingMessage', { defaultMessage: 'You no longer need to configure "{fullPath}".', diff --git a/packages/kbn-config/src/deprecation/types.ts b/packages/kbn-config/src/deprecation/types.ts index 12b561aa2b1b9..f5bb240f5cc43 100644 --- a/packages/kbn-config/src/deprecation/types.ts +++ b/packages/kbn-config/src/deprecation/types.ts @@ -20,6 +20,8 @@ export type AddConfigDeprecation = (details: DeprecatedConfigDetails) => void; * @public */ export interface DeprecatedConfigDetails { + /** The path of the deprecated config setting */ + configPath: string; /** The title to be displayed for the deprecation. */ title?: string; /** The message to be displayed for the deprecation. */ @@ -30,7 +32,7 @@ export interface DeprecatedConfigDetails { * - critical: needs to be addressed before upgrade. */ level?: 'warning' | 'critical'; - /** (optional) set false to prevent the config service from logging the deprecation message. */ + /** (optional) set to `true` to prevent the config service from logging the deprecation message. */ silent?: boolean; /** (optional) link to the documentation for more details on the deprecation. */ documentationUrl?: string; diff --git a/packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_config.ts b/packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_config.ts index 9af52ae8d2df0..f73b9c830a2ab 100644 --- a/packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_config.ts +++ b/packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_config.ts @@ -8,8 +8,18 @@ import type { ToolingLog } from '../tooling_log'; +/** + * Information about how CiStatsReporter should talk to the ci-stats service. Normally + * it is read from a JSON environment variable using the `parseConfig()` function + * exported by this module. + */ export interface Config { + /** ApiToken necessary for writing build data to ci-stats service */ apiToken: string; + /** + * uuid which should be obtained by first creating a build with the + * ci-stats service and then passing it to all subsequent steps + */ buildId: string; } diff --git a/packages/kbn-dev-utils/src/ci_stats_reporter/index.ts b/packages/kbn-dev-utils/src/ci_stats_reporter/index.ts index 9cb05608526eb..318a2921517f1 100644 --- a/packages/kbn-dev-utils/src/ci_stats_reporter/index.ts +++ b/packages/kbn-dev-utils/src/ci_stats_reporter/index.ts @@ -7,5 +7,6 @@ */ export * from './ci_stats_reporter'; +export type { Config } from './ci_stats_config'; export * from './ship_ci_stats_cli'; export { getTimeReporter } from './report_time'; diff --git a/packages/kbn-dev-utils/src/proc_runner/proc_runner.ts b/packages/kbn-dev-utils/src/proc_runner/proc_runner.ts index 35c910c911105..8ef32411621f8 100644 --- a/packages/kbn-dev-utils/src/proc_runner/proc_runner.ts +++ b/packages/kbn-dev-utils/src/proc_runner/proc_runner.ts @@ -37,6 +37,8 @@ export class ProcRunner { private signalUnsubscribe: () => void; constructor(private log: ToolingLog) { + this.log = log.withType('ProcRunner'); + this.signalUnsubscribe = exitHook(() => { this.teardown().catch((error) => { log.error(`ProcRunner teardown error: ${error.stack}`); diff --git a/packages/kbn-dev-utils/src/run/cleanup.ts b/packages/kbn-dev-utils/src/run/cleanup.ts index 26a6f5c632c46..ba0b762a562ad 100644 --- a/packages/kbn-dev-utils/src/run/cleanup.ts +++ b/packages/kbn-dev-utils/src/run/cleanup.ts @@ -13,6 +13,10 @@ import exitHook from 'exit-hook'; import { ToolingLog } from '../tooling_log'; import { isFailError } from './fail'; +/** + * A function which will be called when the CLI is torn-down which should + * quickly cleanup whatever it needs. + */ export type CleanupTask = () => void; export class Cleanup { diff --git a/packages/kbn-dev-utils/src/run/index.ts b/packages/kbn-dev-utils/src/run/index.ts index f3c364c774d30..505ef4ee264d6 100644 --- a/packages/kbn-dev-utils/src/run/index.ts +++ b/packages/kbn-dev-utils/src/run/index.ts @@ -10,3 +10,4 @@ export * from './run'; export * from './run_with_commands'; export * from './flags'; export * from './fail'; +export type { CleanupTask } from './cleanup'; diff --git a/packages/kbn-dev-utils/src/tooling_log/__snapshots__/tooling_log.test.ts.snap b/packages/kbn-dev-utils/src/tooling_log/__snapshots__/tooling_log.test.ts.snap index 059e3d49c3688..7742c2bb681d0 100644 --- a/packages/kbn-dev-utils/src/tooling_log/__snapshots__/tooling_log.test.ts.snap +++ b/packages/kbn-dev-utils/src/tooling_log/__snapshots__/tooling_log.test.ts.snap @@ -10,6 +10,7 @@ Array [ "baz", ], "indent": 0, + "source": undefined, "type": "debug", }, ], @@ -24,6 +25,7 @@ Array [ [Error: error message], ], "indent": 0, + "source": undefined, "type": "error", }, ], @@ -33,6 +35,7 @@ Array [ "string message", ], "indent": 0, + "source": undefined, "type": "error", }, ], @@ -50,6 +53,7 @@ Array [ "foo", ], "indent": 0, + "source": undefined, "type": "debug", }, Object { @@ -57,6 +61,7 @@ Array [ "bar", ], "indent": 0, + "source": undefined, "type": "info", }, Object { @@ -64,6 +69,7 @@ Array [ "baz", ], "indent": 0, + "source": undefined, "type": "verbose", }, ] @@ -76,6 +82,7 @@ Array [ "foo", ], "indent": 0, + "source": undefined, "type": "debug", }, Object { @@ -83,6 +90,7 @@ Array [ "bar", ], "indent": 0, + "source": undefined, "type": "info", }, Object { @@ -90,6 +98,7 @@ Array [ "baz", ], "indent": 0, + "source": undefined, "type": "verbose", }, ] @@ -103,6 +112,7 @@ Array [ "foo", ], "indent": 1, + "source": undefined, "type": "debug", }, ], @@ -112,6 +122,7 @@ Array [ "bar", ], "indent": 3, + "source": undefined, "type": "debug", }, ], @@ -121,6 +132,7 @@ Array [ "baz", ], "indent": 6, + "source": undefined, "type": "debug", }, ], @@ -130,6 +142,7 @@ Array [ "box", ], "indent": 4, + "source": undefined, "type": "debug", }, ], @@ -139,6 +152,7 @@ Array [ "foo", ], "indent": 0, + "source": undefined, "type": "debug", }, ], @@ -155,6 +169,7 @@ Array [ "baz", ], "indent": 0, + "source": undefined, "type": "info", }, ], @@ -171,6 +186,7 @@ Array [ "baz", ], "indent": 0, + "source": undefined, "type": "success", }, ], @@ -187,6 +203,7 @@ Array [ "baz", ], "indent": 0, + "source": undefined, "type": "verbose", }, ], @@ -203,6 +220,7 @@ Array [ "baz", ], "indent": 0, + "source": undefined, "type": "warning", }, ], @@ -219,6 +237,7 @@ Array [ "baz", ], "indent": 0, + "source": undefined, "type": "write", }, ], diff --git a/packages/kbn-dev-utils/src/tooling_log/index.ts b/packages/kbn-dev-utils/src/tooling_log/index.ts index 65dcd3054ef93..4da54ee9bfeae 100644 --- a/packages/kbn-dev-utils/src/tooling_log/index.ts +++ b/packages/kbn-dev-utils/src/tooling_log/index.ts @@ -7,6 +7,9 @@ */ export { ToolingLog } from './tooling_log'; +export type { ToolingLogOptions } from './tooling_log'; export { ToolingLogTextWriter, ToolingLogTextWriterConfig } from './tooling_log_text_writer'; export { pickLevelFromFlags, parseLogLevel, LogLevel, ParsedLogLevel } from './log_levels'; export { ToolingLogCollectingWriter } from './tooling_log_collecting_writer'; +export type { Writer } from './writer'; +export type { Message } from './message'; diff --git a/packages/kbn-dev-utils/src/tooling_log/message.ts b/packages/kbn-dev-utils/src/tooling_log/message.ts index ebd3a255a73a4..082c0e65d48b2 100644 --- a/packages/kbn-dev-utils/src/tooling_log/message.ts +++ b/packages/kbn-dev-utils/src/tooling_log/message.ts @@ -8,8 +8,16 @@ export type MessageTypes = 'verbose' | 'debug' | 'info' | 'success' | 'warning' | 'error' | 'write'; +/** + * The object shape passed to ToolingLog writers each time the log is used. + */ export interface Message { + /** level/type of message */ type: MessageTypes; + /** indentation intended when message written to a text log */ indent: number; + /** type of logger this message came from */ + source?: string; + /** args passed to the logging method */ args: any[]; } diff --git a/packages/kbn-dev-utils/src/tooling_log/tooling_log.test.ts b/packages/kbn-dev-utils/src/tooling_log/tooling_log.test.ts index ec63a9fb7e6f2..506f89786917f 100644 --- a/packages/kbn-dev-utils/src/tooling_log/tooling_log.test.ts +++ b/packages/kbn-dev-utils/src/tooling_log/tooling_log.test.ts @@ -155,3 +155,40 @@ describe('#getWritten$()', () => { await testWrittenMsgs([{ write: jest.fn(() => false) }, { write: jest.fn(() => false) }]); }); }); + +describe('#withType()', () => { + it('creates a child logger with a unique type that respects all other settings', () => { + const writerA = new ToolingLogCollectingWriter(); + const writerB = new ToolingLogCollectingWriter(); + const log = new ToolingLog(); + log.setWriters([writerA]); + + const fork = log.withType('someType'); + log.info('hello'); + fork.info('world'); + fork.indent(2); + log.debug('indented'); + fork.indent(-2); + log.debug('not-indented'); + + log.setWriters([writerB]); + fork.info('to new writer'); + fork.indent(5); + log.info('also to new writer'); + + expect(writerA.messages).toMatchInlineSnapshot(` + Array [ + " info hello", + " info source[someType] world", + " │ debg indented", + " debg not-indented", + ] + `); + expect(writerB.messages).toMatchInlineSnapshot(` + Array [ + " info source[someType] to new writer", + " │ info also to new writer", + ] + `); + }); +}); diff --git a/packages/kbn-dev-utils/src/tooling_log/tooling_log.ts b/packages/kbn-dev-utils/src/tooling_log/tooling_log.ts index e9fd15afefe4e..84e9159dfcd41 100644 --- a/packages/kbn-dev-utils/src/tooling_log/tooling_log.ts +++ b/packages/kbn-dev-utils/src/tooling_log/tooling_log.ts @@ -12,21 +12,45 @@ import { ToolingLogTextWriter, ToolingLogTextWriterConfig } from './tooling_log_ import { Writer } from './writer'; import { Message, MessageTypes } from './message'; +export interface ToolingLogOptions { + /** + * type name for this logger, will be assigned to the "source" + * properties of messages produced by this logger + */ + type?: string; + /** + * parent ToolingLog. When a ToolingLog has a parent they will both + * share indent and writers state. Changing the indent width or + * writers on either log will update the other too. + */ + parent?: ToolingLog; +} + export class ToolingLog { - private indentWidth = 0; - private writers: Writer[]; + private indentWidth$: Rx.BehaviorSubject; + private writers$: Rx.BehaviorSubject; private readonly written$: Rx.Subject; + private readonly type: string | undefined; + + constructor(writerConfig?: ToolingLogTextWriterConfig, options?: ToolingLogOptions) { + this.indentWidth$ = options?.parent ? options.parent.indentWidth$ : new Rx.BehaviorSubject(0); - constructor(writerConfig?: ToolingLogTextWriterConfig) { - this.writers = writerConfig ? [new ToolingLogTextWriter(writerConfig)] : []; - this.written$ = new Rx.Subject(); + this.writers$ = options?.parent + ? options.parent.writers$ + : new Rx.BehaviorSubject([]); + if (!options?.parent && writerConfig) { + this.writers$.next([new ToolingLogTextWriter(writerConfig)]); + } + + this.written$ = options?.parent ? options.parent.written$ : new Rx.Subject(); + this.type = options?.type; } /** * Get the current indentation level of the ToolingLog */ public getIndent() { - return this.indentWidth; + return this.indentWidth$.getValue(); } /** @@ -39,8 +63,8 @@ export class ToolingLog { * @param block a function to run and reset any indentation changes after */ public indent(delta = 0, block?: () => Promise) { - const originalWidth = this.indentWidth; - this.indentWidth = Math.max(this.indentWidth + delta, 0); + const originalWidth = this.indentWidth$.getValue(); + this.indentWidth$.next(Math.max(originalWidth + delta, 0)); if (!block) { return; } @@ -49,7 +73,7 @@ export class ToolingLog { try { return await block(); } finally { - this.indentWidth = originalWidth; + this.indentWidth$.next(originalWidth); } })(); } @@ -83,26 +107,40 @@ export class ToolingLog { } public getWriters() { - return this.writers.slice(0); + return [...this.writers$.getValue()]; } public setWriters(writers: Writer[]) { - this.writers = [...writers]; + this.writers$.next([...writers]); } public getWritten$() { return this.written$.asObservable(); } + /** + * Create a new ToolingLog which sets a different "type", allowing messages to be filtered out by "source" + * @param type A string that will be passed along with messages from this logger which can be used to filter messages with `ignoreSources` + */ + public withType(type: string) { + return new ToolingLog(undefined, { + type, + parent: this, + }); + } + private sendToWriters(type: MessageTypes, args: any[]) { - const msg = { + const indent = this.indentWidth$.getValue(); + const writers = this.writers$.getValue(); + const msg: Message = { type, - indent: this.indentWidth, + indent, + source: this.type, args, }; let written = false; - for (const writer of this.writers) { + for (const writer of writers) { if (writer.write(msg)) { written = true; } diff --git a/packages/kbn-dev-utils/src/tooling_log/tooling_log_collecting_writer.ts b/packages/kbn-dev-utils/src/tooling_log/tooling_log_collecting_writer.ts index cc399e40d2cb4..6f73563f4a2c5 100644 --- a/packages/kbn-dev-utils/src/tooling_log/tooling_log_collecting_writer.ts +++ b/packages/kbn-dev-utils/src/tooling_log/tooling_log_collecting_writer.ts @@ -8,6 +8,7 @@ import { ToolingLogTextWriter } from './tooling_log_text_writer'; import { LogLevel } from './log_levels'; +import { Message } from './message'; export class ToolingLogCollectingWriter extends ToolingLogTextWriter { messages: string[] = []; @@ -23,4 +24,18 @@ export class ToolingLogCollectingWriter extends ToolingLogTextWriter { }, }); } + + /** + * Called by ToolingLog, extends messages with the source if message includes one. + */ + write(msg: Message) { + if (msg.source) { + return super.write({ + ...msg, + args: [`source[${msg.source}]`, ...msg.args], + }); + } + + return super.write(msg); + } } diff --git a/packages/kbn-dev-utils/src/tooling_log/tooling_log_text_writer.ts b/packages/kbn-dev-utils/src/tooling_log/tooling_log_text_writer.ts index 2b1806eb4b9a2..660dae3fa1f55 100644 --- a/packages/kbn-dev-utils/src/tooling_log/tooling_log_text_writer.ts +++ b/packages/kbn-dev-utils/src/tooling_log/tooling_log_text_writer.ts @@ -28,7 +28,20 @@ const MSG_PREFIXES = { const has = (obj: T, key: any): key is keyof T => obj.hasOwnProperty(key); export interface ToolingLogTextWriterConfig { + /** + * Log level, messages below this level will be ignored + */ level: LogLevel; + /** + * List of message sources/ToolingLog types which will be ignored. Create + * a logger with `ToolingLog#withType()` to create messages with a specific + * source. Ignored messages will be dropped without writing. + */ + ignoreSources?: string[]; + /** + * Target which will receive formatted message lines, a common value for `writeTo` + * is process.stdout + */ writeTo: { write(s: string): void; }; @@ -59,10 +72,12 @@ export class ToolingLogTextWriter implements Writer { public readonly writeTo: { write(msg: string): void; }; + private readonly ignoreSources?: string[]; constructor(config: ToolingLogTextWriterConfig) { this.level = parseLogLevel(config.level); this.writeTo = config.writeTo; + this.ignoreSources = config.ignoreSources; if (!this.writeTo || typeof this.writeTo.write !== 'function') { throw new Error( @@ -76,6 +91,10 @@ export class ToolingLogTextWriter implements Writer { return false; } + if (this.ignoreSources && msg.source && this.ignoreSources.includes(msg.source)) { + return false; + } + const prefix = has(MSG_PREFIXES, msg.type) ? MSG_PREFIXES[msg.type] : ''; ToolingLogTextWriter.write(this.writeTo, prefix, msg); return true; diff --git a/packages/kbn-dev-utils/src/tooling_log/writer.ts b/packages/kbn-dev-utils/src/tooling_log/writer.ts index fd56f4fe3d3a6..26fec6a780694 100644 --- a/packages/kbn-dev-utils/src/tooling_log/writer.ts +++ b/packages/kbn-dev-utils/src/tooling_log/writer.ts @@ -8,6 +8,15 @@ import { Message } from './message'; +/** + * An object which received ToolingLog `Messages` and sends them to + * some interface for collecting logs like stdio, or a file + */ export interface Writer { + /** + * Called with every log message, should return true if the message + * was written and false if it was ignored. + * @param msg The log message to write + */ write(msg: Message): boolean; } diff --git a/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_a.foo.json b/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_a.foo.json deleted file mode 100644 index c7b43d9436cb9..0000000000000 --- a/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_a.foo.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "id": "pluginA.foo", - "client": { - "classes": [], - "functions": [ - { - "parentPluginId": "pluginA", - "id": "def-public.doTheFooFnThing", - "type": "Function", - "tags": [], - "label": "doTheFooFnThing", - "description": [], - "signature": [ - "() => void" - ], - "path": "packages/kbn-docs-utils/src/api_docs/tests/__fixtures__/src/plugin_a/public/foo/index.ts", - "deprecated": false, - "children": [], - "returnComment": [], - "initialIsOpen": false - } - ], - "interfaces": [], - "enums": [], - "misc": [ - { - "parentPluginId": "pluginA", - "id": "def-public.FooType", - "type": "Type", - "tags": [], - "label": "FooType", - "description": [], - "signature": [ - "() => \"foo\"" - ], - "path": "packages/kbn-docs-utils/src/api_docs/tests/__fixtures__/src/plugin_a/public/foo/index.ts", - "deprecated": false, - "returnComment": [], - "children": [], - "initialIsOpen": false - } - ], - "objects": [] - }, - "server": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], - "misc": [], - "objects": [] - }, - "common": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], - "misc": [ - { - "parentPluginId": "pluginA", - "id": "def-common.commonFoo", - "type": "string", - "tags": [], - "label": "commonFoo", - "description": [], - "signature": [ - "\"COMMON VAR!\"" - ], - "path": "packages/kbn-docs-utils/src/api_docs/tests/__fixtures__/src/plugin_a/common/foo/index.ts", - "deprecated": false, - "initialIsOpen": false - } - ], - "objects": [] - } -} \ No newline at end of file diff --git a/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_a.foo.mdx b/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_a.foo.mdx deleted file mode 100644 index 1fd371b585ce7..0000000000000 --- a/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_a.foo.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -id: kibPluginAFooPluginApi -slug: /kibana-dev-docs/pluginA.fooPluginApi -title: pluginA.foo -image: https://source.unsplash.com/400x175/?github -summary: API docs for the pluginA.foo plugin -date: 2020-11-16 -tags: ['contributor', 'dev', 'apidocs', 'kibana', 'pluginA.foo'] -warning: 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. ---- -import pluginA.fooObj from './plugin_a.foo.json'; - - - -Contact Kibana Core for questions regarding this plugin. - -**Code health stats** - -| Public API count | Any count | Items lacking comments | Missing exports | -|-------------------|-----------|------------------------|-----------------| -| 3 | 0 | 0 | 0 | - -## Client - -### Functions - - -### Consts, variables and types - - -## Common - -### Consts, variables and types - - diff --git a/packages/kbn-es-query/src/es_query/build_es_query.test.ts b/packages/kbn-es-query/src/es_query/build_es_query.test.ts index aca40632960f8..8fd884f65fa0d 100644 --- a/packages/kbn-es-query/src/es_query/build_es_query.test.ts +++ b/packages/kbn-es-query/src/es_query/build_es_query.test.ts @@ -12,13 +12,14 @@ import { luceneStringToDsl } from './lucene_string_to_dsl'; import { decorateQuery } from './decorate_query'; import { MatchAllFilter, Query } from '../filters'; import { fields } from '../filters/stubs'; -import { IndexPatternBase } from './types'; +import { DataViewBase } from './types'; jest.mock('../kuery/grammar'); describe('build query', () => { - const indexPattern: IndexPatternBase = { + const indexPattern: DataViewBase = { fields, + title: 'dataView', }; describe('buildEsQuery', () => { diff --git a/packages/kbn-es-query/src/es_query/from_filters.test.ts b/packages/kbn-es-query/src/es_query/from_filters.test.ts index eacf775194bb8..67de9e4d88736 100644 --- a/packages/kbn-es-query/src/es_query/from_filters.test.ts +++ b/packages/kbn-es-query/src/es_query/from_filters.test.ts @@ -9,11 +9,12 @@ import { buildQueryFromFilters } from './from_filters'; import { ExistsFilter, Filter, MatchAllFilter } from '../filters'; import { fields } from '../filters/stubs'; -import { IndexPatternBase } from './types'; +import { DataViewBase } from './types'; describe('build query', () => { - const indexPattern: IndexPatternBase = { + const indexPattern: DataViewBase = { fields, + title: 'dataView', }; describe('buildQueryFromFilters', () => { diff --git a/packages/kbn-es-query/src/es_query/from_kuery.test.ts b/packages/kbn-es-query/src/es_query/from_kuery.test.ts index 2458013854393..443b44dff5819 100644 --- a/packages/kbn-es-query/src/es_query/from_kuery.test.ts +++ b/packages/kbn-es-query/src/es_query/from_kuery.test.ts @@ -9,14 +9,15 @@ import { buildQueryFromKuery } from './from_kuery'; import { fromKueryExpression, toElasticsearchQuery } from '../kuery'; import { fields } from '../filters/stubs'; -import { IndexPatternBase } from './types'; +import { DataViewBase } from './types'; import { Query } from '..'; jest.mock('../kuery/grammar'); describe('build query', () => { - const indexPattern: IndexPatternBase = { + const indexPattern: DataViewBase = { fields, + title: 'dataView', }; describe('buildQueryFromKuery', () => { diff --git a/packages/kbn-es-query/src/es_query/handle_nested_filter.test.ts b/packages/kbn-es-query/src/es_query/handle_nested_filter.test.ts index 333f4bad54a46..2b9fbbe5ece04 100644 --- a/packages/kbn-es-query/src/es_query/handle_nested_filter.test.ts +++ b/packages/kbn-es-query/src/es_query/handle_nested_filter.test.ts @@ -9,12 +9,13 @@ import { handleNestedFilter } from './handle_nested_filter'; import { fields } from '../filters/stubs'; import { buildPhraseFilter, buildQueryFilter } from '../filters'; -import { IndexPatternBase } from './types'; +import { DataViewBase } from './types'; describe('handleNestedFilter', function () { - const indexPattern: IndexPatternBase = { + const indexPattern: DataViewBase = { id: 'logstash-*', fields, + title: 'dataView', }; it("should return the filter's query wrapped in nested query if the target field is nested", () => { diff --git a/packages/kbn-es-query/src/es_query/types.ts b/packages/kbn-es-query/src/es_query/types.ts index 3a5893d20ef25..75ea320b3431f 100644 --- a/packages/kbn-es-query/src/es_query/types.ts +++ b/packages/kbn-es-query/src/es_query/types.ts @@ -65,7 +65,7 @@ export type IndexPatternFieldBase = DataViewFieldBase; export interface DataViewBase { fields: DataViewFieldBase[]; id?: string; - title?: string; + title: string; } /** diff --git a/packages/kbn-es-query/src/filters/build_filters/build_filter.test.ts b/packages/kbn-es-query/src/filters/build_filters/build_filter.test.ts index 762af90063070..761d0341f1eae 100644 --- a/packages/kbn-es-query/src/filters/build_filters/build_filter.test.ts +++ b/packages/kbn-es-query/src/filters/build_filters/build_filter.test.ts @@ -7,13 +7,14 @@ */ import { buildFilter, FilterStateStore, FILTERS } from '.'; -import { IndexPatternBase } from '../..'; +import { DataViewBase } from '../..'; import { fields as stubFields } from '../stubs'; describe('buildFilter', () => { - const stubIndexPattern: IndexPatternBase = { + const stubIndexPattern: DataViewBase = { id: 'logstash-*', fields: stubFields, + title: 'dataView', }; it('should build phrase filters', () => { diff --git a/packages/kbn-es-query/src/filters/build_filters/exists_filter.test.ts b/packages/kbn-es-query/src/filters/build_filters/exists_filter.test.ts index 35a2a5c3d6057..81aab2c300243 100644 --- a/packages/kbn-es-query/src/filters/build_filters/exists_filter.test.ts +++ b/packages/kbn-es-query/src/filters/build_filters/exists_filter.test.ts @@ -6,13 +6,14 @@ * Side Public License, v 1. */ -import { IndexPatternBase } from '../../es_query'; +import { DataViewBase } from '../../es_query'; import { buildExistsFilter, getExistsFilterField } from './exists_filter'; import { fields } from '../stubs/fields.mocks'; describe('exists filter', function () { - const indexPattern: IndexPatternBase = { + const indexPattern: DataViewBase = { fields, + title: 'dataView', }; describe('getExistsFilterField', function () { diff --git a/packages/kbn-es-query/src/filters/build_filters/get_filter_field.test.ts b/packages/kbn-es-query/src/filters/build_filters/get_filter_field.test.ts index ca67a439757de..06803716aac2f 100644 --- a/packages/kbn-es-query/src/filters/build_filters/get_filter_field.test.ts +++ b/packages/kbn-es-query/src/filters/build_filters/get_filter_field.test.ts @@ -9,13 +9,14 @@ import { buildPhraseFilter } from './phrase_filter'; import { buildQueryFilter } from './query_string_filter'; import { getFilterField } from './get_filter_field'; -import { IndexPatternBase } from '../../es_query'; +import { DataViewBase } from '../../es_query'; import { fields } from '../stubs/fields.mocks'; describe('getFilterField', function () { - const indexPattern: IndexPatternBase = { + const indexPattern: DataViewBase = { id: 'logstash-*', fields, + title: 'dataView', }; it('should return the field name from known filter types that target a specific field', () => { diff --git a/packages/kbn-es-query/src/filters/build_filters/phrase_filter.test.ts b/packages/kbn-es-query/src/filters/build_filters/phrase_filter.test.ts index f23dfde12d977..13f18ad0cc7ea 100644 --- a/packages/kbn-es-query/src/filters/build_filters/phrase_filter.test.ts +++ b/packages/kbn-es-query/src/filters/build_filters/phrase_filter.test.ts @@ -13,16 +13,17 @@ import { PhraseFilter, } from './phrase_filter'; import { fields, getField } from '../stubs'; -import { IndexPatternBase } from '../../es_query'; +import { DataViewBase } from '../../es_query'; import { estypes } from '@elastic/elasticsearch'; describe('Phrase filter builder', () => { - let indexPattern: IndexPatternBase; + let indexPattern: DataViewBase; beforeEach(() => { indexPattern = { id: 'id', fields, + title: 'dataView', }; }); @@ -151,8 +152,9 @@ describe('buildInlineScriptForPhraseFilter', () => { }); describe('getPhraseFilterField', function () { - const indexPattern: IndexPatternBase = { + const indexPattern: DataViewBase = { fields, + title: 'dataView', }; it('should return the name of the field a phrase query is targeting', () => { diff --git a/packages/kbn-es-query/src/filters/build_filters/phrases_filter.test.ts b/packages/kbn-es-query/src/filters/build_filters/phrases_filter.test.ts index c3e7fd37e1ff6..1a125e98f9645 100644 --- a/packages/kbn-es-query/src/filters/build_filters/phrases_filter.test.ts +++ b/packages/kbn-es-query/src/filters/build_filters/phrases_filter.test.ts @@ -6,13 +6,14 @@ * Side Public License, v 1. */ -import { IndexPatternBase } from '../../es_query'; +import { DataViewBase } from '../../es_query'; import { buildPhrasesFilter, getPhrasesFilterField } from './phrases_filter'; import { fields } from '../stubs'; describe('phrases filter', function () { - const indexPattern: IndexPatternBase = { + const indexPattern: DataViewBase = { fields, + title: 'dataView', }; describe('getPhrasesFilterField', function () { diff --git a/packages/kbn-es-query/src/kuery/ast/ast.test.ts b/packages/kbn-es-query/src/kuery/ast/ast.test.ts index edb9150ea00d5..0e4366d6e21d1 100644 --- a/packages/kbn-es-query/src/kuery/ast/ast.test.ts +++ b/packages/kbn-es-query/src/kuery/ast/ast.test.ts @@ -8,18 +8,19 @@ import { fromKueryExpression, fromLiteralExpression, toElasticsearchQuery } from './ast'; import { nodeTypes } from '../node_types'; -import { IndexPatternBase } from '../..'; +import { DataViewBase } from '../..'; import { KueryNode } from '../types'; import { fields } from '../../filters/stubs'; jest.mock('../grammar'); describe('kuery AST API', () => { - let indexPattern: IndexPatternBase; + let indexPattern: DataViewBase; beforeEach(() => { indexPattern = { fields, + title: 'dataView', }; }); diff --git a/packages/kbn-es-query/src/kuery/functions/and.test.ts b/packages/kbn-es-query/src/kuery/functions/and.test.ts index 239342bdc0a1c..07e431791b37a 100644 --- a/packages/kbn-es-query/src/kuery/functions/and.test.ts +++ b/packages/kbn-es-query/src/kuery/functions/and.test.ts @@ -10,7 +10,7 @@ import { nodeTypes } from '../node_types'; import { fields } from '../../filters/stubs'; import * as ast from '../ast'; import * as and from './and'; -import { IndexPatternBase } from '../../es_query'; +import { DataViewBase } from '../../es_query'; jest.mock('../grammar'); @@ -19,11 +19,12 @@ const childNode2 = nodeTypes.function.buildNode('is', 'extension', 'jpg'); describe('kuery functions', () => { describe('and', () => { - let indexPattern: IndexPatternBase; + let indexPattern: DataViewBase; beforeEach(() => { indexPattern = { fields, + title: 'dataView', }; }); diff --git a/packages/kbn-es-query/src/kuery/functions/exists.test.ts b/packages/kbn-es-query/src/kuery/functions/exists.test.ts index 0941e478e816b..ed368d6af2bfd 100644 --- a/packages/kbn-es-query/src/kuery/functions/exists.test.ts +++ b/packages/kbn-es-query/src/kuery/functions/exists.test.ts @@ -8,7 +8,7 @@ import { nodeTypes } from '../node_types'; import { fields } from '../../filters/stubs'; -import { IndexPatternBase } from '../..'; +import { DataViewBase } from '../..'; jest.mock('../grammar'); @@ -17,11 +17,12 @@ import * as exists from './exists'; describe('kuery functions', () => { describe('exists', () => { - let indexPattern: IndexPatternBase; + let indexPattern: DataViewBase; beforeEach(() => { indexPattern = { fields, + title: 'dataView', }; }); diff --git a/packages/kbn-es-query/src/kuery/functions/geo_bounding_box.test.ts b/packages/kbn-es-query/src/kuery/functions/geo_bounding_box.test.ts index 45e6474b22986..9c4a33f50020f 100644 --- a/packages/kbn-es-query/src/kuery/functions/geo_bounding_box.test.ts +++ b/packages/kbn-es-query/src/kuery/functions/geo_bounding_box.test.ts @@ -9,7 +9,7 @@ import { get } from 'lodash'; import { nodeTypes } from '../node_types'; import { fields } from '../../filters/stubs'; -import { IndexPatternBase } from '../..'; +import { DataViewBase } from '../..'; import * as geoBoundingBox from './geo_bounding_box'; import { JsonObject } from '@kbn/utility-types'; @@ -29,11 +29,12 @@ const params = { describe('kuery functions', () => { describe('geoBoundingBox', () => { - let indexPattern: IndexPatternBase; + let indexPattern: DataViewBase; beforeEach(() => { indexPattern = { fields, + title: 'dataView', }; }); diff --git a/packages/kbn-es-query/src/kuery/functions/geo_polygon.test.ts b/packages/kbn-es-query/src/kuery/functions/geo_polygon.test.ts index 2d1d6ed6cd6de..5a96f6f3cb03d 100644 --- a/packages/kbn-es-query/src/kuery/functions/geo_polygon.test.ts +++ b/packages/kbn-es-query/src/kuery/functions/geo_polygon.test.ts @@ -8,7 +8,7 @@ import { nodeTypes } from '../node_types'; import { fields } from '../../filters/stubs'; -import { IndexPatternBase } from '../..'; +import { DataViewBase } from '../..'; import * as geoPolygon from './geo_polygon'; @@ -31,11 +31,12 @@ const points = [ describe('kuery functions', () => { describe('geoPolygon', () => { - let indexPattern: IndexPatternBase; + let indexPattern: DataViewBase; beforeEach(() => { indexPattern = { fields, + title: 'dataView', }; }); diff --git a/packages/kbn-es-query/src/kuery/functions/is.test.ts b/packages/kbn-es-query/src/kuery/functions/is.test.ts index bc1bbb2508438..fbc6011331dbb 100644 --- a/packages/kbn-es-query/src/kuery/functions/is.test.ts +++ b/packages/kbn-es-query/src/kuery/functions/is.test.ts @@ -10,18 +10,19 @@ import { nodeTypes } from '../node_types'; import { fields } from '../../filters/stubs'; import * as is from './is'; -import { IndexPatternBase } from '../..'; +import { DataViewBase } from '../..'; import { estypes } from '@elastic/elasticsearch'; jest.mock('../grammar'); describe('kuery functions', () => { describe('is', () => { - let indexPattern: IndexPatternBase; + let indexPattern: DataViewBase; beforeEach(() => { indexPattern = { fields, + title: 'dataView', }; }); diff --git a/packages/kbn-es-query/src/kuery/functions/nested.test.ts b/packages/kbn-es-query/src/kuery/functions/nested.test.ts index 7b6b7b695db2d..da7bfd2dce2d8 100644 --- a/packages/kbn-es-query/src/kuery/functions/nested.test.ts +++ b/packages/kbn-es-query/src/kuery/functions/nested.test.ts @@ -8,7 +8,7 @@ import { nodeTypes } from '../node_types'; import { fields } from '../../filters/stubs'; -import { IndexPatternBase } from '../..'; +import { DataViewBase } from '../..'; import * as ast from '../ast'; @@ -20,11 +20,12 @@ const childNode = nodeTypes.function.buildNode('is', 'child', 'foo'); describe('kuery functions', () => { describe('nested', () => { - let indexPattern: IndexPatternBase; + let indexPattern: DataViewBase; beforeEach(() => { indexPattern = { fields, + title: 'dataView', }; }); diff --git a/packages/kbn-es-query/src/kuery/functions/not.test.ts b/packages/kbn-es-query/src/kuery/functions/not.test.ts index af1e8108b40f5..96af4bc693621 100644 --- a/packages/kbn-es-query/src/kuery/functions/not.test.ts +++ b/packages/kbn-es-query/src/kuery/functions/not.test.ts @@ -8,7 +8,7 @@ import { nodeTypes } from '../node_types'; import { fields } from '../../filters/stubs'; -import { IndexPatternBase } from '../..'; +import { DataViewBase } from '../..'; import * as ast from '../ast'; import * as not from './not'; @@ -19,11 +19,12 @@ const childNode = nodeTypes.function.buildNode('is', 'extension', 'jpg'); describe('kuery functions', () => { describe('not', () => { - let indexPattern: IndexPatternBase; + let indexPattern: DataViewBase; beforeEach(() => { indexPattern = { fields, + title: 'dataView', }; }); diff --git a/packages/kbn-es-query/src/kuery/functions/or.test.ts b/packages/kbn-es-query/src/kuery/functions/or.test.ts index eb7db62b22162..63fde9e802401 100644 --- a/packages/kbn-es-query/src/kuery/functions/or.test.ts +++ b/packages/kbn-es-query/src/kuery/functions/or.test.ts @@ -8,7 +8,7 @@ import { nodeTypes } from '../node_types'; import { fields } from '../../filters/stubs'; -import { IndexPatternBase } from '../..'; +import { DataViewBase } from '../..'; import * as ast from '../ast'; @@ -20,11 +20,12 @@ const childNode2 = nodeTypes.function.buildNode('is', 'extension', 'jpg'); describe('kuery functions', () => { describe('or', () => { - let indexPattern: IndexPatternBase; + let indexPattern: DataViewBase; beforeEach(() => { indexPattern = { fields, + title: 'dataView', }; }); diff --git a/packages/kbn-es-query/src/kuery/functions/range.test.ts b/packages/kbn-es-query/src/kuery/functions/range.test.ts index 42005a3fe702d..c541b26ce176f 100644 --- a/packages/kbn-es-query/src/kuery/functions/range.test.ts +++ b/packages/kbn-es-query/src/kuery/functions/range.test.ts @@ -9,7 +9,7 @@ import { get } from 'lodash'; import { nodeTypes } from '../node_types'; import { fields } from '../../filters/stubs'; -import { IndexPatternBase } from '../..'; +import { DataViewBase } from '../..'; import { RangeFilterParams } from '../../filters'; import * as range from './range'; @@ -18,11 +18,12 @@ jest.mock('../grammar'); describe('kuery functions', () => { describe('range', () => { - let indexPattern: IndexPatternBase; + let indexPattern: DataViewBase; beforeEach(() => { indexPattern = { fields, + title: 'dataView', }; }); diff --git a/packages/kbn-es-query/src/kuery/functions/utils/get_full_field_name_node.test.ts b/packages/kbn-es-query/src/kuery/functions/utils/get_full_field_name_node.test.ts index dccfc5d1c463a..046ffdb152e42 100644 --- a/packages/kbn-es-query/src/kuery/functions/utils/get_full_field_name_node.test.ts +++ b/packages/kbn-es-query/src/kuery/functions/utils/get_full_field_name_node.test.ts @@ -8,17 +8,18 @@ import { nodeTypes } from '../../node_types'; import { fields } from '../../../filters/stubs'; -import { IndexPatternBase } from '../../..'; +import { DataViewBase } from '../../..'; import { getFullFieldNameNode } from './get_full_field_name_node'; jest.mock('../../grammar'); describe('getFullFieldNameNode', function () { - let indexPattern: IndexPatternBase; + let indexPattern: DataViewBase; beforeEach(() => { indexPattern = { fields, + title: 'dataView', }; }); diff --git a/packages/kbn-es-query/src/kuery/node_types/function.test.ts b/packages/kbn-es-query/src/kuery/node_types/function.test.ts index 5df6ba1916046..754bf170c5062 100644 --- a/packages/kbn-es-query/src/kuery/node_types/function.test.ts +++ b/packages/kbn-es-query/src/kuery/node_types/function.test.ts @@ -10,18 +10,19 @@ import { nodeTypes } from './index'; import { buildNode, buildNodeWithArgumentNodes, toElasticsearchQuery } from './function'; import { toElasticsearchQuery as isFunctionToElasticsearchQuery } from '../functions/is'; -import { IndexPatternBase } from '../../es_query'; +import { DataViewBase } from '../../es_query'; import { fields } from '../../filters/stubs/fields.mocks'; jest.mock('../grammar'); describe('kuery node types', () => { describe('function', () => { - let indexPattern: IndexPatternBase; + let indexPattern: DataViewBase; beforeEach(() => { indexPattern = { fields, + title: 'dataView', }; }); diff --git a/packages/kbn-es/src/cluster.js b/packages/kbn-es/src/cluster.js index 0866b14f4ade8..dd9c17055fb18 100644 --- a/packages/kbn-es/src/cluster.js +++ b/packages/kbn-es/src/cluster.js @@ -36,7 +36,7 @@ const first = (stream, map) => exports.Cluster = class Cluster { constructor({ log = defaultLog, ssl = false } = {}) { - this._log = log; + this._log = log.withType('@kbn/es Cluster'); this._ssl = ssl; this._caCertPromise = ssl ? readFile(CA_CERT_PATH) : undefined; } diff --git a/packages/kbn-es/src/integration_tests/cluster.test.js b/packages/kbn-es/src/integration_tests/cluster.test.js index c196a89a6b090..0cdbac310bbb1 100644 --- a/packages/kbn-es/src/integration_tests/cluster.test.js +++ b/packages/kbn-es/src/integration_tests/cluster.test.js @@ -8,9 +8,11 @@ const { ToolingLog, + ToolingLogCollectingWriter, ES_P12_PATH, ES_P12_PASSWORD, createAnyInstanceSerializer, + createStripAnsiSerializer, } = require('@kbn/dev-utils'); const execa = require('execa'); const { Cluster } = require('../cluster'); @@ -18,6 +20,7 @@ const { installSource, installSnapshot, installArchive } = require('../install') const { extractConfigFiles } = require('../utils/extract_config_files'); expect.addSnapshotSerializer(createAnyInstanceSerializer(ToolingLog)); +expect.addSnapshotSerializer(createStripAnsiSerializer()); jest.mock('../install', () => ({ installSource: jest.fn(), @@ -31,6 +34,8 @@ jest.mock('../utils/extract_config_files', () => ({ })); const log = new ToolingLog(); +const logWriter = new ToolingLogCollectingWriter(); +log.setWriters([logWriter]); function sleep(ms) { return new Promise((resolve) => setTimeout(resolve, ms)); @@ -76,6 +81,8 @@ const initialEnv = { ...process.env }; beforeEach(() => { jest.resetAllMocks(); extractConfigFiles.mockImplementation((config) => config); + log.indent(-log.getIndent()); + logWriter.messages.length = 0; }); afterEach(() => { @@ -107,11 +114,21 @@ describe('#installSource()', () => { installSource.mockResolvedValue({}); const cluster = new Cluster({ log }); await cluster.installSource({ foo: 'bar' }); - expect(installSource).toHaveBeenCalledTimes(1); - expect(installSource).toHaveBeenCalledWith({ - log, - foo: 'bar', - }); + expect(installSource.mock.calls).toMatchInlineSnapshot(` + Array [ + Array [ + Object { + "foo": "bar", + "log": , + }, + ], + ] + `); + expect(logWriter.messages).toMatchInlineSnapshot(` + Array [ + " info source[@kbn/es Cluster] Installing from source", + ] + `); }); it('rejects if installSource() rejects', async () => { @@ -146,11 +163,21 @@ describe('#installSnapshot()', () => { installSnapshot.mockResolvedValue({}); const cluster = new Cluster({ log }); await cluster.installSnapshot({ foo: 'bar' }); - expect(installSnapshot).toHaveBeenCalledTimes(1); - expect(installSnapshot).toHaveBeenCalledWith({ - log, - foo: 'bar', - }); + expect(installSnapshot.mock.calls).toMatchInlineSnapshot(` + Array [ + Array [ + Object { + "foo": "bar", + "log": , + }, + ], + ] + `); + expect(logWriter.messages).toMatchInlineSnapshot(` + Array [ + " info source[@kbn/es Cluster] Installing from snapshot", + ] + `); }); it('rejects if installSnapshot() rejects', async () => { @@ -185,11 +212,22 @@ describe('#installArchive(path)', () => { installArchive.mockResolvedValue({}); const cluster = new Cluster({ log }); await cluster.installArchive('path', { foo: 'bar' }); - expect(installArchive).toHaveBeenCalledTimes(1); - expect(installArchive).toHaveBeenCalledWith('path', { - log, - foo: 'bar', - }); + expect(installArchive.mock.calls).toMatchInlineSnapshot(` + Array [ + Array [ + "path", + Object { + "foo": "bar", + "log": , + }, + ], + ] + `); + expect(logWriter.messages).toMatchInlineSnapshot(` + Array [ + " info source[@kbn/es Cluster] Installing from an archive", + ] + `); }); it('rejects if installArchive() rejects', async () => { diff --git a/packages/kbn-es/src/utils/build_snapshot.js b/packages/kbn-es/src/utils/build_snapshot.js index c60ef61e98538..ec26ba69e658b 100644 --- a/packages/kbn-es/src/utils/build_snapshot.js +++ b/packages/kbn-es/src/utils/build_snapshot.js @@ -26,6 +26,7 @@ const onceEvent = (emitter, event) => new Promise((resolve) => emitter.once(even * @returns {Object} containing archive and optional plugins * * Gradle tasks: + * $ ./gradlew tasks --all | grep 'distribution.*assemble\s' * :distribution:archives:darwin-tar:assemble * :distribution:archives:linux-tar:assemble * :distribution:archives:windows-zip:assemble diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index d62115c44b0c5..e5813f8f38139 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -2,8 +2,6 @@ pageLoadAssetSize: advancedSettings: 27596 alerting: 106936 apm: 64385 - apmOss: 18996 - bfetch: 51874 canvas: 1066647 charts: 95000 cloud: 21076 @@ -13,16 +11,11 @@ pageLoadAssetSize: dashboard: 374267 dashboardEnhanced: 65646 dashboardMode: 22716 - data: 830000 - dataEnhanced: 50420 devTools: 38781 discover: 99999 discoverEnhanced: 42730 - embeddable: 99999 - embeddableEnhanced: 41145 enterpriseSearch: 35741 features: 21723 - fieldFormats: 92628 globalSearch: 29696 globalSearchBar: 50403 globalSearchProviders: 25554 @@ -31,8 +24,6 @@ pageLoadAssetSize: home: 30182 indexLifecycleManagement: 107090 indexManagement: 140608 - indexPatternManagement: 28222 - indexPatternEditor: 40000 infra: 184320 fleet: 250000 ingestPipelines: 58003 @@ -40,8 +31,6 @@ pageLoadAssetSize: inspector: 148711 kibanaLegacy: 107711 kibanaOverview: 56279 - kibanaReact: 188705 - kibanaUtils: 198829 lens: 96624 licenseManagement: 41817 licensing: 29004 @@ -58,7 +47,6 @@ pageLoadAssetSize: painlessLab: 179892 regionMap: 66098 remoteClusters: 51327 - reporting: 183418 rollup: 97204 savedObjects: 108518 savedObjectsManagement: 101836 @@ -72,11 +60,8 @@ pageLoadAssetSize: tileMap: 65337 transform: 41151 triggersActionsUi: 100000 - uiActions: 97717 - uiActionsEnhanced: 48000 upgradeAssistant: 81241 uptime: 40825 - urlDrilldown: 70674 urlForwarding: 32579 usageCollection: 39762 visDefaultEditor: 50178 @@ -94,7 +79,6 @@ pageLoadAssetSize: runtimeFields: 41752 stackAlerts: 29684 presentationUtil: 94301 - indexPatternFieldEditor: 50000 osquery: 107090 fileUpload: 25664 dataVisualizer: 27530 @@ -119,4 +103,19 @@ pageLoadAssetSize: customIntegrations: 28810 expressionMetricVis: 23121 visTypeMetric: 23332 - dataViews: 42000 + bfetch: 22837 + kibanaUtils: 97808 + data: 491273 + dataViews: 42532 + fieldFormats: 65209 + kibanaReact: 84422 + uiActions: 35121 + dataEnhanced: 24980 + embeddable: 87309 + embeddableEnhanced: 22107 + uiActionsEnhanced: 38494 + urlDrilldown: 30063 + indexPatternEditor: 19123 + indexPatternFieldEditor: 34448 + indexPatternManagement: 19165 + reporting: 57003 diff --git a/packages/kbn-pm/dist/index.js b/packages/kbn-pm/dist/index.js index 595b619a7f2a4..721072d9e899b 100644 --- a/packages/kbn-pm/dist/index.js +++ b/packages/kbn-pm/dist/index.js @@ -625,12 +625,20 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && * Side Public License, v 1. */ class ToolingLog { - constructor(writerConfig) { - (0, _defineProperty2.default)(this, "indentWidth", 0); - (0, _defineProperty2.default)(this, "writers", void 0); + constructor(writerConfig, options) { + (0, _defineProperty2.default)(this, "indentWidth$", void 0); + (0, _defineProperty2.default)(this, "writers$", void 0); (0, _defineProperty2.default)(this, "written$", void 0); - this.writers = writerConfig ? [new _tooling_log_text_writer.ToolingLogTextWriter(writerConfig)] : []; - this.written$ = new Rx.Subject(); + (0, _defineProperty2.default)(this, "type", void 0); + this.indentWidth$ = options !== null && options !== void 0 && options.parent ? options.parent.indentWidth$ : new Rx.BehaviorSubject(0); + this.writers$ = options !== null && options !== void 0 && options.parent ? options.parent.writers$ : new Rx.BehaviorSubject([]); + + if (!(options !== null && options !== void 0 && options.parent) && writerConfig) { + this.writers$.next([new _tooling_log_text_writer.ToolingLogTextWriter(writerConfig)]); + } + + this.written$ = options !== null && options !== void 0 && options.parent ? options.parent.written$ : new Rx.Subject(); + this.type = options === null || options === void 0 ? void 0 : options.type; } /** * Get the current indentation level of the ToolingLog @@ -638,7 +646,7 @@ class ToolingLog { getIndent() { - return this.indentWidth; + return this.indentWidth$.getValue(); } /** * Indent the output of the ToolingLog by some character (4 is a good choice usually). @@ -652,8 +660,8 @@ class ToolingLog { indent(delta = 0, block) { - const originalWidth = this.indentWidth; - this.indentWidth = Math.max(this.indentWidth + delta, 0); + const originalWidth = this.indentWidth$.getValue(); + this.indentWidth$.next(Math.max(originalWidth + delta, 0)); if (!block) { return; @@ -663,7 +671,7 @@ class ToolingLog { try { return await block(); } finally { - this.indentWidth = originalWidth; + this.indentWidth$.next(originalWidth); } })(); } @@ -697,26 +705,41 @@ class ToolingLog { } getWriters() { - return this.writers.slice(0); + return [...this.writers$.getValue()]; } setWriters(writers) { - this.writers = [...writers]; + this.writers$.next([...writers]); } getWritten$() { return this.written$.asObservable(); } + /** + * Create a new ToolingLog which sets a different "type", allowing messages to be filtered out by "source" + * @param type A string that will be passed along with messages from this logger which can be used to filter messages with `ignoreSources` + */ + + + withType(type) { + return new ToolingLog(undefined, { + type, + parent: this + }); + } sendToWriters(type, args) { + const indent = this.indentWidth$.getValue(); + const writers = this.writers$.getValue(); const msg = { type, - indent: this.indentWidth, + indent, + source: this.type, args }; let written = false; - for (const writer of this.writers) { + for (const writer of writers) { if (writer.write(msg)) { written = true; } @@ -6618,8 +6641,10 @@ class ToolingLogTextWriter { constructor(config) { (0, _defineProperty2.default)(this, "level", void 0); (0, _defineProperty2.default)(this, "writeTo", void 0); + (0, _defineProperty2.default)(this, "ignoreSources", void 0); this.level = (0, _log_levels.parseLogLevel)(config.level); this.writeTo = config.writeTo; + this.ignoreSources = config.ignoreSources; if (!this.writeTo || typeof this.writeTo.write !== 'function') { throw new Error('ToolingLogTextWriter requires the `writeTo` option be set to a stream (like process.stdout)'); @@ -6631,6 +6656,10 @@ class ToolingLogTextWriter { return false; } + if (this.ignoreSources && msg.source && this.ignoreSources.includes(msg.source)) { + return false; + } + const prefix = has(MSG_PREFIXES, msg.type) ? MSG_PREFIXES[msg.type] : ''; ToolingLogTextWriter.write(this.writeTo, prefix, msg); return true; @@ -8773,6 +8802,20 @@ class ToolingLogCollectingWriter extends _tooling_log_text_writer.ToolingLogText }); (0, _defineProperty2.default)(this, "messages", []); } + /** + * Called by ToolingLog, extends messages with the source if message includes one. + */ + + + write(msg) { + if (msg.source) { + return super.write({ ...msg, + args: [`source[${msg.source}]`, ...msg.args] + }); + } + + return super.write(msg); + } } @@ -15466,6 +15509,12 @@ exports.parseConfig = parseConfig; * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ + +/** + * Information about how CiStatsReporter should talk to the ci-stats service. Normally + * it is read from a JSON environment variable using the `parseConfig()` function + * exported by this module. + */ function validateConfig(log, config) { const validApiToken = typeof config.apiToken === 'string' && config.apiToken.length !== 0; diff --git a/packages/kbn-securitysolution-list-api/src/api/index.ts b/packages/kbn-securitysolution-list-api/src/api/index.ts index d70417a29971f..77c50fb32c299 100644 --- a/packages/kbn-securitysolution-list-api/src/api/index.ts +++ b/packages/kbn-securitysolution-list-api/src/api/index.ts @@ -558,7 +558,7 @@ export const exportExceptionList = async ({ signal, }: ExportExceptionListProps): Promise => http.fetch(`${EXCEPTION_LIST_URL}/_export`, { - method: 'GET', + method: 'POST', query: { id, list_id: listId, namespace_type: namespaceType }, signal, }); diff --git a/packages/kbn-securitysolution-utils/src/index.ts b/packages/kbn-securitysolution-utils/src/index.ts index 0bb36c590ffdf..755bbd2203dff 100644 --- a/packages/kbn-securitysolution-utils/src/index.ts +++ b/packages/kbn-securitysolution-utils/src/index.ts @@ -7,3 +7,4 @@ */ export * from './add_remove_id_to_item'; +export * from './transform_data_to_ndjson'; diff --git a/packages/kbn-securitysolution-utils/src/transform_data_to_ndjson/index.test.ts b/packages/kbn-securitysolution-utils/src/transform_data_to_ndjson/index.test.ts new file mode 100644 index 0000000000000..b10626357f5b1 --- /dev/null +++ b/packages/kbn-securitysolution-utils/src/transform_data_to_ndjson/index.test.ts @@ -0,0 +1,88 @@ +/* + * Copyright 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 { transformDataToNdjson } from './'; + +export const ANCHOR_DATE = '2020-02-20T03:57:54.037Z'; + +const getRulesSchemaMock = (anchorDate: string = ANCHOR_DATE) => ({ + author: [], + id: '7a7065d7-6e8b-4aae-8d20-c93613dec9f9', + created_at: new Date(anchorDate).toISOString(), + updated_at: new Date(anchorDate).toISOString(), + created_by: 'elastic', + description: 'some description', + enabled: true, + false_positives: ['false positive 1', 'false positive 2'], + from: 'now-6m', + immutable: false, + name: 'Query with a rule id', + query: 'user.name: root or user.name: admin', + references: ['test 1', 'test 2'], + severity: 'high', + severity_mapping: [], + updated_by: 'elastic_kibana', + tags: ['some fake tag 1', 'some fake tag 2'], + to: 'now', + type: 'query', + threat: [], + version: 1, + status: 'succeeded', + status_date: '2020-02-22T16:47:50.047Z', + last_success_at: '2020-02-22T16:47:50.047Z', + last_success_message: 'succeeded', + output_index: '.siem-signals-default', + max_signals: 100, + risk_score: 55, + risk_score_mapping: [], + language: 'kuery', + rule_id: 'query-rule-id', + interval: '5m', + exceptions_list: [], +}); + +describe('transformDataToNdjson', () => { + test('if rules are empty it returns an empty string', () => { + const ruleNdjson = transformDataToNdjson([]); + expect(ruleNdjson).toEqual(''); + }); + + test('single rule will transform with new line ending character for ndjson', () => { + const rule = getRulesSchemaMock(); + const ruleNdjson = transformDataToNdjson([rule]); + expect(ruleNdjson.endsWith('\n')).toBe(true); + }); + + test('multiple rules will transform with two new line ending characters for ndjson', () => { + const result1 = getRulesSchemaMock(); + const result2 = getRulesSchemaMock(); + result2.id = 'some other id'; + result2.rule_id = 'some other id'; + result2.name = 'Some other rule'; + + const ruleNdjson = transformDataToNdjson([result1, result2]); + // this is how we count characters in JavaScript :-) + const count = ruleNdjson.split('\n').length - 1; + expect(count).toBe(2); + }); + + test('you can parse two rules back out without errors', () => { + const result1 = getRulesSchemaMock(); + const result2 = getRulesSchemaMock(); + result2.id = 'some other id'; + result2.rule_id = 'some other id'; + result2.name = 'Some other rule'; + + const ruleNdjson = transformDataToNdjson([result1, result2]); + const ruleStrings = ruleNdjson.split('\n'); + const reParsed1 = JSON.parse(ruleStrings[0]); + const reParsed2 = JSON.parse(ruleStrings[1]); + expect(reParsed1).toEqual(result1); + expect(reParsed2).toEqual(result2); + }); +}); diff --git a/packages/kbn-securitysolution-utils/src/transform_data_to_ndjson/index.ts b/packages/kbn-securitysolution-utils/src/transform_data_to_ndjson/index.ts new file mode 100644 index 0000000000000..66a500731f497 --- /dev/null +++ b/packages/kbn-securitysolution-utils/src/transform_data_to_ndjson/index.ts @@ -0,0 +1,16 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export const transformDataToNdjson = (data: unknown[]): string => { + if (data.length !== 0) { + const dataString = data.map((item) => JSON.stringify(item)).join('\n'); + return `${dataString}\n`; + } else { + return ''; + } +}; diff --git a/packages/kbn-storybook/src/lib/run_storybook_cli.ts b/packages/kbn-storybook/src/lib/run_storybook_cli.ts index 24a3e4511f7be..93197a1f2b318 100644 --- a/packages/kbn-storybook/src/lib/run_storybook_cli.ts +++ b/packages/kbn-storybook/src/lib/run_storybook_cli.ts @@ -36,7 +36,11 @@ export function runStorybookCli({ configDir, name }: { configDir: string; name: async ({ flags, log }) => { log.debug('Global config:\n', constants); - const staticDir = [UiSharedDepsNpm.distDir, UiSharedDepsSrc.distDir]; + const staticDir = [ + UiSharedDepsNpm.distDir, + UiSharedDepsSrc.distDir, + 'src/plugins/kibana_react/public/assets:plugins/kibanaReact/assets', + ]; const config: Record = { configDir, mode: flags.site ? 'static' : 'dev', diff --git a/packages/kbn-test/src/functional_test_runner/lib/mocha/reporter/reporter.js b/packages/kbn-test/src/functional_test_runner/lib/mocha/reporter/reporter.js index 43229ff2d1c98..d6045b71bf3a7 100644 --- a/packages/kbn-test/src/functional_test_runner/lib/mocha/reporter/reporter.js +++ b/packages/kbn-test/src/functional_test_runner/lib/mocha/reporter/reporter.js @@ -62,6 +62,7 @@ export function MochaReporterProvider({ getService }) { log.setWriters([ new ToolingLogTextWriter({ level: 'error', + ignoreSources: ['ProcRunner', '@kbn/es Cluster'], writeTo: process.stdout, }), new ToolingLogTextWriter({ @@ -136,7 +137,7 @@ export function MochaReporterProvider({ getService }) { onPass = (test) => { const time = colors.speed(test.speed, ` (${ms(test.duration)})`); const pass = colors.pass(`${symbols.ok} pass`); - log.write(`- ${pass} ${time} "${test.fullTitle()}"`); + log.write(`- ${pass} ${time}`); }; onFail = (runnable) => { diff --git a/packages/kbn-test/src/functional_tests/tasks.ts b/packages/kbn-test/src/functional_tests/tasks.ts index c8265c032cbcc..b220c3899a638 100644 --- a/packages/kbn-test/src/functional_tests/tasks.ts +++ b/packages/kbn-test/src/functional_tests/tasks.ts @@ -90,7 +90,7 @@ export async function runTests(options: RunTestsParams) { log.write('--- determining which ftr configs to run'); const configPathsWithTests: string[] = []; for (const configPath of options.configs) { - log.info('testing', configPath); + log.info('testing', relative(REPO_ROOT, configPath)); await log.indent(4, async () => { if (await hasTests({ configPath, options: { ...options, log } })) { configPathsWithTests.push(configPath); @@ -98,9 +98,10 @@ export async function runTests(options: RunTestsParams) { }); } - for (const configPath of configPathsWithTests) { + for (const [i, configPath] of configPathsWithTests.entries()) { await log.indent(0, async () => { - log.write(`--- Running ${relative(REPO_ROOT, configPath)}`); + const progress = `${i + 1}/${configPathsWithTests.length}`; + log.write(`--- [${progress}] Running ${relative(REPO_ROOT, configPath)}`); await withProcRunner(log, async (procs) => { const config = await readConfigFile(log, configPath); diff --git a/src/core/public/doc_links/doc_links_service.ts b/src/core/public/doc_links/doc_links_service.ts index adb2aa203a7d7..0421f9ccffd40 100644 --- a/src/core/public/doc_links/doc_links_service.ts +++ b/src/core/public/doc_links/doc_links_service.ts @@ -26,12 +26,14 @@ export class DocLinksService { const PLUGIN_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/plugins/${DOC_LINK_VERSION}/`; const APM_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/apm/`; const SECURITY_SOLUTION_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/security/${DOC_LINK_VERSION}/`; + const STACK_GETTING_STARTED = `${ELASTIC_WEBSITE_URL}guide/en/elastic-stack-get-started/${DOC_LINK_VERSION}/`; return deepFreeze({ DOC_LINK_VERSION, ELASTIC_WEBSITE_URL, links: { settings: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/settings.html`, + elasticStackGetStarted: `${STACK_GETTING_STARTED}get-started-elastic-stack.html`, apm: { kibanaSettings: `${KIBANA_DOCS}apm-settings-in-kibana.html`, supportedServiceMaps: `${KIBANA_DOCS}service-maps.html#service-maps-supported`, @@ -238,6 +240,9 @@ export class DocLinksService { networkMap: `${SECURITY_SOLUTION_DOCS}conf-map-ui.html`, troubleshootGaps: `${SECURITY_SOLUTION_DOCS}alerts-ui-monitor.html#troubleshoot-gaps`, }, + securitySolution: { + trustedApps: `${ELASTIC_WEBSITE_URL}guide/en/security/${DOC_LINK_VERSION}/trusted-apps-ov.html`, + }, query: { eql: `${ELASTICSEARCH_DOCS}eql.html`, kueryQuerySyntax: `${KIBANA_DOCS}kuery-query.html`, @@ -483,6 +488,7 @@ export class DocLinksService { upgradeElasticAgent: `${FLEET_DOCS}upgrade-elastic-agent.html`, upgradeElasticAgent712lower: `${FLEET_DOCS}upgrade-elastic-agent.html#upgrade-7.12-lower`, learnMoreBlog: `${ELASTIC_WEBSITE_URL}blog/elastic-agent-and-fleet-make-it-easier-to-integrate-your-systems-with-elastic`, + apiKeysLearnMore: `${KIBANA_DOCS}api-keys.html`, }, ecs: { guide: `${ELASTIC_WEBSITE_URL}guide/en/ecs/current/index.html`, @@ -511,6 +517,7 @@ export interface DocLinksStart { readonly ELASTIC_WEBSITE_URL: string; readonly links: { readonly settings: string; + readonly elasticStackGetStarted: string; readonly apm: { readonly kibanaSettings: string; readonly supportedServiceMaps: string; @@ -650,6 +657,9 @@ export interface DocLinksStart { readonly networkMap: string; readonly troubleshootGaps: string; }; + readonly securitySolution: { + readonly trustedApps: string; + }; readonly query: { readonly eql: string; readonly kueryQuerySyntax: string; @@ -741,6 +751,7 @@ export interface DocLinksStart { upgradeElasticAgent: string; upgradeElasticAgent712lower: string; learnMoreBlog: string; + apiKeysLearnMore: string; }>; readonly ecs: { readonly guide: string; diff --git a/src/core/public/public.api.md b/src/core/public/public.api.md index d9a56dd3cc1c7..f39ad9d5f8cde 100644 --- a/src/core/public/public.api.md +++ b/src/core/public/public.api.md @@ -479,6 +479,7 @@ export interface DocLinksStart { // (undocumented) readonly links: { readonly settings: string; + readonly elasticStackGetStarted: string; readonly apm: { readonly kibanaSettings: string; readonly supportedServiceMaps: string; @@ -618,6 +619,9 @@ export interface DocLinksStart { readonly networkMap: string; readonly troubleshootGaps: string; }; + readonly securitySolution: { + readonly trustedApps: string; + }; readonly query: { readonly eql: string; readonly kueryQuerySyntax: string; @@ -709,6 +713,7 @@ export interface DocLinksStart { upgradeElasticAgent: string; upgradeElasticAgent712lower: string; learnMoreBlog: string; + apiKeysLearnMore: string; }>; readonly ecs: { readonly guide: string; @@ -731,10 +736,9 @@ export interface DocLinksStart { // Warning: (ae-forgotten-export) The symbol "DeprecationsDetails" needs to be exported by the entry point index.d.ts // // @internal (undocumented) -export interface DomainDeprecationDetails extends DeprecationsDetails { - // (undocumented) +export type DomainDeprecationDetails = DeprecationsDetails & { domainId: string; -} +}; export { EnvironmentMode } diff --git a/src/core/public/rendering/_base.scss b/src/core/public/rendering/_base.scss index 18e564abf822f..32a297a4066d9 100644 --- a/src/core/public/rendering/_base.scss +++ b/src/core/public/rendering/_base.scss @@ -42,6 +42,12 @@ #app-fixed-viewport { top: $headerHeight; } + + .kbnStickyMenu { + position: sticky; + max-height: calc(100vh - #{$headerHeight + $euiSize}); + top: $headerHeight + $euiSize; + } } .kbnBody { diff --git a/src/core/server/config/deprecation/core_deprecations.ts b/src/core/server/config/deprecation/core_deprecations.ts index 6909375408fb4..1cf67f479f9b3 100644 --- a/src/core/server/config/deprecation/core_deprecations.ts +++ b/src/core/server/config/deprecation/core_deprecations.ts @@ -12,6 +12,7 @@ import { ConfigDeprecationProvider, ConfigDeprecation } from '@kbn/config'; const kibanaPathConf: ConfigDeprecation = (settings, fromPath, addDeprecation) => { if (process.env?.KIBANA_PATH_CONF) { addDeprecation({ + configPath: 'env.KIBANA_PATH_CONF', message: `Environment variable "KIBANA_PATH_CONF" is deprecated. It has been replaced with "KBN_PATH_CONF" pointing to a config folder`, correctiveActions: { manualSteps: [ @@ -25,6 +26,7 @@ const kibanaPathConf: ConfigDeprecation = (settings, fromPath, addDeprecation) = const configPathDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecation) => { if (process.env?.CONFIG_PATH) { addDeprecation({ + configPath: 'env.CONFIG_PATH', message: `Environment variable "CONFIG_PATH" is deprecated. It has been replaced with "KBN_PATH_CONF" pointing to a config folder`, correctiveActions: { manualSteps: ['Use "KBN_PATH_CONF" instead of "CONFIG_PATH" to point to a config folder.'], @@ -36,6 +38,7 @@ const configPathDeprecation: ConfigDeprecation = (settings, fromPath, addDepreca const dataPathDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecation) => { if (process.env?.DATA_PATH) { addDeprecation({ + configPath: 'env.DATA_PATH', message: `Environment variable "DATA_PATH" will be removed. It has been replaced with kibana.yml setting "path.data"`, correctiveActions: { manualSteps: [ @@ -49,6 +52,8 @@ const dataPathDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecati const rewriteBasePathDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecation) => { if (settings.server?.basePath && !settings.server?.rewriteBasePath) { addDeprecation({ + configPath: 'server.basePath', + title: 'Setting "server.rewriteBasePath" should be set when using "server.basePath"', message: 'You should set server.basePath along with server.rewriteBasePath. Starting in 7.0, Kibana ' + 'will expect that all requests start with server.basePath rather than expecting you to rewrite ' + @@ -69,6 +74,8 @@ const rewriteCorsSettings: ConfigDeprecation = (settings, fromPath, addDeprecati const corsSettings = settings.server?.cors; if (typeof corsSettings === 'boolean') { addDeprecation({ + configPath: 'server.cors', + title: 'Setting "server.cors" is deprecated', message: '"server.cors" is deprecated and has been replaced by "server.cors.enabled"', correctiveActions: { manualSteps: [ @@ -105,6 +112,7 @@ const cspRulesDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecati value: [...parsed].map(([policy, sourceList]) => { if (sourceList.find((source) => source.includes(NONCE_STRING))) { addDeprecation({ + configPath: 'csp.rules', message: `csp.rules no longer supports the {nonce} syntax. Replacing with 'self' in ${policy}`, correctiveActions: { manualSteps: [`Replace {nonce} syntax with 'self' in ${policy}`], @@ -123,6 +131,7 @@ const cspRulesDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecati !sourceList.find((source) => source.includes(SELF_STRING)) ) { addDeprecation({ + configPath: 'csp.rules', message: `csp.rules must contain the 'self' source. Automatically adding to ${policy}.`, correctiveActions: { manualSteps: [`Add 'self' source to ${policy}.`], @@ -146,6 +155,7 @@ const mapManifestServiceUrlDeprecation: ConfigDeprecation = ( ) => { if (settings.map?.manifestServiceUrl) { addDeprecation({ + configPath: 'map.manifestServiceUrl', message: 'You should no longer use the map.manifestServiceUrl setting in kibana.yml to configure the location ' + 'of the Elastic Maps Service settings. These settings have moved to the "map.emsTileApiUrl" and ' + @@ -164,6 +174,7 @@ const mapManifestServiceUrlDeprecation: ConfigDeprecation = ( const serverHostZeroDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecation) => { if (settings.server?.host === '0') { addDeprecation({ + configPath: 'server.host', message: 'Support for setting server.host to "0" in kibana.yml is deprecated and will be removed in Kibana version 8.0.0. ' + 'Instead use "0.0.0.0" to bind to all interfaces.', @@ -194,6 +205,7 @@ const opsLoggingEventDeprecation: ConfigDeprecation = ( ) => { if (settings.logging?.events?.ops) { addDeprecation({ + configPath: 'logging.events.ops', documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingevents`, title: i18n.translate('core.deprecations.loggingEventsOps.deprecationTitle', { defaultMessage: `Setting "logging.events.ops" is deprecated`, @@ -224,6 +236,7 @@ const requestLoggingEventDeprecation: ConfigDeprecation = ( ) => { if (settings.logging?.events?.request) { addDeprecation({ + configPath: 'logging.events.request', documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingevents`, title: i18n.translate('core.deprecations.loggingEventsRequest.deprecationTitle', { defaultMessage: `Setting "logging.events.request" is deprecated`, @@ -254,6 +267,7 @@ const responseLoggingEventDeprecation: ConfigDeprecation = ( ) => { if (settings.logging?.events?.response) { addDeprecation({ + configPath: 'logging.events.response', documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingevents`, title: i18n.translate('core.deprecations.loggingEventsResponse.deprecationTitle', { defaultMessage: `Setting "logging.events.response" is deprecated`, @@ -284,6 +298,7 @@ const timezoneLoggingDeprecation: ConfigDeprecation = ( ) => { if (settings.logging?.timezone) { addDeprecation({ + configPath: 'logging.timezone', documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingtimezone`, title: i18n.translate('core.deprecations.loggingTimezone.deprecationTitle', { defaultMessage: `Setting "logging.timezone" is deprecated`, @@ -314,6 +329,7 @@ const destLoggingDeprecation: ConfigDeprecation = ( ) => { if (settings.logging?.dest) { addDeprecation({ + configPath: 'logging.dest', documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingdest`, title: i18n.translate('core.deprecations.loggingDest.deprecationTitle', { defaultMessage: `Setting "logging.dest" is deprecated`, @@ -344,6 +360,7 @@ const quietLoggingDeprecation: ConfigDeprecation = ( ) => { if (settings.logging?.quiet) { addDeprecation({ + configPath: 'logging.quiet', documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingquiet`, title: i18n.translate('core.deprecations.loggingQuiet.deprecationTitle', { defaultMessage: `Setting "logging.quiet" is deprecated`, @@ -373,6 +390,7 @@ const silentLoggingDeprecation: ConfigDeprecation = ( ) => { if (settings.logging?.silent) { addDeprecation({ + configPath: 'logging.silent', documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingsilent`, title: i18n.translate('core.deprecations.loggingSilent.deprecationTitle', { defaultMessage: `Setting "logging.silent" is deprecated`, @@ -402,6 +420,7 @@ const verboseLoggingDeprecation: ConfigDeprecation = ( ) => { if (settings.logging?.verbose) { addDeprecation({ + configPath: 'logging.verbose', documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingverbose`, title: i18n.translate('core.deprecations.loggingVerbose.deprecationTitle', { defaultMessage: `Setting "logging.verbose" is deprecated`, @@ -435,6 +454,7 @@ const jsonLoggingDeprecation: ConfigDeprecation = ( // ` legacyLoggingConfigSchema` returns `true` for the TTY check on `process.stdout.isTTY` if (settings.logging?.json && settings.env !== 'development') { addDeprecation({ + configPath: 'logging.json', documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx`, title: i18n.translate('core.deprecations.loggingJson.deprecationTitle', { defaultMessage: `Setting "logging.json" is deprecated`, @@ -466,6 +486,7 @@ const logRotateDeprecation: ConfigDeprecation = ( ) => { if (settings.logging?.rotate) { addDeprecation({ + configPath: 'logging.rotate', documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#rolling-file-appender`, title: i18n.translate('core.deprecations.loggingRotate.deprecationTitle', { defaultMessage: `Setting "logging.rotate" is deprecated`, @@ -496,6 +517,7 @@ const logEventsLogDeprecation: ConfigDeprecation = ( ) => { if (settings.logging?.events?.log) { addDeprecation({ + configPath: 'logging.events.log', documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingevents`, title: i18n.translate('core.deprecations.loggingEventsLog.deprecationTitle', { defaultMessage: `Setting "logging.events.log" is deprecated`, @@ -525,6 +547,7 @@ const logEventsErrorDeprecation: ConfigDeprecation = ( ) => { if (settings.logging?.events?.error) { addDeprecation({ + configPath: 'logging.events.error', documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingevents`, title: i18n.translate('core.deprecations.loggingEventsError.deprecationTitle', { defaultMessage: `Setting "logging.events.error" is deprecated`, @@ -554,6 +577,7 @@ const logFilterDeprecation: ConfigDeprecation = ( ) => { if (settings.logging?.filter) { addDeprecation({ + configPath: 'logging.filter', documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingfilter`, title: i18n.translate('core.deprecations.loggingFilter.deprecationTitle', { defaultMessage: `Setting "logging.filter" is deprecated`, diff --git a/src/core/server/csp/config.ts b/src/core/server/csp/config.ts index 16a2fa4e62894..6697eda62597b 100644 --- a/src/core/server/csp/config.ts +++ b/src/core/server/csp/config.ts @@ -137,6 +137,7 @@ export const config: ServiceConfigDescriptor = { const cspConfig = rawConfig[fromPath]; if (cspConfig?.rules) { addDeprecation({ + configPath: 'csp.rules', message: '`csp.rules` is deprecated in favor of directive specific configuration. Please use `csp.connect_src`, ' + '`csp.default_src`, `csp.font_src`, `csp.frame_ancestors`, `csp.frame_src`, `csp.img_src`, ' + diff --git a/src/core/server/deprecations/deprecation_config.ts b/src/core/server/deprecations/deprecation_config.ts new file mode 100644 index 0000000000000..fb5ff7e5957f5 --- /dev/null +++ b/src/core/server/deprecations/deprecation_config.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 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 { schema, TypeOf } from '@kbn/config-schema'; +import { ServiceConfigDescriptor } from '../internal_types'; + +const configSchema = schema.object({ + // `deprecation.skip_deprecated_settings` is consistent with the equivalent ES feature and config property + skip_deprecated_settings: schema.arrayOf(schema.string(), { defaultValue: [] }), +}); + +export type DeprecationConfigType = TypeOf; + +export const config: ServiceConfigDescriptor = { + path: 'deprecation', + schema: configSchema, +}; diff --git a/src/core/server/deprecations/deprecations_factory.test.ts b/src/core/server/deprecations/deprecations_factory.test.ts index 85ef521538b15..9a67c6dc36dd2 100644 --- a/src/core/server/deprecations/deprecations_factory.test.ts +++ b/src/core/server/deprecations/deprecations_factory.test.ts @@ -7,20 +7,26 @@ */ import type { GetDeprecationsContext } from './types'; -import { DeprecationsFactory } from './deprecations_factory'; +import { DeprecationsFactory, DeprecationsFactoryConfig } from './deprecations_factory'; import { loggerMock } from '../logging/logger.mock'; +import { DeprecationsDetails } from './types'; describe('DeprecationsFactory', () => { - const logger = loggerMock.create(); + let logger: ReturnType; + let config: DeprecationsFactoryConfig; + beforeEach(() => { - loggerMock.clear(logger); + logger = loggerMock.create(); + config = { + ignoredConfigDeprecations: [], + }; }); describe('getRegistry', () => { const domainId = 'test-plugin'; it('creates a registry for a domainId', async () => { - const deprecationsFactory = new DeprecationsFactory({ logger }); + const deprecationsFactory = new DeprecationsFactory({ logger, config }); const registry = deprecationsFactory.getRegistry(domainId); expect(registry).toHaveProperty('registerDeprecations'); @@ -28,7 +34,7 @@ describe('DeprecationsFactory', () => { }); it('creates one registry for a domainId', async () => { - const deprecationsFactory = new DeprecationsFactory({ logger }); + const deprecationsFactory = new DeprecationsFactory({ logger, config }); const registry = deprecationsFactory.getRegistry(domainId); const sameRegistry = deprecationsFactory.getRegistry(domainId); @@ -36,7 +42,7 @@ describe('DeprecationsFactory', () => { }); it('returns a registered registry', () => { - const deprecationsFactory = new DeprecationsFactory({ logger }); + const deprecationsFactory = new DeprecationsFactory({ logger, config }); const mockRegistry = 'mock-reg'; const mockRegistries = { set: jest.fn(), @@ -61,7 +67,7 @@ describe('DeprecationsFactory', () => { } as unknown as GetDeprecationsContext; it('returns a flattened array of deprecations', async () => { - const deprecationsFactory = new DeprecationsFactory({ logger }); + const deprecationsFactory = new DeprecationsFactory({ logger, config }); const mockPluginDeprecationsInfo = [ { message: 'mockPlugin message', @@ -97,8 +103,8 @@ describe('DeprecationsFactory', () => { getDeprecations: jest.fn().mockResolvedValue(anotherMockPluginDeprecationsInfo), }); - const derpecations = await deprecationsFactory.getAllDeprecations(mockDependencies); - expect(derpecations).toStrictEqual( + const deprecations = await deprecationsFactory.getAllDeprecations(mockDependencies); + expect(deprecations).toStrictEqual( [ mockPluginDeprecationsInfo.map((info) => ({ ...info, domainId: 'mockPlugin' })), anotherMockPluginDeprecationsInfo.map((info) => ({ @@ -110,7 +116,7 @@ describe('DeprecationsFactory', () => { }); it(`returns a failure message for failed getDeprecations functions`, async () => { - const deprecationsFactory = new DeprecationsFactory({ logger }); + const deprecationsFactory = new DeprecationsFactory({ logger, config }); const domainId = 'mockPlugin'; const mockError = new Error(); @@ -142,7 +148,7 @@ describe('DeprecationsFactory', () => { }); it(`returns successful results even when some getDeprecations fail`, async () => { - const deprecationsFactory = new DeprecationsFactory({ logger }); + const deprecationsFactory = new DeprecationsFactory({ logger, config }); const mockPluginRegistry = deprecationsFactory.getRegistry('mockPlugin'); const anotherMockPluginRegistry = deprecationsFactory.getRegistry('anotherMockPlugin'); const mockError = new Error(); @@ -161,14 +167,14 @@ describe('DeprecationsFactory', () => { anotherMockPluginRegistry.registerDeprecations({ getDeprecations: jest.fn().mockRejectedValue(mockError), }); - const derpecations = await deprecationsFactory.getAllDeprecations(mockDependencies); + const deprecations = await deprecationsFactory.getAllDeprecations(mockDependencies); expect(logger.warn).toBeCalledTimes(1); expect(logger.warn).toBeCalledWith( `Failed to get deprecations info for plugin "anotherMockPlugin".`, mockError ); - expect(derpecations).toStrictEqual([ + expect(deprecations).toStrictEqual([ ...mockPluginDeprecationsInfo.map((info) => ({ ...info, domainId: 'mockPlugin' })), { domainId: 'anotherMockPlugin', @@ -181,6 +187,123 @@ describe('DeprecationsFactory', () => { }, ]); }); + + it('excludes config deprecations explicitly ignored via `ignoredConfigDeprecations`', async () => { + const deprecationsFactory = new DeprecationsFactory({ + logger, + config: { + ignoredConfigDeprecations: ['mockPlugin.foo', 'anotherMockPlugin.bar'], + }, + }); + const mockPluginDeprecationsInfo: DeprecationsDetails[] = [ + { + configPath: 'mockPlugin.foo', + title: 'mockPlugin.foo is deprecated', + message: 'mockPlugin.foo is deprecated and will be removed in a future Kibana version', + level: 'critical', + deprecationType: 'config', + correctiveActions: { + manualSteps: ['come on', 'do something'], + }, + }, + { + configPath: 'mockPlugin.bar', + title: 'mockPlugin.bar is deprecated', + message: 'mockPlugin.bar is deprecated and will be removed in a future Kibana version', + level: 'critical', + deprecationType: 'config', + correctiveActions: { + manualSteps: ['come on', 'do something'], + }, + }, + ]; + const anotherMockPluginDeprecationsInfo: DeprecationsDetails[] = [ + { + configPath: 'anotherMockPlugin.foo', + title: 'anotherMockPlugin.foo is deprecated', + message: + 'anotherMockPlugin.foo is deprecated and will be removed in a future Kibana version', + level: 'critical', + deprecationType: 'config', + correctiveActions: { + manualSteps: ['come on', 'do something'], + }, + }, + { + configPath: 'anotherMockPlugin.bar', + title: 'anotherMockPlugin.bar is deprecated', + message: + 'anotherMockPlugin.bar is deprecated and will be removed in a future Kibana version', + level: 'critical', + deprecationType: 'config', + correctiveActions: { + manualSteps: ['come on', 'do something'], + }, + }, + ]; + + const mockPluginRegistry = deprecationsFactory.getRegistry('mockPlugin'); + mockPluginRegistry.registerDeprecations({ + getDeprecations: jest.fn().mockResolvedValue(mockPluginDeprecationsInfo), + }); + + const anotherMockPluginRegistry = deprecationsFactory.getRegistry('anotherMockPlugin'); + anotherMockPluginRegistry.registerDeprecations({ + getDeprecations: jest.fn().mockResolvedValue(anotherMockPluginDeprecationsInfo), + }); + + const deprecations = await deprecationsFactory.getAllDeprecations(mockDependencies); + + expect(deprecations).toHaveLength(2); + expect(deprecations).toEqual([ + expect.objectContaining({ + configPath: 'mockPlugin.bar', + title: 'mockPlugin.bar is deprecated', + }), + expect.objectContaining({ + configPath: 'anotherMockPlugin.foo', + title: 'anotherMockPlugin.foo is deprecated', + }), + ]); + }); + + it('does not throw when configured with paths not matching any deprecation', async () => { + const deprecationsFactory = new DeprecationsFactory({ + logger, + config: { + ignoredConfigDeprecations: ['unknown.bar'], + }, + }); + const mockPluginDeprecationsInfo: DeprecationsDetails[] = [ + { + configPath: 'mockPlugin.foo', + title: 'mockPlugin.foo is deprecated', + message: 'mockPlugin.foo is deprecated and will be removed in a future Kibana version', + level: 'critical', + deprecationType: 'config', + correctiveActions: { + manualSteps: ['come on', 'do something'], + }, + }, + { + configPath: 'mockPlugin.bar', + title: 'mockPlugin.bar is deprecated', + message: 'mockPlugin.bar is deprecated and will be removed in a future Kibana version', + level: 'critical', + deprecationType: 'config', + correctiveActions: { + manualSteps: ['come on', 'do something'], + }, + }, + ]; + + const mockPluginRegistry = deprecationsFactory.getRegistry('mockPlugin'); + mockPluginRegistry.registerDeprecations({ + getDeprecations: jest.fn().mockResolvedValue(mockPluginDeprecationsInfo), + }); + + await expect(deprecationsFactory.getAllDeprecations(mockDependencies)).resolves.toBeDefined(); + }); }); describe('getDeprecations', () => { @@ -190,7 +313,7 @@ describe('DeprecationsFactory', () => { } as unknown as GetDeprecationsContext; it('returns a flattened array of DeprecationInfo', async () => { - const deprecationsFactory = new DeprecationsFactory({ logger }); + const deprecationsFactory = new DeprecationsFactory({ logger, config }); const deprecationsRegistry = deprecationsFactory.getRegistry('mockPlugin'); const deprecationsBody = [ { @@ -215,40 +338,62 @@ describe('DeprecationsFactory', () => { getDeprecations: jest.fn().mockResolvedValue(deprecationsBody), }); - const derpecations = await deprecationsFactory.getDeprecations( + const deprecations = await deprecationsFactory.getDeprecations( 'mockPlugin', mockDependencies ); - expect(derpecations).toStrictEqual( + expect(deprecations).toStrictEqual( deprecationsBody.flat().map((body) => ({ ...body, domainId: 'mockPlugin' })) ); }); - it('removes empty entries from the returned array', async () => { - const deprecationsFactory = new DeprecationsFactory({ logger }); + it('excludes config deprecations explicitly ignored via `ignoredConfigDeprecations`', async () => { + const deprecationsFactory = new DeprecationsFactory({ + logger, + config: { + ignoredConfigDeprecations: ['test.foo'], + }, + }); const deprecationsRegistry = deprecationsFactory.getRegistry('mockPlugin'); - const deprecationsBody = [ + const deprecationsBody: DeprecationsDetails[] = [ { - message: 'mockPlugin message', + configPath: 'test.foo', + title: 'test.foo is deprecated', + message: 'test.foo is deprecated and will be removed in a future Kibana version', level: 'critical', + deprecationType: 'config', correctiveActions: { - manualSteps: ['mockPlugin step 1', 'mockPlugin step 2'], + manualSteps: ['come on', 'do something'], + }, + }, + { + configPath: 'test.bar', + title: 'test.bar is deprecated', + message: 'test.bar is deprecated and will be removed in a future Kibana version', + level: 'critical', + deprecationType: 'config', + correctiveActions: { + manualSteps: ['come on', 'do something'], }, }, - [undefined], - undefined, ]; deprecationsRegistry.registerDeprecations({ getDeprecations: jest.fn().mockResolvedValue(deprecationsBody), }); - const derpecations = await deprecationsFactory.getDeprecations( + const deprecations = await deprecationsFactory.getDeprecations( 'mockPlugin', mockDependencies ); - expect(derpecations).toHaveLength(1); - expect(derpecations).toStrictEqual([{ ...deprecationsBody[0], domainId: 'mockPlugin' }]); + expect(deprecations).toHaveLength(1); + expect(deprecations[0]).toEqual( + expect.objectContaining({ + deprecationType: 'config', + configPath: 'test.bar', + title: 'test.bar is deprecated', + }) + ); }); }); }); diff --git a/src/core/server/deprecations/deprecations_factory.ts b/src/core/server/deprecations/deprecations_factory.ts index 9905f0b26b4f3..ad28af2db528e 100644 --- a/src/core/server/deprecations/deprecations_factory.ts +++ b/src/core/server/deprecations/deprecations_factory.ts @@ -17,13 +17,21 @@ import type { export interface DeprecationsFactoryDeps { logger: Logger; + config: DeprecationsFactoryConfig; +} + +export interface DeprecationsFactoryConfig { + ignoredConfigDeprecations: string[]; } export class DeprecationsFactory { private readonly registries: Map = new Map(); private readonly logger: Logger; - constructor({ logger }: DeprecationsFactoryDeps) { + private readonly config: DeprecationsFactoryConfig; + + constructor({ logger, config }: DeprecationsFactoryDeps) { this.logger = logger; + this.config = config; } public getRegistry = (domainId: string): DeprecationsRegistry => { @@ -41,7 +49,7 @@ export class DeprecationsFactory { dependencies: GetDeprecationsContext ): Promise => { const infoBody = await this.getDeprecationsBody(domainId, dependencies); - return this.createDeprecationInfo(domainId, infoBody).flat(); + return this.createDeprecationInfo(domainId, infoBody); }; public getAllDeprecations = async ( @@ -63,13 +71,10 @@ export class DeprecationsFactory { domainId: string, deprecationInfoBody: DeprecationsDetails[] ): DomainDeprecationDetails[] => { - return deprecationInfoBody - .flat() - .filter(Boolean) - .map((pluginDeprecation) => ({ - ...pluginDeprecation, - domainId, - })); + return deprecationInfoBody.map((pluginDeprecation) => ({ + ...pluginDeprecation, + domainId, + })); }; private getDeprecationsBody = async ( @@ -113,7 +118,7 @@ export class DeprecationsFactory { ]; } - return settledResult.value; + return filterIgnoredDeprecations(settledResult.value.flat(), this.config); }); } catch (err) { this.logger.warn(`Failed to get deprecations info for plugin "${domainId}".`, err); @@ -121,3 +126,15 @@ export class DeprecationsFactory { } }; } + +const filterIgnoredDeprecations = ( + deprecations: DeprecationsDetails[], + config: DeprecationsFactoryConfig +): DeprecationsDetails[] => { + return deprecations.filter((deprecation) => { + if (deprecation.deprecationType === 'config') { + return !config.ignoredConfigDeprecations.includes(deprecation.configPath); + } + return true; + }); +}; diff --git a/src/core/server/deprecations/deprecations_service.mock.ts b/src/core/server/deprecations/deprecations_service.mock.ts index 2f9c8bade6405..c274c4409cce2 100644 --- a/src/core/server/deprecations/deprecations_service.mock.ts +++ b/src/core/server/deprecations/deprecations_service.mock.ts @@ -50,7 +50,7 @@ const createDeprecationsServiceMock = () => { stop: jest.fn(), }; - mocked.setup.mockReturnValue(createInternalSetupContractMock()); + mocked.setup.mockResolvedValue(createInternalSetupContractMock()); return mocked; }; diff --git a/src/core/server/deprecations/deprecations_service.test.mocks.ts b/src/core/server/deprecations/deprecations_service.test.mocks.ts new file mode 100644 index 0000000000000..3174698725f96 --- /dev/null +++ b/src/core/server/deprecations/deprecations_service.test.mocks.ts @@ -0,0 +1,18 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { mockDeprecationsFactory } from './deprecations_factory.mock'; + +export const mockedDeprecationFactoryInstance = mockDeprecationsFactory.create(); +export const DeprecationsFactoryMock = jest + .fn() + .mockImplementation(() => mockedDeprecationFactoryInstance); + +jest.doMock('./deprecations_factory', () => ({ + DeprecationsFactory: DeprecationsFactoryMock, +})); diff --git a/src/core/server/deprecations/deprecations_service.test.ts b/src/core/server/deprecations/deprecations_service.test.ts index 0067cff1d2306..256cfdaa666b3 100644 --- a/src/core/server/deprecations/deprecations_service.test.ts +++ b/src/core/server/deprecations/deprecations_service.test.ts @@ -6,42 +6,69 @@ * Side Public License, v 1. */ +import { DeprecationsFactoryMock } from './deprecations_service.test.mocks'; + /* eslint-disable dot-notation */ -import { DeprecationsService } from './deprecations_service'; +import { DeprecationsService, DeprecationsSetupDeps } from './deprecations_service'; import { httpServiceMock } from '../http/http_service.mock'; -import { mockRouter } from '../http/router/router.mock'; -import { savedObjectsClientMock, elasticsearchServiceMock } from '../mocks'; +import { savedObjectsClientMock, elasticsearchServiceMock, configServiceMock } from '../mocks'; import { mockCoreContext } from '../core_context.mock'; import { mockDeprecationsFactory } from './deprecations_factory.mock'; import { mockDeprecationsRegistry } from './deprecations_registry.mock'; describe('DeprecationsService', () => { - const coreContext = mockCoreContext.create(); - const http = httpServiceMock.createInternalSetupContract(); - const router = mockRouter.create(); - http.createRouter.mockReturnValue(router); - const deprecationsCoreSetupDeps = { http }; + let coreContext: ReturnType; + let http: ReturnType; + let router: ReturnType; + let deprecationsCoreSetupDeps: DeprecationsSetupDeps; + + beforeEach(() => { + const configService = configServiceMock.create({ + atPath: { skip_deprecated_settings: ['hello', 'world'] }, + }); + coreContext = mockCoreContext.create({ configService }); + http = httpServiceMock.createInternalSetupContract(); + router = httpServiceMock.createRouter(); + http.createRouter.mockReturnValue(router); + deprecationsCoreSetupDeps = { http }; + }); - beforeEach(() => jest.clearAllMocks()); + afterEach(() => { + jest.clearAllMocks(); + DeprecationsFactoryMock.mockClear(); + }); describe('#setup', () => { - it('registers routes', () => { + it('registers routes', async () => { const deprecationsService = new DeprecationsService(coreContext); - deprecationsService.setup(deprecationsCoreSetupDeps); - // Registers correct base api path + await deprecationsService.setup(deprecationsCoreSetupDeps); + // registers correct base api path expect(http.createRouter).toBeCalledWith('/api/deprecations'); // registers get route '/' expect(router.get).toHaveBeenCalledTimes(1); expect(router.get).toHaveBeenCalledWith({ path: '/', validate: false }, expect.any(Function)); }); - it('calls registerConfigDeprecationsInfo', () => { + it('calls registerConfigDeprecationsInfo', async () => { const deprecationsService = new DeprecationsService(coreContext); const mockRegisterConfigDeprecationsInfo = jest.fn(); deprecationsService['registerConfigDeprecationsInfo'] = mockRegisterConfigDeprecationsInfo; - deprecationsService.setup(deprecationsCoreSetupDeps); + await deprecationsService.setup(deprecationsCoreSetupDeps); expect(mockRegisterConfigDeprecationsInfo).toBeCalledTimes(1); }); + + it('creates DeprecationsFactory with the correct parameters', async () => { + const deprecationsService = new DeprecationsService(coreContext); + await deprecationsService.setup(deprecationsCoreSetupDeps); + + expect(DeprecationsFactoryMock).toHaveBeenCalledTimes(1); + expect(DeprecationsFactoryMock).toHaveBeenCalledWith({ + logger: expect.any(Object), + config: { + ignoredConfigDeprecations: ['hello', 'world'], + }, + }); + }); }); describe('#start', () => { @@ -51,7 +78,7 @@ describe('DeprecationsService', () => { const savedObjectsClient = savedObjectsClientMock.create(); const deprecationsService = new DeprecationsService(coreContext); - deprecationsService.setup(deprecationsCoreSetupDeps); + await deprecationsService.setup(deprecationsCoreSetupDeps); const start = deprecationsService.start(); const deprecationsClient = start.asScopedToClient(esClient, savedObjectsClient); @@ -73,6 +100,7 @@ describe('DeprecationsService', () => { 'testDomain', [ { + configPath: 'test', message: 'testMessage', documentationUrl: 'testDocUrl', correctiveActions: { @@ -100,6 +128,7 @@ describe('DeprecationsService', () => { expect(configDeprecations).toMatchInlineSnapshot(` Array [ Object { + "configPath": "test", "correctiveActions": Object { "manualSteps": Array [ "Using Kibana user management, change all users using the kibana_user role to the kibana_admin role.", @@ -124,6 +153,7 @@ describe('DeprecationsService', () => { 'testDomain', [ { + configPath: 'test', message: 'testMessage', level: 'warning', correctiveActions: { diff --git a/src/core/server/deprecations/deprecations_service.ts b/src/core/server/deprecations/deprecations_service.ts index cfc0aae443d1b..0c3fd75987aa6 100644 --- a/src/core/server/deprecations/deprecations_service.ts +++ b/src/core/server/deprecations/deprecations_service.ts @@ -6,11 +6,14 @@ * Side Public License, v 1. */ +import { take } from 'rxjs/operators'; + import { DeprecationsFactory } from './deprecations_factory'; import { DomainDeprecationDetails, RegisterDeprecationsConfig } from './types'; import { registerRoutes } from './routes'; - +import { config as deprecationConfig, DeprecationConfigType } from './deprecation_config'; import { CoreContext } from '../core_context'; +import { IConfigService } from '../config'; import { CoreService } from '../../types'; import { InternalHttpServiceSetup } from '../http'; import { Logger } from '../logging'; @@ -103,6 +106,7 @@ export interface DeprecationsServiceSetup { export interface DeprecationsClient { getAllDeprecations: () => Promise; } + export interface InternalDeprecationsServiceStart { /** * Creates a {@link DeprecationsClient} with provided SO client and ES client. @@ -129,22 +133,33 @@ export class DeprecationsService implements CoreService { private readonly logger: Logger; - private readonly deprecationsFactory: DeprecationsFactory; + private readonly configService: IConfigService; + private deprecationsFactory?: DeprecationsFactory; - constructor(private readonly coreContext: Pick) { + constructor(coreContext: Pick) { this.logger = coreContext.logger.get('deprecations-service'); - this.deprecationsFactory = new DeprecationsFactory({ - logger: this.logger, - }); + this.configService = coreContext.configService; } - public setup({ http }: DeprecationsSetupDeps): InternalDeprecationsServiceSetup { + public async setup({ http }: DeprecationsSetupDeps): Promise { this.logger.debug('Setting up Deprecations service'); - const deprecationsFactory = this.deprecationsFactory; + + const config = await this.configService + .atPath(deprecationConfig.path) + .pipe(take(1)) + .toPromise(); + + this.deprecationsFactory = new DeprecationsFactory({ + logger: this.logger, + config: { + ignoredConfigDeprecations: config.skip_deprecated_settings, + }, + }); registerRoutes({ http }); this.registerConfigDeprecationsInfo(this.deprecationsFactory); + const deprecationsFactory = this.deprecationsFactory; return { getRegistry: (domainId: string): DeprecationsServiceSetup => { const registry = deprecationsFactory.getRegistry(domainId); @@ -156,6 +171,9 @@ export class DeprecationsService } public start(): InternalDeprecationsServiceStart { + if (!this.deprecationsFactory) { + throw new Error('`setup` must be called before `start`'); + } return { asScopedToClient: this.createScopedDeprecations(), }; @@ -169,7 +187,7 @@ export class DeprecationsService ) => DeprecationsClient { return (esClient: IScopedClusterClient, savedObjectsClient: SavedObjectsClientContract) => { return { - getAllDeprecations: this.deprecationsFactory.getAllDeprecations.bind(null, { + getAllDeprecations: this.deprecationsFactory!.getAllDeprecations.bind(null, { savedObjectsClient, esClient, }), @@ -178,7 +196,7 @@ export class DeprecationsService } private registerConfigDeprecationsInfo(deprecationsFactory: DeprecationsFactory) { - const handledDeprecatedConfigs = this.coreContext.configService.getHandledDeprecatedConfigs(); + const handledDeprecatedConfigs = this.configService.getHandledDeprecatedConfigs(); for (const [domainId, deprecationsContexts] of handledDeprecatedConfigs) { const deprecationsRegistry = deprecationsFactory.getRegistry(domainId); @@ -186,12 +204,14 @@ export class DeprecationsService getDeprecations: () => { return deprecationsContexts.map( ({ + configPath, title = `${domainId} has a deprecated setting`, level = 'critical', message, correctiveActions, documentationUrl, }) => ({ + configPath, title, level, message, diff --git a/src/core/server/deprecations/index.ts b/src/core/server/deprecations/index.ts index 5c2a0b87b42de..d9225750f04a1 100644 --- a/src/core/server/deprecations/index.ts +++ b/src/core/server/deprecations/index.ts @@ -7,7 +7,10 @@ */ export type { + BaseDeprecationDetails, DeprecationsDetails, + ConfigDeprecationDetails, + FeatureDeprecationDetails, GetDeprecationsContext, RegisterDeprecationsConfig, DeprecationsGetResponse, @@ -21,3 +24,4 @@ export type { } from './deprecations_service'; export { DeprecationsService } from './deprecations_service'; +export { config } from './deprecation_config'; diff --git a/src/core/server/deprecations/types.ts b/src/core/server/deprecations/types.ts index e24c6a13fceea..3990a76f7578e 100644 --- a/src/core/server/deprecations/types.ts +++ b/src/core/server/deprecations/types.ts @@ -6,22 +6,16 @@ * Side Public License, v 1. */ +import type { MaybePromise } from '@kbn/utility-types'; import type { SavedObjectsClientContract } from '../saved_objects/types'; import type { IScopedClusterClient } from '../elasticsearch'; -type MaybePromise = T | Promise; - -/** - * @internal - */ -export interface DomainDeprecationDetails extends DeprecationsDetails { - domainId: string; -} - /** + * Base properties shared by all types of deprecations + * * @public */ -export interface DeprecationsDetails { +export interface BaseDeprecationDetails { /** * The title of the deprecation. * Check the README for writing deprecations in `src/core/server/deprecations/README.mdx` @@ -82,6 +76,33 @@ export interface DeprecationsDetails { }; } +/** + * @public + */ +export interface ConfigDeprecationDetails extends BaseDeprecationDetails { + configPath: string; + deprecationType: 'config'; +} + +/** + * @public + */ +export interface FeatureDeprecationDetails extends BaseDeprecationDetails { + deprecationType?: 'feature' | undefined; +} + +/** + * @public + */ +export type DeprecationsDetails = ConfigDeprecationDetails | FeatureDeprecationDetails; + +/** + * @internal + */ +export type DomainDeprecationDetails = DeprecationsDetails & { + domainId: string; +}; + /** * @public */ diff --git a/src/core/server/elasticsearch/elasticsearch_config.ts b/src/core/server/elasticsearch/elasticsearch_config.ts index f5d44a87d5404..71b9f87c14fa3 100644 --- a/src/core/server/elasticsearch/elasticsearch_config.ts +++ b/src/core/server/elasticsearch/elasticsearch_config.ts @@ -145,6 +145,7 @@ const deprecations: ConfigDeprecationProvider = () => [ } if (es.username === 'elastic') { addDeprecation({ + configPath: `${fromPath}.username`, message: `Setting [${fromPath}.username] to "elastic" is deprecated. You should use the "kibana_system" user instead.`, correctiveActions: { manualSteps: [`Replace [${fromPath}.username] from "elastic" to "kibana_system".`], @@ -152,6 +153,7 @@ const deprecations: ConfigDeprecationProvider = () => [ }); } else if (es.username === 'kibana') { addDeprecation({ + configPath: `${fromPath}.username`, message: `Setting [${fromPath}.username] to "kibana" is deprecated. You should use the "kibana_system" user instead.`, correctiveActions: { manualSteps: [`Replace [${fromPath}.username] from "kibana" to "kibana_system".`], @@ -160,6 +162,7 @@ const deprecations: ConfigDeprecationProvider = () => [ } if (es.ssl?.key !== undefined && es.ssl?.certificate === undefined) { addDeprecation({ + configPath: `${fromPath}.ssl.key`, message: `Setting [${fromPath}.ssl.key] without [${fromPath}.ssl.certificate] is deprecated. This has no effect, you should use both settings to enable TLS client authentication to Elasticsearch.`, correctiveActions: { manualSteps: [ @@ -169,6 +172,7 @@ const deprecations: ConfigDeprecationProvider = () => [ }); } else if (es.ssl?.certificate !== undefined && es.ssl?.key === undefined) { addDeprecation({ + configPath: `${fromPath}.ssl.certificate`, message: `Setting [${fromPath}.ssl.certificate] without [${fromPath}.ssl.key] is deprecated. This has no effect, you should use both settings to enable TLS client authentication to Elasticsearch.`, correctiveActions: { manualSteps: [ @@ -178,6 +182,7 @@ const deprecations: ConfigDeprecationProvider = () => [ }); } else if (es.logQueries === true) { addDeprecation({ + configPath: `${fromPath}.logQueries`, message: `Setting [${fromPath}.logQueries] is deprecated and no longer used. You should set the log level to "debug" for the "elasticsearch.queries" context in "logging.loggers" or use "logging.verbose: true".`, correctiveActions: { manualSteps: [ diff --git a/src/core/server/index.ts b/src/core/server/index.ts index a9f2f00707646..92c758f7e6980 100644 --- a/src/core/server/index.ts +++ b/src/core/server/index.ts @@ -387,7 +387,10 @@ export { EventLoopDelaysMonitor } from './metrics'; export type { I18nServiceSetup } from './i18n'; export type { + BaseDeprecationDetails, DeprecationsDetails, + ConfigDeprecationDetails, + FeatureDeprecationDetails, RegisterDeprecationsConfig, GetDeprecationsContext, DeprecationsServiceSetup, diff --git a/src/core/server/kibana_config.ts b/src/core/server/kibana_config.ts index ead3f2cc2776a..859f25d7082f1 100644 --- a/src/core/server/kibana_config.ts +++ b/src/core/server/kibana_config.ts @@ -17,6 +17,7 @@ const deprecations: ConfigDeprecationProvider = () => [ const kibana = settings[fromPath]; if (kibana?.index) { addDeprecation({ + configPath: 'kibana.index', title: i18n.translate('core.kibana.index.deprecationTitle', { defaultMessage: `Setting "kibana.index" is deprecated`, }), diff --git a/src/core/server/saved_objects/migrationsv2/actions/integration_tests/actions.test.ts b/src/core/server/saved_objects/migrationsv2/actions/integration_tests/actions.test.ts index b3ddaa60e5a31..707e92366871f 100644 --- a/src/core/server/saved_objects/migrationsv2/actions/integration_tests/actions.test.ts +++ b/src/core/server/saved_objects/migrationsv2/actions/integration_tests/actions.test.ts @@ -7,9 +7,7 @@ */ import { ElasticsearchClient } from '../../../../'; -import { InternalCoreStart } from '../../../../internal_types'; import * as kbnTestServer from '../../../../../test_helpers/kbn_server'; -import { Root } from '../../../../root'; import { SavedObjectsRawDoc } from '../../../serialization'; import { bulkOverwriteTransformedDocuments, @@ -43,12 +41,14 @@ import * as Option from 'fp-ts/lib/Option'; import { ResponseError } from '@elastic/elasticsearch/lib/errors'; import { DocumentsTransformFailed, DocumentsTransformSuccess } from '../../../migrations/core'; import { TaskEither } from 'fp-ts/lib/TaskEither'; +import Path from 'path'; const { startES } = kbnTestServer.createTestServers({ adjustTimeout: (t: number) => jest.setTimeout(t), settings: { es: { license: 'basic', + dataArchive: Path.join(__dirname, './archives', '7.7.2_xpack_100k_obj.zip'), esArgs: ['http.max_content_length=10Kb'], }, }, @@ -57,22 +57,11 @@ let esServer: kbnTestServer.TestElasticsearchUtils; // Failing: See https://github.com/elastic/kibana/issues/113697 describe.skip('migration actions', () => { - let root: Root; - let start: InternalCoreStart; let client: ElasticsearchClient; beforeAll(async () => { esServer = await startES(); - root = kbnTestServer.createRootWithCorePlugins({ - server: { - basePath: '/hello', - }, - }); - - await root.preboot(); - await root.setup(); - start = await root.start(); - client = start.elasticsearch.client.asInternalUser; + client = esServer.es.getClient(); // Create test fixture data: await createIndex({ @@ -118,7 +107,6 @@ describe.skip('migration actions', () => { afterAll(async () => { await esServer.stop(); - await root.shutdown(); }); describe('fetchIndices', () => { @@ -321,14 +309,14 @@ describe.skip('migration actions', () => { }); expect.assertions(1); await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Right", - "right": Object { - "acknowledged": true, - "shardsAcknowledged": true, - }, - } - `); + Object { + "_tag": "Right", + "right": Object { + "acknowledged": true, + "shardsAcknowledged": true, + }, + } + `); }); it('resolves right after waiting for index status to be yellow if clone target already existed', async () => { expect.assertions(2); @@ -812,7 +800,7 @@ describe.skip('migration actions', () => { const res = (await reindex({ client, - sourceIndex: 'existing_index_with_docs', + sourceIndex: '.kibana_1', targetIndex: 'reindex_target', reindexScript: Option.none, requireAlias: false, diff --git a/src/core/server/saved_objects/migrationsv2/actions/integration_tests/archives/7.7.2_xpack_100k_obj.zip b/src/core/server/saved_objects/migrationsv2/actions/integration_tests/archives/7.7.2_xpack_100k_obj.zip new file mode 100644 index 0000000000000..13afaa04b06f9 Binary files /dev/null and b/src/core/server/saved_objects/migrationsv2/actions/integration_tests/archives/7.7.2_xpack_100k_obj.zip differ diff --git a/src/core/server/saved_objects/saved_objects_config.ts b/src/core/server/saved_objects/saved_objects_config.ts index 0c27f170f590b..c9b4b4499fa80 100644 --- a/src/core/server/saved_objects/saved_objects_config.ts +++ b/src/core/server/saved_objects/saved_objects_config.ts @@ -27,6 +27,7 @@ const migrationDeprecations: ConfigDeprecationProvider = () => [ const migrationsConfig = settings[fromPath]; if (migrationsConfig?.enableV2 !== undefined) { addDeprecation({ + configPath: `${fromPath}.enableV2`, message: '"migrations.enableV2" is deprecated and will be removed in an upcoming release without any further notice.', documentationUrl: 'https://ela.st/kbn-so-migration-v2', diff --git a/src/core/server/saved_objects/service/lib/repository.test.js b/src/core/server/saved_objects/service/lib/repository.test.js index 72ca2d15007b8..82a0dd71700f6 100644 --- a/src/core/server/saved_objects/service/lib/repository.test.js +++ b/src/core/server/saved_objects/service/lib/repository.test.js @@ -4011,16 +4011,7 @@ describe('SavedObjectsRepository', () => { ]; const originId = 'some-origin-id'; - const updateSuccess = async (type, id, attributes, options, includeOriginId) => { - if (registry.isMultiNamespace(type)) { - const mockGetResponse = getMockGetResponse({ type, id }, options?.namespace); - client.get.mockResolvedValueOnce( - elasticsearchClientMock.createSuccessTransportRequestPromise( - { ...mockGetResponse }, - { statusCode: 200 } - ) - ); - } + const mockUpdateResponse = (type, id, options, includeOriginId) => { client.update.mockResolvedValueOnce( elasticsearchClientMock.createSuccessTransportRequestPromise( { @@ -4042,6 +4033,19 @@ describe('SavedObjectsRepository', () => { { statusCode: 200 } ) ); + }; + + const updateSuccess = async (type, id, attributes, options, includeOriginId) => { + if (registry.isMultiNamespace(type)) { + const mockGetResponse = getMockGetResponse({ type, id }, options?.namespace); + client.get.mockResolvedValueOnce( + elasticsearchClientMock.createSuccessTransportRequestPromise( + { ...mockGetResponse }, + { statusCode: 200 } + ) + ); + } + mockUpdateResponse(type, id, options, includeOriginId); const result = await savedObjectsRepository.update(type, id, attributes, options); expect(client.get).toHaveBeenCalledTimes(registry.isMultiNamespace(type) ? 1 : 0); return result; @@ -4085,7 +4089,7 @@ describe('SavedObjectsRepository', () => { await test([]); }); - it(`uses the 'upsertAttributes' option when specified`, async () => { + it(`uses the 'upsertAttributes' option when specified for a single-namespace type`, async () => { await updateSuccess(type, id, attributes, { upsert: { title: 'foo', @@ -4109,6 +4113,42 @@ describe('SavedObjectsRepository', () => { ); }); + it(`uses the 'upsertAttributes' option when specified for a multi-namespace type that does not exist`, async () => { + const options = { upsert: { title: 'foo', description: 'bar' } }; + mockUpdateResponse(MULTI_NAMESPACE_ISOLATED_TYPE, id, options); + await savedObjectsRepository.update(MULTI_NAMESPACE_ISOLATED_TYPE, id, attributes, options); + expect(client.get).toHaveBeenCalledTimes(1); + expect(client.update).toHaveBeenCalledWith( + expect.objectContaining({ + id: `${MULTI_NAMESPACE_ISOLATED_TYPE}:logstash-*`, + body: expect.objectContaining({ + upsert: expect.objectContaining({ + type: MULTI_NAMESPACE_ISOLATED_TYPE, + [MULTI_NAMESPACE_ISOLATED_TYPE]: { + title: 'foo', + description: 'bar', + }, + }), + }), + }), + expect.anything() + ); + }); + + it(`ignores use the 'upsertAttributes' option when specified for a multi-namespace type that already exists`, async () => { + const options = { upsert: { title: 'foo', description: 'bar' } }; + await updateSuccess(MULTI_NAMESPACE_ISOLATED_TYPE, id, attributes, options); + expect(client.update).toHaveBeenCalledWith( + expect.objectContaining({ + id: `${MULTI_NAMESPACE_ISOLATED_TYPE}:logstash-*`, + body: expect.not.objectContaining({ + upsert: expect.anything(), + }), + }), + expect.anything() + ); + }); + it(`doesn't accept custom references if not an array`, async () => { const test = async (references) => { await updateSuccess(type, id, attributes, { references }); diff --git a/src/core/server/saved_objects/service/lib/repository.ts b/src/core/server/saved_objects/service/lib/repository.ts index 9cdc58f02f5d1..c74092faad96a 100644 --- a/src/core/server/saved_objects/service/lib/repository.ts +++ b/src/core/server/saved_objects/service/lib/repository.ts @@ -161,6 +161,35 @@ export interface SavedObjectsIncrementCounterField { incrementBy?: number; } +/** + * @internal + */ +interface PreflightCheckNamespacesParams { + /** The object type to fetch */ + type: string; + /** The object ID to fetch */ + id: string; + /** The current space */ + namespace: string | undefined; + /** Optional; for an object that is being created, this specifies the initial namespace(s) it will exist in (overriding the current space) */ + initialNamespaces?: string[]; +} + +/** + * @internal + */ +interface PreflightCheckNamespacesResult { + /** If the object exists, and whether or not it exists in the current space */ + checkResult: 'not_found' | 'found_in_namespace' | 'found_outside_namespace'; + /** + * What namespace(s) the object should exist in, if it needs to be created; practically speaking, this will never be undefined if + * checkResult == not_found or checkResult == found_in_namespace + */ + savedObjectNamespaces?: string[]; + /** The source of the raw document, if the object already exists */ + rawDocSource?: GetResponseFound; +} + /** * @public */ @@ -297,12 +326,16 @@ export class SavedObjectsRepository { if (id && overwrite) { // we will overwrite a multi-namespace saved object if it exists; if that happens, ensure we preserve its included namespaces // note: this check throws an error if the object is found but does not exist in this namespace - savedObjectNamespaces = await this.preflightGetNamespaces( + const preflightResult = await this.preflightCheckNamespaces({ type, id, namespace, - initialNamespaces - ); + initialNamespaces, + }); + if (preflightResult.checkResult === 'found_outside_namespace') { + throw SavedObjectsErrorHelpers.createConflictError(type, id); + } + savedObjectNamespaces = preflightResult.savedObjectNamespaces; } else { savedObjectNamespaces = initialNamespaces || getSavedObjectNamespaces(namespace); } @@ -670,11 +703,22 @@ export class SavedObjectsRepository { const namespace = normalizeNamespace(options.namespace); const rawId = this._serializer.generateRawId(namespace, type, id); - let preflightResult: SavedObjectsRawDoc | undefined; + let preflightResult: PreflightCheckNamespacesResult | undefined; if (this._registry.isMultiNamespace(type)) { - preflightResult = await this.preflightCheckIncludesNamespace(type, id, namespace); - const existingNamespaces = getSavedObjectNamespaces(undefined, preflightResult) ?? []; + // note: this check throws an error if the object is found but does not exist in this namespace + preflightResult = await this.preflightCheckNamespaces({ + type, + id, + namespace, + }); + if ( + preflightResult.checkResult === 'found_outside_namespace' || + preflightResult.checkResult === 'not_found' + ) { + throw SavedObjectsErrorHelpers.createGenericNotFoundError(type, id); + } + const existingNamespaces = preflightResult.savedObjectNamespaces ?? []; if ( !force && (existingNamespaces.length > 1 || existingNamespaces.includes(ALL_NAMESPACES_STRING)) @@ -689,7 +733,7 @@ export class SavedObjectsRepository { { id: rawId, index: this.getIndexForType(type), - ...getExpectedVersionProperties(undefined, preflightResult), + ...getExpectedVersionProperties(undefined, preflightResult?.rawDocSource), refresh, }, { ignore: [404] } @@ -1208,22 +1252,33 @@ export class SavedObjectsRepository { const { version, references, upsert, refresh = DEFAULT_REFRESH_SETTING } = options; const namespace = normalizeNamespace(options.namespace); - let preflightResult: SavedObjectsRawDoc | undefined; + let preflightResult: PreflightCheckNamespacesResult | undefined; if (this._registry.isMultiNamespace(type)) { - preflightResult = await this.preflightCheckIncludesNamespace(type, id, namespace); + preflightResult = await this.preflightCheckNamespaces({ + type, + id, + namespace, + }); + if ( + preflightResult.checkResult === 'found_outside_namespace' || + (!upsert && preflightResult.checkResult === 'not_found') + ) { + throw SavedObjectsErrorHelpers.createGenericNotFoundError(type, id); + } } const time = getCurrentTime(); let rawUpsert: SavedObjectsRawDoc | undefined; - if (upsert) { + // don't include upsert if the object already exists; ES doesn't allow upsert in combination with version properties + if (upsert && (!preflightResult || preflightResult.checkResult === 'not_found')) { let savedObjectNamespace: string | undefined; let savedObjectNamespaces: string[] | undefined; if (this._registry.isSingleNamespace(type) && namespace) { savedObjectNamespace = namespace; } else if (this._registry.isMultiNamespace(type)) { - savedObjectNamespaces = await this.preflightGetNamespaces(type, id, namespace); + savedObjectNamespaces = preflightResult!.savedObjectNamespaces; } const migrated = this._migrator.migrateDocument({ @@ -1249,9 +1304,8 @@ export class SavedObjectsRepository { .update({ id: this._serializer.generateRawId(namespace, type, id), index: this.getIndexForType(type), - ...getExpectedVersionProperties(version, preflightResult), + ...getExpectedVersionProperties(version, preflightResult?.rawDocSource), refresh, - body: { doc, ...(rawUpsert && { upsert: rawUpsert._source }), @@ -1753,7 +1807,16 @@ export class SavedObjectsRepository { if (this._registry.isSingleNamespace(type) && namespace) { savedObjectNamespace = namespace; } else if (this._registry.isMultiNamespace(type)) { - savedObjectNamespaces = await this.preflightGetNamespaces(type, id, namespace); + // note: this check throws an error if the object is found but does not exist in this namespace + const preflightResult = await this.preflightCheckNamespaces({ + type, + id, + namespace, + }); + if (preflightResult.checkResult === 'found_outside_namespace') { + throw SavedObjectsErrorHelpers.createConflictError(type, id); + } + savedObjectNamespaces = preflightResult.savedObjectNamespaces; } // attributes: { [counterFieldName]: incrementBy }, @@ -2047,24 +2110,14 @@ export class SavedObjectsRepository { } /** - * Pre-flight check to get a multi-namespace saved object's included namespaces. This ensures that, if the saved object exists, it - * includes the target namespace. - * - * @param type The type of the saved object. - * @param id The ID of the saved object. - * @param namespace The target namespace. - * @param initialNamespaces The target namespace(s) we intend to create the object in, if specified. - * @returns Array of namespaces that this saved object currently includes, or (if the object does not exist yet) the namespaces that a - * newly-created object will include. Value may be undefined if an existing saved object has no namespaces attribute; this should not - * happen in normal operations, but it is possible if the Elasticsearch document is manually modified. - * @throws Will throw an error if the saved object exists and it does not include the target namespace. + * Pre-flight check to ensure that a multi-namespace object exists in the current namespace. */ - private async preflightGetNamespaces( - type: string, - id: string, - namespace: string | undefined, - initialNamespaces?: string[] - ) { + private async preflightCheckNamespaces({ + type, + id, + namespace, + initialNamespaces, + }: PreflightCheckNamespacesParams): Promise { if (!this._registry.isMultiNamespace(type)) { throw new Error(`Cannot make preflight get request for non-multi-namespace type '${type}'.`); } @@ -2084,55 +2137,21 @@ export class SavedObjectsRepository { const indexFound = statusCode !== 404; if (indexFound && isFoundGetResponse(body)) { if (!this.rawDocExistsInNamespaces(body, namespaces)) { - throw SavedObjectsErrorHelpers.createConflictError(type, id); + return { checkResult: 'found_outside_namespace' }; } - return initialNamespaces ?? getSavedObjectNamespaces(namespace, body); + return { + checkResult: 'found_in_namespace', + savedObjectNamespaces: initialNamespaces ?? getSavedObjectNamespaces(namespace, body), + rawDocSource: body, + }; } else if (isNotFoundFromUnsupportedServer({ statusCode, headers })) { // checking if the 404 is from Elasticsearch throw SavedObjectsErrorHelpers.createGenericNotFoundEsUnavailableError(type, id); } - return initialNamespaces ?? getSavedObjectNamespaces(namespace); - } - - /** - * Pre-flight check for a multi-namespace saved object's namespaces. This ensures that, if the saved object exists, it includes the target - * namespace. - * - * @param type The type of the saved object. - * @param id The ID of the saved object. - * @param namespace The target namespace. - * @returns Raw document from Elasticsearch. - * @throws Will throw an error if the saved object is not found, if it doesn't include the target namespace or if the response is not identifiable as an Elasticsearch response. - */ - private async preflightCheckIncludesNamespace(type: string, id: string, namespace?: string) { - if (!this._registry.isMultiNamespace(type)) { - throw new Error(`Cannot make preflight get request for non-multi-namespace type '${type}'.`); - } - - const rawId = this._serializer.generateRawId(undefined, type, id); - const { body, statusCode, headers } = await this.client.get( - { - id: rawId, - index: this.getIndexForType(type), - }, - { ignore: [404] } - ); - - const indexFound = statusCode !== 404; - - // check if we have the elasticsearch header when index is not found and if we do, ensure it is Elasticsearch - if (isNotFoundFromUnsupportedServer({ statusCode, headers })) { - throw SavedObjectsErrorHelpers.createGenericNotFoundEsUnavailableError(type, id); - } - - if ( - !indexFound || - !isFoundGetResponse(body) || - !this.rawDocExistsInNamespace(body, namespace) - ) { - throw SavedObjectsErrorHelpers.createGenericNotFoundError(type, id); - } - return body; + return { + checkResult: 'not_found', + savedObjectNamespaces: initialNamespaces ?? getSavedObjectNamespaces(namespace), + }; } /** The `initialNamespaces` field (create, bulkCreate) is used to create an object in an initial set of spaces. */ diff --git a/src/core/server/server.api.md b/src/core/server/server.api.md index a1e5d61744648..958083ae06899 100644 --- a/src/core/server/server.api.md +++ b/src/core/server/server.api.md @@ -33,6 +33,7 @@ import { LoggerFactory } from '@kbn/logging'; import { LogLevel } from '@kbn/logging'; import { LogMeta } from '@kbn/logging'; import { LogRecord } from '@kbn/logging'; +import { MaybePromise } from '@kbn/utility-types'; import { ObjectType } from '@kbn/config-schema'; import { Observable } from 'rxjs'; import { PackageInfo } from '@kbn/config'; @@ -156,6 +157,27 @@ export interface AuthToolkit { } & ResponseHeaders) => AuthResult; } +// @public +export interface BaseDeprecationDetails { + correctiveActions: { + api?: { + path: string; + method: 'POST' | 'PUT'; + body?: { + [key: string]: any; + }; + omitContextFromBody?: boolean; + }; + manualSteps: string[]; + }; + deprecationType?: 'config' | 'feature'; + documentationUrl?: string; + level: 'warning' | 'critical' | 'fetch_error'; + message: string; + requireRestart?: boolean; + title: string; +} + // @public export class BasePath { // @internal @@ -250,6 +272,14 @@ export { ConfigDeprecation } export { ConfigDeprecationContext } +// @public (undocumented) +export interface ConfigDeprecationDetails extends BaseDeprecationDetails { + // (undocumented) + configPath: string; + // (undocumented) + deprecationType: 'config'; +} + export { ConfigDeprecationFactory } export { ConfigDeprecationProvider } @@ -782,25 +812,7 @@ export interface DeprecationsClient { } // @public (undocumented) -export interface DeprecationsDetails { - correctiveActions: { - api?: { - path: string; - method: 'POST' | 'PUT'; - body?: { - [key: string]: any; - }; - omitContextFromBody?: boolean; - }; - manualSteps: string[]; - }; - deprecationType?: 'config' | 'feature'; - documentationUrl?: string; - level: 'warning' | 'critical' | 'fetch_error'; - message: string; - requireRestart?: boolean; - title: string; -} +export type DeprecationsDetails = ConfigDeprecationDetails | FeatureDeprecationDetails; // @public export interface DeprecationSettings { @@ -951,6 +963,12 @@ export interface FakeRequest { headers: Headers; } +// @public (undocumented) +export interface FeatureDeprecationDetails extends BaseDeprecationDetails { + // (undocumented) + deprecationType?: 'feature' | undefined; +} + // @public export type GetAuthHeaders = (request: KibanaRequest) => AuthHeaders | undefined; @@ -1676,8 +1694,6 @@ export type RedirectResponseOptions = HttpResponseOptions & { // @public (undocumented) export interface RegisterDeprecationsConfig { - // Warning: (ae-forgotten-export) The symbol "MaybePromise" needs to be exported by the entry point index.d.ts - // // (undocumented) getDeprecations: (context: GetDeprecationsContext) => MaybePromise; } diff --git a/src/core/server/server.ts b/src/core/server/server.ts index 59cde6835c519..b6f263f0c22ff 100644 --- a/src/core/server/server.ts +++ b/src/core/server/server.ts @@ -51,7 +51,7 @@ import { ServiceConfigDescriptor, } from './internal_types'; import { CoreUsageDataService } from './core_usage_data'; -import { DeprecationsService } from './deprecations'; +import { DeprecationsService, config as deprecationConfig } from './deprecations'; import { CoreRouteHandlerContext } from './core_route_handler_context'; import { config as externalUrlConfig } from './external_url'; import { config as executionContextConfig } from './execution_context'; @@ -206,7 +206,7 @@ export class Server { executionContext: executionContextSetup, }); - const deprecationsSetup = this.deprecations.setup({ + const deprecationsSetup = await this.deprecations.setup({ http: httpSetup, }); @@ -388,6 +388,7 @@ export class Server { statusConfig, pidConfig, i18nConfig, + deprecationConfig, ]; this.configService.addDeprecationProvider(rootConfigPath, coreDeprecationProvider); diff --git a/src/dev/build/tasks/os_packages/docker_generator/bundle_dockerfiles.ts b/src/dev/build/tasks/os_packages/docker_generator/bundle_dockerfiles.ts index 5f0665692b46f..02b469820f900 100644 --- a/src/dev/build/tasks/os_packages/docker_generator/bundle_dockerfiles.ts +++ b/src/dev/build/tasks/os_packages/docker_generator/bundle_dockerfiles.ts @@ -8,8 +8,9 @@ import { resolve } from 'path'; import { readFileSync } from 'fs'; +import { copyFile } from 'fs/promises'; -import { ToolingLog } from '@kbn/dev-utils'; +import { ToolingLog, REPO_ROOT } from '@kbn/dev-utils'; import Mustache from 'mustache'; import { compressTar, copyAll, mkdirp, write, Config } from '../../../lib'; @@ -39,9 +40,10 @@ export async function bundleDockerFiles(config: Config, log: ToolingLog, scope: await copyAll(resolve(scope.dockerBuildDir, 'bin'), resolve(dockerFilesBuildDir, 'bin')); await copyAll(resolve(scope.dockerBuildDir, 'config'), resolve(dockerFilesBuildDir, 'config')); if (scope.ironbank) { - await copyAll(resolve(scope.dockerBuildDir), resolve(dockerFilesBuildDir), { - select: ['LICENSE'], - }); + await copyFile( + resolve(REPO_ROOT, 'licenses/ELASTIC-LICENSE-2.0.txt'), + resolve(dockerFilesBuildDir, 'LICENSE') + ); const templates = ['hardening_manifest.yaml', 'README.md']; for (const template of templates) { const file = readFileSync(resolve(__dirname, 'templates/ironbank', template)); diff --git a/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker b/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker index c957293aa59aa..7d486e4717e57 100755 --- a/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker +++ b/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker @@ -226,6 +226,12 @@ kibana_vars=( xpack.alerts.invalidateApiKeysTask.interval xpack.alerts.invalidateApiKeysTask.removalDelay xpack.apm.enabled + xpack.apm.indices.error + xpack.apm.indices.metric + xpack.apm.indices.onboarding + xpack.apm.indices.sourcemap + xpack.apm.indices.span + xpack.apm.indices.transaction xpack.apm.maxServiceEnvironments xpack.apm.searchAggregatedTransactions xpack.apm.serviceMapEnabled diff --git a/src/dev/build/tasks/os_packages/docker_generator/resources/ironbank/LICENSE b/src/dev/build/tasks/os_packages/docker_generator/resources/ironbank/LICENSE deleted file mode 100644 index 632c3abe22e9b..0000000000000 --- a/src/dev/build/tasks/os_packages/docker_generator/resources/ironbank/LICENSE +++ /dev/null @@ -1,280 +0,0 @@ -ELASTIC LICENSE AGREEMENT - -PLEASE READ CAREFULLY THIS ELASTIC LICENSE AGREEMENT (THIS "AGREEMENT"), WHICH -CONSTITUTES A LEGALLY BINDING AGREEMENT AND GOVERNS ALL OF YOUR USE OF ALL OF -THE ELASTIC SOFTWARE WITH WHICH THIS AGREEMENT IS INCLUDED ("ELASTIC SOFTWARE") -THAT IS PROVIDED IN OBJECT CODE FORMAT, AND, IN ACCORDANCE WITH SECTION 2 BELOW, -CERTAIN OF THE ELASTIC SOFTWARE THAT IS PROVIDED IN SOURCE CODE FORMAT. BY -INSTALLING OR USING ANY OF THE ELASTIC SOFTWARE GOVERNED BY THIS AGREEMENT, YOU -ARE ASSENTING TO THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE -WITH SUCH TERMS AND CONDITIONS, YOU MAY NOT INSTALL OR USE THE ELASTIC SOFTWARE -GOVERNED BY THIS AGREEMENT. IF YOU ARE INSTALLING OR USING THE SOFTWARE ON -BEHALF OF A LEGAL ENTITY, YOU REPRESENT AND WARRANT THAT YOU HAVE THE ACTUAL -AUTHORITY TO AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT ON BEHALF OF -SUCH ENTITY. - -Posted Date: April 20, 2018 - -This Agreement is entered into by and between Elasticsearch BV ("Elastic") and -You, or the legal entity on behalf of whom You are acting (as applicable, -"You"). - -1. OBJECT CODE END USER LICENSES, RESTRICTIONS AND THIRD PARTY OPEN SOURCE -SOFTWARE - - 1.1 Object Code End User License. Subject to the terms and conditions of - Section 1.2 of this Agreement, Elastic hereby grants to You, AT NO CHARGE and - for so long as you are not in breach of any provision of this Agreement, a - License to the Basic Features and Functions of the Elastic Software. - - 1.2 Reservation of Rights; Restrictions. As between Elastic and You, Elastic - and its licensors own all right, title and interest in and to the Elastic - Software, and except as expressly set forth in Sections 1.1, and 2.1 of this - Agreement, no other license to the Elastic Software is granted to You under - this Agreement, by implication, estoppel or otherwise. You agree not to: (i) - reverse engineer or decompile, decrypt, disassemble or otherwise reduce any - Elastic Software provided to You in Object Code, or any portion thereof, to - Source Code, except and only to the extent any such restriction is prohibited - by applicable law, (ii) except as expressly permitted in this Agreement, - prepare derivative works from, modify, copy or use the Elastic Software Object - Code or the Commercial Software Source Code in any manner; (iii) except as - expressly permitted in Section 1.1 above, transfer, sell, rent, lease, - distribute, sublicense, loan or otherwise transfer, Elastic Software Object - Code, in whole or in part, to any third party; (iv) use Elastic Software - Object Code for providing time-sharing services, any software-as-a-service, - service bureau services or as part of an application services provider or - other service offering (collectively, "SaaS Offering") where obtaining access - to the Elastic Software or the features and functions of the Elastic Software - is a primary reason or substantial motivation for users of the SaaS Offering - to access and/or use the SaaS Offering ("Prohibited SaaS Offering"); (v) - circumvent the limitations on use of Elastic Software provided to You in - Object Code format that are imposed or preserved by any License Key, or (vi) - alter or remove any Marks and Notices in the Elastic Software. If You have any - question as to whether a specific SaaS Offering constitutes a Prohibited SaaS - Offering, or are interested in obtaining Elastic's permission to engage in - commercial or non-commercial distribution of the Elastic Software, please - contact elastic_license@elastic.co. - - 1.3 Third Party Open Source Software. The Commercial Software may contain or - be provided with third party open source libraries, components, utilities and - other open source software (collectively, "Open Source Software"), which Open - Source Software may have applicable license terms as identified on a website - designated by Elastic. Notwithstanding anything to the contrary herein, use of - the Open Source Software shall be subject to the license terms and conditions - applicable to such Open Source Software, to the extent required by the - applicable licensor (which terms shall not restrict the license rights granted - to You hereunder, but may contain additional rights). To the extent any - condition of this Agreement conflicts with any license to the Open Source - Software, the Open Source Software license will govern with respect to such - Open Source Software only. Elastic may also separately provide you with - certain open source software that is licensed by Elastic. Your use of such - Elastic open source software will not be governed by this Agreement, but by - the applicable open source license terms. - -2. COMMERCIAL SOFTWARE SOURCE CODE - - 2.1 Limited License. Subject to the terms and conditions of Section 2.2 of - this Agreement, Elastic hereby grants to You, AT NO CHARGE and for so long as - you are not in breach of any provision of this Agreement, a limited, - non-exclusive, non-transferable, fully paid up royalty free right and license - to the Commercial Software in Source Code format, without the right to grant - or authorize sublicenses, to prepare Derivative Works of the Commercial - Software, provided You (i) do not hack the licensing mechanism, or otherwise - circumvent the intended limitations on the use of Elastic Software to enable - features other than Basic Features and Functions or those features You are - entitled to as part of a Subscription, and (ii) use the resulting object code - only for reasonable testing purposes. - - 2.2 Restrictions. Nothing in Section 2.1 grants You the right to (i) use the - Commercial Software Source Code other than in accordance with Section 2.1 - above, (ii) use a Derivative Work of the Commercial Software outside of a - Non-production Environment, in any production capacity, on a temporary or - permanent basis, or (iii) transfer, sell, rent, lease, distribute, sublicense, - loan or otherwise make available the Commercial Software Source Code, in whole - or in part, to any third party. Notwithstanding the foregoing, You may - maintain a copy of the repository in which the Source Code of the Commercial - Software resides and that copy may be publicly accessible, provided that you - include this Agreement with Your copy of the repository. - -3. TERMINATION - - 3.1 Termination. This Agreement will automatically terminate, whether or not - You receive notice of such Termination from Elastic, if You breach any of its - provisions. - - 3.2 Post Termination. Upon any termination of this Agreement, for any reason, - You shall promptly cease the use of the Elastic Software in Object Code format - and cease use of the Commercial Software in Source Code format. For the - avoidance of doubt, termination of this Agreement will not affect Your right - to use Elastic Software, in either Object Code or Source Code formats, made - available under the Apache License Version 2.0. - - 3.3 Survival. Sections 1.2, 2.2. 3.3, 4 and 5 shall survive any termination or - expiration of this Agreement. - -4. DISCLAIMER OF WARRANTIES AND LIMITATION OF LIABILITY - - 4.1 Disclaimer of Warranties. TO THE MAXIMUM EXTENT PERMITTED UNDER APPLICABLE - LAW, THE ELASTIC SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, - AND ELASTIC AND ITS LICENSORS MAKE NO WARRANTIES WHETHER EXPRESSED, IMPLIED OR - STATUTORY REGARDING OR RELATING TO THE ELASTIC SOFTWARE. TO THE MAXIMUM EXTENT - PERMITTED UNDER APPLICABLE LAW, ELASTIC AND ITS LICENSORS SPECIFICALLY - DISCLAIM ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND NON-INFRINGEMENT WITH RESPECT TO THE ELASTIC SOFTWARE, AND WITH - RESPECT TO THE USE OF THE FOREGOING. FURTHER, ELASTIC DOES NOT WARRANT RESULTS - OF USE OR THAT THE ELASTIC SOFTWARE WILL BE ERROR FREE OR THAT THE USE OF THE - ELASTIC SOFTWARE WILL BE UNINTERRUPTED. - - 4.2 Limitation of Liability. IN NO EVENT SHALL ELASTIC OR ITS LICENSORS BE - LIABLE TO YOU OR ANY THIRD PARTY FOR ANY DIRECT OR INDIRECT DAMAGES, - INCLUDING, WITHOUT LIMITATION, FOR ANY LOSS OF PROFITS, LOSS OF USE, BUSINESS - INTERRUPTION, LOSS OF DATA, COST OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY - SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, IN CONNECTION WITH - OR ARISING OUT OF THE USE OR INABILITY TO USE THE ELASTIC SOFTWARE, OR THE - PERFORMANCE OF OR FAILURE TO PERFORM THIS AGREEMENT, WHETHER ALLEGED AS A - BREACH OF CONTRACT OR TORTIOUS CONDUCT, INCLUDING NEGLIGENCE, EVEN IF ELASTIC - HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -5. MISCELLANEOUS - - This Agreement completely and exclusively states the entire agreement of the - parties regarding the subject matter herein, and it supersedes, and its terms - govern, all prior proposals, agreements, or other communications between the - parties, oral or written, regarding such subject matter. This Agreement may be - modified by Elastic from time to time, and any such modifications will be - effective upon the "Posted Date" set forth at the top of the modified - Agreement. If any provision hereof is held unenforceable, this Agreement will - continue without said provision and be interpreted to reflect the original - intent of the parties. This Agreement and any non-contractual obligation - arising out of or in connection with it, is governed exclusively by Dutch law. - This Agreement shall not be governed by the 1980 UN Convention on Contracts - for the International Sale of Goods. All disputes arising out of or in - connection with this Agreement, including its existence and validity, shall be - resolved by the courts with jurisdiction in Amsterdam, The Netherlands, except - where mandatory law provides for the courts at another location in The - Netherlands to have jurisdiction. The parties hereby irrevocably waive any and - all claims and defenses either might otherwise have in any such action or - proceeding in any of such courts based upon any alleged lack of personal - jurisdiction, improper venue, forum non conveniens or any similar claim or - defense. A breach or threatened breach, by You of Section 2 may cause - irreparable harm for which damages at law may not provide adequate relief, and - therefore Elastic shall be entitled to seek injunctive relief without being - required to post a bond. You may not assign this Agreement (including by - operation of law in connection with a merger or acquisition), in whole or in - part to any third party without the prior written consent of Elastic, which - may be withheld or granted by Elastic in its sole and absolute discretion. - Any assignment in violation of the preceding sentence is void. Notices to - Elastic may also be sent to legal@elastic.co. - -6. DEFINITIONS - - The following terms have the meanings ascribed: - - 6.1 "Affiliate" means, with respect to a party, any entity that controls, is - controlled by, or which is under common control with, such party, where - "control" means ownership of at least fifty percent (50%) of the outstanding - voting shares of the entity, or the contractual right to establish policy for, - and manage the operations of, the entity. - - 6.2 "Basic Features and Functions" means those features and functions of the - Elastic Software that are eligible for use under a Basic license, as set forth - at https://www.elastic.co/subscriptions, as may be modified by Elastic from - time to time. - - 6.3 "Commercial Software" means the Elastic Software Source Code in any file - containing a header stating the contents are subject to the Elastic License or - which is contained in the repository folder labeled "x-pack", unless a LICENSE - file present in the directory subtree declares a different license. - - 6.4 "Derivative Work of the Commercial Software" means, for purposes of this - Agreement, any modification(s) or enhancement(s) to the Commercial Software, - which represent, as a whole, an original work of authorship. - - 6.5 "License" means a limited, non-exclusive, non-transferable, fully paid up, - royalty free, right and license, without the right to grant or authorize - sublicenses, solely for Your internal business operations to (i) install and - use the applicable Features and Functions of the Elastic Software in Object - Code, and (ii) permit Contractors and Your Affiliates to use the Elastic - software as set forth in (i) above, provided that such use by Contractors must - be solely for Your benefit and/or the benefit of Your Affiliates, and You - shall be responsible for all acts and omissions of such Contractors and - Affiliates in connection with their use of the Elastic software that are - contrary to the terms and conditions of this Agreement. - - 6.6 "License Key" means a sequence of bytes, including but not limited to a - JSON blob, that is used to enable certain features and functions of the - Elastic Software. - - 6.7 "Marks and Notices" means all Elastic trademarks, trade names, logos and - notices present on the Documentation as originally provided by Elastic. - - 6.8 "Non-production Environment" means an environment for development, testing - or quality assurance, where software is not used for production purposes. - - 6.9 "Object Code" means any form resulting from mechanical transformation or - translation of Source Code form, including but not limited to compiled object - code, generated documentation, and conversions to other media types. - - 6.10 "Source Code" means the preferred form of computer software for making - modifications, including but not limited to software source code, - documentation source, and configuration files. - - 6.11 "Subscription" means the right to receive Support Services and a License - to the Commercial Software. - - -GOVERNMENT END USER ADDENDUM TO THE ELASTIC LICENSE AGREEMENT - - This ADDENDUM TO THE ELASTIC LICENSE AGREEMENT (this "Addendum") applies -only to U.S. Federal Government, State Government, and Local Government -entities ("Government End Users") of the Elastic Software. This Addendum is -subject to, and hereby incorporated into, the Elastic License Agreement, -which is being entered into as of even date herewith, by Elastic and You (the -"Agreement"). This Addendum sets forth additional terms and conditions -related to Your use of the Elastic Software. Capitalized terms not defined in -this Addendum have the meaning set forth in the Agreement. - - 1. LIMITED LICENSE TO DISTRIBUTE (DSOP ONLY). Subject to the terms and -conditions of the Agreement (including this Addendum), Elastic grants the -Department of Defense Enterprise DevSecOps Initiative (DSOP) a royalty-free, -non-exclusive, non-transferable, limited license to reproduce and distribute -the Elastic Software solely through a software distribution repository -controlled and managed by DSOP, provided that DSOP: (i) distributes the -Elastic Software complete and unmodified, inclusive of the Agreement -(including this Addendum) and (ii) does not remove or alter any proprietary -legends or notices contained in the Elastic Software. - - 2. CHOICE OF LAW. The choice of law and venue provisions set forth shall -prevail over those set forth in Section 5 of the Agreement. - - "For U.S. Federal Government Entity End Users. This Agreement and any - non-contractual obligation arising out of or in connection with it, is - governed exclusively by U.S. Federal law. To the extent permitted by - federal law, the laws of the State of Delaware (excluding Delaware choice - of law rules) will apply in the absence of applicable federal law. - - For State and Local Government Entity End Users. This Agreement and any - non-contractual obligation arising out of or in connection with it, is - governed exclusively by the laws of the state in which you are located - without reference to conflict of laws. Furthermore, the Parties agree that - the Uniform Computer Information Transactions Act or any version thereof, - adopted by any state in any form ('UCITA'), shall not apply to this - Agreement and, to the extent that UCITA is applicable, the Parties agree to - opt out of the applicability of UCITA pursuant to the opt-out provision(s) - contained therein." - - 3. ELASTIC LICENSE MODIFICATION. Section 5 of the Agreement is hereby -amended to replace - - "This Agreement may be modified by Elastic from time to time, and any - such modifications will be effective upon the "Posted Date" set forth at - the top of the modified Agreement." - - with: - - "This Agreement may be modified by Elastic from time to time; provided, - however, that any such modifications shall apply only to Elastic Software - that is installed after the "Posted Date" set forth at the top of the - modified Agreement." - -V100820.0 diff --git a/src/dev/build/tasks/os_packages/docker_generator/templates/ironbank/README.md b/src/dev/build/tasks/os_packages/docker_generator/templates/ironbank/README.md index d297d135149f4..d81b219900a85 100644 --- a/src/dev/build/tasks/os_packages/docker_generator/templates/ironbank/README.md +++ b/src/dev/build/tasks/os_packages/docker_generator/templates/ironbank/README.md @@ -31,9 +31,9 @@ You can learn more about the Elastic Community and also understand how to get mo visiting [Elastic Community](https://www.elastic.co/community). This software is governed by the [Elastic -License](https://github.com/elastic/elasticsearch/blob/{{branch}}/licenses/ELASTIC-LICENSE.txt), +License](https://github.com/elastic/kibana/blob/{{branch}}/licenses/ELASTIC-LICENSE-2.0.txt), and includes the full set of [free features](https://www.elastic.co/subscriptions). View the detailed release notes -[here](https://www.elastic.co/guide/en/elasticsearch/reference/{{branch}}/es-release-notes.html). +[here](https://www.elastic.co/guide/en/kibana/{{branch}}/release-notes-{{version}}.html). diff --git a/src/dev/build/tasks/os_packages/docker_generator/templates/ironbank/hardening_manifest.yaml b/src/dev/build/tasks/os_packages/docker_generator/templates/ironbank/hardening_manifest.yaml index 2e65e68bc2882..24614039e5eb7 100644 --- a/src/dev/build/tasks/os_packages/docker_generator/templates/ironbank/hardening_manifest.yaml +++ b/src/dev/build/tasks/os_packages/docker_generator/templates/ironbank/hardening_manifest.yaml @@ -56,3 +56,7 @@ maintainers: name: 'Alexander Klepal' username: 'alexander.klepal' cht_member: true + - email: "yalabe.dukuly@anchore.com" + name: "Yalabe Dukuly" + username: "yalabe.dukuly" + cht_member: true \ No newline at end of file diff --git a/src/dev/ci_setup/.bazelrc-ci b/src/dev/ci_setup/.bazelrc-ci index ef6fab3a30590..9aee657f37bcb 100644 --- a/src/dev/ci_setup/.bazelrc-ci +++ b/src/dev/ci_setup/.bazelrc-ci @@ -1,16 +1,15 @@ -# Inspired on https://github.com/angular/angular/blob/master/.circleci/bazel.linux.rc -# These options are only enabled when running on CI -# That is done by copying this file into "$HOME/.bazelrc" which loads after the .bazelrc into the workspace +# Used in the on-merge job to persist the Bazel cache to BuildBuddy +# from: .buildkite/scripts/common/persist_bazel_cache.sh -# Import and load bazelrc common settings for ci env -try-import %workspace%/src/dev/ci_setup/.bazelrc-ci.common +import %workspace%/.bazelrc.common # BuildBuddy settings -## Remote settings including cache build --bes_results_url=https://app.buildbuddy.io/invocation/ build --bes_backend=grpcs://cloud.buildbuddy.io build --remote_cache=grpcs://cloud.buildbuddy.io build --remote_timeout=3600 +# --remote_header=x-buildbuddy-api-key= # appended in CI script -## Metadata settings +# Metadata settings build --build_metadata=ROLE=CI +build --workspace_status_command="node ./src/dev/bazel_workspace_status.js" diff --git a/src/dev/ci_setup/.bazelrc-ci.common b/src/dev/ci_setup/.bazelrc-ci.common deleted file mode 100644 index 56a5ee8d30cd6..0000000000000 --- a/src/dev/ci_setup/.bazelrc-ci.common +++ /dev/null @@ -1,11 +0,0 @@ -# Inspired on https://github.com/angular/angular/blob/master/.circleci/bazel.common.rc -# Settings in this file should be OS agnostic - -# Don't be spammy in the logs -build --noshow_progress - -# More details on failures -build --verbose_failures=true - -## Avoid to keep connections to build event backend connections alive across builds -build --keep_backend_build_event_connections_alive=false diff --git a/src/dev/license_checker/config.ts b/src/dev/license_checker/config.ts index 818ea3675194e..a4ae39848735e 100644 --- a/src/dev/license_checker/config.ts +++ b/src/dev/license_checker/config.ts @@ -74,7 +74,7 @@ export const DEV_ONLY_LICENSE_ALLOWED = ['MPL-2.0']; export const LICENSE_OVERRIDES = { 'jsts@1.6.2': ['Eclipse Distribution License - v 1.0'], // cf. https://github.com/bjornharrtell/jsts '@mapbox/jsonlint-lines-primitives@2.0.2': ['MIT'], // license in readme https://github.com/tmcw/jsonlint - '@elastic/ems-client@7.15.0': ['Elastic License 2.0'], + '@elastic/ems-client@7.16.0': ['Elastic License 2.0'], '@elastic/eui@39.0.0': ['SSPL-1.0 OR Elastic License 2.0'], 'language-subtag-registry@0.3.21': ['CC-BY-4.0'], // retired ODC‑By license https://github.com/mattcg/language-subtag-registry }; diff --git a/src/dev/typescript/run_type_check_cli.ts b/src/dev/typescript/run_type_check_cli.ts index 472b9c04757ca..27998f881a03d 100644 --- a/src/dev/typescript/run_type_check_cli.ts +++ b/src/dev/typescript/run_type_check_cli.ts @@ -53,23 +53,8 @@ export async function runTypeCheckCli() { } } - const nonCompositeProjects = projects.filter((p) => !p.isCompositeProject()); - if (!nonCompositeProjects.length) { - if (projectFilter) { - log.success( - `${flags.project} is a composite project so its types are validated by scripts/build_ts_refs` - ); - } else { - log.success( - `All projects are composite so their types are validated by scripts/build_ts_refs` - ); - } - - return; - } - const concurrency = Math.min(4, Math.round((Os.cpus() || []).length / 2) || 1) || 1; - log.info('running type check in', nonCompositeProjects.length, 'non-composite projects'); + log.info('running type check in', projects.length, 'projects'); const tscArgs = [ ...['--emitDeclarationOnly', 'false'], @@ -81,7 +66,7 @@ export async function runTypeCheckCli() { ]; const failureCount = await lastValueFrom( - Rx.from(nonCompositeProjects).pipe( + Rx.from(projects).pipe( mergeMap(async (p) => { const relativePath = Path.relative(process.cwd(), p.tsConfigPath); diff --git a/src/plugins/apm_oss/README.asciidoc b/src/plugins/apm_oss/README.asciidoc deleted file mode 100644 index c3c060a99ee27..0000000000000 --- a/src/plugins/apm_oss/README.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -# APM OSS plugin - -OSS plugin for APM. Includes index configuration and tutorial resources. - -See <<../../x-pack/plugins/apm/readme.md,the X-Pack APM plugin README>> for information about the main APM plugin. diff --git a/src/plugins/apm_oss/kibana.json b/src/plugins/apm_oss/kibana.json deleted file mode 100644 index f18b275add9e3..0000000000000 --- a/src/plugins/apm_oss/kibana.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "id": "apmOss", - "owner": { - "name": "APM UI", - "githubTeam": "apm-ui" - }, - "version": "8.0.0", - "server": true, - "kibanaVersion": "kibana", - "configPath": ["apm_oss"], - "ui": true, - "requiredPlugins": ["home"] -} diff --git a/src/plugins/apm_oss/public/plugin.ts b/src/plugins/apm_oss/public/plugin.ts deleted file mode 100644 index e6981954b301a..0000000000000 --- a/src/plugins/apm_oss/public/plugin.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 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 { CoreSetup, CoreStart, Plugin } from 'kibana/public'; -import { ApmOssPluginSetup, ApmOssPluginStart } from './types'; - -export class ApmOssPlugin implements Plugin { - public setup(core: CoreSetup): ApmOssPluginSetup { - return {}; - } - - public start(core: CoreStart): ApmOssPluginStart { - return {}; - } - - public stop() {} -} diff --git a/src/plugins/apm_oss/server/index.ts b/src/plugins/apm_oss/server/index.ts deleted file mode 100644 index f2f6777672e33..0000000000000 --- a/src/plugins/apm_oss/server/index.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 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 { schema, TypeOf } from '@kbn/config-schema'; -import { ConfigDeprecationProvider, PluginInitializerContext } from '../../../core/server'; -import { APMOSSPlugin } from './plugin'; - -const deprecations: ConfigDeprecationProvider = ({ deprecate, unused }) => [ - deprecate('enabled', '8.0.0'), - unused('fleetMode'), - unused('indexPattern'), -]; - -export const config = { - schema: schema.object({ - enabled: schema.boolean({ defaultValue: true }), - transactionIndices: schema.string({ defaultValue: 'apm-*' }), - spanIndices: schema.string({ defaultValue: 'apm-*' }), - errorIndices: schema.string({ defaultValue: 'apm-*' }), - metricsIndices: schema.string({ defaultValue: 'apm-*' }), - sourcemapIndices: schema.string({ defaultValue: 'apm-*' }), - onboardingIndices: schema.string({ defaultValue: 'apm-*' }), - indexPattern: schema.string({ defaultValue: 'apm-*' }), - fleetMode: schema.boolean({ defaultValue: true }), - }), - deprecations, -}; - -export function plugin(initializerContext: PluginInitializerContext) { - return new APMOSSPlugin(initializerContext); -} - -export type APMOSSConfig = TypeOf; - -export { APMOSSPluginSetup } from './plugin'; diff --git a/src/plugins/apm_oss/server/plugin.ts b/src/plugins/apm_oss/server/plugin.ts deleted file mode 100644 index 02a8ac38be2a3..0000000000000 --- a/src/plugins/apm_oss/server/plugin.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 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 { Observable } from 'rxjs'; -import { Plugin, PluginInitializerContext } from 'src/core/server'; -import { APMOSSConfig } from './'; - -export class APMOSSPlugin implements Plugin { - constructor(private readonly initContext: PluginInitializerContext) { - this.initContext = initContext; - } - public setup() { - const config$ = this.initContext.config.create(); - const config = this.initContext.config.get(); - return { config, config$ }; - } - - start() {} - stop() {} -} - -export interface APMOSSPluginSetup { - config: APMOSSConfig; - config$: Observable; -} diff --git a/src/plugins/apm_oss/tsconfig.json b/src/plugins/apm_oss/tsconfig.json deleted file mode 100644 index 08ed86d5da0a8..0000000000000 --- a/src/plugins/apm_oss/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../../../tsconfig.base.json", - "compilerOptions": { - "outDir": "./target/types", - "emitDeclarationOnly": true, - "declaration": true, - "declarationMap": true - }, - "include": [ - "common/**/*", - "public/**/*", - "server/**/*", - // have to declare *.json explicitly due to https://github.com/microsoft/TypeScript/issues/25636 - "server/tutorial/index_pattern.json" - ], - "references": [{ "path": "../../core/tsconfig.json" }, { "path": "../home/tsconfig.json" }] -} diff --git a/src/plugins/custom_integrations/common/index.ts b/src/plugins/custom_integrations/common/index.ts index 9af7c4ccd4633..944ac6ba3e6ee 100755 --- a/src/plugins/custom_integrations/common/index.ts +++ b/src/plugins/custom_integrations/common/index.ts @@ -40,11 +40,15 @@ export const INTEGRATION_CATEGORY_DISPLAY = { web: 'Web', // Kibana added - upload_file: 'Upload a file', + communication: 'Communication', + customer_support: 'Customer Support', + document_storage: 'Document Storage', + enterprise_management: 'Enterprise Management', + knowledge_platform: 'Knowledge Platform', language_client: 'Language client', - - // Internal - updates_available: 'Updates available', + project_management: 'Project Management', + software_development: 'Software Development', + upload_file: 'Upload a file', }; /** @@ -73,6 +77,7 @@ export interface IntegrationCategoryCount { // TODO: consider i18n export const SHIPPER_DISPLAY = { beats: 'Beats', + enterprise_search: 'Enterprise Search', language_clients: 'Language clients', other: 'Other', sample_data: 'Sample data', diff --git a/src/plugins/custom_integrations/public/services/stub/fixtures/integrations.ts b/src/plugins/custom_integrations/public/services/stub/fixtures/integrations.ts index 7553deada9e26..5e4427a66cc76 100644 --- a/src/plugins/custom_integrations/public/services/stub/fixtures/integrations.ts +++ b/src/plugins/custom_integrations/public/services/stub/fixtures/integrations.ts @@ -10,1875 +10,54 @@ import type { CustomIntegration } from '../../../../common'; export const integrations: CustomIntegration[] = [ { - type: 'ui_link', - id: 'System logs', - title: 'System logs', - categories: ['os_system', 'security'], - uiInternalPath: '/app/home#/tutorial/systemLogs', - description: 'Collect system logs of common Unix/Linux based distributions.', - icons: [ - { - type: 'eui', - src: 'logoLogging', - }, - ], - shipper: 'beats', - eprOverlap: 'system', - isBeta: false, - }, - { - type: 'ui_link', - id: 'System metrics', - title: 'System metrics', - categories: ['os_system', 'security'], - uiInternalPath: '/app/home#/tutorial/systemMetrics', - description: 'Collect CPU, memory, network, and disk statistics from the host.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/system.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'system', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Apache logs', - title: 'Apache logs', - categories: ['web'], - uiInternalPath: '/app/home#/tutorial/apacheLogs', - description: 'Collect and parse access and error logs created by the Apache HTTP server.', - icons: [ - { - type: 'eui', - src: 'logoApache', - }, - ], - shipper: 'beats', - eprOverlap: 'apache', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Apache metrics', - title: 'Apache metrics', - categories: ['web'], - uiInternalPath: '/app/home#/tutorial/apacheMetrics', - description: 'Fetch internal metrics from the Apache 2 HTTP server.', - icons: [ - { - type: 'eui', - src: 'logoApache', - }, - ], - shipper: 'beats', - eprOverlap: 'apache', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Elasticsearch logs', - title: 'Elasticsearch logs', - categories: ['containers', 'os_system'], - uiInternalPath: '/app/home#/tutorial/elasticsearchLogs', - description: 'Collect and parse logs created by Elasticsearch.', - icons: [ - { - type: 'eui', - src: 'logoElasticsearch', - }, - ], - shipper: 'beats', - eprOverlap: 'elasticsearch', - isBeta: false, - }, - { - type: 'ui_link', - id: 'IIS logs', - title: 'IIS logs', - categories: ['web'], - uiInternalPath: '/app/home#/tutorial/iisLogs', - description: 'Collect and parse access and error logs created by the IIS HTTP server.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/iis.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'iis', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Kafka logs', - title: 'Kafka logs', - categories: ['message_queue'], - uiInternalPath: '/app/home#/tutorial/kafkaLogs', - description: 'Collect and parse logs created by Kafka.', - icons: [ - { - type: 'eui', - src: 'logoKafka', - }, - ], - shipper: 'beats', - eprOverlap: 'kafka', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Logstash logs', - title: 'Logstash logs', - categories: ['custom'], - uiInternalPath: '/app/home#/tutorial/logstashLogs', - description: 'Collect Logstash main and slow logs.', - icons: [ - { - type: 'eui', - src: 'logoLogstash', - }, - ], - shipper: 'beats', - eprOverlap: 'logstash', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Nginx logs', - title: 'Nginx logs', - categories: ['web', 'security'], - uiInternalPath: '/app/home#/tutorial/nginxLogs', - description: 'Collect and parse access and error logs created by the Nginx HTTP server.', - icons: [ - { - type: 'eui', - src: 'logoNginx', - }, - ], - shipper: 'beats', - eprOverlap: 'nginx', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Nginx metrics', - title: 'Nginx metrics', - categories: ['web', 'security'], - uiInternalPath: '/app/home#/tutorial/nginxMetrics', - description: 'Fetch internal metrics from the Nginx HTTP server.', - icons: [ - { - type: 'eui', - src: 'logoNginx', - }, - ], - shipper: 'beats', - eprOverlap: 'nginx', - isBeta: false, - }, - { - type: 'ui_link', - id: 'MySQL logs', - title: 'MySQL logs', - categories: ['datastore'], - uiInternalPath: '/app/home#/tutorial/mysqlLogs', - description: 'Collect and parse error and slow logs created by MySQL.', - icons: [ - { - type: 'eui', - src: 'logoMySQL', - }, - ], - shipper: 'beats', - eprOverlap: 'mysql', - isBeta: false, - }, - { - type: 'ui_link', - id: 'MySQL metrics', - title: 'MySQL metrics', - categories: ['datastore'], - uiInternalPath: '/app/home#/tutorial/mysqlMetrics', - description: 'Fetch internal metrics from MySQL.', - icons: [ - { - type: 'eui', - src: 'logoMySQL', - }, - ], - shipper: 'beats', - eprOverlap: 'mysql', - isBeta: false, - }, - { - type: 'ui_link', - id: 'MongoDB metrics', - title: 'MongoDB metrics', - categories: ['datastore'], - uiInternalPath: '/app/home#/tutorial/mongodbMetrics', - description: 'Fetch internal metrics from MongoDB.', - icons: [ - { - type: 'eui', - src: 'logoMongodb', - }, - ], - shipper: 'beats', - eprOverlap: 'mongodb', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Osquery logs', - title: 'Osquery logs', - categories: ['security', 'os_system'], - uiInternalPath: '/app/home#/tutorial/osqueryLogs', - description: 'Collect osquery logs in JSON format.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/osquery.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'osquery', + id: 'b.ga_beats', + categories: ['azure', 'cloud', 'config_management'], + description: 'Beats for a GA package that is not installed', isBeta: false, - }, - { - type: 'ui_link', - id: 'PHP-FPM metrics', - title: 'PHP-FPM metrics', - categories: ['security'], - uiInternalPath: '/app/home#/tutorial/phpfpmMetrics', - description: 'Fetch internal metrics from PHP-FPM.', - icons: [ - { - type: 'eui', - src: 'logoPhp', - }, - ], shipper: 'beats', - eprOverlap: 'php_fpm', - isBeta: false, - }, - { - type: 'ui_link', - id: 'PostgreSQL metrics', - title: 'PostgreSQL metrics', - categories: ['datastore'], - uiInternalPath: '/app/home#/tutorial/postgresqlMetrics', - description: 'Fetch internal metrics from PostgreSQL.', icons: [ { type: 'eui', - src: 'logoPostgres', + src: 'logoBeats', }, ], - shipper: 'beats', - eprOverlap: 'postgresql', - isBeta: false, - }, - { + title: 'b. GA, has Beats', type: 'ui_link', - id: 'PostgreSQL logs', - title: 'PostgreSQL logs', - categories: ['datastore'], - uiInternalPath: '/app/home#/tutorial/postgresqlLogs', - description: 'Collect and parse error and slow logs created by PostgreSQL.', - icons: [ - { - type: 'eui', - src: 'logoPostgres', - }, - ], - shipper: 'beats', - eprOverlap: 'postgresql', - isBeta: false, + uiInternalPath: '/', + eprOverlap: 'ga_beats', }, { - type: 'ui_link', - id: 'RabbitMQ metrics', - title: 'RabbitMQ metrics', - categories: ['message_queue'], - uiInternalPath: '/app/home#/tutorial/rabbitmqMetrics', - description: 'Fetch internal metrics from the RabbitMQ server.', - icons: [ - { - type: 'eui', - src: 'logoRabbitmq', - }, - ], - shipper: 'beats', - eprOverlap: 'rabbitmq', + id: 'f.beta_beats', + categories: ['azure', 'cloud', 'config_management'], + description: 'Beats for a beta package that is not installed', isBeta: false, - }, - { - type: 'ui_link', - id: 'Redis logs', - title: 'Redis logs', - categories: ['datastore', 'message_queue'], - uiInternalPath: '/app/home#/tutorial/redisLogs', - description: 'Collect and parse error and slow logs created by Redis.', - icons: [ - { - type: 'eui', - src: 'logoRedis', - }, - ], shipper: 'beats', - eprOverlap: 'redis', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Redis metrics', - title: 'Redis metrics', - categories: ['datastore', 'message_queue'], - uiInternalPath: '/app/home#/tutorial/redisMetrics', - description: 'Fetch internal metrics from Redis.', icons: [ { type: 'eui', - src: 'logoRedis', - }, - ], - shipper: 'beats', - eprOverlap: 'redis', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Suricata logs', - title: 'Suricata logs', - categories: ['network', 'security'], - uiInternalPath: '/app/home#/tutorial/suricataLogs', - description: 'Collect Suricata IDS/IPS/NSM logs.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/suricata.svg', + src: 'logoBeats', }, ], - shipper: 'beats', - eprOverlap: 'suricata', - isBeta: false, - }, - { + title: 'f. Beta, has Beats', type: 'ui_link', - id: 'Docker metrics', - title: 'Docker metrics', - categories: ['containers', 'os_system'], - uiInternalPath: '/app/home#/tutorial/dockerMetrics', - description: 'Fetch metrics about your Docker containers.', - icons: [ - { - type: 'eui', - src: 'logoDocker', - }, - ], - shipper: 'beats', - eprOverlap: 'docker', - isBeta: false, + uiInternalPath: '/', + eprOverlap: 'beta_beats', }, { - type: 'ui_link', - id: 'Kubernetes metrics', - title: 'Kubernetes metrics', - categories: ['containers', 'kubernetes'], - uiInternalPath: '/app/home#/tutorial/kubernetesMetrics', - description: 'Fetch metrics from your Kubernetes installation.', - icons: [ - { - type: 'eui', - src: 'logoKubernetes', - }, - ], - shipper: 'beats', - eprOverlap: 'kubernetes', + id: 'j.exp_beats', + categories: ['azure', 'cloud', 'config_management'], + description: 'Beats for an experimental package that is not installed', isBeta: false, - }, - { - type: 'ui_link', - id: 'uWSGI metrics', - title: 'uWSGI metrics', - categories: ['web', 'security'], - uiInternalPath: '/app/home#/tutorial/uwsgiMetrics', - description: 'Fetch internal metrics from the uWSGI server.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/uwsgi.svg', - }, - ], shipper: 'beats', - eprOverlap: 'uwsgi', - isBeta: false, - }, - { - type: 'ui_link', - id: 'NetFlow / IPFIX Collector', - title: 'NetFlow / IPFIX Collector', - categories: ['network', 'security'], - uiInternalPath: '/app/home#/tutorial/netflowLogs', - description: 'Collect NetFlow and IPFIX flow records.', icons: [ { type: 'eui', src: 'logoBeats', }, ], - shipper: 'beats', - eprOverlap: 'netflow', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Traefik logs', - title: 'Traefik logs', - categories: ['web', 'security'], - uiInternalPath: '/app/home#/tutorial/traefikLogs', - description: 'Collect Traefik access logs.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/traefik.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'traefik', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Ceph metrics', - title: 'Ceph metrics', - categories: ['network', 'security'], - uiInternalPath: '/app/home#/tutorial/cephMetrics', - description: 'Fetch internal metrics from the Ceph server.', - icons: [ - { - type: 'eui', - src: 'logoCeph', - }, - ], - shipper: 'beats', - eprOverlap: 'ceph', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Aerospike metrics', - title: 'Aerospike metrics', - categories: ['web'], - uiInternalPath: '/app/home#/tutorial/aerospikeMetrics', - description: 'Fetch internal metrics from the Aerospike server.', - icons: [ - { - type: 'eui', - src: 'logoAerospike', - }, - ], - shipper: 'beats', - eprOverlap: 'aerospike', - isBeta: false, - }, - { + title: 'j. Experimental, has Beats', type: 'ui_link', - id: 'Couchbase metrics', - title: 'Couchbase metrics', - categories: ['security', 'network', 'web'], - uiInternalPath: '/app/home#/tutorial/couchbaseMetrics', - description: 'Fetch internal metrics from Couchbase.', - icons: [ - { - type: 'eui', - src: 'logoCouchbase', - }, - ], - shipper: 'beats', - eprOverlap: 'couchbase', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Dropwizard metrics', - title: 'Dropwizard metrics', - categories: ['elastic_stack', 'datastore'], - uiInternalPath: '/app/home#/tutorial/dropwizardMetrics', - description: 'Fetch internal metrics from Dropwizard Java application.', - icons: [ - { - type: 'eui', - src: 'logoDropwizard', - }, - ], - shipper: 'beats', - eprOverlap: 'dropwizard', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Elasticsearch metrics', - title: 'Elasticsearch metrics', - categories: ['elastic_stack', 'datastore'], - uiInternalPath: '/app/home#/tutorial/elasticsearchMetrics', - description: 'Fetch internal metrics from Elasticsearch.', - icons: [ - { - type: 'eui', - src: 'logoElasticsearch', - }, - ], - shipper: 'beats', - eprOverlap: 'elasticsearch', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Etcd metrics', - title: 'Etcd metrics', - categories: ['elastic_stack', 'datastore'], - uiInternalPath: '/app/home#/tutorial/etcdMetrics', - description: 'Fetch internal metrics from the Etcd server.', - icons: [ - { - type: 'eui', - src: 'logoEtcd', - }, - ], - shipper: 'beats', - eprOverlap: 'etcd', - isBeta: false, - }, - { - type: 'ui_link', - id: 'HAProxy metrics', - title: 'HAProxy metrics', - categories: ['network', 'web'], - uiInternalPath: '/app/home#/tutorial/haproxyMetrics', - description: 'Fetch internal metrics from the HAProxy server.', - icons: [ - { - type: 'eui', - src: 'logoHAproxy', - }, - ], - shipper: 'beats', - eprOverlap: 'haproxy', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Kafka metrics', - title: 'Kafka metrics', - categories: ['message_queue'], - uiInternalPath: '/app/home#/tutorial/kafkaMetrics', - description: 'Fetch internal metrics from the Kafka server.', - icons: [ - { - type: 'eui', - src: 'logoKafka', - }, - ], - shipper: 'beats', - eprOverlap: 'kafka', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Kibana metrics', - title: 'Kibana metrics', - categories: ['message_queue'], - uiInternalPath: '/app/home#/tutorial/kibanaMetrics', - description: 'Fetch internal metrics from Kibana.', - icons: [ - { - type: 'eui', - src: 'logoKibana', - }, - ], - shipper: 'beats', - eprOverlap: 'kibana', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Memcached metrics', - title: 'Memcached metrics', - categories: ['custom'], - uiInternalPath: '/app/home#/tutorial/memcachedMetrics', - description: 'Fetch internal metrics from the Memcached server.', - icons: [ - { - type: 'eui', - src: 'logoMemcached', - }, - ], - shipper: 'beats', - eprOverlap: 'memcached', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Munin metrics', - title: 'Munin metrics', - categories: ['datastore'], - uiInternalPath: '/app/home#/tutorial/muninMetrics', - description: 'Fetch internal metrics from the Munin server.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/munin.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'munin', - isBeta: false, - }, - { - type: 'ui_link', - id: 'vSphere metrics', - title: 'vSphere metrics', - categories: ['web', 'security'], - uiInternalPath: '/app/home#/tutorial/vsphereMetrics', - description: 'Fetch internal metrics from vSphere.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/vsphere.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'vsphere', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Windows metrics', - title: 'Windows metrics', - categories: ['os_system', 'security'], - uiInternalPath: '/app/home#/tutorial/windowsMetrics', - description: 'Fetch internal metrics from Windows.', - icons: [ - { - type: 'eui', - src: 'logoWindows', - }, - ], - shipper: 'beats', - eprOverlap: 'windows', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Windows Event Log', - title: 'Windows Event Log', - categories: ['os_system', 'security'], - uiInternalPath: '/app/home#/tutorial/windowsEventLogs', - description: 'Fetch logs from the Windows Event Log.', - icons: [ - { - type: 'eui', - src: 'logoWindows', - }, - ], - shipper: 'beats', - eprOverlap: 'windows', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Golang metrics', - title: 'Golang metrics', - categories: ['google_cloud', 'cloud', 'network', 'security'], - uiInternalPath: '/app/home#/tutorial/golangMetrics', - description: 'Fetch internal metrics from a Golang app.', - icons: [ - { - type: 'eui', - src: 'logoGolang', - }, - ], - shipper: 'beats', - eprOverlap: 'golang', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Logstash metrics', - title: 'Logstash metrics', - categories: ['custom'], - uiInternalPath: '/app/home#/tutorial/logstashMetrics', - description: 'Fetch internal metrics from a Logstash server.', - icons: [ - { - type: 'eui', - src: 'logoLogstash', - }, - ], - shipper: 'beats', - eprOverlap: 'logstash', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Prometheus metrics', - title: 'Prometheus metrics', - categories: ['monitoring', 'datastore'], - uiInternalPath: '/app/home#/tutorial/prometheusMetrics', - description: 'Fetch metrics from a Prometheus exporter.', - icons: [ - { - type: 'eui', - src: 'logoPrometheus', - }, - ], - shipper: 'beats', - eprOverlap: 'prometheus', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Zookeeper metrics', - title: 'Zookeeper metrics', - categories: ['datastore', 'config_management'], - uiInternalPath: '/app/home#/tutorial/zookeeperMetrics', - description: 'Fetch internal metrics from a Zookeeper server.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/zookeeper.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'zookeeper', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Uptime Monitors', - title: 'Uptime Monitors', - categories: ['web', 'security'], - uiInternalPath: '/app/home#/tutorial/uptimeMonitors', - description: 'Monitor services for their availability', - icons: [ - { - type: 'eui', - src: 'uptimeApp', - }, - ], - shipper: 'beats', - eprOverlap: 'uptime', - isBeta: false, - }, - { - type: 'ui_link', - id: 'AWS Cloudwatch logs', - title: 'AWS Cloudwatch logs', - categories: ['security', 'network', 'web'], - uiInternalPath: '/app/home#/tutorial/cloudwatchLogs', - description: 'Collect Cloudwatch logs with Functionbeat.', - icons: [ - { - type: 'eui', - src: 'logoAWS', - }, - ], - shipper: 'beats', - eprOverlap: 'aws', - isBeta: false, - }, - { - type: 'ui_link', - id: 'AWS metrics', - title: 'AWS metrics', - categories: ['aws', 'cloud', 'datastore', 'security', 'network'], - uiInternalPath: '/app/home#/tutorial/awsMetrics', - description: 'Fetch monitoring metrics for EC2 instances from the AWS APIs and Cloudwatch.', - icons: [ - { - type: 'eui', - src: 'logoAWS', - }, - ], - shipper: 'beats', - eprOverlap: 'aws', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Microsoft SQL Server Metrics', - title: 'Microsoft SQL Server Metrics', - categories: ['datastore'], - uiInternalPath: '/app/home#/tutorial/mssqlMetrics', - description: 'Fetch monitoring metrics from a Microsoft SQL Server instance', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/mssql.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'mssql', - isBeta: false, - }, - { - type: 'ui_link', - id: 'NATS metrics', - title: 'NATS metrics', - categories: ['message_queue'], - uiInternalPath: '/app/home#/tutorial/natsMetrics', - description: 'Fetch monitoring metrics from the Nats server.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/nats.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'nats', - isBeta: false, - }, - { - type: 'ui_link', - id: 'NATS logs', - title: 'NATS logs', - categories: ['message_queue'], - uiInternalPath: '/app/home#/tutorial/natsLogs', - description: 'Collect and parse logs created by Nats.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/nats.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'nats', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Zeek logs', - title: 'Zeek logs', - categories: ['network', 'monitoring', 'security'], - uiInternalPath: '/app/home#/tutorial/zeekLogs', - description: 'Collect Zeek network security monitoring logs.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/zeek.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'zeek', - isBeta: false, - }, - { - type: 'ui_link', - id: 'CoreDNS metrics', - title: 'CoreDNS metrics', - categories: ['security', 'network', 'web'], - uiInternalPath: '/app/home#/tutorial/corednsMetrics', - description: 'Fetch monitoring metrics from the CoreDNS server.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/coredns.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'coredns', - isBeta: false, - }, - { - type: 'ui_link', - id: 'CoreDNS logs', - title: 'CoreDNS logs', - categories: ['security', 'network', 'web'], - uiInternalPath: '/app/home#/tutorial/corednsLogs', - description: 'Collect CoreDNS logs.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/coredns.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'coredns', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Auditbeat', - title: 'Auditbeat', - categories: ['web'], - uiInternalPath: '/app/home#/tutorial/auditbeat', - description: 'Collect audit data from your hosts.', - icons: [ - { - type: 'eui', - src: 'securityAnalyticsApp', - }, - ], - shipper: 'beats', - eprOverlap: 'auditbeat', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Iptables logs', - title: 'Iptables logs', - categories: ['network', 'security'], - uiInternalPath: '/app/home#/tutorial/iptablesLogs', - description: 'Collect iptables and ip6tables logs.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/linux.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'iptables', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Cisco logs', - title: 'Cisco logs', - categories: ['network', 'security'], - uiInternalPath: '/app/home#/tutorial/ciscoLogs', - description: 'Collect Cisco network device logs over syslog or from a file.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/cisco.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'cisco', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Envoy Proxy logs', - title: 'Envoy Proxy logs', - categories: ['elastic_stack', 'datastore'], - uiInternalPath: '/app/home#/tutorial/envoyproxyLogs', - description: 'Collect Envoy Proxy logs.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/envoyproxy.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'envoyproxy', - isBeta: false, - }, - { - type: 'ui_link', - id: 'CouchDB metrics', - title: 'CouchDB metrics', - categories: ['security', 'network', 'web'], - uiInternalPath: '/app/home#/tutorial/couchdbMetrics', - description: 'Fetch monitoring metrics from the CouchdB server.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/couchdb.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'couchdb', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Consul metrics', - title: 'Consul metrics', - categories: ['security', 'network', 'web'], - uiInternalPath: '/app/home#/tutorial/consulMetrics', - description: 'Fetch monitoring metrics from the Consul server.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/consul.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'consul', - isBeta: false, - }, - { - type: 'ui_link', - id: 'CockroachDB metrics', - title: 'CockroachDB metrics', - categories: ['security', 'network', 'web'], - uiInternalPath: '/app/home#/tutorial/cockroachdbMetrics', - description: 'Fetch monitoring metrics from the CockroachDB server.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/cockroachdb.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'cockroachdb', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Traefik metrics', - title: 'Traefik metrics', - categories: ['web', 'security'], - uiInternalPath: '/app/home#/tutorial/traefikMetrics', - description: 'Fetch monitoring metrics from Traefik.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/traefik.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'traefik', - isBeta: false, - }, - { - type: 'ui_link', - id: 'AWS S3 based logs', - title: 'AWS S3 based logs', - categories: ['aws', 'cloud', 'datastore', 'security', 'network'], - uiInternalPath: '/app/home#/tutorial/awsLogs', - description: 'Collect AWS logs from S3 bucket with Filebeat.', - icons: [ - { - type: 'eui', - src: 'logoAWS', - }, - ], - shipper: 'beats', - eprOverlap: 'aws', - isBeta: false, - }, - { - type: 'ui_link', - id: 'ActiveMQ logs', - title: 'ActiveMQ logs', - categories: ['web'], - uiInternalPath: '/app/home#/tutorial/activemqLogs', - description: 'Collect ActiveMQ logs with Filebeat.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/activemq.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'activemq', - isBeta: false, - }, - { - type: 'ui_link', - id: 'ActiveMQ metrics', - title: 'ActiveMQ metrics', - categories: ['web'], - uiInternalPath: '/app/home#/tutorial/activemqMetrics', - description: 'Fetch monitoring metrics from ActiveMQ instances.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/activemq.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'activemq', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Azure metrics', - title: 'Azure metrics', - categories: ['azure', 'cloud', 'network', 'security'], - uiInternalPath: '/app/home#/tutorial/azureMetrics', - description: 'Fetch Azure Monitor metrics.', - icons: [ - { - type: 'eui', - src: 'logoAzure', - }, - ], - shipper: 'beats', - eprOverlap: 'azure', - isBeta: false, - }, - { - type: 'ui_link', - id: 'IBM MQ logs', - title: 'IBM MQ logs', - categories: ['security'], - uiInternalPath: '/app/home#/tutorial/ibmmqLogs', - description: 'Collect IBM MQ logs with Filebeat.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/ibmmq.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'ibmmq', - isBeta: false, - }, - { - type: 'ui_link', - id: 'IBM MQ metrics', - title: 'IBM MQ metrics', - categories: ['security'], - uiInternalPath: '/app/home#/tutorial/ibmmqMetrics', - description: 'Fetch monitoring metrics from IBM MQ instances.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/ibmmq.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'ibmmq', - isBeta: false, - }, - { - type: 'ui_link', - id: 'STAN metrics', - title: 'STAN metrics', - categories: ['message_queue', 'kubernetes'], - uiInternalPath: '/app/home#/tutorial/stanMetrics', - description: 'Fetch monitoring metrics from the STAN server.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/stan.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'stan', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Envoy Proxy metrics', - title: 'Envoy Proxy metrics', - categories: ['elastic_stack', 'datastore'], - uiInternalPath: '/app/home#/tutorial/envoyproxyMetrics', - description: 'Fetch monitoring metrics from Envoy Proxy.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/envoyproxy.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'envoyproxy', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Statsd metrics', - title: 'Statsd metrics', - categories: ['message_queue', 'kubernetes'], - uiInternalPath: '/app/home#/tutorial/statsdMetrics', - description: 'Fetch monitoring metrics from statsd.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/statsd.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'statsd', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Redis Enterprise metrics', - title: 'Redis Enterprise metrics', - categories: ['datastore', 'message_queue'], - uiInternalPath: '/app/home#/tutorial/redisenterpriseMetrics', - description: 'Fetch monitoring metrics from Redis Enterprise Server.', - icons: [ - { - type: 'eui', - src: 'logoRedis', - }, - ], - shipper: 'beats', - eprOverlap: 'redisenterprise', - isBeta: false, - }, - { - type: 'ui_link', - id: 'OpenMetrics metrics', - title: 'OpenMetrics metrics', - categories: ['security'], - uiInternalPath: '/app/home#/tutorial/openmetricsMetrics', - description: 'Fetch metrics from an endpoint that serves metrics in OpenMetrics format.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/openmetrics.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'openmetrics', - isBeta: false, - }, - { - type: 'ui_link', - id: 'oracle metrics', - title: 'oracle metrics', - categories: ['security'], - uiInternalPath: '/app/home#/tutorial/oracleMetrics', - description: 'Fetch internal metrics from a Oracle server.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/oracle.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'oracle', - isBeta: false, - }, - { - type: 'ui_link', - id: 'IIS Metrics', - title: 'IIS Metrics', - categories: ['web'], - uiInternalPath: '/app/home#/tutorial/iisMetrics', - description: 'Collect IIS server related metrics.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/iis.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'iis', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Azure logs', - title: 'Azure logs', - categories: ['azure', 'cloud', 'network', 'security'], - uiInternalPath: '/app/home#/tutorial/azureLogs', - description: 'Collects Azure activity and audit related logs.', - icons: [ - { - type: 'eui', - src: 'logoAzure', - }, - ], - shipper: 'beats', - eprOverlap: 'azure', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Google Cloud metrics', - title: 'Google Cloud metrics', - categories: ['google_cloud', 'cloud', 'network', 'security'], - uiInternalPath: '/app/home#/tutorial/gcpMetrics', - description: - 'Fetch monitoring metrics from Google Cloud Platform using Stackdriver Monitoring API.', - icons: [ - { - type: 'eui', - src: 'logoGCP', - }, - ], - shipper: 'beats', - eprOverlap: 'gcp', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Auditd logs', - title: 'Auditd logs', - categories: ['os_system'], - uiInternalPath: '/app/home#/tutorial/auditdLogs', - description: 'Collect logs from the Linux auditd daemon.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/linux.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'auditd', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Barracuda logs', - title: 'Barracuda logs', - categories: ['network', 'security'], - uiInternalPath: '/app/home#/tutorial/barracudaLogs', - description: 'Collect Barracuda Web Application Firewall logs over syslog or from a file.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/barracuda.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'barracuda', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Bluecoat logs', - title: 'Bluecoat logs', - categories: ['network', 'security'], - uiInternalPath: '/app/home#/tutorial/bluecoatLogs', - description: 'Collect Blue Coat Director logs over syslog or from a file.', - icons: [ - { - type: 'eui', - src: 'logoLogging', - }, - ], - shipper: 'beats', - eprOverlap: 'bluecoat', - isBeta: false, - }, - { - type: 'ui_link', - id: 'CEF logs', - title: 'CEF logs', - categories: ['network', 'security'], - uiInternalPath: '/app/home#/tutorial/cefLogs', - description: 'Collect Common Event Format (CEF) log data over syslog.', - icons: [ - { - type: 'eui', - src: 'logoLogging', - }, - ], - shipper: 'beats', - eprOverlap: 'cef', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Check Point logs', - title: 'Check Point logs', - categories: ['security'], - uiInternalPath: '/app/home#/tutorial/checkpointLogs', - description: 'Collect Check Point firewall logs.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/checkpoint.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'checkpoint', - isBeta: false, - }, - { - type: 'ui_link', - id: 'CrowdStrike logs', - title: 'CrowdStrike logs', - categories: ['security'], - uiInternalPath: '/app/home#/tutorial/crowdstrikeLogs', - description: 'Collect CrowdStrike Falcon logs using the Falcon SIEM Connector.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/crowdstrike.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'crowdstrike', - isBeta: false, - }, - { - type: 'ui_link', - id: 'CylancePROTECT logs', - title: 'CylancePROTECT logs', - categories: ['security'], - uiInternalPath: '/app/home#/tutorial/cylanceLogs', - description: 'Collect CylancePROTECT logs over syslog or from a file.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/cylance.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'cylance', - isBeta: false, - }, - { - type: 'ui_link', - id: 'F5 logs', - title: 'F5 logs', - categories: ['network', 'security'], - uiInternalPath: '/app/home#/tutorial/f5Logs', - description: 'Collect F5 Big-IP Access Policy Manager logs over syslog or from a file.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/f5.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'f5', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Fortinet logs', - title: 'Fortinet logs', - categories: ['security'], - uiInternalPath: '/app/home#/tutorial/fortinetLogs', - description: 'Collect Fortinet FortiOS logs over syslog.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/fortinet.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'fortinet', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Google Cloud logs', - title: 'Google Cloud logs', - categories: ['google_cloud', 'cloud', 'network', 'security'], - uiInternalPath: '/app/home#/tutorial/gcpLogs', - description: 'Collect Google Cloud audit, firewall, and VPC flow logs.', - icons: [ - { - type: 'eui', - src: 'logoGoogleG', - }, - ], - shipper: 'beats', - eprOverlap: 'gcp', - isBeta: false, - }, - { - type: 'ui_link', - id: 'GSuite logs', - title: 'GSuite logs', - categories: ['security'], - uiInternalPath: '/app/home#/tutorial/gsuiteLogs', - description: 'Collect GSuite activity reports.', - icons: [ - { - type: 'eui', - src: 'logoGoogleG', - }, - ], - shipper: 'beats', - eprOverlap: 'gsuite', - isBeta: false, - }, - { - type: 'ui_link', - id: 'HAProxy logs', - title: 'HAProxy logs', - categories: ['network', 'web'], - uiInternalPath: '/app/home#/tutorial/haproxyLogs', - description: 'Collect HAProxy logs.', - icons: [ - { - type: 'eui', - src: 'logoHAproxy', - }, - ], - shipper: 'beats', - eprOverlap: 'haproxy', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Icinga logs', - title: 'Icinga logs', - categories: ['security'], - uiInternalPath: '/app/home#/tutorial/icingaLogs', - description: 'Collect Icinga main, debug, and startup logs.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/icinga.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'icinga', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Imperva logs', - title: 'Imperva logs', - categories: ['network', 'security'], - uiInternalPath: '/app/home#/tutorial/impervaLogs', - description: 'Collect Imperva SecureSphere logs over syslog or from a file.', - icons: [ - { - type: 'eui', - src: 'logoLogging', - }, - ], - shipper: 'beats', - eprOverlap: 'imperva', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Infoblox logs', - title: 'Infoblox logs', - categories: ['network'], - uiInternalPath: '/app/home#/tutorial/infobloxLogs', - description: 'Collect Infoblox NIOS logs over syslog or from a file.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/infoblox.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'infoblox', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Juniper Logs', - title: 'Juniper Logs', - categories: ['network', 'security'], - uiInternalPath: '/app/home#/tutorial/juniperLogs', - description: 'Collect Juniper JUNOS logs over syslog or from a file.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/juniper.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'juniper', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Kibana Logs', - title: 'Kibana Logs', - categories: ['message_queue'], - uiInternalPath: '/app/home#/tutorial/kibanaLogs', - description: 'Collect Kibana logs.', - icons: [ - { - type: 'eui', - src: 'logoKibana', - }, - ], - shipper: 'beats', - eprOverlap: 'kibana', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Microsoft Defender ATP logs', - title: 'Microsoft Defender ATP logs', - categories: ['network', 'security', 'azure'], - uiInternalPath: '/app/home#/tutorial/microsoftLogs', - description: 'Collect Microsoft Defender ATP alerts.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/microsoft.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'microsoft', - isBeta: false, - }, - { - type: 'ui_link', - id: 'MISP threat intel logs', - title: 'MISP threat intel logs', - categories: ['network', 'security', 'azure'], - uiInternalPath: '/app/home#/tutorial/mispLogs', - description: 'Collect MISP threat intelligence data with Filebeat.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/misp.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'misp', - isBeta: false, - }, - { - type: 'ui_link', - id: 'MongoDB logs', - title: 'MongoDB logs', - categories: ['datastore'], - uiInternalPath: '/app/home#/tutorial/mongodbLogs', - description: 'Collect MongoDB logs.', - icons: [ - { - type: 'eui', - src: 'logoMongodb', - }, - ], - shipper: 'beats', - eprOverlap: 'mongodb', - isBeta: false, - }, - { - type: 'ui_link', - id: 'MSSQL logs', - title: 'MSSQL logs', - categories: ['datastore'], - uiInternalPath: '/app/home#/tutorial/mssqlLogs', - description: 'Collect MSSQL logs.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/microsoft.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'mssql', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Arbor Peakflow logs', - title: 'Arbor Peakflow logs', - categories: ['security'], - uiInternalPath: '/app/home#/tutorial/netscoutLogs', - description: 'Collect Netscout Arbor Peakflow SP logs over syslog or from a file.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/netscout.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'netscout', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Office 365 logs', - title: 'Office 365 logs', - categories: ['security'], - uiInternalPath: '/app/home#/tutorial/o365Logs', - description: 'Collect Office 365 activity logs via the Office 365 API.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/o365.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'o365', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Okta logs', - title: 'Okta logs', - categories: ['security'], - uiInternalPath: '/app/home#/tutorial/oktaLogs', - description: 'Collect the Okta system log via the Okta API.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/okta.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'okta', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Palo Alto Networks PAN-OS logs', - title: 'Palo Alto Networks PAN-OS logs', - categories: ['security'], - uiInternalPath: '/app/home#/tutorial/panwLogs', - description: - 'Collect Palo Alto Networks PAN-OS threat and traffic logs over syslog or from a log file.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/paloalto.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'panw', - isBeta: false, - }, - { - type: 'ui_link', - id: 'RabbitMQ logs', - title: 'RabbitMQ logs', - categories: ['message_queue'], - uiInternalPath: '/app/home#/tutorial/rabbitmqLogs', - description: 'Collect RabbitMQ logs.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/rabbitmq.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'rabbitmq', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Radware DefensePro logs', - title: 'Radware DefensePro logs', - categories: ['security'], - uiInternalPath: '/app/home#/tutorial/radwareLogs', - description: 'Collect Radware DefensePro logs over syslog or from a file.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/radware.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'radware', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Google Santa logs', - title: 'Google Santa logs', - categories: ['security', 'os_system'], - uiInternalPath: '/app/home#/tutorial/santaLogs', - description: 'Collect Google Santa logs about process executions on MacOS.', - icons: [ - { - type: 'eui', - src: 'logoLogging', - }, - ], - shipper: 'beats', - eprOverlap: 'santa', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Sonicwall FW logs', - title: 'Sonicwall FW logs', - categories: ['network', 'security'], - uiInternalPath: '/app/home#/tutorial/sonicwallLogs', - description: 'Collect Sonicwall-FW logs over syslog or from a file.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/sonicwall.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'sonicwall', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Sophos logs', - title: 'Sophos logs', - categories: ['security'], - uiInternalPath: '/app/home#/tutorial/sophosLogs', - description: 'Collect Sophos XG SFOS logs over syslog.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/sophos.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'sophos', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Squid logs', - title: 'Squid logs', - categories: ['security'], - uiInternalPath: '/app/home#/tutorial/squidLogs', - description: 'Collect Squid logs over syslog or from a file.', - icons: [ - { - type: 'eui', - src: 'logoLogging', - }, - ], - shipper: 'beats', - eprOverlap: 'squid', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Tomcat logs', - title: 'Tomcat logs', - categories: ['web', 'security'], - uiInternalPath: '/app/home#/tutorial/tomcatLogs', - description: 'Collect Apache Tomcat logs over syslog or from a file.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/tomcat.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'tomcat', - isBeta: false, - }, - { - type: 'ui_link', - id: 'Zscaler Logs', - title: 'Zscaler Logs', - categories: ['network', 'security'], - uiInternalPath: '/app/home#/tutorial/zscalerLogs', - description: 'This is a module for receiving Zscaler NSS logs over Syslog or a file.', - icons: [ - { - type: 'svg', - src: '/dqo/plugins/home/assets/logos/zscaler.svg', - }, - ], - shipper: 'beats', - eprOverlap: 'zscaler', - isBeta: false, - }, - { - type: 'ui_link', - id: 'apm', - title: 'APM', - categories: ['web'], - uiInternalPath: '/app/home#/tutorial/apm', - description: 'Collect in-depth performance metrics and errors from inside your applications.', - icons: [ - { - type: 'eui', - src: 'apmApp', - }, - ], - shipper: 'tutorial', - isBeta: false, - eprOverlap: 'apm', + uiInternalPath: '/', + eprOverlap: 'exp_beats', }, ]; diff --git a/src/plugins/custom_integrations/server/index.ts b/src/plugins/custom_integrations/server/index.ts index 490627ef90f8d..00372df501435 100755 --- a/src/plugins/custom_integrations/server/index.ts +++ b/src/plugins/custom_integrations/server/index.ts @@ -19,7 +19,7 @@ export function plugin(initializerContext: PluginInitializerContext) { export { CustomIntegrationsPluginSetup, CustomIntegrationsPluginStart } from './types'; -export type { IntegrationCategory, IntegrationCategoryCount, CustomIntegration } from '../common'; +export type { IntegrationCategory, CustomIntegration } from '../common'; export const config = { schema: schema.object({}), diff --git a/src/plugins/data/common/search/expressions/kibana_context.test.ts b/src/plugins/data/common/search/expressions/kibana_context.test.ts index 77d89792b63c3..c9fe4ee5b7367 100644 --- a/src/plugins/data/common/search/expressions/kibana_context.test.ts +++ b/src/plugins/data/common/search/expressions/kibana_context.test.ts @@ -205,7 +205,7 @@ describe('kibanaContextFn', () => { it('deduplicates duplicated filters and keeps the first enabled filter', async () => { const { fn } = kibanaContextFn; const filter1 = buildFilter( - { fields: [] }, + { fields: [], title: 'dataView' }, { name: 'test', type: 'test' }, FILTERS.PHRASE, false, @@ -217,7 +217,7 @@ describe('kibanaContextFn', () => { FilterStateStore.APP_STATE ); const filter2 = buildFilter( - { fields: [] }, + { fields: [], title: 'dataView' }, { name: 'test', type: 'test' }, FILTERS.PHRASE, false, @@ -230,7 +230,7 @@ describe('kibanaContextFn', () => { ); const filter3 = buildFilter( - { fields: [] }, + { fields: [], title: 'dataView' }, { name: 'test', type: 'test' }, FILTERS.PHRASE, false, diff --git a/src/plugins/data/common/search/tabify/__snapshots__/tabify_docs.test.ts.snap b/src/plugins/data/common/search/tabify/__snapshots__/tabify_docs.test.ts.snap index 22276335a0599..9a85ba57ce5ef 100644 --- a/src/plugins/data/common/search/tabify/__snapshots__/tabify_docs.test.ts.snap +++ b/src/plugins/data/common/search/tabify/__snapshots__/tabify_docs.test.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`tabifyDocs combines meta fields if meta option is set 1`] = ` +exports[`tabify_docs tabifyDocs converts fields by default 1`] = ` Object { "columns": Array [ Object { @@ -108,7 +108,7 @@ Object { } `; -exports[`tabifyDocs converts fields by default 1`] = ` +exports[`tabify_docs tabifyDocs converts source if option is set 1`] = ` Object { "columns": Array [ Object { @@ -216,7 +216,7 @@ Object { } `; -exports[`tabifyDocs converts source if option is set 1`] = ` +exports[`tabify_docs tabifyDocs skips nested fields if option is set 1`] = ` Object { "columns": Array [ Object { @@ -324,115 +324,7 @@ Object { } `; -exports[`tabifyDocs skips nested fields if option is set 1`] = ` -Object { - "columns": Array [ - Object { - "id": "fieldTest", - "meta": Object { - "field": "fieldTest", - "index": "test-index", - "params": Object { - "id": "number", - }, - "type": "number", - }, - "name": "fieldTest", - }, - Object { - "id": "invalidMapping", - "meta": Object { - "field": "invalidMapping", - "index": "test-index", - "params": undefined, - "type": "number", - }, - "name": "invalidMapping", - }, - Object { - "id": "nested", - "meta": Object { - "field": "nested", - "index": "test-index", - "params": undefined, - "type": "object", - }, - "name": "nested", - }, - Object { - "id": "sourceTest", - "meta": Object { - "field": "sourceTest", - "index": "test-index", - "params": Object { - "id": "number", - }, - "type": "number", - }, - "name": "sourceTest", - }, - Object { - "id": "_id", - "meta": Object { - "field": "_id", - "index": "test-index", - "params": undefined, - "type": "string", - }, - "name": "_id", - }, - Object { - "id": "_index", - "meta": Object { - "field": "_index", - "index": "test-index", - "params": undefined, - "type": "string", - }, - "name": "_index", - }, - Object { - "id": "_score", - "meta": Object { - "field": "_score", - "index": "test-index", - "params": undefined, - "type": "number", - }, - "name": "_score", - }, - Object { - "id": "_type", - "meta": Object { - "field": "_type", - "index": "test-index", - "params": undefined, - "type": "string", - }, - "name": "_type", - }, - ], - "rows": Array [ - Object { - "_id": "hit-id-value", - "_index": "hit-index-value", - "_score": 77, - "_type": "hit-type-value", - "fieldTest": 123, - "invalidMapping": 345, - "nested": Array [ - Object { - "field": 123, - }, - ], - "sourceTest": 123, - }, - ], - "type": "datatable", -} -`; - -exports[`tabifyDocs works without provided index pattern 1`] = ` +exports[`tabify_docs tabifyDocs works without provided index pattern 1`] = ` Object { "columns": Array [ Object { @@ -475,53 +367,9 @@ Object { }, "name": "sourceTest", }, - Object { - "id": "_id", - "meta": Object { - "field": "_id", - "index": undefined, - "params": undefined, - "type": "string", - }, - "name": "_id", - }, - Object { - "id": "_index", - "meta": Object { - "field": "_index", - "index": undefined, - "params": undefined, - "type": "string", - }, - "name": "_index", - }, - Object { - "id": "_score", - "meta": Object { - "field": "_score", - "index": undefined, - "params": undefined, - "type": "number", - }, - "name": "_score", - }, - Object { - "id": "_type", - "meta": Object { - "field": "_type", - "index": undefined, - "params": undefined, - "type": "string", - }, - "name": "_type", - }, ], "rows": Array [ Object { - "_id": "hit-id-value", - "_index": "hit-index-value", - "_score": 77, - "_type": "hit-type-value", "fieldTest": 123, "invalidMapping": 345, "nested": Array [ diff --git a/src/plugins/data/common/search/tabify/index.ts b/src/plugins/data/common/search/tabify/index.ts index 74fbc7ba4cfa4..279ff705f231c 100644 --- a/src/plugins/data/common/search/tabify/index.ts +++ b/src/plugins/data/common/search/tabify/index.ts @@ -6,6 +6,6 @@ * Side Public License, v 1. */ -export { tabifyDocs } from './tabify_docs'; +export { tabifyDocs, flattenHit } from './tabify_docs'; export { tabifyAggResponse } from './tabify'; export { tabifyGetColumns } from './get_columns'; diff --git a/src/plugins/data/common/search/tabify/tabify_docs.test.ts b/src/plugins/data/common/search/tabify/tabify_docs.test.ts index 1a3f7195b722e..a2910a1be4a9a 100644 --- a/src/plugins/data/common/search/tabify/tabify_docs.test.ts +++ b/src/plugins/data/common/search/tabify/tabify_docs.test.ts @@ -6,71 +6,137 @@ * Side Public License, v 1. */ -import { tabifyDocs } from './tabify_docs'; -import { IndexPattern } from '../..'; +import { tabifyDocs, flattenHit } from './tabify_docs'; +import { IndexPattern, DataView } from '../..'; import type { estypes } from '@elastic/elasticsearch'; -describe('tabifyDocs', () => { - const fieldFormats = { - getInstance: (id: string) => ({ toJSON: () => ({ id }) }), - getDefaultInstance: (id: string) => ({ toJSON: () => ({ id }) }), - }; +import { fieldFormatsMock } from '../../../../field_formats/common/mocks'; +import { stubbedSavedObjectIndexPattern } from '../../../../data_views/common/data_view.stub'; - const index = new IndexPattern({ +class MockFieldFormatter {} + +fieldFormatsMock.getInstance = jest.fn().mockImplementation(() => new MockFieldFormatter()) as any; + +// helper function to create index patterns +function create(id: string) { + const { + type, + version, + attributes: { timeFieldName, fields, title }, + } = stubbedSavedObjectIndexPattern(id); + + return new DataView({ spec: { - id: 'test-index', - fields: { - sourceTest: { name: 'sourceTest', type: 'number', searchable: true, aggregatable: true }, - fieldTest: { name: 'fieldTest', type: 'number', searchable: true, aggregatable: true }, - 'nested.field': { - name: 'nested.field', - type: 'number', - searchable: true, - aggregatable: true, - }, - }, + id, + type, + version, + timeFieldName, + fields: JSON.parse(fields), + title, + runtimeFieldMap: {}, }, - fieldFormats: fieldFormats as any, + fieldFormats: fieldFormatsMock, + shortDotsEnable: false, + metaFields: ['_id', '_type', '_score', '_routing'], }); +} - // @ts-expect-error not full inteface - const response = { - hits: { - hits: [ +describe('tabify_docs', () => { + describe('flattenHit', () => { + let indexPattern: DataView; + + // create an indexPattern instance for each test + beforeEach(() => { + indexPattern = create('test-pattern'); + }); + + it('returns sorted object keys that combine _source, fields and metaFields in a defined order', () => { + const response = flattenHit( { - _id: 'hit-id-value', - _index: 'hit-index-value', - _type: 'hit-type-value', - _score: 77, - _source: { sourceTest: 123 }, - fields: { fieldTest: 123, invalidMapping: 345, nested: [{ field: 123 }] }, + _index: 'foobar', + _id: 'a', + _source: { + name: 'first', + }, + fields: { + date: ['1'], + zzz: ['z'], + _abc: ['a'], + }, }, - ], - }, - } as estypes.SearchResponse; - - it('converts fields by default', () => { - const table = tabifyDocs(response, index); - expect(table).toMatchSnapshot(); + indexPattern + ); + const expectedOrder = ['_abc', 'date', 'name', 'zzz', '_id', '_routing', '_score', '_type']; + expect(Object.keys(response)).toEqual(expectedOrder); + expect(Object.entries(response).map(([key]) => key)).toEqual(expectedOrder); + }); }); - it('converts source if option is set', () => { - const table = tabifyDocs(response, index, { source: true }); - expect(table).toMatchSnapshot(); - }); + describe('tabifyDocs', () => { + const fieldFormats = { + getInstance: (id: string) => ({ toJSON: () => ({ id }) }), + getDefaultInstance: (id: string) => ({ toJSON: () => ({ id }) }), + }; - it('skips nested fields if option is set', () => { - const table = tabifyDocs(response, index, { shallow: true }); - expect(table).toMatchSnapshot(); - }); + const index = new IndexPattern({ + spec: { + id: 'test-index', + fields: { + sourceTest: { name: 'sourceTest', type: 'number', searchable: true, aggregatable: true }, + fieldTest: { name: 'fieldTest', type: 'number', searchable: true, aggregatable: true }, + 'nested.field': { + name: 'nested.field', + type: 'number', + searchable: true, + aggregatable: true, + }, + }, + }, + metaFields: ['_id', '_index', '_score', '_type'], + fieldFormats: fieldFormats as any, + }); - it('combines meta fields if meta option is set', () => { - const table = tabifyDocs(response, index, { meta: true }); - expect(table).toMatchSnapshot(); - }); + // @ts-expect-error not full inteface + const response = { + hits: { + hits: [ + { + _id: 'hit-id-value', + _index: 'hit-index-value', + _type: 'hit-type-value', + _score: 77, + _source: { sourceTest: 123 }, + fields: { fieldTest: 123, invalidMapping: 345, nested: [{ field: 123 }] }, + }, + ], + }, + } as estypes.SearchResponse; + + it('converts fields by default', () => { + const table = tabifyDocs(response, index); + expect(table).toMatchSnapshot(); + }); + + it('converts source if option is set', () => { + const table = tabifyDocs(response, index, { source: true }); + expect(table).toMatchSnapshot(); + }); + + it('skips nested fields if option is set', () => { + const table = tabifyDocs(response, index, { shallow: true }); + expect(table).toMatchSnapshot(); + }); + + it('combines meta fields from index pattern', () => { + const table = tabifyDocs(response, index); + expect(table.columns.map((col) => col.id)).toEqual( + expect.arrayContaining(['_id', '_index', '_score', '_type']) + ); + }); - it('works without provided index pattern', () => { - const table = tabifyDocs(response); - expect(table).toMatchSnapshot(); + it('works without provided index pattern', () => { + const table = tabifyDocs(response); + expect(table).toMatchSnapshot(); + }); }); }); diff --git a/src/plugins/data/common/search/tabify/tabify_docs.ts b/src/plugins/data/common/search/tabify/tabify_docs.ts index 8e628e7741df5..4259488771761 100644 --- a/src/plugins/data/common/search/tabify/tabify_docs.ts +++ b/src/plugins/data/common/search/tabify/tabify_docs.ts @@ -11,12 +11,60 @@ import { isPlainObject } from 'lodash'; import { IndexPattern } from '../..'; import { Datatable, DatatableColumn, DatatableColumnType } from '../../../../expressions/common'; +type ValidMetaFieldNames = keyof Pick< + estypes.SearchHit, + | '_id' + | '_ignored' + | '_index' + | '_node' + | '_primary_term' + | '_routing' + | '_score' + | '_seq_no' + | '_shard' + | '_source' + | '_type' + | '_version' +>; +const VALID_META_FIELD_NAMES: ValidMetaFieldNames[] = [ + '_id', + '_ignored', + '_index', + '_node', + '_primary_term', + '_routing', + '_score', + '_seq_no', + '_shard', + '_source', + '_type', + '_version', +]; + +function isValidMetaFieldName(field: string): field is ValidMetaFieldNames { + // Since the array above is more narrowly typed than string[], we cannot use + // string to find a value in here. We manually cast it to wider string[] type + // so we're able to use `includes` on it. + return (VALID_META_FIELD_NAMES as string[]).includes(field); +} + export interface TabifyDocsOptions { shallow?: boolean; + /** + * If set to `false` the _source of the document, if requested, won't be + * merged into the flattened document. + */ source?: boolean; - meta?: boolean; } +/** + * Flattens an individual hit (from an ES response) into an object. This will + * create flattened field names, like `user.name`. + * + * @param hit The hit from an ES reponse's hits.hits[] + * @param indexPattern The index pattern for the requested index if available. + * @param params Parameters how to flatten the hit + */ export function flattenHit( hit: estypes.SearchHit, indexPattern?: IndexPattern, @@ -62,13 +110,36 @@ export function flattenHit( if (params?.source !== false && hit._source) { flatten(hit._source as Record); } - if (params?.meta !== false) { - // combine the fields that Discover allows to add as columns - const { _id, _index, _type, _score } = hit; - flatten({ _id, _index, _score, _type }); - } - return flat; + // Merge all valid meta fields into the flattened object + // expect for _source (in case that was specified as a meta field) + indexPattern?.metaFields?.forEach((metaFieldName) => { + if (!isValidMetaFieldName(metaFieldName) || metaFieldName === '_source') { + return; + } + flat[metaFieldName] = hit[metaFieldName]; + }); + + // Use a proxy to make sure that keys are always returned in a specific order, + // so we have a guarantee on the flattened order of keys. + return new Proxy(flat, { + ownKeys: (target) => { + return Reflect.ownKeys(target).sort((a, b) => { + const aIsMeta = indexPattern?.metaFields?.includes(String(a)); + const bIsMeta = indexPattern?.metaFields?.includes(String(b)); + if (aIsMeta && bIsMeta) { + return String(a).localeCompare(String(b)); + } + if (aIsMeta) { + return 1; + } + if (bIsMeta) { + return -1; + } + return String(a).localeCompare(String(b)); + }); + }, + }); } export const tabifyDocs = ( diff --git a/src/plugins/data/public/index.ts b/src/plugins/data/public/index.ts index 3ae98c083976e..4d51a7ae0ad77 100644 --- a/src/plugins/data/public/index.ts +++ b/src/plugins/data/public/index.ts @@ -52,7 +52,6 @@ import { ILLEGAL_CHARACTERS_VISIBLE, ILLEGAL_CHARACTERS, validateDataView, - flattenHitWrapper, } from './data_views'; export type { IndexPatternsService } from './data_views'; @@ -69,7 +68,6 @@ export const indexPatterns = { getFieldSubtypeMulti, getFieldSubtypeNested, validate: validateDataView, - flattenHitWrapper, }; export { diff --git a/src/plugins/data_views/common/data_views/data_view.ts b/src/plugins/data_views/common/data_views/data_view.ts index 1f038c171abf5..a1b6d4d731bca 100644 --- a/src/plugins/data_views/common/data_views/data_view.ts +++ b/src/plugins/data_views/common/data_views/data_view.ts @@ -72,6 +72,9 @@ export class DataView implements IIndexPattern { formatField: FormatFieldFn; }; public formatField: FormatFieldFn; + /** + * @deprecated Use `flattenHit` utility method exported from data plugin instead. + */ public flattenHit: (hit: Record, deep?: boolean) => Record; public metaFields: string[]; /** diff --git a/src/plugins/data_views/common/data_views/flatten_hit.ts b/src/plugins/data_views/common/data_views/flatten_hit.ts index ddf484affa298..0a6388f0914b1 100644 --- a/src/plugins/data_views/common/data_views/flatten_hit.ts +++ b/src/plugins/data_views/common/data_views/flatten_hit.ts @@ -6,6 +6,11 @@ * Side Public License, v 1. */ +// --------- DEPRECATED --------- +// This implementation of flattenHit is deprecated and should no longer be used. +// If you consider adding features to this, please don't but use the `flattenHit` +// implementation from the data plugin. + import _ from 'lodash'; import { DataView } from './data_view'; @@ -114,15 +119,3 @@ export function flattenHitWrapper(dataView: DataView, metaFields = {}, cache = n return decorateFlattened(flattened); }; } - -/** - * This wraps `flattenHitWrapper` so one single cache can be provided for all uses of that - * function. The returned value of this function is what is included in the index patterns - * setup contract. - * - * @public - */ -export function createFlattenHitWrapper() { - const cache = new WeakMap(); - return _.partial(flattenHitWrapper, _, _, cache); -} diff --git a/src/plugins/data_views/public/index.ts b/src/plugins/data_views/public/index.ts index 6b67da68ed78e..d8814e886fb0e 100644 --- a/src/plugins/data_views/public/index.ts +++ b/src/plugins/data_views/public/index.ts @@ -14,7 +14,6 @@ export { validateDataView, } from '../common/lib'; export { - flattenHitWrapper, formatHitProvider, onRedirectNoIndexPattern, onUnsupportedTimePattern, diff --git a/src/plugins/discover/public/__mocks__/index_pattern.ts b/src/plugins/discover/public/__mocks__/index_pattern.ts index f9cc202f9063e..2acb512617a6b 100644 --- a/src/plugins/discover/public/__mocks__/index_pattern.ts +++ b/src/plugins/discover/public/__mocks__/index_pattern.ts @@ -6,9 +6,9 @@ * Side Public License, v 1. */ -import { IIndexPatternFieldList } from '../../../data/common'; +import type { estypes } from '@elastic/elasticsearch'; +import { flattenHit, IIndexPatternFieldList } from '../../../data/common'; import { IndexPattern } from '../../../data/common'; -import { indexPatterns } from '../../../data/public'; const fields = [ { @@ -85,10 +85,11 @@ const indexPattern = { getFormatterForField: () => ({ convert: () => 'formatted' }), } as unknown as IndexPattern; -indexPattern.flattenHit = indexPatterns.flattenHitWrapper(indexPattern, indexPattern.metaFields); indexPattern.isTimeBased = () => !!indexPattern.timeFieldName; indexPattern.formatField = (hit: Record, fieldName: string) => { - return fieldName === '_source' ? hit._source : indexPattern.flattenHit(hit)[fieldName]; + return fieldName === '_source' + ? hit._source + : flattenHit(hit as unknown as estypes.SearchHit, indexPattern)[fieldName]; }; export const indexPatternMock = indexPattern; diff --git a/src/plugins/discover/public/__mocks__/index_pattern_with_timefield.ts b/src/plugins/discover/public/__mocks__/index_pattern_with_timefield.ts index f1f1d74f3af3a..ac30c24ef6f08 100644 --- a/src/plugins/discover/public/__mocks__/index_pattern_with_timefield.ts +++ b/src/plugins/discover/public/__mocks__/index_pattern_with_timefield.ts @@ -6,9 +6,9 @@ * Side Public License, v 1. */ -import { IIndexPatternFieldList } from '../../../data/common'; +import { flattenHit, IIndexPatternFieldList } from '../../../data/common'; import { IndexPattern } from '../../../data/common'; -import { indexPatterns } from '../../../data/public'; +import type { estypes } from '@elastic/elasticsearch'; const fields = [ { @@ -74,10 +74,11 @@ const indexPattern = { getFormatterForField: () => ({ convert: () => 'formatted' }), } as unknown as IndexPattern; -indexPattern.flattenHit = indexPatterns.flattenHitWrapper(indexPattern, indexPattern.metaFields); indexPattern.isTimeBased = () => !!indexPattern.timeFieldName; indexPattern.formatField = (hit: Record, fieldName: string) => { - return fieldName === '_source' ? hit._source : indexPattern.flattenHit(hit)[fieldName]; + return fieldName === '_source' + ? hit._source + : flattenHit(hit as unknown as estypes.SearchHit, indexPattern)[fieldName]; }; export const indexPatternWithTimefieldMock = indexPattern; diff --git a/src/plugins/discover/public/application/apps/main/components/chart/discover_chart.tsx b/src/plugins/discover/public/application/apps/main/components/chart/discover_chart.tsx index 8039cb06e49b3..b6509356c8c41 100644 --- a/src/plugins/discover/public/application/apps/main/components/chart/discover_chart.tsx +++ b/src/plugins/discover/public/application/apps/main/components/chart/discover_chart.tsx @@ -25,6 +25,7 @@ import { DiscoverServices } from '../../../../../build_services'; import { useChartPanels } from './use_chart_panels'; const DiscoverHistogramMemoized = memo(DiscoverHistogram); +export const CHART_HIDDEN_KEY = 'discover:chartHidden'; export function DiscoverChart({ resetSavedSearch, @@ -47,7 +48,8 @@ export function DiscoverChart({ }) { const [showChartOptionsPopover, setShowChartOptionsPopover] = useState(false); - const { data } = services; + const { data, storage } = services; + const chartRef = useRef<{ element: HTMLElement | null; moveFocus: boolean }>({ element: null, moveFocus: false, @@ -71,7 +73,8 @@ export function DiscoverChart({ const newHideChart = !state.hideChart; stateContainer.setAppState({ hideChart: newHideChart }); chartRef.current.moveFocus = !newHideChart; - }, [state, stateContainer]); + storage.set(CHART_HIDDEN_KEY, newHideChart); + }, [state.hideChart, stateContainer, storage]); const timefilterUpdateHandler = useCallback( (ranges: { from: number; to: number }) => { diff --git a/src/plugins/discover/public/application/apps/main/components/doc_table/components/table_row.tsx b/src/plugins/discover/public/application/apps/main/components/doc_table/components/table_row.tsx index 8d56f2adeaf65..d91735460af08 100644 --- a/src/plugins/discover/public/application/apps/main/components/doc_table/components/table_row.tsx +++ b/src/plugins/discover/public/application/apps/main/components/doc_table/components/table_row.tsx @@ -10,6 +10,7 @@ import React, { Fragment, useCallback, useMemo, useState } from 'react'; import classNames from 'classnames'; import { i18n } from '@kbn/i18n'; import { EuiButtonEmpty, EuiIcon } from '@elastic/eui'; +import { flattenHit } from '../../../../../../../../data/common'; import { DocViewer } from '../../../../../components/doc_viewer/doc_viewer'; import { FilterManager, IndexPattern } from '../../../../../../../../data/public'; import { TableCell } from './table_row/table_cell'; @@ -57,7 +58,7 @@ export const TableRow = ({ }); const anchorDocTableRowSubj = row.isAnchor ? ' docTableAnchorRow' : ''; - const flattenedRow = useMemo(() => indexPattern.flattenHit(row), [indexPattern, row]); + const flattenedRow = useMemo(() => flattenHit(row, indexPattern), [indexPattern, row]); const mapping = useMemo(() => indexPattern.fields.getByName, [indexPattern]); // toggle display of the rows details, a full list of the fields from each row diff --git a/src/plugins/discover/public/application/apps/main/components/sidebar/discover_sidebar.test.tsx b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_sidebar.test.tsx index e53bf006e2b4e..a550dbd59b9fa 100644 --- a/src/plugins/discover/public/application/apps/main/components/sidebar/discover_sidebar.test.tsx +++ b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_sidebar.test.tsx @@ -15,7 +15,7 @@ import realHits from '../../../../../__fixtures__/real_hits.js'; import { mountWithIntl } from '@kbn/test/jest'; import React from 'react'; import { DiscoverSidebarProps } from './discover_sidebar'; -import { IndexPatternAttributes } from '../../../../../../../data/common'; +import { flattenHit, IndexPatternAttributes } from '../../../../../../../data/common'; import { SavedObject } from '../../../../../../../../core/types'; import { getDefaultFieldFilter } from './lib/field_filter'; import { DiscoverSidebarComponent as DiscoverSidebar } from './discover_sidebar'; @@ -44,7 +44,7 @@ function getCompProps(): DiscoverSidebarProps { const fieldCounts: Record = {}; for (const hit of hits) { - for (const key of Object.keys(indexPattern.flattenHit(hit))) { + for (const key of Object.keys(flattenHit(hit, indexPattern))) { fieldCounts[key] = (fieldCounts[key] || 0) + 1; } } diff --git a/src/plugins/discover/public/application/apps/main/components/sidebar/discover_sidebar_responsive.test.tsx b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_sidebar_responsive.test.tsx index 9d73f885c988d..ded7897d2a9e5 100644 --- a/src/plugins/discover/public/application/apps/main/components/sidebar/discover_sidebar_responsive.test.tsx +++ b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_sidebar_responsive.test.tsx @@ -15,7 +15,7 @@ import realHits from '../../../../../__fixtures__/real_hits.js'; import { act } from 'react-dom/test-utils'; import { mountWithIntl } from '@kbn/test/jest'; import React from 'react'; -import { IndexPatternAttributes } from '../../../../../../../data/common'; +import { flattenHit, IndexPatternAttributes } from '../../../../../../../data/common'; import { SavedObject } from '../../../../../../../../core/types'; import { DiscoverSidebarResponsive, @@ -72,7 +72,7 @@ function getCompProps(): DiscoverSidebarResponsiveProps { const indexPattern = stubLogstashIndexPattern; // @ts-expect-error _.each() is passing additional args to flattenHit - const hits = each(cloneDeep(realHits), indexPattern.flattenHit) as Array< + const hits = each(cloneDeep(realHits), (hit) => flattenHit(hit, indexPattern)) as Array< Record > as ElasticSearchHit[]; @@ -83,7 +83,7 @@ function getCompProps(): DiscoverSidebarResponsiveProps { ]; for (const hit of hits) { - for (const key of Object.keys(indexPattern.flattenHit(hit))) { + for (const key of Object.keys(flattenHit(hit, indexPattern))) { mockfieldCounts[key] = (mockfieldCounts[key] || 0) + 1; } } diff --git a/src/plugins/discover/public/application/apps/main/components/sidebar/lib/field_calculator.js b/src/plugins/discover/public/application/apps/main/components/sidebar/lib/field_calculator.js index 8f86cdad82cf7..be7e9c616273d 100644 --- a/src/plugins/discover/public/application/apps/main/components/sidebar/lib/field_calculator.js +++ b/src/plugins/discover/public/application/apps/main/components/sidebar/lib/field_calculator.js @@ -8,12 +8,12 @@ import { map, sortBy, without, each, defaults, isObject } from 'lodash'; import { i18n } from '@kbn/i18n'; +import { flattenHit } from '../../../../../../../../data/common'; function getFieldValues(hits, field, indexPattern) { const name = field.name; - const flattenHit = indexPattern.flattenHit; return map(hits, function (hit) { - return flattenHit(hit)[name]; + return flattenHit(hit, indexPattern)[name]; }); } diff --git a/src/plugins/discover/public/application/apps/main/components/sidebar/lib/field_calculator.test.ts b/src/plugins/discover/public/application/apps/main/components/sidebar/lib/field_calculator.test.ts index c3ff7970c5aac..d4bc41f36b2d4 100644 --- a/src/plugins/discover/public/application/apps/main/components/sidebar/lib/field_calculator.test.ts +++ b/src/plugins/discover/public/application/apps/main/components/sidebar/lib/field_calculator.test.ts @@ -13,6 +13,7 @@ import { keys, each, cloneDeep, clone, uniq, filter, map } from 'lodash'; import realHits from '../../../../../../__fixtures__/real_hits.js'; import { IndexPattern } from '../../../../../../../../data/public'; +import { flattenHit } from '../../../../../../../../data/common'; // @ts-expect-error import { fieldCalculator } from './field_calculator'; @@ -120,7 +121,7 @@ describe('fieldCalculator', function () { let hits: any; beforeEach(function () { - hits = each(cloneDeep(realHits), (hit) => indexPattern.flattenHit(hit)); + hits = each(cloneDeep(realHits), (hit) => flattenHit(hit, indexPattern)); }); it('Should return an array of values for _source fields', function () { diff --git a/src/plugins/discover/public/application/apps/main/services/use_discover_state.ts b/src/plugins/discover/public/application/apps/main/services/use_discover_state.ts index ce30c0749b938..a1d58fdd6090e 100644 --- a/src/plugins/discover/public/application/apps/main/services/use_discover_state.ts +++ b/src/plugins/discover/public/application/apps/main/services/use_discover_state.ts @@ -34,7 +34,7 @@ export function useDiscoverState({ savedSearch: SavedSearch; history: History; }) { - const { uiSettings: config, data, filterManager, indexPatterns } = services; + const { uiSettings: config, data, filterManager, indexPatterns, storage } = services; const useNewFieldsApi = useMemo(() => !config.get(SEARCH_FIELDS_FROM_SOURCE), [config]); const { timefilter } = data.query.timefilter; @@ -53,13 +53,14 @@ export function useDiscoverState({ config, data, savedSearch, + storage, }), storeInSessionStorage: config.get('state:storeInSessionStorage'), history, toasts: services.core.notifications.toasts, uiSettings: config, }), - [config, data, history, savedSearch, services.core.notifications.toasts] + [config, data, history, savedSearch, services.core.notifications.toasts, storage] ); const { appStateContainer } = stateContainer; @@ -160,11 +161,12 @@ export function useDiscoverState({ config, data, savedSearch: newSavedSearch, + storage, }); await stateContainer.replaceUrlAppState(newAppState); setState(newAppState); }, - [indexPattern, services, config, data, stateContainer] + [services, indexPattern, config, data, storage, stateContainer] ); /** @@ -209,10 +211,11 @@ export function useDiscoverState({ config, data, savedSearch, + storage, }); stateContainer.replaceUrlAppState(newAppState); setState(newAppState); - }, [config, data, savedSearch, reset, stateContainer]); + }, [config, data, savedSearch, reset, stateContainer, storage]); /** * Trigger data fetching on indexPattern or savedSearch changes diff --git a/src/plugins/discover/public/application/apps/main/utils/calc_field_counts.ts b/src/plugins/discover/public/application/apps/main/utils/calc_field_counts.ts index 1ce7023539be4..211c4e5c8b069 100644 --- a/src/plugins/discover/public/application/apps/main/utils/calc_field_counts.ts +++ b/src/plugins/discover/public/application/apps/main/utils/calc_field_counts.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import type { IndexPattern } from 'src/plugins/data/common'; +import { flattenHit, IndexPattern } from '../../../../../../data/common'; import { ElasticSearchHit } from '../../../doc_views/doc_views_types'; /** @@ -22,7 +22,7 @@ export function calcFieldCounts( return {}; } for (const hit of rows) { - const fields = Object.keys(indexPattern.flattenHit(hit)); + const fields = Object.keys(flattenHit(hit, indexPattern)); for (const fieldName of fields) { counts[fieldName] = (counts[fieldName] || 0) + 1; } diff --git a/src/plugins/discover/public/application/apps/main/utils/get_state_defaults.test.ts b/src/plugins/discover/public/application/apps/main/utils/get_state_defaults.test.ts index 04ee5f414e7f4..45447fe642ad4 100644 --- a/src/plugins/discover/public/application/apps/main/utils/get_state_defaults.test.ts +++ b/src/plugins/discover/public/application/apps/main/utils/get_state_defaults.test.ts @@ -12,14 +12,18 @@ import { uiSettingsMock } from '../../../../__mocks__/ui_settings'; import { indexPatternWithTimefieldMock } from '../../../../__mocks__/index_pattern_with_timefield'; import { savedSearchMock } from '../../../../__mocks__/saved_search'; import { indexPatternMock } from '../../../../__mocks__/index_pattern'; +import { discoverServiceMock } from '../../../../__mocks__/services'; describe('getStateDefaults', () => { + const storage = discoverServiceMock.storage; + test('index pattern with timefield', () => { savedSearchMock.searchSource = createSearchSourceMock({ index: indexPatternWithTimefieldMock }); const actual = getStateDefaults({ config: uiSettingsMock, data: dataPluginMock.createStartContract(), savedSearch: savedSearchMock, + storage, }); expect(actual).toMatchInlineSnapshot(` Object { @@ -49,6 +53,7 @@ describe('getStateDefaults', () => { config: uiSettingsMock, data: dataPluginMock.createStartContract(), savedSearch: savedSearchMock, + storage, }); expect(actual).toMatchInlineSnapshot(` Object { diff --git a/src/plugins/discover/public/application/apps/main/utils/get_state_defaults.ts b/src/plugins/discover/public/application/apps/main/utils/get_state_defaults.ts index 11ebf0ecf9af4..6fa4dda2eab19 100644 --- a/src/plugins/discover/public/application/apps/main/utils/get_state_defaults.ts +++ b/src/plugins/discover/public/application/apps/main/utils/get_state_defaults.ts @@ -6,19 +6,28 @@ * Side Public License, v 1. */ -import { cloneDeep } from 'lodash'; +import { cloneDeep, isEqual } from 'lodash'; import { IUiSettingsClient } from 'kibana/public'; -import { DEFAULT_COLUMNS_SETTING, SORT_DEFAULT_ORDER_SETTING } from '../../../../../common'; +import { + DEFAULT_COLUMNS_SETTING, + SEARCH_FIELDS_FROM_SOURCE, + SORT_DEFAULT_ORDER_SETTING, +} from '../../../../../common'; import { SavedSearch } from '../../../../saved_searches'; import { DataPublicPluginStart } from '../../../../../../data/public'; import { AppState } from '../services/discover_state'; import { getDefaultSort, getSortArray } from '../components/doc_table'; +import { CHART_HIDDEN_KEY } from '../components/chart/discover_chart'; +import { Storage } from '../../../../../../kibana_utils/public'; function getDefaultColumns(savedSearch: SavedSearch, config: IUiSettingsClient) { if (savedSearch.columns && savedSearch.columns.length > 0) { return [...savedSearch.columns]; } + if (config.get(SEARCH_FIELDS_FROM_SOURCE) && isEqual(config.get(DEFAULT_COLUMNS_SETTING), [])) { + return ['_source']; + } return [...config.get(DEFAULT_COLUMNS_SETTING)]; } @@ -26,10 +35,12 @@ export function getStateDefaults({ config, data, savedSearch, + storage, }: { config: IUiSettingsClient; data: DataPublicPluginStart; savedSearch: SavedSearch; + storage: Storage; }) { const { searchSource } = savedSearch; const indexPattern = searchSource.getField('index'); @@ -37,6 +48,7 @@ export function getStateDefaults({ const query = searchSource.getField('query') || data.query.queryString.getDefaultQuery(); const sort = getSortArray(savedSearch.sort ?? [], indexPattern!); const columns = getDefaultColumns(savedSearch, config); + const chartHidden = Boolean(storage.get(CHART_HIDDEN_KEY)); const defaultState = { query, @@ -47,13 +59,13 @@ export function getStateDefaults({ index: indexPattern?.id, interval: 'auto', filters: cloneDeep(searchSource.getOwnField('filter')), - hideChart: undefined, + hideChart: chartHidden ? chartHidden : undefined, savedQuery: undefined, } as AppState; if (savedSearch.grid) { defaultState.grid = savedSearch.grid; } - if (savedSearch.hideChart) { + if (savedSearch.hideChart !== undefined) { defaultState.hideChart = savedSearch.hideChart; } diff --git a/src/plugins/discover/public/application/components/discover_grid/discover_grid.tsx b/src/plugins/discover/public/application/components/discover_grid/discover_grid.tsx index 0fe506b3b8537..11323080274a9 100644 --- a/src/plugins/discover/public/application/components/discover_grid/discover_grid.tsx +++ b/src/plugins/discover/public/application/components/discover_grid/discover_grid.tsx @@ -21,7 +21,7 @@ import { EuiLoadingSpinner, EuiIcon, } from '@elastic/eui'; -import type { IndexPattern } from 'src/plugins/data/common'; +import { flattenHit, IndexPattern } from '../../../../../data/common'; import { DocViewFilterFn, ElasticSearchHit } from '../../doc_views/doc_views_types'; import { getSchemaDetectors } from './discover_grid_schema'; import { DiscoverGridFlyout } from './discover_grid_flyout'; @@ -271,7 +271,7 @@ export const DiscoverGrid = ({ getRenderCellValueFn( indexPattern, displayedRows, - displayedRows ? displayedRows.map((hit) => indexPattern.flattenHit(hit)) : [], + displayedRows ? displayedRows.map((hit) => flattenHit(hit, indexPattern)) : [], useNewFieldsApi, fieldsToShow, services.uiSettings.get(MAX_DOC_FIELDS_DISPLAYED) diff --git a/src/plugins/discover/public/application/components/discover_grid/discover_grid_cell_actions.tsx b/src/plugins/discover/public/application/components/discover_grid/discover_grid_cell_actions.tsx index b1823eb3d668c..a31b551821ddb 100644 --- a/src/plugins/discover/public/application/components/discover_grid/discover_grid_cell_actions.tsx +++ b/src/plugins/discover/public/application/components/discover_grid/discover_grid_cell_actions.tsx @@ -9,7 +9,7 @@ import React, { useContext } from 'react'; import { EuiDataGridColumnCellActionProps } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { IndexPatternField } from '../../../../../data/common'; +import { flattenHit, IndexPatternField } from '../../../../../data/common'; import { DiscoverGridContext } from './discover_grid_context'; export const FilterInBtn = ({ @@ -27,7 +27,7 @@ export const FilterInBtn = ({ { const row = context.rows[rowIndex]; - const flattened = context.indexPattern.flattenHit(row); + const flattened = flattenHit(row, context.indexPattern); if (flattened) { context.onFilter(columnId, flattened[columnId], '+'); @@ -60,7 +60,7 @@ export const FilterOutBtn = ({ { const row = context.rows[rowIndex]; - const flattened = context.indexPattern.flattenHit(row); + const flattened = flattenHit(row, context.indexPattern); if (flattened) { context.onFilter(columnId, flattened[columnId], '-'); diff --git a/src/plugins/discover/public/application/components/discover_grid/discover_grid_document_selection.test.tsx b/src/plugins/discover/public/application/components/discover_grid/discover_grid_document_selection.test.tsx index 41cf3f5a68edb..e9b93e21553a2 100644 --- a/src/plugins/discover/public/application/components/discover_grid/discover_grid_document_selection.test.tsx +++ b/src/plugins/discover/public/application/components/discover_grid/discover_grid_document_selection.test.tsx @@ -17,6 +17,17 @@ import { esHits } from '../../../__mocks__/es_hits'; import { indexPatternMock } from '../../../__mocks__/index_pattern'; import { DiscoverGridContext } from './discover_grid_context'; +const baseContextMock = { + expanded: undefined, + setExpanded: jest.fn(), + rows: esHits, + onFilter: jest.fn(), + indexPattern: indexPatternMock, + isDarkMode: false, + selectedDocs: [], + setSelectedDocs: jest.fn(), +}; + describe('document selection', () => { describe('getDocId', () => { test('doc with custom routing', () => { @@ -39,14 +50,7 @@ describe('document selection', () => { describe('SelectButton', () => { test('is not checked', () => { const contextMock = { - expanded: undefined, - setExpanded: jest.fn(), - rows: esHits, - onFilter: jest.fn(), - indexPattern: indexPatternMock, - isDarkMode: false, - selectedDocs: [], - setSelectedDocs: jest.fn(), + ...baseContextMock, }; const component = mountWithIntl( @@ -68,14 +72,8 @@ describe('document selection', () => { test('is checked', () => { const contextMock = { - expanded: undefined, - setExpanded: jest.fn(), - rows: esHits, - onFilter: jest.fn(), - indexPattern: indexPatternMock, - isDarkMode: false, + ...baseContextMock, selectedDocs: ['i::1::'], - setSelectedDocs: jest.fn(), }; const component = mountWithIntl( @@ -97,14 +95,7 @@ describe('document selection', () => { test('adding a selection', () => { const contextMock = { - expanded: undefined, - setExpanded: jest.fn(), - rows: esHits, - onFilter: jest.fn(), - indexPattern: indexPatternMock, - isDarkMode: false, - selectedDocs: [], - setSelectedDocs: jest.fn(), + ...baseContextMock, }; const component = mountWithIntl( @@ -126,14 +117,8 @@ describe('document selection', () => { }); test('removing a selection', () => { const contextMock = { - expanded: undefined, - setExpanded: jest.fn(), - rows: esHits, - onFilter: jest.fn(), - indexPattern: indexPatternMock, - isDarkMode: false, + ...baseContextMock, selectedDocs: ['i::1::'], - setSelectedDocs: jest.fn(), }; const component = mountWithIntl( diff --git a/src/plugins/discover/public/application/components/discover_grid/discover_grid_expand_button.test.tsx b/src/plugins/discover/public/application/components/discover_grid/discover_grid_expand_button.test.tsx index d1299b39a25b2..3f7cb70091cfa 100644 --- a/src/plugins/discover/public/application/components/discover_grid/discover_grid_expand_button.test.tsx +++ b/src/plugins/discover/public/application/components/discover_grid/discover_grid_expand_button.test.tsx @@ -14,17 +14,21 @@ import { DiscoverGridContext } from './discover_grid_context'; import { indexPatternMock } from '../../../__mocks__/index_pattern'; import { esHits } from '../../../__mocks__/es_hits'; +const baseContextMock = { + expanded: undefined, + setExpanded: jest.fn(), + rows: esHits, + onFilter: jest.fn(), + indexPattern: indexPatternMock, + isDarkMode: false, + selectedDocs: [], + setSelectedDocs: jest.fn(), +}; + describe('Discover grid view button ', function () { it('when no document is expanded, setExpanded is called with current document', async () => { const contextMock = { - expanded: undefined, - setExpanded: jest.fn(), - rows: esHits, - onFilter: jest.fn(), - indexPattern: indexPatternMock, - isDarkMode: false, - selectedDocs: [], - setSelectedDocs: jest.fn(), + ...baseContextMock, }; const component = mountWithIntl( @@ -45,14 +49,8 @@ describe('Discover grid view button ', function () { }); it('when the current document is expanded, setExpanded is called with undefined', async () => { const contextMock = { + ...baseContextMock, expanded: esHits[0], - setExpanded: jest.fn(), - rows: esHits, - onFilter: jest.fn(), - indexPattern: indexPatternMock, - isDarkMode: false, - selectedDocs: [], - setSelectedDocs: jest.fn(), }; const component = mountWithIntl( @@ -73,14 +71,8 @@ describe('Discover grid view button ', function () { }); it('when another document is expanded, setExpanded is called with the current document', async () => { const contextMock = { + ...baseContextMock, expanded: esHits[0], - setExpanded: jest.fn(), - rows: esHits, - onFilter: jest.fn(), - indexPattern: indexPatternMock, - isDarkMode: false, - selectedDocs: [], - setSelectedDocs: jest.fn(), }; const component = mountWithIntl( diff --git a/src/plugins/discover/public/application/components/discover_grid/get_render_cell_value.test.tsx b/src/plugins/discover/public/application/components/discover_grid/get_render_cell_value.test.tsx index 5aca237d46581..6556876217953 100644 --- a/src/plugins/discover/public/application/components/discover_grid/get_render_cell_value.test.tsx +++ b/src/plugins/discover/public/application/components/discover_grid/get_render_cell_value.test.tsx @@ -11,6 +11,7 @@ import { ReactWrapper, shallow } from 'enzyme'; import { getRenderCellValueFn } from './get_render_cell_value'; import { indexPatternMock } from '../../../__mocks__/index_pattern'; import { ElasticSearchHit } from '../../doc_views/doc_views_types'; +import { flattenHit } from 'src/plugins/data/common'; jest.mock('../../../../../kibana_react/public', () => ({ useUiSetting: () => true, @@ -68,12 +69,16 @@ const rowsFieldsWithTopLevelObject: ElasticSearchHit[] = [ }, ]; +const flatten = (hit: ElasticSearchHit): Record => { + return flattenHit(hit, indexPatternMock); +}; + describe('Discover grid cell rendering', function () { it('renders bytes column correctly', () => { const DiscoverGridCellValue = getRenderCellValueFn( indexPatternMock, rowsSource, - rowsSource.map((row) => indexPatternMock.flattenHit(row)), + rowsSource.map(flatten), false, [], 100 @@ -95,7 +100,7 @@ describe('Discover grid cell rendering', function () { const DiscoverGridCellValue = getRenderCellValueFn( indexPatternMock, rowsSource, - rowsSource.map((row) => indexPatternMock.flattenHit(row)), + rowsSource.map(flatten), false, [], 100 @@ -146,7 +151,7 @@ describe('Discover grid cell rendering', function () { const DiscoverGridCellValue = getRenderCellValueFn( indexPatternMock, rowsSource, - rowsSource.map((row) => indexPatternMock.flattenHit(row)), + rowsSource.map(flatten), false, [], 100 @@ -189,7 +194,7 @@ describe('Discover grid cell rendering', function () { const DiscoverGridCellValue = getRenderCellValueFn( indexPatternMock, rowsFields, - rowsFields.map((row) => indexPatternMock.flattenHit(row)), + rowsFields.map(flatten), true, [], 100 @@ -244,7 +249,7 @@ describe('Discover grid cell rendering', function () { const DiscoverGridCellValue = getRenderCellValueFn( indexPatternMock, rowsFields, - rowsFields.map((row) => indexPatternMock.flattenHit(row)), + rowsFields.map(flatten), true, [], // this is the number of rendered items @@ -287,7 +292,7 @@ describe('Discover grid cell rendering', function () { const DiscoverGridCellValue = getRenderCellValueFn( indexPatternMock, rowsFields, - rowsFields.map((row) => indexPatternMock.flattenHit(row)), + rowsFields.map(flatten), true, [], 100 @@ -335,7 +340,7 @@ describe('Discover grid cell rendering', function () { const DiscoverGridCellValue = getRenderCellValueFn( indexPatternMock, rowsFieldsWithTopLevelObject, - rowsFieldsWithTopLevelObject.map((row) => indexPatternMock.flattenHit(row)), + rowsFieldsWithTopLevelObject.map(flatten), true, [], 100 @@ -376,7 +381,7 @@ describe('Discover grid cell rendering', function () { const DiscoverGridCellValue = getRenderCellValueFn( indexPatternMock, rowsFieldsWithTopLevelObject, - rowsFieldsWithTopLevelObject.map((row) => indexPatternMock.flattenHit(row)), + rowsFieldsWithTopLevelObject.map(flatten), true, [], 100 @@ -416,7 +421,7 @@ describe('Discover grid cell rendering', function () { const DiscoverGridCellValue = getRenderCellValueFn( indexPatternMock, rowsFieldsWithTopLevelObject, - rowsFieldsWithTopLevelObject.map((row) => indexPatternMock.flattenHit(row)), + rowsFieldsWithTopLevelObject.map(flatten), true, [], 100 @@ -447,7 +452,7 @@ describe('Discover grid cell rendering', function () { const DiscoverGridCellValue = getRenderCellValueFn( indexPatternMock, rowsFieldsWithTopLevelObject, - rowsFieldsWithTopLevelObject.map((row) => indexPatternMock.flattenHit(row)), + rowsFieldsWithTopLevelObject.map(flatten), true, [], 100 @@ -466,7 +471,9 @@ describe('Discover grid cell rendering', function () { @@ -477,7 +484,7 @@ describe('Discover grid cell rendering', function () { const DiscoverGridCellValue = getRenderCellValueFn( indexPatternMock, rowsSource, - rowsSource.map((row) => indexPatternMock.flattenHit(row)), + rowsSource.map(flatten), false, [], 100 @@ -499,7 +506,7 @@ describe('Discover grid cell rendering', function () { const DiscoverGridCellValue = getRenderCellValueFn( indexPatternMock, rowsSource, - rowsSource.map((row) => indexPatternMock.flattenHit(row)), + rowsSource.map(flatten), false, [], 100 diff --git a/src/plugins/discover/public/application/components/source_viewer/__snapshots__/source_viewer.test.tsx.snap b/src/plugins/discover/public/application/components/source_viewer/__snapshots__/source_viewer.test.tsx.snap index 3d4a9923fa8c8..82d9183f3d394 100644 --- a/src/plugins/discover/public/application/components/source_viewer/__snapshots__/source_viewer.test.tsx.snap +++ b/src/plugins/discover/public/application/components/source_viewer/__snapshots__/source_viewer.test.tsx.snap @@ -594,9 +594,13 @@ exports[`Source Viewer component renders json code editor 1`] = ` fallback={} > - +
+ +
diff --git a/src/plugins/discover/public/application/components/table/table.test.tsx b/src/plugins/discover/public/application/components/table/table.test.tsx index 3f010d9d07737..ce914edcec703 100644 --- a/src/plugins/discover/public/application/components/table/table.test.tsx +++ b/src/plugins/discover/public/application/components/table/table.test.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { mountWithIntl } from '@kbn/test/jest'; import { findTestSubject } from '@elastic/eui/lib/test'; import { DocViewerTable, DocViewerTableProps } from './table'; -import { indexPatterns, IndexPattern } from '../../../../../data/public'; +import { IndexPattern } from '../../../../../data/public'; import { ElasticSearchHit } from '../../doc_views/doc_views_types'; jest.mock('../../../kibana_services', () => ({ @@ -65,7 +65,7 @@ const indexPattern = { ], }, metaFields: ['_index', '_score'], - flattenHit: undefined, + flattenHit: jest.fn(), formatHit: jest.fn((hit) => hit._source), } as unknown as IndexPattern; @@ -73,8 +73,6 @@ indexPattern.fields.getByName = (name: string) => { return indexPattern.fields.getAll().find((field) => field.name === name); }; -indexPattern.flattenHit = indexPatterns.flattenHitWrapper(indexPattern, indexPattern.metaFields); - const mountComponent = (props: DocViewerTableProps) => { return mountWithIntl(); }; diff --git a/src/plugins/discover/public/application/components/table/table.tsx b/src/plugins/discover/public/application/components/table/table.tsx index eab3ba6e3d29a..7f597d846f88f 100644 --- a/src/plugins/discover/public/application/components/table/table.tsx +++ b/src/plugins/discover/public/application/components/table/table.tsx @@ -9,6 +9,7 @@ import React, { useCallback, useMemo } from 'react'; import { EuiInMemoryTable } from '@elastic/eui'; import { IndexPattern, IndexPatternField } from '../../../../../data/public'; +import { flattenHit } from '../../../../../data/common'; import { SHOW_MULTIFIELDS } from '../../../../common'; import { getServices } from '../../../kibana_services'; import { isNestedFieldParent } from '../../apps/main/utils/nested_fields'; @@ -95,7 +96,7 @@ export const DocViewerTable = ({ return null; } - const flattened = indexPattern?.flattenHit(hit); + const flattened = flattenHit(hit, indexPattern, { source: true }); const fieldsToShow = getFieldsToShow(Object.keys(flattened), indexPattern, showMultiFields); const items: FieldRecord[] = Object.keys(flattened) diff --git a/src/plugins/discover/public/application/helpers/state_helpers.ts b/src/plugins/discover/public/application/helpers/state_helpers.ts index fd17ec9516ab5..bb64f823d61a6 100644 --- a/src/plugins/discover/public/application/helpers/state_helpers.ts +++ b/src/plugins/discover/public/application/helpers/state_helpers.ts @@ -24,6 +24,7 @@ export function handleSourceColumnState( } const useNewFieldsApi = !uiSettings.get(SEARCH_FIELDS_FROM_SOURCE); const defaultColumns = uiSettings.get(DEFAULT_COLUMNS_SETTING); + if (useNewFieldsApi) { // if fields API is used, filter out the source column let cleanedColumns = state.columns.filter((column) => column !== '_source'); @@ -39,9 +40,13 @@ export function handleSourceColumnState( } else if (state.columns.length === 0) { // if _source fetching is used and there are no column, switch back to default columns // this can happen if the fields API was previously used + const columns = defaultColumns; + if (columns.length === 0) { + columns.push('_source'); + } return { ...state, - columns: [...defaultColumns], + columns: [...columns], }; } diff --git a/src/plugins/discover/server/ui_settings.ts b/src/plugins/discover/server/ui_settings.ts index aa1b44da12bfc..82221fb8e8593 100644 --- a/src/plugins/discover/server/ui_settings.ts +++ b/src/plugins/discover/server/ui_settings.ts @@ -33,9 +33,10 @@ export const getUiSettings: () => Record = () => ({ name: i18n.translate('discover.advancedSettings.defaultColumnsTitle', { defaultMessage: 'Default columns', }), - value: ['_source'], + value: [], description: i18n.translate('discover.advancedSettings.defaultColumnsText', { - defaultMessage: 'Columns displayed by default in the Discovery tab', + defaultMessage: + 'Columns displayed by default in the Discover app. If empty, a summary of the document will be displayed.', }), category: ['discover'], schema: schema.arrayOf(schema.string()), diff --git a/src/plugins/home/server/tutorials/cloudwatch_logs/index.ts b/src/plugins/home/server/tutorials/cloudwatch_logs/index.ts index dd035a66c5ced..cf0c27ed9be73 100644 --- a/src/plugins/home/server/tutorials/cloudwatch_logs/index.ts +++ b/src/plugins/home/server/tutorials/cloudwatch_logs/index.ts @@ -53,6 +53,6 @@ export function cloudwatchLogsSpecProvider(context: TutorialContext): TutorialSc onPrem: onPremInstructions([], context), elasticCloud: cloudInstructions(), onPremElasticCloud: onPremCloudInstructions(), - integrationBrowserCategories: ['security', 'network', 'web'], + integrationBrowserCategories: ['aws', 'cloud', 'datastore', 'security', 'network'], }; } diff --git a/src/plugins/index_pattern_field_editor/__jest__/client_integration/field_editor_flyout_preview.test.ts b/src/plugins/index_pattern_field_editor/__jest__/client_integration/field_editor_flyout_preview.test.ts index 65089bc24317b..67309aab44a76 100644 --- a/src/plugins/index_pattern_field_editor/__jest__/client_integration/field_editor_flyout_preview.test.ts +++ b/src/plugins/index_pattern_field_editor/__jest__/client_integration/field_editor_flyout_preview.test.ts @@ -366,6 +366,7 @@ describe('Field editor Preview panel', () => { subTitle: 'First doc - subTitle', title: 'First doc - title', }, + documentId: '001', index: 'testIndex', script: { source: 'echo("hello")', diff --git a/src/plugins/index_pattern_field_editor/public/components/preview/field_preview_context.tsx b/src/plugins/index_pattern_field_editor/public/components/preview/field_preview_context.tsx index e49e0ef6885d0..21ab055c9b05e 100644 --- a/src/plugins/index_pattern_field_editor/public/components/preview/field_preview_context.tsx +++ b/src/plugins/index_pattern_field_editor/public/components/preview/field_preview_context.tsx @@ -335,6 +335,7 @@ export const FieldPreviewProvider: FunctionComponent = ({ children }) => { document: params.document!, context: `${params.type!}_field` as FieldPreviewContext, script: params.script!, + documentId: currentDocId, }); if (currentApiCall !== previewCount.current) { diff --git a/src/plugins/index_pattern_field_editor/public/lib/api.ts b/src/plugins/index_pattern_field_editor/public/lib/api.ts index 9325b5c2faf47..9641619640a52 100644 --- a/src/plugins/index_pattern_field_editor/public/lib/api.ts +++ b/src/plugins/index_pattern_field_editor/public/lib/api.ts @@ -16,11 +16,13 @@ export const initApi = (httpClient: HttpSetup) => { context, script, document, + documentId, }: { index: string; context: FieldPreviewContext; script: { source: string } | null; document: Record; + documentId: string; }) => { return sendRequest(httpClient, { path: `${API_BASE_PATH}/field_preview`, @@ -30,6 +32,7 @@ export const initApi = (httpClient: HttpSetup) => { context, script, document, + documentId, }, }); }; diff --git a/src/plugins/index_pattern_field_editor/server/routes/field_preview.ts b/src/plugins/index_pattern_field_editor/server/routes/field_preview.ts index 11ec1ca7d5666..847dd41e0082b 100644 --- a/src/plugins/index_pattern_field_editor/server/routes/field_preview.ts +++ b/src/plugins/index_pattern_field_editor/server/routes/field_preview.ts @@ -6,8 +6,8 @@ * Side Public License, v 1. */ +import { estypes } from '@elastic/elasticsearch'; import { schema } from '@kbn/config-schema'; -import { HttpResponsePayload } from 'kibana/server'; import { API_BASE_PATH } from '../../common/constants'; import { RouteDependencies } from '../types'; @@ -26,6 +26,7 @@ const bodySchema = schema.object({ schema.literal('long_field'), ]), document: schema.object({}, { unknowns: 'allow' }), + documentId: schema.string(), }); export const registerFieldPreviewRoute = ({ router }: RouteDependencies): void => { @@ -39,30 +40,41 @@ export const registerFieldPreviewRoute = ({ router }: RouteDependencies): void = async (ctx, req, res) => { const { client } = ctx.core.elasticsearch; - const body = JSON.stringify({ - script: req.body.script, - context: req.body.context, - context_setup: { - document: req.body.document, - index: req.body.index, - } as any, - }); + const type = req.body.context.split('_field')[0] as estypes.MappingRuntimeFieldType; + const body = { + runtime_mappings: { + my_runtime_field: { + type, + script: req.body.script, + }, + }, + size: 1, + query: { + term: { + _id: req.body.documentId, + }, + }, + fields: ['my_runtime_field'], + }; try { - const response = await client.asCurrentUser.scriptsPainlessExecute({ - // @ts-expect-error `ExecutePainlessScriptRequest.body` does not allow `string` + const response = await client.asCurrentUser.search({ + index: req.body.index, body, }); - const fieldValue = response.body.result as any[] as HttpResponsePayload; + const fieldValue = response.body.hits.hits[0]?.fields?.my_runtime_field ?? ''; return res.ok({ body: { values: fieldValue } }); - } catch (error) { + } catch (error: any) { // Assume invalid painless script was submitted // Return 200 with error object const handleCustomError = () => { return res.ok({ - body: { values: [], ...error.body }, + body: { + values: [], + error: error.body.error.failed_shards[0]?.reason ?? {}, + }, }); }; diff --git a/src/plugins/kibana_legacy/server/index.ts b/src/plugins/kibana_legacy/server/index.ts index 90c9c2888c9da..15ae8547c73e1 100644 --- a/src/plugins/kibana_legacy/server/index.ts +++ b/src/plugins/kibana_legacy/server/index.ts @@ -27,6 +27,7 @@ export const config: PluginConfigDescriptor = { return; } addDeprecation({ + configPath: 'kibana.defaultAppId', message: `kibana.defaultAppId is deprecated and will be removed in 8.0. Please use the \`defaultRoute\` advanced setting instead`, correctiveActions: { manualSteps: [ diff --git a/src/plugins/kibana_react/public/code_editor/code_editor.tsx b/src/plugins/kibana_react/public/code_editor/code_editor.tsx index 07bda19bf6d14..e0e2c4b3145c0 100644 --- a/src/plugins/kibana_react/public/code_editor/code_editor.tsx +++ b/src/plugins/kibana_react/public/code_editor/code_editor.tsx @@ -14,6 +14,7 @@ import { monaco } from '@kbn/monaco'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; import classNames from 'classnames'; +import './register_languages'; import { DARK_THEME, diff --git a/src/plugins/kibana_react/public/code_editor/code_editor_field.tsx b/src/plugins/kibana_react/public/code_editor/code_editor_field.tsx new file mode 100644 index 0000000000000..0e6ab21159f15 --- /dev/null +++ b/src/plugins/kibana_react/public/code_editor/code_editor_field.tsx @@ -0,0 +1,39 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; +import darkTheme from '@elastic/eui/dist/eui_theme_dark.json'; +import lightTheme from '@elastic/eui/dist/eui_theme_light.json'; +import { EuiFormControlLayout } from '@elastic/eui'; +import { CodeEditor, Props } from './code_editor'; + +/** + * Renders a Monaco code editor in the same style as other EUI form fields. + */ +export const CodeEditorField: React.FunctionComponent = (props) => { + const { width, height, options, fullWidth, useDarkTheme } = props; + const theme = useDarkTheme ? darkTheme : lightTheme; + const style = { + width, + height, + backgroundColor: options?.readOnly + ? theme.euiFormBackgroundReadOnlyColor + : theme.euiFormBackgroundColor, + }; + + return ( + + ); +}; diff --git a/src/plugins/kibana_react/public/code_editor/index.tsx b/src/plugins/kibana_react/public/code_editor/index.tsx index f7f9c3b7fc8da..9aab815e23544 100644 --- a/src/plugins/kibana_react/public/code_editor/index.tsx +++ b/src/plugins/kibana_react/public/code_editor/index.tsx @@ -7,28 +7,31 @@ */ import React from 'react'; -import { - EuiDelayRender, - EuiErrorBoundary, - EuiLoadingContent, - EuiFormControlLayout, -} from '@elastic/eui'; -import darkTheme from '@elastic/eui/dist/eui_theme_dark.json'; -import lightTheme from '@elastic/eui/dist/eui_theme_light.json'; +import { EuiDelayRender, EuiErrorBoundary, EuiLoadingContent } from '@elastic/eui'; + import { useUiSetting } from '../ui_settings'; -import { Props } from './code_editor'; -import './register_languages'; +import type { Props } from './code_editor'; -export * from './languages'; +export * from './languages/constants'; const LazyBaseEditor = React.lazy(() => import('./code_editor')); - -const Fallback = () => ( - - - +const LazyCodeEditorField = React.lazy(() => + import('./code_editor_field').then((m) => ({ default: m.CodeEditorField })) ); +const Fallback: React.FunctionComponent<{ height: Props['height'] }> = ({ height }) => { + return ( + <> + {/* when height is known, set minHeight to avoid layout shift */} +
+ + + +
+ + ); +}; + export type CodeEditorProps = Props; /** @@ -40,7 +43,7 @@ export const CodeEditor: React.FunctionComponent = (props) => { const darkMode = useUiSetting('theme:darkMode'); return ( - }> + }> @@ -51,38 +54,11 @@ export const CodeEditor: React.FunctionComponent = (props) => { * Renders a Monaco code editor in the same style as other EUI form fields. */ export const CodeEditorField: React.FunctionComponent = (props) => { - const { width, height, options, fullWidth } = props; const darkMode = useUiSetting('theme:darkMode'); - const theme = darkMode ? darkTheme : lightTheme; - const style = { - width, - height, - backgroundColor: options?.readOnly - ? theme.euiFormBackgroundReadOnlyColor - : theme.euiFormBackgroundColor, - }; - return ( - ); diff --git a/src/plugins/apm_oss/public/index.ts b/src/plugins/kibana_react/public/code_editor/languages/constants.ts similarity index 57% rename from src/plugins/apm_oss/public/index.ts rename to src/plugins/kibana_react/public/code_editor/languages/constants.ts index fea8ac4a8a1e4..af80e4ccc56e2 100644 --- a/src/plugins/apm_oss/public/index.ts +++ b/src/plugins/kibana_react/public/code_editor/languages/constants.ts @@ -6,11 +6,7 @@ * Side Public License, v 1. */ -import { ApmOssPlugin } from './plugin'; - -// This exports static code and TypeScript types, -// as well as, Kibana Platform `plugin()` initializer. -export function plugin() { - return new ApmOssPlugin(); -} -export { ApmOssPluginSetup, ApmOssPluginStart } from './types'; +export { LANG as CssLang } from './css/constants'; +export { LANG as MarkdownLang } from './markdown/constants'; +export { LANG as YamlLang } from './yaml/constants'; +export { LANG as HandlebarsLang } from './handlebars/constants'; diff --git a/src/plugins/kibana_react/public/url_template_editor/url_template_editor.tsx b/src/plugins/kibana_react/public/url_template_editor/url_template_editor.tsx index 0fed4d37e4f7f..c6250d73a8896 100644 --- a/src/plugins/kibana_react/public/url_template_editor/url_template_editor.tsx +++ b/src/plugins/kibana_react/public/url_template_editor/url_template_editor.tsx @@ -66,7 +66,7 @@ export const UrlTemplateEditor: React.FC = ({ return; } - const { dispose } = monaco.languages.registerCompletionItemProvider(HandlebarsLang.ID, { + const { dispose } = monaco.languages.registerCompletionItemProvider(HandlebarsLang, { triggerCharacters: ['{', '/', '?', '&', '='], provideCompletionItems(model, position, context, token) { const { lineNumber } = position; @@ -124,7 +124,7 @@ export const UrlTemplateEditor: React.FC = ({ return (
{ expect(mockAddDeprecation.mock.calls[0]).toMatchInlineSnapshot(` Array [ Object { + "configPath": "telemetry.url", "correctiveActions": Object { "manualSteps": Array [ "Remove \\"telemetry.url\\" from the Kibana configuration.", @@ -180,6 +181,7 @@ describe('deprecateEndpointConfigs', () => { expect(mockAddDeprecation.mock.calls[0]).toMatchInlineSnapshot(` Array [ Object { + "configPath": "telemetry.optInStatusUrl", "correctiveActions": Object { "manualSteps": Array [ "Remove \\"telemetry.optInStatusUrl\\" from the Kibana configuration.", diff --git a/src/plugins/telemetry/server/config/deprecations.ts b/src/plugins/telemetry/server/config/deprecations.ts index 013ee51a2ddd9..38553be7d5774 100644 --- a/src/plugins/telemetry/server/config/deprecations.ts +++ b/src/plugins/telemetry/server/config/deprecations.ts @@ -35,6 +35,7 @@ export const deprecateEndpointConfigs: ConfigDeprecation = ( } addDeprecation({ + configPath: fullConfigPath, title: i18n.translate('telemetry.endpointConfigs.deprecationTitle', { defaultMessage: 'Setting "{configPath}" is deprecated', values: { configPath: fullConfigPath }, diff --git a/src/plugins/vis_types/timeseries/public/application/components/markdown_editor.js b/src/plugins/vis_types/timeseries/public/application/components/markdown_editor.js index adee297fe0119..610c694e08121 100644 --- a/src/plugins/vis_types/timeseries/public/application/components/markdown_editor.js +++ b/src/plugins/vis_types/timeseries/public/application/components/markdown_editor.js @@ -116,7 +116,7 @@ export class MarkdownEditor extends Component {
{ expect(resp.body.findIndex((c: { id: string }) => c.id === sampleData)).to.be.above(-1); diff --git a/test/api_integration/apis/index_pattern_field_editor/field_preview.ts b/test/api_integration/apis/index_pattern_field_editor/field_preview.ts index a84accc8e5f03..7123be1deb18a 100644 --- a/test/api_integration/apis/index_pattern_field_editor/field_preview.ts +++ b/test/api_integration/apis/index_pattern_field_editor/field_preview.ts @@ -12,11 +12,14 @@ import { FtrProviderContext } from '../../ftr_provider_context'; import { API_BASE_PATH } from './constants'; const INDEX_NAME = 'api-integration-test-field-preview'; +const DOC_ID = '1'; export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); const es = getService('es'); + const document = { foo: 1, bar: 'hello' }; + const createIndex = async () => { await es.indices.create({ index: INDEX_NAME, @@ -35,6 +38,15 @@ export default function ({ getService }: FtrProviderContext) { }); }; + const addDoc = async () => { + await es.index({ + index: INDEX_NAME, + id: DOC_ID, + body: document, + refresh: 'wait_for', + }); + }; + const deleteIndex = async () => { await es.indices.delete({ index: INDEX_NAME, @@ -42,12 +54,13 @@ export default function ({ getService }: FtrProviderContext) { }; describe('Field preview', function () { - before(async () => await createIndex()); + before(async () => { + await createIndex(); + await addDoc(); + }); after(async () => await deleteIndex()); describe('should return the script value', () => { - const document = { foo: 1, bar: 'hello' }; - const tests = [ { context: 'keyword_field', @@ -77,6 +90,7 @@ export default function ({ getService }: FtrProviderContext) { const payload = { script: test.script, document, + documentId: DOC_ID, context: test.context, index: INDEX_NAME, }; diff --git a/test/functional/apps/discover/_chart_hidden.ts b/test/functional/apps/discover/_chart_hidden.ts new file mode 100644 index 0000000000000..a9179fd234905 --- /dev/null +++ b/test/functional/apps/discover/_chart_hidden.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 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 log = getService('log'); + const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); + const PageObjects = getPageObjects(['common', 'discover', 'header', 'timePicker']); + + const defaultSettings = { + defaultIndex: 'logstash-*', + }; + + describe('discover show/hide chart test', function () { + before(async function () { + log.debug('load kibana index with default index pattern'); + + await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json'); + + // and load a set of makelogs data + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); + await kibanaServer.uiSettings.replace(defaultSettings); + await PageObjects.common.navigateToApp('discover'); + await PageObjects.timePicker.setDefaultAbsoluteRange(); + }); + + after(async () => { + await kibanaServer.uiSettings.unset('defaultIndex'); + }); + + it('shows chart by default', async function () { + expect(await PageObjects.discover.isChartVisible()).to.be(true); + }); + + it('hiding the chart persists the setting', async function () { + await PageObjects.discover.toggleChartVisibility(); + expect(await PageObjects.discover.isChartVisible()).to.be(false); + + await PageObjects.common.navigateToApp('dashboard'); + await PageObjects.common.navigateToApp('discover'); + await PageObjects.timePicker.setDefaultAbsoluteRange(); + await PageObjects.header.waitUntilLoadingHasFinished(); + + expect(await PageObjects.discover.isChartVisible()).to.be(false); + }); + + it('persists hidden chart option on the saved search ', async function () { + const savedSearchTitle = 'chart hidden'; + await PageObjects.discover.saveSearch(savedSearchTitle); + + await PageObjects.discover.toggleChartVisibility(); + expect(await PageObjects.discover.isChartVisible()).to.be(true); + + await PageObjects.common.navigateToApp('discover'); + await PageObjects.timePicker.setDefaultAbsoluteRange(); + await PageObjects.header.waitUntilLoadingHasFinished(); + expect(await PageObjects.discover.isChartVisible()).to.be(true); + + await PageObjects.discover.loadSavedSearch(savedSearchTitle); + expect(await PageObjects.discover.isChartVisible()).to.be(false); + }); + }); +} diff --git a/test/functional/apps/discover/_discover_fields_api.ts b/test/functional/apps/discover/_discover_fields_api.ts index 42e2a94b36462..700c865031cd6 100644 --- a/test/functional/apps/discover/_discover_fields_api.ts +++ b/test/functional/apps/discover/_discover_fields_api.ts @@ -15,7 +15,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const retry = getService('retry'); const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); - const PageObjects = getPageObjects(['common', 'discover', 'header', 'timePicker']); + const PageObjects = getPageObjects(['common', 'discover', 'header', 'timePicker', 'settings']); const defaultSettings = { defaultIndex: 'logstash-*', 'discover:searchFieldsFromSource': false, @@ -67,5 +67,27 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.discover.clickDocViewerTab(1); await PageObjects.discover.expectSourceViewerToExist(); }); + + it('switches to _source column when fields API is no longer used', async function () { + await PageObjects.settings.navigateTo(); + await PageObjects.settings.clickKibanaSettings(); + await PageObjects.settings.toggleAdvancedSettingCheckbox('discover:searchFieldsFromSource'); + + await PageObjects.common.navigateToApp('discover'); + await PageObjects.timePicker.setDefaultAbsoluteRange(); + + expect(await PageObjects.discover.getDocHeader()).to.have.string('_source'); + }); + + it('switches to Document column when fields API is used', async function () { + await PageObjects.settings.navigateTo(); + await PageObjects.settings.clickKibanaSettings(); + await PageObjects.settings.toggleAdvancedSettingCheckbox('discover:searchFieldsFromSource'); + + await PageObjects.common.navigateToApp('discover'); + await PageObjects.timePicker.setDefaultAbsoluteRange(); + + expect(await PageObjects.discover.getDocHeader()).to.have.string('Document'); + }); }); } diff --git a/test/functional/apps/discover/index.ts b/test/functional/apps/discover/index.ts index 59191b489f4c7..13658215e9e59 100644 --- a/test/functional/apps/discover/index.ts +++ b/test/functional/apps/discover/index.ts @@ -52,5 +52,6 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./_huge_fields')); loadTestFile(require.resolve('./_date_nested')); loadTestFile(require.resolve('./_search_on_page_load')); + loadTestFile(require.resolve('./_chart_hidden')); }); } diff --git a/test/functional/page_objects/discover_page.ts b/test/functional/page_objects/discover_page.ts index 63fe4cde2c774..b4db8996c7c84 100644 --- a/test/functional/page_objects/discover_page.ts +++ b/test/functional/page_objects/discover_page.ts @@ -185,6 +185,17 @@ export class DiscoverPageObject extends FtrService { return await this.globalNav.getLastBreadcrumb(); } + public async isChartVisible() { + return await this.testSubjects.exists('discoverChart'); + } + + public async toggleChartVisibility() { + await this.testSubjects.click('discoverChartOptionsToggle'); + await this.testSubjects.exists('discoverChartToggle'); + await this.testSubjects.click('discoverChartToggle'); + await this.header.waitUntilLoadingHasFinished(); + } + public async getChartInterval() { await this.testSubjects.click('discoverChartOptionsToggle'); await this.testSubjects.click('discoverTimeIntervalPanel'); diff --git a/test/functional/services/remote/remote.ts b/test/functional/services/remote/remote.ts index 4285a1deb7638..ba474436ca53d 100644 --- a/test/functional/services/remote/remote.ts +++ b/test/functional/services/remote/remote.ts @@ -44,7 +44,7 @@ export async function RemoteProvider({ getService }: FtrProviderContext) { } consoleLog$.subscribe(({ message, level }) => { - log[level === 'SEVERE' || level === 'error' ? 'error' : 'debug']( + log[level === 'SEVERE' || level === 'error' ? 'warning' : 'debug']( `browser[${level}] ${message}` ); }); diff --git a/test/plugin_functional/plugins/core_plugin_deprecations/server/config.ts b/test/plugin_functional/plugins/core_plugin_deprecations/server/config.ts index 650567f761aa3..5b9145be52661 100644 --- a/test/plugin_functional/plugins/core_plugin_deprecations/server/config.ts +++ b/test/plugin_functional/plugins/core_plugin_deprecations/server/config.ts @@ -22,6 +22,7 @@ type ConfigType = TypeOf; const configSecretDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecation) => { if (get(settings, 'corePluginDeprecations.secret') !== 42) { addDeprecation({ + configPath: 'corePluginDeprecations.secret', documentationUrl: 'config-secret-doc-url', message: 'Kibana plugin functional tests will no longer allow corePluginDeprecations.secret ' + diff --git a/test/plugin_functional/test_suites/core/deprecations.ts b/test/plugin_functional/test_suites/core/deprecations.ts index dbaf10008e35e..d8dc82a56cb55 100644 --- a/test/plugin_functional/test_suites/core/deprecations.ts +++ b/test/plugin_functional/test_suites/core/deprecations.ts @@ -19,6 +19,7 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide const CorePluginDeprecationsPluginDeprecations: DomainDeprecationDetails[] = [ { + configPath: 'corePluginDeprecations.oldProperty', title: 'Setting "corePluginDeprecations.oldProperty" is deprecated', level: 'critical', message: @@ -33,6 +34,7 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide requireRestart: true, }, { + configPath: 'corePluginDeprecations.noLongerUsed', title: 'Setting "corePluginDeprecations.noLongerUsed" is deprecated', level: 'critical', message: 'You no longer need to configure "corePluginDeprecations.noLongerUsed".', @@ -46,6 +48,7 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide requireRestart: true, }, { + configPath: 'corePluginDeprecations.secret', title: 'corePluginDeprecations has a deprecated setting', level: 'critical', message: diff --git a/vars/kibanaPipeline.groovy b/vars/kibanaPipeline.groovy index 1f838a170c407..511ee70188962 100644 --- a/vars/kibanaPipeline.groovy +++ b/vars/kibanaPipeline.groovy @@ -191,7 +191,6 @@ def withGcsArtifactUpload(workerName, closure) { 'x-pack/test/**/screenshots/diff/*.png', 'x-pack/test/**/screenshots/failure/*.png', 'x-pack/test/**/screenshots/session/*.png', - 'x-pack/test/functional/apps/reporting/reports/session/*.pdf', 'x-pack/test/functional/failure_debug/html/*.html', '.es/**/*.hprof' ] diff --git a/x-pack/plugins/actions/server/index.ts b/x-pack/plugins/actions/server/index.ts index 26f7da073223d..b3e019a1bf46d 100644 --- a/x-pack/plugins/actions/server/index.ts +++ b/x-pack/plugins/actions/server/index.ts @@ -69,6 +69,7 @@ export const config: PluginConfigDescriptor = { ) ) { addDeprecation({ + configPath: 'xpack.actions.customHostSettings.ssl.rejectUnauthorized', message: `"xpack.actions.customHostSettings[].ssl.rejectUnauthorized" is deprecated.` + `Use "xpack.actions.customHostSettings[].ssl.verificationMode" instead, ` + @@ -96,6 +97,7 @@ export const config: PluginConfigDescriptor = { const actions = get(settings, fromPath); if (actions?.hasOwnProperty('rejectUnauthorized')) { addDeprecation({ + configPath: `${fromPath}.rejectUnauthorized`, message: `"xpack.actions.rejectUnauthorized" is deprecated. Use "xpack.actions.verificationMode" instead, ` + `with the setting "verificationMode:full" eql to "rejectUnauthorized:true", ` + @@ -122,6 +124,7 @@ export const config: PluginConfigDescriptor = { const actions = get(settings, fromPath); if (actions?.hasOwnProperty('proxyRejectUnauthorizedCertificates')) { addDeprecation({ + configPath: `${fromPath}.proxyRejectUnauthorizedCertificates`, message: `"xpack.actions.proxyRejectUnauthorizedCertificates" is deprecated. Use "xpack.actions.proxyVerificationMode" instead, ` + `with the setting "proxyVerificationMode:full" eql to "rejectUnauthorized:true",` + @@ -148,6 +151,7 @@ export const config: PluginConfigDescriptor = { const actions = get(settings, fromPath); if (actions?.enabled === false || actions?.enabled === true) { addDeprecation({ + configPath: 'xpack.actions.enabled', message: `"xpack.actions.enabled" is deprecated. The ability to disable this plugin will be removed in 8.0.0.`, correctiveActions: { manualSteps: [`Remove "xpack.actions.enabled" from your kibana configs.`], diff --git a/x-pack/plugins/actions/server/saved_objects/index.ts b/x-pack/plugins/actions/server/saved_objects/index.ts index 71ec92645b249..16f569092f844 100644 --- a/x-pack/plugins/actions/server/saved_objects/index.ts +++ b/x-pack/plugins/actions/server/saved_objects/index.ts @@ -39,6 +39,7 @@ export function setupSavedObjects( mappings: mappings.action as SavedObjectsTypeMappingDefinition, migrations: getActionsMigrations(encryptedSavedObjects), management: { + displayName: 'connector', defaultSearchField: 'name', importableAndExportable: true, getTitle(savedObject: SavedObject) { diff --git a/x-pack/plugins/actions/server/usage/actions_telemetry.test.ts b/x-pack/plugins/actions/server/usage/actions_telemetry.test.ts index 4049d8fc3b594..0e6b7fff04451 100644 --- a/x-pack/plugins/actions/server/usage/actions_telemetry.test.ts +++ b/x-pack/plugins/actions/server/usage/actions_telemetry.test.ts @@ -116,7 +116,7 @@ Object { test('getInUseTotalCount', async () => { const mockEsClient = elasticsearchClientMock.createClusterClient().asScoped().asInternalUser; - mockEsClient.search.mockReturnValue( + mockEsClient.search.mockReturnValueOnce( // @ts-expect-error not full search response elasticsearchClientMock.createSuccessTransportRequestPromise({ aggregations: { @@ -134,28 +134,35 @@ Object { }, }) ); - const actionsBulkGet = jest.fn(); - actionsBulkGet.mockReturnValue({ - saved_objects: [ - { - id: '1', - attributes: { - actionTypeId: '.server-log', - }, - }, - { - id: '123', - attributes: { - actionTypeId: '.slack', - }, - }, - ], - }); - const telemetry = await getInUseTotalCount(mockEsClient, actionsBulkGet, 'test'); - expect(mockEsClient.search).toHaveBeenCalledTimes(1); - expect(actionsBulkGet).toHaveBeenCalledTimes(1); + mockEsClient.search.mockReturnValueOnce( + // @ts-expect-error not full search response + elasticsearchClientMock.createSuccessTransportRequestPromise({ + hits: { + hits: [ + { + _source: { + action: { + id: '1', + actionTypeId: '.server-log', + }, + }, + }, + { + _source: { + action: { + id: '2', + actionTypeId: '.slack', + }, + }, + }, + ], + }, + }) + ); + const telemetry = await getInUseTotalCount(mockEsClient, 'test'); + expect(mockEsClient.search).toHaveBeenCalledTimes(2); expect(telemetry).toMatchInlineSnapshot(` Object { "countByAlertHistoryConnectorType": 0, @@ -170,7 +177,7 @@ Object { test('getInUseTotalCount should count preconfigured alert history connector usage', async () => { const mockEsClient = elasticsearchClientMock.createClusterClient().asScoped().asInternalUser; - mockEsClient.search.mockReturnValue( + mockEsClient.search.mockReturnValueOnce( // @ts-expect-error not full search response elasticsearchClientMock.createSuccessTransportRequestPromise({ aggregations: { @@ -202,28 +209,34 @@ Object { }, }) ); - const actionsBulkGet = jest.fn(); - actionsBulkGet.mockReturnValue({ - saved_objects: [ - { - id: '1', - attributes: { - actionTypeId: '.server-log', - }, - }, - { - id: '123', - attributes: { - actionTypeId: '.slack', - }, + mockEsClient.search.mockReturnValueOnce( + // @ts-expect-error not full search response + elasticsearchClientMock.createSuccessTransportRequestPromise({ + hits: { + hits: [ + { + _source: { + action: { + id: '1', + actionTypeId: '.server-log', + }, + }, + }, + { + _source: { + action: { + id: '2', + actionTypeId: '.slack', + }, + }, + }, + ], }, - ], - }); - const telemetry = await getInUseTotalCount(mockEsClient, actionsBulkGet, 'test'); - - expect(mockEsClient.search).toHaveBeenCalledTimes(1); - expect(actionsBulkGet).toHaveBeenCalledTimes(1); + }) + ); + const telemetry = await getInUseTotalCount(mockEsClient, 'test'); + expect(mockEsClient.search).toHaveBeenCalledTimes(2); expect(telemetry).toMatchInlineSnapshot(` Object { "countByAlertHistoryConnectorType": 1, @@ -359,7 +372,7 @@ Object { test('getInUseTotalCount() accounts for preconfigured connectors', async () => { const mockEsClient = elasticsearchClientMock.createClusterClient().asScoped().asInternalUser; - mockEsClient.search.mockReturnValue( + mockEsClient.search.mockReturnValueOnce( // @ts-expect-error not full search response elasticsearchClientMock.createSuccessTransportRequestPromise({ aggregations: { @@ -399,34 +412,42 @@ Object { }, }) ); - const actionsBulkGet = jest.fn(); - actionsBulkGet.mockReturnValue({ - saved_objects: [ - { - id: '1', - attributes: { - actionTypeId: '.server-log', - }, - }, - { - id: '123', - attributes: { - actionTypeId: '.slack', - }, - }, - { - id: '456', - attributes: { - actionTypeId: '.email', - }, + mockEsClient.search.mockReturnValueOnce( + // @ts-expect-error not full search response + elasticsearchClientMock.createSuccessTransportRequestPromise({ + hits: { + hits: [ + { + _source: { + action: { + id: '1', + actionTypeId: '.server-log', + }, + }, + }, + { + _source: { + action: { + id: '2', + actionTypeId: '.slack', + }, + }, + }, + { + _source: { + action: { + id: '3', + actionTypeId: '.email', + }, + }, + }, + ], }, - ], - }); - const telemetry = await getInUseTotalCount(mockEsClient, actionsBulkGet, 'test'); - - expect(mockEsClient.search).toHaveBeenCalledTimes(1); - expect(actionsBulkGet).toHaveBeenCalledTimes(1); + }) + ); + const telemetry = await getInUseTotalCount(mockEsClient, 'test'); + expect(mockEsClient.search).toHaveBeenCalledTimes(2); expect(telemetry).toMatchInlineSnapshot(` Object { "countByAlertHistoryConnectorType": 1, diff --git a/x-pack/plugins/actions/server/usage/actions_telemetry.ts b/x-pack/plugins/actions/server/usage/actions_telemetry.ts index 544d6a411ccdc..4a3d0c70e535a 100644 --- a/x-pack/plugins/actions/server/usage/actions_telemetry.ts +++ b/x-pack/plugins/actions/server/usage/actions_telemetry.ts @@ -5,12 +5,7 @@ * 2.0. */ -import { - ElasticsearchClient, - SavedObjectsBaseOptions, - SavedObjectsBulkGetObject, - SavedObjectsBulkResponse, -} from 'kibana/server'; +import { ElasticsearchClient } from 'kibana/server'; import { AlertHistoryEsIndexConnectorId } from '../../common'; import { ActionResult, PreConfiguredAction } from '../types'; @@ -86,10 +81,6 @@ export async function getTotalCount( export async function getInUseTotalCount( esClient: ElasticsearchClient, - actionsBulkGet: ( - objects?: SavedObjectsBulkGetObject[] | undefined, - options?: SavedObjectsBaseOptions | undefined - ) => Promise>>>, kibanaIndex: string ): Promise<{ countTotal: number; @@ -259,15 +250,34 @@ export async function getInUseTotalCount( const preconfiguredActionsAggs = // @ts-expect-error aggegation type is not specified actionResults.aggregations.preconfigured_actions?.preconfiguredActionRefIds.value; - const bulkFilter = Object.entries(aggs.connectorIds).map(([key]) => ({ - id: key, - type: 'action', - fields: ['id', 'actionTypeId'], - })); - const actions = await actionsBulkGet(bulkFilter); - const countByActionTypeId = actions.saved_objects.reduce( + const { + body: { hits: actions }, + } = await esClient.search<{ + action: ActionResult; + }>({ + index: kibanaIndex, + _source_includes: ['action'], + body: { + query: { + bool: { + must: [ + { + term: { type: 'action' }, + }, + { + terms: { + _id: Object.entries(aggs.connectorIds).map(([key]) => `action:${key}`), + }, + }, + ], + }, + }, + }, + }); + const countByActionTypeId = actions.hits.reduce( (actionTypeCount: Record, action) => { - const alertTypeId = replaceFirstAndLastDotSymbols(action.attributes.actionTypeId); + const actionSource = action._source!; + const alertTypeId = replaceFirstAndLastDotSymbols(actionSource.action.actionTypeId); const currentCount = actionTypeCount[alertTypeId] !== undefined ? actionTypeCount[alertTypeId] : 0; actionTypeCount[alertTypeId] = currentCount + 1; diff --git a/x-pack/plugins/actions/server/usage/task.ts b/x-pack/plugins/actions/server/usage/task.ts index f37f830697eb5..7cbfb87dedda6 100644 --- a/x-pack/plugins/actions/server/usage/task.ts +++ b/x-pack/plugins/actions/server/usage/task.ts @@ -5,19 +5,14 @@ * 2.0. */ -import { - Logger, - CoreSetup, - SavedObjectsBulkGetObject, - SavedObjectsBaseOptions, -} from 'kibana/server'; +import { Logger, CoreSetup } from 'kibana/server'; import moment from 'moment'; import { RunContext, TaskManagerSetupContract, TaskManagerStartContract, } from '../../../task_manager/server'; -import { ActionResult, PreConfiguredAction } from '../types'; +import { PreConfiguredAction } from '../types'; import { getTotalCount, getInUseTotalCount } from './actions_telemetry'; export const TELEMETRY_TASK_TYPE = 'actions_telemetry'; @@ -83,22 +78,12 @@ export function telemetryTaskRunner( }, ]) => client.asInternalUser ); - const actionsBulkGet = ( - objects?: SavedObjectsBulkGetObject[], - options?: SavedObjectsBaseOptions - ) => { - return core - .getStartServices() - .then(([{ savedObjects }]) => - savedObjects.createInternalRepository(['action']).bulkGet(objects, options) - ); - }; return { async run() { const esClient = await getEsClient(); return Promise.all([ getTotalCount(esClient, kibanaIndex, preconfiguredActions), - getInUseTotalCount(esClient, actionsBulkGet, kibanaIndex), + getInUseTotalCount(esClient, kibanaIndex), ]) .then(([totalAggegations, totalInUse]) => { return { diff --git a/x-pack/plugins/alerting/common/alert_instance_summary.ts b/x-pack/plugins/alerting/common/alert_instance_summary.ts index 7ae37d6ddf53a..462d20b8fb2ea 100644 --- a/x-pack/plugins/alerting/common/alert_instance_summary.ts +++ b/x-pack/plugins/alerting/common/alert_instance_summary.ts @@ -23,6 +23,10 @@ export interface AlertInstanceSummary { lastRun?: string; errorMessages: Array<{ date: string; message: string }>; instances: Record; + executionDuration: { + average: number; + values: number[]; + }; } export interface AlertInstanceStatus { diff --git a/x-pack/plugins/alerting/server/index.ts b/x-pack/plugins/alerting/server/index.ts index 3b4688173e9b5..b7a510a37661b 100644 --- a/x-pack/plugins/alerting/server/index.ts +++ b/x-pack/plugins/alerting/server/index.ts @@ -62,6 +62,7 @@ export const config: PluginConfigDescriptor = { const alerting = get(settings, fromPath); if (alerting?.enabled === false || alerting?.enabled === true) { addDeprecation({ + configPath: 'xpack.alerting.enabled', message: `"xpack.alerting.enabled" is deprecated. The ability to disable this plugin will be removed in 8.0.0.`, correctiveActions: { manualSteps: [`Remove "xpack.alerting.enabled" from your kibana configs.`], diff --git a/x-pack/plugins/alerting/server/lib/alert_instance_summary_from_event_log.test.ts b/x-pack/plugins/alerting/server/lib/alert_instance_summary_from_event_log.test.ts index 22122b22fd3bb..a6529f4c30a7b 100644 --- a/x-pack/plugins/alerting/server/lib/alert_instance_summary_from_event_log.test.ts +++ b/x-pack/plugins/alerting/server/lib/alert_instance_summary_from_event_log.test.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { random, mean } from 'lodash'; import { SanitizedAlert, AlertInstanceSummary } from '../types'; import { IValidatedEvent } from '../../../event_log/server'; import { EVENT_LOG_ACTIONS, EVENT_LOG_PROVIDER, LEGACY_EVENT_LOG_ACTIONS } from '../plugin'; @@ -31,6 +32,10 @@ describe('alertInstanceSummaryFromEventLog', () => { "consumer": "alert-consumer", "enabled": false, "errorMessages": Array [], + "executionDuration": Object { + "average": 0, + "values": Array [], + }, "id": "alert-123", "instances": Object {}, "lastRun": undefined, @@ -71,6 +76,10 @@ describe('alertInstanceSummaryFromEventLog', () => { "consumer": "alert-consumer-2", "enabled": true, "errorMessages": Array [], + "executionDuration": Object { + "average": 0, + "values": Array [], + }, "id": "alert-456", "instances": Object {}, "lastRun": undefined, @@ -137,7 +146,7 @@ describe('alertInstanceSummaryFromEventLog', () => { dateEnd, }); - const { lastRun, status, instances } = summary; + const { lastRun, status, instances, executionDuration } = summary; expect({ lastRun, status, instances }).toMatchInlineSnapshot(` Object { "instances": Object {}, @@ -145,6 +154,8 @@ describe('alertInstanceSummaryFromEventLog', () => { "status": "OK", } `); + + testExecutionDurations(eventsFactory.getExecutionDurations(), executionDuration); }); test('active alert with no instances but has errors', async () => { @@ -163,7 +174,7 @@ describe('alertInstanceSummaryFromEventLog', () => { dateEnd, }); - const { lastRun, status, errorMessages, instances } = summary; + const { lastRun, status, errorMessages, instances, executionDuration } = summary; expect({ lastRun, status, errorMessages, instances }).toMatchInlineSnapshot(` Object { "errorMessages": Array [ @@ -181,6 +192,8 @@ describe('alertInstanceSummaryFromEventLog', () => { "status": "Error", } `); + + testExecutionDurations(eventsFactory.getExecutionDurations(), executionDuration); }); test('alert with currently inactive instance', async () => { @@ -202,7 +215,7 @@ describe('alertInstanceSummaryFromEventLog', () => { dateEnd, }); - const { lastRun, status, instances } = summary; + const { lastRun, status, instances, executionDuration } = summary; expect({ lastRun, status, instances }).toMatchInlineSnapshot(` Object { "instances": Object { @@ -218,6 +231,8 @@ describe('alertInstanceSummaryFromEventLog', () => { "status": "OK", } `); + + testExecutionDurations(eventsFactory.getExecutionDurations(), executionDuration); }); test('legacy alert with currently inactive instance', async () => { @@ -239,7 +254,7 @@ describe('alertInstanceSummaryFromEventLog', () => { dateEnd, }); - const { lastRun, status, instances } = summary; + const { lastRun, status, instances, executionDuration } = summary; expect({ lastRun, status, instances }).toMatchInlineSnapshot(` Object { "instances": Object { @@ -255,6 +270,8 @@ describe('alertInstanceSummaryFromEventLog', () => { "status": "OK", } `); + + testExecutionDurations(eventsFactory.getExecutionDurations(), executionDuration); }); test('alert with currently inactive instance, no new-instance', async () => { @@ -275,7 +292,7 @@ describe('alertInstanceSummaryFromEventLog', () => { dateEnd, }); - const { lastRun, status, instances } = summary; + const { lastRun, status, instances, executionDuration } = summary; expect({ lastRun, status, instances }).toMatchInlineSnapshot(` Object { "instances": Object { @@ -291,6 +308,8 @@ describe('alertInstanceSummaryFromEventLog', () => { "status": "OK", } `); + + testExecutionDurations(eventsFactory.getExecutionDurations(), executionDuration); }); test('alert with currently active instance', async () => { @@ -312,7 +331,7 @@ describe('alertInstanceSummaryFromEventLog', () => { dateEnd, }); - const { lastRun, status, instances } = summary; + const { lastRun, status, instances, executionDuration } = summary; expect({ lastRun, status, instances }).toMatchInlineSnapshot(` Object { "instances": Object { @@ -328,6 +347,8 @@ describe('alertInstanceSummaryFromEventLog', () => { "status": "Active", } `); + + testExecutionDurations(eventsFactory.getExecutionDurations(), executionDuration); }); test('alert with currently active instance with no action group in event log', async () => { @@ -349,7 +370,7 @@ describe('alertInstanceSummaryFromEventLog', () => { dateEnd, }); - const { lastRun, status, instances } = summary; + const { lastRun, status, instances, executionDuration } = summary; expect({ lastRun, status, instances }).toMatchInlineSnapshot(` Object { "instances": Object { @@ -365,6 +386,8 @@ describe('alertInstanceSummaryFromEventLog', () => { "status": "Active", } `); + + testExecutionDurations(eventsFactory.getExecutionDurations(), executionDuration); }); test('alert with currently active instance that switched action groups', async () => { @@ -386,7 +409,7 @@ describe('alertInstanceSummaryFromEventLog', () => { dateEnd, }); - const { lastRun, status, instances } = summary; + const { lastRun, status, instances, executionDuration } = summary; expect({ lastRun, status, instances }).toMatchInlineSnapshot(` Object { "instances": Object { @@ -402,6 +425,8 @@ describe('alertInstanceSummaryFromEventLog', () => { "status": "Active", } `); + + testExecutionDurations(eventsFactory.getExecutionDurations(), executionDuration); }); test('alert with currently active instance, no new-instance', async () => { @@ -422,7 +447,7 @@ describe('alertInstanceSummaryFromEventLog', () => { dateEnd, }); - const { lastRun, status, instances } = summary; + const { lastRun, status, instances, executionDuration } = summary; expect({ lastRun, status, instances }).toMatchInlineSnapshot(` Object { "instances": Object { @@ -438,6 +463,8 @@ describe('alertInstanceSummaryFromEventLog', () => { "status": "Active", } `); + + testExecutionDurations(eventsFactory.getExecutionDurations(), executionDuration); }); test('alert with active and inactive muted alerts', async () => { @@ -462,7 +489,7 @@ describe('alertInstanceSummaryFromEventLog', () => { dateEnd, }); - const { lastRun, status, instances } = summary; + const { lastRun, status, instances, executionDuration } = summary; expect({ lastRun, status, instances }).toMatchInlineSnapshot(` Object { "instances": Object { @@ -485,6 +512,8 @@ describe('alertInstanceSummaryFromEventLog', () => { "status": "Active", } `); + + testExecutionDurations(eventsFactory.getExecutionDurations(), executionDuration); }); test('alert with active and inactive alerts over many executes', async () => { @@ -515,7 +544,7 @@ describe('alertInstanceSummaryFromEventLog', () => { dateEnd, }); - const { lastRun, status, instances } = summary; + const { lastRun, status, instances, executionDuration } = summary; expect({ lastRun, status, instances }).toMatchInlineSnapshot(` Object { "instances": Object { @@ -538,7 +567,19 @@ describe('alertInstanceSummaryFromEventLog', () => { "status": "Active", } `); + + testExecutionDurations(eventsFactory.getExecutionDurations(), executionDuration); }); + + const testExecutionDurations = ( + actualDurations: number[], + executionDuration?: { average?: number; values?: number[] } + ) => { + expect(executionDuration).toEqual({ + average: Math.round(mean(actualDurations)), + values: actualDurations, + }); + }; }); function dateString(isoBaseDate: string, offsetMillis = 0): string { @@ -573,6 +614,7 @@ export class EventsFactory { event: { provider: EVENT_LOG_PROVIDER, action: EVENT_LOG_ACTIONS.execute, + duration: random(2000, 180000) * 1000 * 1000, }, }; @@ -634,6 +676,12 @@ export class EventsFactory { }); return this; } + + getExecutionDurations(): number[] { + return this.events + .filter((ev) => ev?.event?.action === 'execute' && ev?.event?.duration !== undefined) + .map((ev) => ev?.event?.duration! / (1000 * 1000)); + } } function createAlert(overrides: Partial): SanitizedAlert<{ bar: boolean }> { diff --git a/x-pack/plugins/alerting/server/lib/alert_instance_summary_from_event_log.ts b/x-pack/plugins/alerting/server/lib/alert_instance_summary_from_event_log.ts index 8a6c55dfac619..40fae121df51d 100644 --- a/x-pack/plugins/alerting/server/lib/alert_instance_summary_from_event_log.ts +++ b/x-pack/plugins/alerting/server/lib/alert_instance_summary_from_event_log.ts @@ -5,10 +5,13 @@ * 2.0. */ +import { mean } from 'lodash'; import { SanitizedAlert, AlertInstanceSummary, AlertInstanceStatus } from '../types'; import { IEvent } from '../../../event_log/server'; import { EVENT_LOG_ACTIONS, EVENT_LOG_PROVIDER, LEGACY_EVENT_LOG_ACTIONS } from '../plugin'; +const Millis2Nanos = 1000 * 1000; + export interface AlertInstanceSummaryFromEventLogParams { alert: SanitizedAlert<{ bar: boolean }>; events: IEvent[]; @@ -36,9 +39,14 @@ export function alertInstanceSummaryFromEventLog( lastRun: undefined, errorMessages: [], instances: {}, + executionDuration: { + average: 0, + values: [], + }, }; const instances = new Map(); + const eventDurations: number[] = []; // loop through the events // should be sorted newest to oldest, we want oldest to newest, so reverse @@ -66,6 +74,10 @@ export function alertInstanceSummaryFromEventLog( alertInstanceSummary.status = 'OK'; } + if (event?.event?.duration) { + eventDurations.push(event?.event?.duration / Millis2Nanos); + } + continue; } @@ -111,6 +123,13 @@ export function alertInstanceSummaryFromEventLog( alertInstanceSummary.errorMessages.sort((a, b) => a.date.localeCompare(b.date)); + if (eventDurations.length > 0) { + alertInstanceSummary.executionDuration = { + average: Math.round(mean(eventDurations)), + values: eventDurations, + }; + } + return alertInstanceSummary; } diff --git a/x-pack/plugins/alerting/server/routes/get_rule_alert_summary.test.ts b/x-pack/plugins/alerting/server/routes/get_rule_alert_summary.test.ts index f0f34ae5756b4..5044c5c8617a0 100644 --- a/x-pack/plugins/alerting/server/routes/get_rule_alert_summary.test.ts +++ b/x-pack/plugins/alerting/server/routes/get_rule_alert_summary.test.ts @@ -38,6 +38,10 @@ describe('getRuleAlertSummaryRoute', () => { status: 'OK', errorMessages: [], instances: {}, + executionDuration: { + average: 1, + values: [3, 5, 5], + }, }; it('gets rule alert summary', async () => { diff --git a/x-pack/plugins/alerting/server/routes/get_rule_alert_summary.ts b/x-pack/plugins/alerting/server/routes/get_rule_alert_summary.ts index 5bb8c5efd0d79..131bddcce049d 100644 --- a/x-pack/plugins/alerting/server/routes/get_rule_alert_summary.ts +++ b/x-pack/plugins/alerting/server/routes/get_rule_alert_summary.ts @@ -39,6 +39,7 @@ const rewriteBodyRes: RewriteResponseCase = ({ errorMessages, lastRun, instances: alerts, + executionDuration, ...rest }) => ({ ...rest, @@ -49,6 +50,7 @@ const rewriteBodyRes: RewriteResponseCase = ({ status_end_date: statusEndDate, error_messages: errorMessages, last_run: lastRun, + execution_duration: executionDuration, }); export const getRuleAlertSummaryRoute = ( diff --git a/x-pack/plugins/alerting/server/routes/legacy/get_alert_instance_summary.test.ts b/x-pack/plugins/alerting/server/routes/legacy/get_alert_instance_summary.test.ts index d529aec4162d6..ed2b3056da45e 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/get_alert_instance_summary.test.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/get_alert_instance_summary.test.ts @@ -43,6 +43,10 @@ describe('getAlertInstanceSummaryRoute', () => { status: 'OK', errorMessages: [], instances: {}, + executionDuration: { + average: 0, + values: [], + }, }; it('gets alert instance summary', async () => { diff --git a/x-pack/plugins/alerting/server/rules_client/tests/get_alert_instance_summary.test.ts b/x-pack/plugins/alerting/server/rules_client/tests/get_alert_instance_summary.test.ts index 28e432a78d6f9..2d8af69781c3b 100644 --- a/x-pack/plugins/alerting/server/rules_client/tests/get_alert_instance_summary.test.ts +++ b/x-pack/plugins/alerting/server/rules_client/tests/get_alert_instance_summary.test.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { omit, mean } from 'lodash'; import { RulesClient, ConstructorOptions } from '../rules_client'; import { savedObjectsClientMock, loggingSystemMock } from '../../../../../../src/core/server/mocks'; import { taskManagerMock } from '../../../../task_manager/server/mocks'; @@ -138,8 +139,11 @@ describe('getAlertInstanceSummary()', () => { const dateStart = new Date(Date.now() - 60 * 1000).toISOString(); + const durations: number[] = eventsFactory.getExecutionDurations(); + const result = await rulesClient.getAlertInstanceSummary({ id: '1', dateStart }); - expect(result).toMatchInlineSnapshot(` + const resultWithoutExecutionDuration = omit(result, 'executionDuration'); + expect(resultWithoutExecutionDuration).toMatchInlineSnapshot(` Object { "alertTypeId": "123", "consumer": "alert-consumer", @@ -182,6 +186,11 @@ describe('getAlertInstanceSummary()', () => { "throttle": null, } `); + + expect(result.executionDuration).toEqual({ + average: Math.round(mean(durations)), + values: durations, + }); }); // Further tests don't check the result of `getAlertInstanceSummary()`, as the result diff --git a/x-pack/plugins/alerting/server/saved_objects/index.ts b/x-pack/plugins/alerting/server/saved_objects/index.ts index b1d56a364a3dd..99621ab69eac8 100644 --- a/x-pack/plugins/alerting/server/saved_objects/index.ts +++ b/x-pack/plugins/alerting/server/saved_objects/index.ts @@ -57,6 +57,7 @@ export function setupSavedObjects( migrations: getMigrations(encryptedSavedObjects, isPreconfigured), mappings: mappings.alert as SavedObjectsTypeMappingDefinition, management: { + displayName: 'rule', importableAndExportable: true, getTitle(ruleSavedObject: SavedObject) { return `Rule: [${ruleSavedObject.attributes.name}]`; diff --git a/x-pack/plugins/apm/common/anomaly_detection.ts b/x-pack/plugins/apm/common/anomaly_detection.ts index eb7c74a4540be..43a779407d2a4 100644 --- a/x-pack/plugins/apm/common/anomaly_detection.ts +++ b/x-pack/plugins/apm/common/anomaly_detection.ts @@ -33,8 +33,6 @@ export function getSeverityColor(score: number) { return mlGetSeverityColor(score); } -export const ML_TRANSACTION_LATENCY_DETECTOR_INDEX = 0; - export const ML_ERRORS = { INVALID_LICENSE: i18n.translate( 'xpack.apm.anomaly_detection.error.invalid_license', diff --git a/x-pack/plugins/apm/common/utils/apm_ml_anomaly_query.ts b/x-pack/plugins/apm/common/utils/apm_ml_anomaly_query.ts deleted file mode 100644 index 26b859d37cf7f..0000000000000 --- a/x-pack/plugins/apm/common/utils/apm_ml_anomaly_query.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -export function apmMlAnomalyQuery(detectorIndex: 0 | 1 | 2) { - return [ - { - bool: { - filter: [ - { - terms: { - result_type: ['model_plot', 'record'], - }, - }, - { - term: { detector_index: detectorIndex }, - }, - ], - }, - }, - ]; -} diff --git a/x-pack/plugins/apm/common/utils/formatters/duration.ts b/x-pack/plugins/apm/common/utils/formatters/duration.ts index bc4d58831ff35..5b20b2e1827a1 100644 --- a/x-pack/plugins/apm/common/utils/formatters/duration.ts +++ b/x-pack/plugins/apm/common/utils/formatters/duration.ts @@ -13,8 +13,6 @@ import { asDecimalOrInteger, asInteger, asDecimal } from './formatters'; import { TimeUnit } from './datetime'; import { Maybe } from '../../../typings/common'; import { isFiniteNumber } from '../is_finite_number'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import type { ThroughputUnit } from '../../../server/lib/helpers/calculate_throughput'; interface FormatterOptions { defaultValue?: string; @@ -182,13 +180,12 @@ export function asTransactionRate(value: Maybe) { }); } -export function asExactTransactionRate(value: number, unit: ThroughputUnit) { +export function asExactTransactionRate(value: number) { return i18n.translate('xpack.apm.exactTransactionRateLabel', { - defaultMessage: `{value} { unit, select, minute {tpm} other {tps} }`, - values: { value: asDecimalOrInteger(value), unit }, + defaultMessage: `{value} tpm`, + values: { value: asDecimalOrInteger(value) }, }); } - /** * Converts value and returns it formatted - 00 unit */ diff --git a/x-pack/plugins/apm/dev_docs/routing_and_linking.md b/x-pack/plugins/apm/dev_docs/routing_and_linking.md index 478de0081fca4..af22bcdbdfa11 100644 --- a/x-pack/plugins/apm/dev_docs/routing_and_linking.md +++ b/x-pack/plugins/apm/dev_docs/routing_and_linking.md @@ -6,15 +6,15 @@ This document describes routing in the APM plugin. ### Server-side -Route definitions for APM's server-side API are in the [server/routes directory](../server/routes). Routes are created with [the `createRoute` function](../server/routes/create_route.ts). Routes are added to the API in [the `createApmApi` function](../server/routes/create_apm_api.ts), which is initialized in the plugin `start` lifecycle method. +Route definitions for APM's server-side API are in the [server/routes directory](../server/routes). Routes are created with [the `createApmServerRoute` function](../server/routes/create_apm_server_route.ts). Routes are added to the API in [the `registerRoutes` function](../server/routes/register_routes.ts), which is initialized in the plugin `setup` lifecycle method. -The path and query string parameters are defined in the calls to `createRoute` with io-ts types, so that each route has its parameters type checked. +The path and query string parameters are defined in the calls to `createApmServerRoute` with io-ts types, so that each route has its parameters type checked. ### Client-side The client-side routing uses `@kbn/typed-react-router-config`, which is a wrapper around [React Router](https://reactrouter.com/) and [React Router Config](https://www.npmjs.com/package/react-router-config). Its goal is to provide a layer of high-fidelity types that allows us to parse and format URLs for routes while making sure the needed parameters are provided and/or available (typed and validated at runtime). The `history` object used by React Router is injected by the Kibana Platform. -Routes (and their parameters) are defined in [public/components/routing/apm_config.tsx](../public/components/routing/apm_config.tsx). +Routes (and their parameters) are defined in [public/components/routing/apm_route_config.tsx](../public/components/routing/apm_route_config.tsx). #### Parameter handling diff --git a/x-pack/plugins/apm/ftr_e2e/cypress/integration/power_user/no_data_screen.ts b/x-pack/plugins/apm/ftr_e2e/cypress/integration/power_user/no_data_screen.ts index 1e954d9982295..56704d63a42f1 100644 --- a/x-pack/plugins/apm/ftr_e2e/cypress/integration/power_user/no_data_screen.ts +++ b/x-pack/plugins/apm/ftr_e2e/cypress/integration/power_user/no_data_screen.ts @@ -4,7 +4,6 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -/* eslint-disable @typescript-eslint/naming-convention */ const apmIndicesSaveURL = '/internal/apm/settings/apm-indices/save'; @@ -20,12 +19,12 @@ describe('No data screen', () => { url: apmIndicesSaveURL, method: 'POST', body: { - 'apm_oss.sourcemapIndices': 'foo-*', - 'apm_oss.errorIndices': 'foo-*', - 'apm_oss.onboardingIndices': 'foo-*', - 'apm_oss.spanIndices': 'foo-*', - 'apm_oss.transactionIndices': 'foo-*', - 'apm_oss.metricsIndices': 'foo-*', + sourcemap: 'foo-*', + error: 'foo-*', + onboarding: 'foo-*', + span: 'foo-*', + transaction: 'foo-*', + metric: 'foo-*', }, headers: { 'kbn-xsrf': true, @@ -50,12 +49,12 @@ describe('No data screen', () => { url: apmIndicesSaveURL, method: 'POST', body: { - 'apm_oss.sourcemapIndices': '', - 'apm_oss.errorIndices': '', - 'apm_oss.onboardingIndices': '', - 'apm_oss.spanIndices': '', - 'apm_oss.transactionIndices': '', - 'apm_oss.metricsIndices': '', + sourcemap: '', + error: '', + onboarding: '', + span: '', + transaction: '', + metric: '', }, headers: { 'kbn-xsrf': true }, auth: { user: 'apm_power_user', pass: 'changeme' }, diff --git a/x-pack/plugins/apm/kibana.json b/x-pack/plugins/apm/kibana.json index 4e82d82d655b4..865358959ea72 100644 --- a/x-pack/plugins/apm/kibana.json +++ b/x-pack/plugins/apm/kibana.json @@ -8,7 +8,6 @@ "version": "8.0.0", "kibanaVersion": "kibana", "requiredPlugins": [ - "apmOss", "data", "embeddable", "features", diff --git a/x-pack/plugins/apm/public/components/app/Settings/ApmIndices/index.tsx b/x-pack/plugins/apm/public/components/app/Settings/ApmIndices/index.tsx index 6685dddd87d7f..2e526eff04346 100644 --- a/x-pack/plugins/apm/public/components/app/Settings/ApmIndices/index.tsx +++ b/x-pack/plugins/apm/public/components/app/Settings/ApmIndices/index.tsx @@ -30,40 +30,40 @@ import { const APM_INDEX_LABELS = [ { - configurationName: 'apm_oss.sourcemapIndices', + configurationName: 'sourcemap', label: i18n.translate( 'xpack.apm.settings.apmIndices.sourcemapIndicesLabel', { defaultMessage: 'Sourcemap Indices' } ), }, { - configurationName: 'apm_oss.errorIndices', + configurationName: 'error', label: i18n.translate('xpack.apm.settings.apmIndices.errorIndicesLabel', { defaultMessage: 'Error Indices', }), }, { - configurationName: 'apm_oss.onboardingIndices', + configurationName: 'onboarding', label: i18n.translate( 'xpack.apm.settings.apmIndices.onboardingIndicesLabel', { defaultMessage: 'Onboarding Indices' } ), }, { - configurationName: 'apm_oss.spanIndices', + configurationName: 'span', label: i18n.translate('xpack.apm.settings.apmIndices.spanIndicesLabel', { defaultMessage: 'Span Indices', }), }, { - configurationName: 'apm_oss.transactionIndices', + configurationName: 'transaction', label: i18n.translate( 'xpack.apm.settings.apmIndices.transactionIndicesLabel', { defaultMessage: 'Transaction Indices' } ), }, { - configurationName: 'apm_oss.metricsIndices', + configurationName: 'metric', label: i18n.translate('xpack.apm.settings.apmIndices.metricsIndicesLabel', { defaultMessage: 'Metrics Indices', }), @@ -145,7 +145,7 @@ export function ApmIndices() { } ), }); - } catch (error) { + } catch (error: any) { notifications.toasts.addDanger({ title: i18n.translate( 'xpack.apm.settings.apmIndices.applyChanges.failed.title', @@ -215,7 +215,10 @@ export function ApmIndices() { { defaultMessage: 'Overrides {configurationName}: {defaultValue}', - values: { configurationName, defaultValue }, + values: { + configurationName: `xpack.apm.indices.${configurationName}`, + defaultValue, + }, } )} fullWidth diff --git a/x-pack/plugins/apm/public/components/app/correlations/failed_transactions_correlations.tsx b/x-pack/plugins/apm/public/components/app/correlations/failed_transactions_correlations.tsx index c497ce434180b..d73ed9d58e526 100644 --- a/x-pack/plugins/apm/public/components/app/correlations/failed_transactions_correlations.tsx +++ b/x-pack/plugins/apm/public/components/app/correlations/failed_transactions_correlations.tsx @@ -21,6 +21,8 @@ import { EuiBadge, EuiToolTip, RIGHT_ALIGNMENT, + EuiSwitch, + EuiIconTip, } from '@elastic/eui'; import type { EuiTableSortingType } from '@elastic/eui/src/components/basic_table/table_types'; import type { Direction } from '@elastic/eui/src/services/sort/sort_direction'; @@ -44,7 +46,6 @@ import { useSearchStrategy } from '../../../hooks/use_search_strategy'; import { ImpactBar } from '../../shared/ImpactBar'; import { createHref, push } from '../../shared/Links/url_helpers'; -import { Summary } from '../../shared/Summary'; import { CorrelationsTable } from './correlations_table'; import { FailedTransactionsCorrelationsHelpPopover } from './failed_transactions_correlations_help_popover'; @@ -59,6 +60,8 @@ import { CorrelationsLog } from './correlations_log'; import { CorrelationsEmptyStatePrompt } from './empty_state_prompt'; import { CrossClusterSearchCompatibilityWarning } from './cross_cluster_search_warning'; import { CorrelationsProgressControls } from './progress_controls'; +import { useLocalStorage } from '../../../hooks/useLocalStorage'; +import { useTheme } from '../../../hooks/use_theme'; export function FailedTransactionsCorrelations({ onFilter, @@ -91,18 +94,53 @@ export function FailedTransactionsCorrelations({ selectedSignificantTerm ?? response.failedTransactionsCorrelations?.[0]; const history = useHistory(); + const [showStats, setShowStats] = useLocalStorage( + 'apmFailedTransactionsShowAdvancedStats', + false + ); + const euiTheme = useTheme(); + + const toggleShowStats = useCallback(() => { + setShowStats(!showStats); + }, [setShowStats, showStats]); const failedTransactionsCorrelationsColumns: Array< EuiBasicTableColumn > = useMemo(() => { const percentageColumns: Array< EuiBasicTableColumn - > = inspectEnabled + > = showStats ? [ { width: '100px', field: 'pValue', - name: 'p-value', + name: ( + + <> + {i18n.translate( + 'xpack.apm.correlations.failedTransactions.correlationsTable.pValueLabel', + { + defaultMessage: 'p-value', + } + )} + + + + ), + render: (pValue: number) => pValue.toPrecision(3), sortable: true, }, @@ -182,7 +220,7 @@ export function FailedTransactionsCorrelations({ name: ( <> {i18n.translate( - 'xpack.apm.correlations.failedTransactions.correlationsTable.pValueLabel', + 'xpack.apm.correlations.failedTransactions.correlationsTable.scoreLabel', { defaultMessage: 'Score', } @@ -315,7 +353,7 @@ export function FailedTransactionsCorrelations({ }, }, ] as Array>; - }, [history, onFilter, trackApmEvent, inspectEnabled]); + }, [history, onFilter, trackApmEvent, showStats]); useEffect(() => { if (isErrorMessage(progress.error)) { @@ -367,9 +405,6 @@ export function FailedTransactionsCorrelations({ correlationTerms.length < 1 && (progressNormalized === 1 || !progress.isRunning); - const showSummaryBadge = - inspectEnabled && (progress.isRunning || correlationTerms.length > 0); - const transactionDistributionChartData: TransactionDistributionChartData[] = []; @@ -462,17 +497,51 @@ export function FailedTransactionsCorrelations({ - - - {i18n.translate( - 'xpack.apm.correlations.failedTransactions.tableTitle', - { - defaultMessage: 'Correlations', - } - )} - - - + + + + {i18n.translate( + 'xpack.apm.correlations.failedTransactions.tableTitle', + { + defaultMessage: 'Correlations', + } + )} + + + + + + + )} - {showSummaryBadge && selectedTerm?.pValue && ( - <> - - - {`${selectedTerm.fieldName}: ${selectedTerm.fieldValue}`} - , - <>{`p-value: ${selectedTerm.pValue.toPrecision(3)}`}, - ]} - /> - - )} -
diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_throughput_chart.tsx b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_throughput_chart.tsx index 0780c2d272715..6648eaec80fa6 100644 --- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_throughput_chart.tsx +++ b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_throughput_chart.tsx @@ -135,29 +135,16 @@ export function ServiceOverviewThroughputChart({ 'xpack.apm.serviceOverview.throughtputChartTitle', { defaultMessage: 'Throughput' } )} - {data.throughputUnit === 'second' - ? i18n.translate( - 'xpack.apm.serviceOverview.throughtputPerSecondChartTitle', - { defaultMessage: ' (per second)' } - ) - : ''} @@ -169,7 +156,7 @@ export function ServiceOverviewThroughputChart({ showAnnotations={false} fetchStatus={status} timeseries={timeseries} - yLabelFormat={(y) => asExactTransactionRate(y, data.throughputUnit)} + yLabelFormat={asExactTransactionRate} customTheme={comparisonChartTheme} /> diff --git a/x-pack/plugins/apm/public/services/rest/apm_observability_overview_fetchers.test.ts b/x-pack/plugins/apm/public/services/rest/apm_observability_overview_fetchers.test.ts index 00447607cf787..c6513aa24df6b 100644 --- a/x-pack/plugins/apm/public/services/rest/apm_observability_overview_fetchers.test.ts +++ b/x-pack/plugins/apm/public/services/rest/apm_observability_overview_fetchers.test.ts @@ -23,7 +23,8 @@ describe('Observability dashboard data', () => { start: 'now-15m', end: 'now', }, - bucketSize: '600s', + intervalString: '600s', + bucketSize: 600, }; afterEach(() => { callApmApiMock.mockClear(); diff --git a/x-pack/plugins/apm/public/services/rest/apm_observability_overview_fetchers.ts b/x-pack/plugins/apm/public/services/rest/apm_observability_overview_fetchers.ts index f26fd85bde968..4e7114ebb9e35 100644 --- a/x-pack/plugins/apm/public/services/rest/apm_observability_overview_fetchers.ts +++ b/x-pack/plugins/apm/public/services/rest/apm_observability_overview_fetchers.ts @@ -15,6 +15,7 @@ export const fetchObservabilityOverviewPageData = async ({ absoluteTime, relativeTime, bucketSize, + intervalString, }: FetchDataParams): Promise => { const data = await callApmApi({ endpoint: 'GET /internal/apm/observability_overview', @@ -24,6 +25,7 @@ export const fetchObservabilityOverviewPageData = async ({ start: new Date(absoluteTime.start).toISOString(), end: new Date(absoluteTime.end).toISOString(), bucketSize, + intervalString, }, }, }); diff --git a/x-pack/plugins/apm/public/utils/testHelpers.tsx b/x-pack/plugins/apm/public/utils/testHelpers.tsx index 8764ac48c5440..9ce7d2e4a52d9 100644 --- a/x-pack/plugins/apm/public/utils/testHelpers.tsx +++ b/x-pack/plugins/apm/public/utils/testHelpers.tsx @@ -119,14 +119,12 @@ interface MockSetup { config: APMConfig; uiFilters: UxUIFilters; indices: { - /* eslint-disable @typescript-eslint/naming-convention */ - 'apm_oss.sourcemapIndices': string; - 'apm_oss.errorIndices': string; - 'apm_oss.onboardingIndices': string; - 'apm_oss.spanIndices': string; - 'apm_oss.transactionIndices': string; - 'apm_oss.metricsIndices': string; - /* eslint-enable @typescript-eslint/naming-convention */ + sourcemap: string; + error: string; + onboarding: string; + span: string; + transaction: string; + metric: string; apmAgentConfigurationIndex: string; apmCustomLinkIndex: string; }; @@ -178,14 +176,12 @@ export async function inspectSearchParams( ) as APMConfig, uiFilters: {}, indices: { - /* eslint-disable @typescript-eslint/naming-convention */ - 'apm_oss.sourcemapIndices': 'myIndex', - 'apm_oss.errorIndices': 'myIndex', - 'apm_oss.onboardingIndices': 'myIndex', - 'apm_oss.spanIndices': 'myIndex', - 'apm_oss.transactionIndices': 'myIndex', - 'apm_oss.metricsIndices': 'myIndex', - /* eslint-enable @typescript-eslint/naming-convention */ + sourcemap: 'myIndex', + error: 'myIndex', + onboarding: 'myIndex', + span: 'myIndex', + transaction: 'myIndex', + metric: 'myIndex', apmAgentConfigurationIndex: 'myIndex', apmCustomLinkIndex: 'myIndex', }, diff --git a/x-pack/plugins/apm/scripts/optimize-tsconfig/test-tsconfig.json b/x-pack/plugins/apm/scripts/optimize-tsconfig/test-tsconfig.json index d6718b7511179..7f7cbf4e3efa2 100644 --- a/x-pack/plugins/apm/scripts/optimize-tsconfig/test-tsconfig.json +++ b/x-pack/plugins/apm/scripts/optimize-tsconfig/test-tsconfig.json @@ -3,7 +3,8 @@ "types": [ "node" ], - "noErrorTruncation": true + "noErrorTruncation": true, + "assumeChangesOnlyAffectDirectDependencies": true }, "include": [ "./apm_api_integration/**/*", @@ -11,6 +12,8 @@ "../../typings/**/*" ], "exclude": [ - "**/__fixtures__/**/*" + "**/__fixtures__/**/*", + "**/target/**", + "**/node_modules/**" ] } diff --git a/x-pack/plugins/apm/scripts/optimize-tsconfig/tsconfig.json b/x-pack/plugins/apm/scripts/optimize-tsconfig/tsconfig.json index 8254ec67eb3c5..2ece69d491fca 100644 --- a/x-pack/plugins/apm/scripts/optimize-tsconfig/tsconfig.json +++ b/x-pack/plugins/apm/scripts/optimize-tsconfig/tsconfig.json @@ -13,6 +13,7 @@ "**/node_modules/**" ], "compilerOptions": { - "noErrorTruncation": true + "noErrorTruncation": true, + "assumeChangesOnlyAffectDirectDependencies": true } } diff --git a/x-pack/plugins/apm/scripts/precommit.js b/x-pack/plugins/apm/scripts/precommit.js index 89c5055c6a7f7..a259cf932c912 100644 --- a/x-pack/plugins/apm/scripts/precommit.js +++ b/x-pack/plugins/apm/scripts/precommit.js @@ -66,7 +66,9 @@ const tasks = new Listr( execa( 'node', [ - resolve(__dirname, './jest.js'), + resolve(__dirname, '../../../../scripts/jest.js'), + '--config', + resolve(__dirname, '../jest.config.js'), '--reporters', resolve(__dirname, '../../../../node_modules/jest-silent-reporter'), '--collect-coverage', diff --git a/x-pack/plugins/apm/scripts/shared/read-kibana-config.ts b/x-pack/plugins/apm/scripts/shared/read-kibana-config.ts index a85bd007bc4f3..f3e2b48390468 100644 --- a/x-pack/plugins/apm/scripts/shared/read-kibana-config.ts +++ b/x-pack/plugins/apm/scripts/shared/read-kibana-config.ts @@ -38,14 +38,12 @@ export const readKibanaConfig = () => { }; return { - /* eslint-disable @typescript-eslint/naming-convention */ - 'apm_oss.transactionIndices': 'apm-*', - 'apm_oss.metricsIndices': 'apm-*', - 'apm_oss.errorIndices': 'apm-*', - 'apm_oss.spanIndices': 'apm-*', - 'apm_oss.onboardingIndices': 'apm-*', - 'apm_oss.sourcemapIndices': 'apm-*', - /* eslint-enable @typescript-eslint/naming-convention */ + 'xpack.apm.indices.transaction': 'traces-apm*,apm-*', + 'xpack.apm.indices.metric': 'metrics-apm*,apm-*', + 'xpack.apm.indices.error': 'logs-apm*,apm-*', + 'xpack.apm.indices.span': 'traces-apm*,apm-*', + 'xpack.apm.indices.onboarding': 'apm-*', + 'xpack.apm.indices.sourcemap': 'apm-*', 'elasticsearch.hosts': 'http://localhost:9200', ...loadedKibanaConfig, ...cliEsCredentials, diff --git a/x-pack/plugins/apm/scripts/upload-telemetry-data/index.ts b/x-pack/plugins/apm/scripts/upload-telemetry-data/index.ts index 0dab75cfba9c7..c900123c6cee9 100644 --- a/x-pack/plugins/apm/scripts/upload-telemetry-data/index.ts +++ b/x-pack/plugins/apm/scripts/upload-telemetry-data/index.ts @@ -78,7 +78,12 @@ async function uploadData() { collectTelemetryParams: { logger: console as unknown as Logger, indices: { - ...config, + transaction: config['xpack.apm.indices.transaction'], + metric: config['xpack.apm.indices.metric'], + error: config['xpack.apm.indices.error'], + span: config['xpack.apm.indices.span'], + onboarding: config['xpack.apm.indices.onboarding'], + sourcemap: config['xpack.apm.indices.sourcemap'], apmCustomLinkIndex: '.apm-custom-links', apmAgentConfigurationIndex: '.apm-agent-configuration', }, diff --git a/x-pack/plugins/apm/server/index.test.ts b/x-pack/plugins/apm/server/index.test.ts deleted file mode 100644 index be93557fea6fc..0000000000000 --- a/x-pack/plugins/apm/server/index.test.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -/* eslint-disable @typescript-eslint/naming-convention */ - -import { APMOSSConfig } from 'src/plugins/apm_oss/server'; -import { APMXPackConfig } from '.'; -import { mergeConfigs } from './index'; - -describe('mergeConfigs', () => { - it('merges the configs', () => { - const apmOssConfig = { - transactionIndices: 'apm-*-transaction-*', - spanIndices: 'apm-*-span-*', - errorIndices: 'apm-*-error-*', - metricsIndices: 'apm-*-metric-*', - } as APMOSSConfig; - - const apmConfig = { - ui: { enabled: false }, - enabled: true, - metricsInterval: 2000, - agent: { migrations: { enabled: true } }, - } as APMXPackConfig; - - expect(mergeConfigs(apmOssConfig, apmConfig)).toEqual({ - 'apm_oss.errorIndices': 'logs-apm*,apm-*-error-*', - 'apm_oss.metricsIndices': 'metrics-apm*,apm-*-metric-*', - 'apm_oss.spanIndices': 'traces-apm*,apm-*-span-*', - 'apm_oss.transactionIndices': 'traces-apm*,apm-*-transaction-*', - 'xpack.apm.metricsInterval': 2000, - 'xpack.apm.ui.enabled': false, - 'xpack.apm.agent.migrations.enabled': true, - }); - }); -}); diff --git a/x-pack/plugins/apm/server/index.ts b/x-pack/plugins/apm/server/index.ts index 22787b0301ce0..abf9b3f5fb774 100644 --- a/x-pack/plugins/apm/server/index.ts +++ b/x-pack/plugins/apm/server/index.ts @@ -10,11 +10,12 @@ import { PluginConfigDescriptor, PluginInitializerContext, } from 'src/core/server'; -import { APMOSSConfig } from 'src/plugins/apm_oss/server'; import { maxSuggestions } from '../../observability/common'; import { SearchAggregatedTransactionSetting } from '../common/aggregated_transactions'; import { APMPlugin } from './plugin'; +// All options should be documented in the APM configuration settings: https://github.com/elastic/kibana/blob/master/docs/settings/apm-settings.asciidoc +// and be included on cloud allow list unless there are specific reasons not to const configSchema = schema.object({ enabled: schema.boolean({ defaultValue: true }), serviceMapEnabled: schema.boolean({ defaultValue: true }), @@ -37,7 +38,7 @@ const configSchema = schema.object({ schema.literal(SearchAggregatedTransactionSetting.always), schema.literal(SearchAggregatedTransactionSetting.never), ], - { defaultValue: SearchAggregatedTransactionSetting.auto } + { defaultValue: SearchAggregatedTransactionSetting.never } ), telemetryCollectionEnabled: schema.boolean({ defaultValue: true }), metricsInterval: schema.number({ defaultValue: 30 }), @@ -47,12 +48,37 @@ const configSchema = schema.object({ enabled: schema.boolean({ defaultValue: false }), }), }), + indices: schema.object({ + transaction: schema.string({ defaultValue: 'traces-apm*,apm-*' }), + span: schema.string({ defaultValue: 'traces-apm*,apm-*' }), + error: schema.string({ defaultValue: 'logs-apm*,apm-*' }), + metric: schema.string({ defaultValue: 'metrics-apm*,apm-*' }), + sourcemap: schema.string({ defaultValue: 'apm-*' }), + onboarding: schema.string({ defaultValue: 'apm-*' }), + }), }); // plugin config -export const config: PluginConfigDescriptor = { - deprecations: ({ deprecate, renameFromRoot }) => [ +export const config: PluginConfigDescriptor = { + deprecations: ({ + deprecate, + renameFromRoot, + deprecateFromRoot, + unusedFromRoot, + }) => [ deprecate('enabled', '8.0.0'), + renameFromRoot( + 'apm_oss.transactionIndices', + 'xpack.apm.indices.transaction' + ), + renameFromRoot('apm_oss.spanIndices', 'xpack.apm.indices.span'), + renameFromRoot('apm_oss.errorIndices', 'xpack.apm.indices.error'), + renameFromRoot('apm_oss.metricsIndices', 'xpack.apm.indices.metric'), + renameFromRoot('apm_oss.sourcemapIndices', 'xpack.apm.indices.sourcemap'), + renameFromRoot('apm_oss.onboardingIndices', 'xpack.apm.indices.onboarding'), + deprecateFromRoot('apm_oss.enabled', '8.0.0'), + unusedFromRoot('apm_oss.fleetMode'), + unusedFromRoot('apm_oss.indexPattern'), renameFromRoot( 'xpack.apm.maxServiceEnvironments', `uiSettings.overrides[${maxSuggestions}]` @@ -70,69 +96,8 @@ export const config: PluginConfigDescriptor = { schema: configSchema, }; -export type APMXPackConfig = TypeOf; -export type APMConfig = ReturnType; - -// plugin config and ui indices settings -// All options should be documented in the APM configuration settings: https://github.com/elastic/kibana/blob/master/docs/settings/apm-settings.asciidoc -// and be included on cloud allow list unless there are specific reasons not to -export function mergeConfigs( - apmOssConfig: APMOSSConfig, - apmConfig: APMXPackConfig -) { - const mergedConfig = { - /* eslint-disable @typescript-eslint/naming-convention */ - // TODO: Remove all apm_oss options by 8.0 - 'apm_oss.transactionIndices': apmOssConfig.transactionIndices, - 'apm_oss.spanIndices': apmOssConfig.spanIndices, - 'apm_oss.errorIndices': apmOssConfig.errorIndices, - 'apm_oss.metricsIndices': apmOssConfig.metricsIndices, - 'apm_oss.sourcemapIndices': apmOssConfig.sourcemapIndices, - 'apm_oss.onboardingIndices': apmOssConfig.onboardingIndices, - /* eslint-enable @typescript-eslint/naming-convention */ - 'xpack.apm.serviceMapEnabled': apmConfig.serviceMapEnabled, - 'xpack.apm.serviceMapFingerprintBucketSize': - apmConfig.serviceMapFingerprintBucketSize, - 'xpack.apm.serviceMapTraceIdBucketSize': - apmConfig.serviceMapTraceIdBucketSize, - 'xpack.apm.serviceMapFingerprintGlobalBucketSize': - apmConfig.serviceMapFingerprintGlobalBucketSize, - 'xpack.apm.serviceMapTraceIdGlobalBucketSize': - apmConfig.serviceMapTraceIdGlobalBucketSize, - 'xpack.apm.serviceMapMaxTracesPerRequest': - apmConfig.serviceMapMaxTracesPerRequest, - 'xpack.apm.ui.enabled': apmConfig.ui.enabled, - 'xpack.apm.ui.maxTraceItems': apmConfig.ui.maxTraceItems, - 'xpack.apm.ui.transactionGroupBucketSize': - apmConfig.ui.transactionGroupBucketSize, - 'xpack.apm.autocreateApmIndexPattern': apmConfig.autocreateApmIndexPattern, - 'xpack.apm.telemetryCollectionEnabled': - apmConfig.telemetryCollectionEnabled, - 'xpack.apm.searchAggregatedTransactions': - apmConfig.searchAggregatedTransactions, - 'xpack.apm.metricsInterval': apmConfig.metricsInterval, - 'xpack.apm.agent.migrations.enabled': apmConfig.agent.migrations.enabled, - }; - - // Add data stream indices to list of configured values - mergedConfig[ - 'apm_oss.transactionIndices' - ] = `traces-apm*,${mergedConfig['apm_oss.transactionIndices']}`; - - mergedConfig[ - 'apm_oss.spanIndices' - ] = `traces-apm*,${mergedConfig['apm_oss.spanIndices']}`; - - mergedConfig[ - 'apm_oss.errorIndices' - ] = `logs-apm*,${mergedConfig['apm_oss.errorIndices']}`; - - mergedConfig[ - 'apm_oss.metricsIndices' - ] = `metrics-apm*,${mergedConfig['apm_oss.metricsIndices']}`; - - return mergedConfig; -} +export type APMConfig = TypeOf; +export type ApmIndicesConfigName = keyof APMConfig['indices']; export const plugin = (initContext: PluginInitializerContext) => new APMPlugin(initContext); diff --git a/x-pack/plugins/apm/server/lib/alerts/register_error_count_alert_type.ts b/x-pack/plugins/apm/server/lib/alerts/register_error_count_alert_type.ts index d1026b0b6ca8b..7fe2adcfe24d7 100644 --- a/x-pack/plugins/apm/server/lib/alerts/register_error_count_alert_type.ts +++ b/x-pack/plugins/apm/server/lib/alerts/register_error_count_alert_type.ts @@ -99,7 +99,7 @@ export function registerErrorCountAlertType({ }); const searchParams = { - index: indices['apm_oss.errorIndices'], + index: indices.error, size: 0, body: { query: { diff --git a/x-pack/plugins/apm/server/lib/alerts/register_transaction_duration_alert_type.ts b/x-pack/plugins/apm/server/lib/alerts/register_transaction_duration_alert_type.ts index b383b4777eca4..df4de254346c9 100644 --- a/x-pack/plugins/apm/server/lib/alerts/register_transaction_duration_alert_type.ts +++ b/x-pack/plugins/apm/server/lib/alerts/register_transaction_duration_alert_type.ts @@ -115,12 +115,12 @@ export function registerTransactionDurationAlertType({ // to prevent (likely) unnecessary blocking request // in rule execution const searchAggregatedTransactions = - config['xpack.apm.searchAggregatedTransactions'] !== + config.searchAggregatedTransactions !== SearchAggregatedTransactionSetting.never; const index = searchAggregatedTransactions - ? indices['apm_oss.metricsIndices'] - : indices['apm_oss.transactionIndices']; + ? indices.metric + : indices.transaction; const field = getTransactionDurationFieldForAggregatedTransactions( searchAggregatedTransactions diff --git a/x-pack/plugins/apm/server/lib/alerts/register_transaction_error_rate_alert_type.ts b/x-pack/plugins/apm/server/lib/alerts/register_transaction_error_rate_alert_type.ts index 6c59bcc4107b0..598487d02625a 100644 --- a/x-pack/plugins/apm/server/lib/alerts/register_transaction_error_rate_alert_type.ts +++ b/x-pack/plugins/apm/server/lib/alerts/register_transaction_error_rate_alert_type.ts @@ -110,12 +110,12 @@ export function registerTransactionErrorRateAlertType({ // to prevent (likely) unnecessary blocking request // in rule execution const searchAggregatedTransactions = - config['xpack.apm.searchAggregatedTransactions'] !== + config.searchAggregatedTransactions !== SearchAggregatedTransactionSetting.never; const index = searchAggregatedTransactions - ? indices['apm_oss.metricsIndices'] - : indices['apm_oss.transactionIndices']; + ? indices.metric + : indices.transaction; const searchParams = { index, diff --git a/x-pack/plugins/apm/server/lib/alerts/test_utils/index.ts b/x-pack/plugins/apm/server/lib/alerts/test_utils/index.ts index 5d5865bdd2289..22649a7010461 100644 --- a/x-pack/plugins/apm/server/lib/alerts/test_utils/index.ts +++ b/x-pack/plugins/apm/server/lib/alerts/test_utils/index.ts @@ -17,10 +17,10 @@ export const createRuleTypeMocks = () => { let alertExecutor: (...args: any[]) => Promise; const mockedConfig$ = of({ - /* eslint-disable @typescript-eslint/naming-convention */ - 'apm_oss.errorIndices': 'apm-*', - 'apm_oss.transactionIndices': 'apm-*', - /* eslint-enable @typescript-eslint/naming-convention */ + indices: { + error: 'apm-*', + transaction: 'apm-*', + }, } as APMConfig); const loggerMock = { diff --git a/x-pack/plugins/apm/server/lib/anomaly_detection/create_anomaly_detection_jobs.ts b/x-pack/plugins/apm/server/lib/anomaly_detection/create_anomaly_detection_jobs.ts index 324202b207237..4d4bc8dc185ab 100644 --- a/x-pack/plugins/apm/server/lib/anomaly_detection/create_anomaly_detection_jobs.ts +++ b/x-pack/plugins/apm/server/lib/anomaly_detection/create_anomaly_detection_jobs.ts @@ -5,21 +5,21 @@ * 2.0. */ -import Boom from '@hapi/boom'; import { Logger } from 'kibana/server'; +import uuid from 'uuid/v4'; import { snakeCase } from 'lodash'; +import Boom from '@hapi/boom'; import moment from 'moment'; -import uuid from 'uuid/v4'; import { ML_ERRORS } from '../../../common/anomaly_detection'; -import { - METRICSET_NAME, - PROCESSOR_EVENT, -} from '../../../common/elasticsearch_fieldnames'; import { ProcessorEvent } from '../../../common/processor_event'; import { environmentQuery } from '../../../common/utils/environment_query'; -import { withApmSpan } from '../../utils/with_apm_span'; import { Setup } from '../helpers/setup_request'; +import { + TRANSACTION_DURATION, + PROCESSOR_EVENT, +} from '../../../common/elasticsearch_fieldnames'; import { APM_ML_JOB_GROUP, ML_MODULE_ID_APM_TRANSACTION } from './constants'; +import { withApmSpan } from '../../utils/with_apm_span'; import { getAnomalyDetectionJobs } from './get_anomaly_detection_jobs'; export async function createAnomalyDetectionJobs( @@ -50,7 +50,7 @@ export async function createAnomalyDetectionJobs( `Creating ML anomaly detection jobs for environments: [${uniqueMlJobEnvs}].` ); - const indexPatternName = indices['apm_oss.metricsIndices']; + const indexPatternName = indices.metric; const responses = await Promise.all( uniqueMlJobEnvs.map((environment) => createAnomalyDetectionJob({ ml, environment, indexPatternName }) @@ -92,8 +92,8 @@ async function createAnomalyDetectionJob({ query: { bool: { filter: [ - { term: { [PROCESSOR_EVENT]: ProcessorEvent.metric } }, - { term: { [METRICSET_NAME]: 'transaction' } }, + { term: { [PROCESSOR_EVENT]: ProcessorEvent.transaction } }, + { exists: { field: TRANSACTION_DURATION } }, ...environmentQuery(environment), ], }, @@ -105,7 +105,7 @@ async function createAnomalyDetectionJob({ job_tags: { environment, // identifies this as an APM ML job & facilitates future migrations - apm_ml_version: 3, + apm_ml_version: 2, }, }, }, diff --git a/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.test.ts b/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.test.ts index 4bfac442b4a3c..1e697ebdcae06 100644 --- a/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.test.ts +++ b/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.test.ts @@ -14,12 +14,10 @@ import { describe('data telemetry collection tasks', () => { const indices = { - /* eslint-disable @typescript-eslint/naming-convention */ - 'apm_oss.errorIndices': 'apm-8.0.0-error', - 'apm_oss.metricsIndices': 'apm-8.0.0-metric', - 'apm_oss.spanIndices': 'apm-8.0.0-span', - 'apm_oss.transactionIndices': 'apm-8.0.0-transaction', - /* eslint-enable @typescript-eslint/naming-convention */ + error: 'apm-8.0.0-error', + metric: 'apm-8.0.0-metric', + span: 'apm-8.0.0-span', + transaction: 'apm-8.0.0-transaction', } as ApmIndicesConfig; describe('environments', () => { diff --git a/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.ts b/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.ts index d624c8527df86..8764223ad1ebb 100644 --- a/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.ts +++ b/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.ts @@ -78,7 +78,7 @@ export const tasks: TelemetryTask[] = [ }; const params = { - index: [indices['apm_oss.transactionIndices']], + index: [indices.transaction], body: { size: 0, timeout, @@ -138,7 +138,7 @@ export const tasks: TelemetryTask[] = [ // fixed date range for reliable results const lastTransaction = ( await search({ - index: indices['apm_oss.transactionIndices'], + index: indices.transaction, body: { query: { bool: { @@ -253,10 +253,10 @@ export const tasks: TelemetryTask[] = [ const response = await search({ index: [ - indices['apm_oss.errorIndices'], - indices['apm_oss.metricsIndices'], - indices['apm_oss.spanIndices'], - indices['apm_oss.transactionIndices'], + indices.error, + indices.metric, + indices.span, + indices.transaction, ], body: { size: 0, @@ -310,10 +310,10 @@ export const tasks: TelemetryTask[] = [ const response = await search({ index: [ - indices['apm_oss.errorIndices'], - indices['apm_oss.metricsIndices'], - indices['apm_oss.spanIndices'], - indices['apm_oss.transactionIndices'], + indices.error, + indices.metric, + indices.span, + indices.transaction, ], body: { size: 0, @@ -345,7 +345,7 @@ export const tasks: TelemetryTask[] = [ name: 'environments', executor: async ({ indices, search }) => { const response = await search({ - index: [indices['apm_oss.transactionIndices']], + index: [indices.transaction], body: { query: { bool: { @@ -426,12 +426,12 @@ export const tasks: TelemetryTask[] = [ name: 'processor_events', executor: async ({ indices, search }) => { const indicesByProcessorEvent = { - error: indices['apm_oss.errorIndices'], - metric: indices['apm_oss.metricsIndices'], - span: indices['apm_oss.spanIndices'], - transaction: indices['apm_oss.transactionIndices'], - onboarding: indices['apm_oss.onboardingIndices'], - sourcemap: indices['apm_oss.sourcemapIndices'], + error: indices.error, + metric: indices.metric, + span: indices.span, + transaction: indices.transaction, + onboarding: indices.onboarding, + sourcemap: indices.sourcemap, }; type ProcessorEvent = keyof typeof indicesByProcessorEvent; @@ -549,10 +549,10 @@ export const tasks: TelemetryTask[] = [ return prevJob.then(async (data) => { const response = await search({ index: [ - indices['apm_oss.errorIndices'], - indices['apm_oss.spanIndices'], - indices['apm_oss.metricsIndices'], - indices['apm_oss.transactionIndices'], + indices.error, + indices.span, + indices.metric, + indices.transaction, ], body: { size: 0, @@ -598,11 +598,7 @@ export const tasks: TelemetryTask[] = [ name: 'versions', executor: async ({ search, indices }) => { const response = await search({ - index: [ - indices['apm_oss.transactionIndices'], - indices['apm_oss.spanIndices'], - indices['apm_oss.errorIndices'], - ], + index: [indices.transaction, indices.span, indices.error], terminateAfter: 1, body: { query: { @@ -647,7 +643,7 @@ export const tasks: TelemetryTask[] = [ executor: async ({ search, indices }) => { const errorGroupsCount = ( await search({ - index: indices['apm_oss.errorIndices'], + index: indices.error, body: { size: 0, timeout, @@ -683,7 +679,7 @@ export const tasks: TelemetryTask[] = [ const transactionGroupsCount = ( await search({ - index: indices['apm_oss.transactionIndices'], + index: indices.transaction, body: { size: 0, timeout, @@ -719,7 +715,7 @@ export const tasks: TelemetryTask[] = [ const tracesPerDayCount = ( await search({ - index: indices['apm_oss.transactionIndices'], + index: indices.transaction, body: { query: { bool: { @@ -741,11 +737,7 @@ export const tasks: TelemetryTask[] = [ const servicesCount = ( await search({ - index: [ - indices['apm_oss.transactionIndices'], - indices['apm_oss.errorIndices'], - indices['apm_oss.metricsIndices'], - ], + index: [indices.transaction, indices.error, indices.metric], body: { size: 0, timeout, @@ -811,11 +803,7 @@ export const tasks: TelemetryTask[] = [ const data = await prevJob; const response = await search({ - index: [ - indices['apm_oss.errorIndices'], - indices['apm_oss.metricsIndices'], - indices['apm_oss.transactionIndices'], - ], + index: [indices.error, indices.metric, indices.transaction], body: { size: 0, timeout, @@ -1006,12 +994,12 @@ export const tasks: TelemetryTask[] = [ const response = await indicesStats({ index: [ indices.apmAgentConfigurationIndex, - indices['apm_oss.errorIndices'], - indices['apm_oss.metricsIndices'], - indices['apm_oss.onboardingIndices'], - indices['apm_oss.sourcemapIndices'], - indices['apm_oss.spanIndices'], - indices['apm_oss.transactionIndices'], + indices.error, + indices.metric, + indices.onboarding, + indices.sourcemap, + indices.span, + indices.transaction, ], }); diff --git a/x-pack/plugins/apm/server/lib/backends/get_throughput_charts_for_backend.ts b/x-pack/plugins/apm/server/lib/backends/get_throughput_charts_for_backend.ts index 19a26c3fcf035..1fbdd1c680c58 100644 --- a/x-pack/plugins/apm/server/lib/backends/get_throughput_charts_for_backend.ts +++ b/x-pack/plugins/apm/server/lib/backends/get_throughput_charts_for_backend.ts @@ -13,8 +13,9 @@ import { environmentQuery } from '../../../common/utils/environment_query'; import { kqlQuery, rangeQuery } from '../../../../observability/server'; import { ProcessorEvent } from '../../../common/processor_event'; import { Setup } from '../helpers/setup_request'; -import { getMetricsDateHistogramParams } from '../helpers/metrics'; import { getOffsetInMs } from '../../../common/utils/get_offset_in_ms'; +import { getBucketSize } from '../helpers/get_bucket_size'; +import { calculateThroughputWithInterval } from '../helpers/calculate_throughput'; export async function getThroughputChartsForBackend({ backendName, @@ -41,6 +42,12 @@ export async function getThroughputChartsForBackend({ offset, }); + const { intervalString, bucketSize } = getBucketSize({ + start: startWithOffset, + end: endWithOffset, + minBucketSize: 60, + }); + const response = await apmEventClient.search('get_throughput_for_backend', { apm: { events: [ProcessorEvent.metric], @@ -59,16 +66,16 @@ export async function getThroughputChartsForBackend({ }, aggs: { timeseries: { - date_histogram: getMetricsDateHistogramParams({ - start: startWithOffset, - end: endWithOffset, - metricsInterval: 60, - }), + date_histogram: { + field: '@timestamp', + fixed_interval: intervalString, + min_doc_count: 0, + extended_bounds: { min: startWithOffset, max: endWithOffset }, + }, aggs: { - throughput: { - rate: { + spanDestinationLatencySum: { + sum: { field: SPAN_DESTINATION_SERVICE_RESPONSE_TIME_COUNT, - unit: 'minute', }, }, }, @@ -81,7 +88,10 @@ export async function getThroughputChartsForBackend({ response.aggregations?.timeseries.buckets.map((bucket) => { return { x: bucket.key + offsetInMs, - y: bucket.throughput.value, + y: calculateThroughputWithInterval({ + bucketSize, + value: bucket.spanDestinationLatencySum.value || 0, + }), }; }) ?? [] ); diff --git a/x-pack/plugins/apm/server/lib/errors/distribution/get_buckets.test.ts b/x-pack/plugins/apm/server/lib/errors/distribution/get_buckets.test.ts index 809869e13de7f..871df10d9bafa 100644 --- a/x-pack/plugins/apm/server/lib/errors/distribution/get_buckets.test.ts +++ b/x-pack/plugins/apm/server/lib/errors/distribution/get_buckets.test.ts @@ -43,14 +43,12 @@ describe('get buckets', () => { } ) as APMConfig, indices: { - /* eslint-disable @typescript-eslint/naming-convention */ - 'apm_oss.sourcemapIndices': 'apm-*', - 'apm_oss.errorIndices': 'apm-*', - 'apm_oss.onboardingIndices': 'apm-*', - 'apm_oss.spanIndices': 'apm-*', - 'apm_oss.transactionIndices': 'apm-*', - 'apm_oss.metricsIndices': 'apm-*', - /* eslint-enable @typescript-eslint/naming-convention */ + sourcemap: 'apm-*', + error: 'apm-*', + onboarding: 'apm-*', + span: 'apm-*', + transaction: 'apm-*', + metric: 'apm-*', apmAgentConfigurationIndex: '.apm-agent-configuration', apmCustomLinkIndex: '.apm-custom-link', }, diff --git a/x-pack/plugins/apm/server/lib/helpers/aggregated_transactions/get_is_using_transaction_events.test.ts b/x-pack/plugins/apm/server/lib/helpers/aggregated_transactions/get_is_using_transaction_events.test.ts index f17224384842d..1fac873ced7be 100644 --- a/x-pack/plugins/apm/server/lib/helpers/aggregated_transactions/get_is_using_transaction_events.test.ts +++ b/x-pack/plugins/apm/server/lib/helpers/aggregated_transactions/get_is_using_transaction_events.test.ts @@ -58,8 +58,7 @@ describe('getIsUsingTransactionEvents', () => { describe('with config xpack.apm.searchAggregatedTransactions: never', () => { const config = { - 'xpack.apm.searchAggregatedTransactions': - SearchAggregatedTransactionSetting.never, + searchAggregatedTransactions: SearchAggregatedTransactionSetting.never, }; it('should be false', async () => { @@ -81,8 +80,7 @@ describe('getIsUsingTransactionEvents', () => { describe('with config xpack.apm.searchAggregatedTransactions: always', () => { const config = { - 'xpack.apm.searchAggregatedTransactions': - SearchAggregatedTransactionSetting.always, + searchAggregatedTransactions: SearchAggregatedTransactionSetting.always, }; it('should be false when kuery is empty', async () => { mock = await inspectSearchParams( @@ -164,8 +162,7 @@ describe('getIsUsingTransactionEvents', () => { describe('with config xpack.apm.searchAggregatedTransactions: auto', () => { const config = { - 'xpack.apm.searchAggregatedTransactions': - SearchAggregatedTransactionSetting.auto, + searchAggregatedTransactions: SearchAggregatedTransactionSetting.auto, }; it('should query for data once if metrics data found', async () => { diff --git a/x-pack/plugins/apm/server/lib/helpers/aggregated_transactions/get_is_using_transaction_events.ts b/x-pack/plugins/apm/server/lib/helpers/aggregated_transactions/get_is_using_transaction_events.ts index 70df0959a63b6..66e9697ab7c91 100644 --- a/x-pack/plugins/apm/server/lib/helpers/aggregated_transactions/get_is_using_transaction_events.ts +++ b/x-pack/plugins/apm/server/lib/helpers/aggregated_transactions/get_is_using_transaction_events.ts @@ -23,8 +23,7 @@ export async function getIsUsingTransactionEvents({ start?: number; end?: number; }): Promise { - const searchAggregatedTransactions = - config['xpack.apm.searchAggregatedTransactions']; + const searchAggregatedTransactions = config.searchAggregatedTransactions; if ( searchAggregatedTransactions === SearchAggregatedTransactionSetting.never diff --git a/x-pack/plugins/apm/server/lib/helpers/aggregated_transactions/index.ts b/x-pack/plugins/apm/server/lib/helpers/aggregated_transactions/index.ts index 478f3218ef38c..a58a95dd43fcc 100644 --- a/x-pack/plugins/apm/server/lib/helpers/aggregated_transactions/index.ts +++ b/x-pack/plugins/apm/server/lib/helpers/aggregated_transactions/index.ts @@ -63,8 +63,7 @@ export async function getSearchAggregatedTransactions({ apmEventClient: APMEventClient; kuery: string; }): Promise { - const searchAggregatedTransactions = - config['xpack.apm.searchAggregatedTransactions']; + const searchAggregatedTransactions = config.searchAggregatedTransactions; if ( kuery || diff --git a/x-pack/plugins/apm/server/lib/helpers/calculate_throughput.ts b/x-pack/plugins/apm/server/lib/helpers/calculate_throughput.ts index 6508329a494ff..9c99f94f82861 100644 --- a/x-pack/plugins/apm/server/lib/helpers/calculate_throughput.ts +++ b/x-pack/plugins/apm/server/lib/helpers/calculate_throughput.ts @@ -5,6 +5,9 @@ * 2.0. */ +/** + * @deprecated use calculateThroughputWithRange instead + */ export function calculateThroughput({ start, end, @@ -18,6 +21,30 @@ export function calculateThroughput({ return value / durationAsMinutes; } +export function calculateThroughputWithRange({ + start, + end, + value, +}: { + start: number; + end: number; + value: number; +}) { + const durationAsMinutes = (end - start) / 1000 / 60; + return value / durationAsMinutes; +} + +export function calculateThroughputWithInterval({ + bucketSize, + value, +}: { + bucketSize: number; + value: number; +}) { + const durationAsMinutes = bucketSize / 60; + return value / durationAsMinutes; +} + export type ThroughputUnit = 'minute' | 'second'; export function getThroughputUnit(bucketSize: number): ThroughputUnit { return bucketSize >= 60 ? 'minute' : 'second'; diff --git a/x-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/unpack_processor_events.test.ts b/x-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/unpack_processor_events.test.ts index 4983d6d515944..5ef3786e9bde4 100644 --- a/x-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/unpack_processor_events.test.ts +++ b/x-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/unpack_processor_events.test.ts @@ -5,7 +5,6 @@ * 2.0. */ -/* eslint-disable @typescript-eslint/naming-convention */ import { APMEventESSearchRequest } from '.'; import { ApmIndicesConfig } from '../../../settings/apm_indices/get_apm_indices'; import { unpackProcessorEvents } from './unpack_processor_events'; @@ -19,12 +18,12 @@ describe('unpackProcessorEvents', () => { } as APMEventESSearchRequest; const indices = { - 'apm_oss.transactionIndices': 'my-apm-*-transaction-*', - 'apm_oss.metricsIndices': 'my-apm-*-metric-*', - 'apm_oss.errorIndices': 'my-apm-*-error-*', - 'apm_oss.spanIndices': 'my-apm-*-span-*', - 'apm_oss.onboardingIndices': 'my-apm-*-onboarding-', - 'apm_oss.sourcemapIndices': 'my-apm-*-sourcemap-*', + transaction: 'my-apm-*-transaction-*', + metric: 'my-apm-*-metric-*', + error: 'my-apm-*-error-*', + span: 'my-apm-*-span-*', + onboarding: 'my-apm-*-onboarding-*', + sourcemap: 'my-apm-*-sourcemap-*', } as ApmIndicesConfig; res = unpackProcessorEvents(request, indices); diff --git a/x-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/unpack_processor_events.ts b/x-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/unpack_processor_events.ts index 47a2b3fe7e5c8..582fe0374c5ca 100644 --- a/x-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/unpack_processor_events.ts +++ b/x-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/unpack_processor_events.ts @@ -13,19 +13,16 @@ import { ESFilter, } from '../../../../../../../../src/core/types/elasticsearch'; import { APMEventESSearchRequest, APMEventESTermsEnumRequest } from '.'; -import { - ApmIndicesConfig, - ApmIndicesName, -} from '../../../settings/apm_indices/get_apm_indices'; +import { ApmIndicesConfig } from '../../../settings/apm_indices/get_apm_indices'; -const processorEventIndexMap: Record = { - [ProcessorEvent.transaction]: 'apm_oss.transactionIndices', - [ProcessorEvent.span]: 'apm_oss.spanIndices', - [ProcessorEvent.metric]: 'apm_oss.metricsIndices', - [ProcessorEvent.error]: 'apm_oss.errorIndices', +const processorEventIndexMap = { + [ProcessorEvent.transaction]: 'transaction', + [ProcessorEvent.span]: 'span', + [ProcessorEvent.metric]: 'metric', + [ProcessorEvent.error]: 'error', // TODO: should have its own config setting - [ProcessorEvent.profile]: 'apm_oss.transactionIndices', -}; + [ProcessorEvent.profile]: 'transaction', +} as const; export function unpackProcessorEvents( request: APMEventESSearchRequest | APMEventESTermsEnumRequest, diff --git a/x-pack/plugins/apm/server/lib/helpers/setup_request.test.ts b/x-pack/plugins/apm/server/lib/helpers/setup_request.test.ts index 94e88a09ea35c..d5ff97c050d9d 100644 --- a/x-pack/plugins/apm/server/lib/helpers/setup_request.test.ts +++ b/x-pack/plugins/apm/server/lib/helpers/setup_request.test.ts @@ -10,19 +10,20 @@ import { APMConfig } from '../..'; import { APMRouteHandlerResources } from '../../routes/typings'; import { ProcessorEvent } from '../../../common/processor_event'; import { PROCESSOR_EVENT } from '../../../common/elasticsearch_fieldnames'; +import { getApmIndices } from '../settings/apm_indices/get_apm_indices'; +import { PromiseReturnType } from '../../../../observability/typings/common'; jest.mock('../settings/apm_indices/get_apm_indices', () => ({ - getApmIndices: async () => ({ - /* eslint-disable @typescript-eslint/naming-convention */ - 'apm_oss.sourcemapIndices': 'apm-*', - 'apm_oss.errorIndices': 'apm-*', - 'apm_oss.onboardingIndices': 'apm-*', - 'apm_oss.spanIndices': 'apm-*', - 'apm_oss.transactionIndices': 'apm-*', - 'apm_oss.metricsIndices': 'apm-*', - /* eslint-enable @typescript-eslint/naming-convention */ - apmAgentConfigurationIndex: 'apm-*', - }), + getApmIndices: async () => + ({ + sourcemap: 'apm-*', + error: 'apm-*', + onboarding: 'apm-*', + span: 'apm-*', + transaction: 'apm-*', + metric: 'apm-*', + apmAgentConfigurationIndex: 'apm-*', + } as PromiseReturnType), })); jest.mock('../index_pattern/get_dynamic_index_pattern', () => ({ diff --git a/x-pack/plugins/apm/server/lib/index_pattern/create_static_index_pattern.test.ts b/x-pack/plugins/apm/server/lib/index_pattern/create_static_index_pattern.test.ts index aae707c6e4689..83adab6ae6cbc 100644 --- a/x-pack/plugins/apm/server/lib/index_pattern/create_static_index_pattern.test.ts +++ b/x-pack/plugins/apm/server/lib/index_pattern/create_static_index_pattern.test.ts @@ -5,7 +5,6 @@ * 2.0. */ -/* eslint-disable @typescript-eslint/naming-convention */ import { createStaticIndexPattern } from './create_static_index_pattern'; import { Setup } from '../helpers/setup_request'; import * as HistoricalAgentData from '../../routes/historical_data/has_historical_agent_data'; @@ -25,11 +24,11 @@ function getMockSavedObjectsClient(existingIndexPatternTitle: string) { const setup = { indices: { - 'apm_oss.transactionIndices': 'apm-*-transaction-*', - 'apm_oss.spanIndices': 'apm-*-span-*', - 'apm_oss.errorIndices': 'apm-*-error-*', - 'apm_oss.metricsIndices': 'apm-*-metrics-*', - }, + transaction: 'apm-*-transaction-*', + span: 'apm-*-span-*', + error: 'apm-*-error-*', + metric: 'apm-*-metrics-*', + } as APMConfig['indices'], } as unknown as Setup; describe('createStaticIndexPattern', () => { @@ -37,7 +36,7 @@ describe('createStaticIndexPattern', () => { const savedObjectsClient = getMockSavedObjectsClient('apm-*'); await createStaticIndexPattern({ setup, - config: { 'xpack.apm.autocreateApmIndexPattern': false } as APMConfig, + config: { autocreateApmIndexPattern: false } as APMConfig, savedObjectsClient, spaceId: 'default', }); @@ -54,7 +53,7 @@ describe('createStaticIndexPattern', () => { await createStaticIndexPattern({ setup, - config: { 'xpack.apm.autocreateApmIndexPattern': true } as APMConfig, + config: { autocreateApmIndexPattern: true } as APMConfig, savedObjectsClient, spaceId: 'default', }); @@ -71,7 +70,7 @@ describe('createStaticIndexPattern', () => { await createStaticIndexPattern({ setup, - config: { 'xpack.apm.autocreateApmIndexPattern': true } as APMConfig, + config: { autocreateApmIndexPattern: true } as APMConfig, savedObjectsClient, spaceId: 'default', }); @@ -91,9 +90,7 @@ describe('createStaticIndexPattern', () => { await createStaticIndexPattern({ setup, - config: { - 'xpack.apm.autocreateApmIndexPattern': true, - } as APMConfig, + config: { autocreateApmIndexPattern: true } as APMConfig, savedObjectsClient, spaceId: 'default', }); @@ -120,9 +117,7 @@ describe('createStaticIndexPattern', () => { await createStaticIndexPattern({ setup, - config: { - 'xpack.apm.autocreateApmIndexPattern': true, - } as APMConfig, + config: { autocreateApmIndexPattern: true } as APMConfig, savedObjectsClient, spaceId: 'default', }); diff --git a/x-pack/plugins/apm/server/lib/index_pattern/create_static_index_pattern.ts b/x-pack/plugins/apm/server/lib/index_pattern/create_static_index_pattern.ts index 4f35e7e639151..26ae2ac337e88 100644 --- a/x-pack/plugins/apm/server/lib/index_pattern/create_static_index_pattern.ts +++ b/x-pack/plugins/apm/server/lib/index_pattern/create_static_index_pattern.ts @@ -34,7 +34,7 @@ export async function createStaticIndexPattern({ }): Promise { return withApmSpan('create_static_index_pattern', async () => { // don't autocreate APM index pattern if it's been disabled via the config - if (!config['xpack.apm.autocreateApmIndexPattern']) { + if (!config.autocreateApmIndexPattern) { return false; } diff --git a/x-pack/plugins/apm/server/lib/index_pattern/get_apm_index_pattern_title.test.ts b/x-pack/plugins/apm/server/lib/index_pattern/get_apm_index_pattern_title.test.ts index 8103630157584..8b7444ffdf6fa 100644 --- a/x-pack/plugins/apm/server/lib/index_pattern/get_apm_index_pattern_title.test.ts +++ b/x-pack/plugins/apm/server/lib/index_pattern/get_apm_index_pattern_title.test.ts @@ -5,18 +5,16 @@ * 2.0. */ -/* eslint-disable @typescript-eslint/naming-convention */ - import { ApmIndicesConfig } from '../settings/apm_indices/get_apm_indices'; import { getApmIndexPatternTitle } from './get_apm_index_pattern_title'; describe('getApmIndexPatternTitle', () => { it('returns an index pattern title by combining existing indicies', () => { const title = getApmIndexPatternTitle({ - 'apm_oss.transactionIndices': 'apm-*-transaction-*', - 'apm_oss.spanIndices': 'apm-*-span-*', - 'apm_oss.errorIndices': 'apm-*-error-*', - 'apm_oss.metricsIndices': 'apm-*-metrics-*', + transaction: 'apm-*-transaction-*', + span: 'apm-*-span-*', + error: 'apm-*-error-*', + metric: 'apm-*-metrics-*', } as ApmIndicesConfig); expect(title).toBe( 'apm-*-transaction-*,apm-*-span-*,apm-*-error-*,apm-*-metrics-*' @@ -25,10 +23,10 @@ describe('getApmIndexPatternTitle', () => { it('removes duplicates', () => { const title = getApmIndexPatternTitle({ - 'apm_oss.transactionIndices': 'apm-*', - 'apm_oss.spanIndices': 'apm-*', - 'apm_oss.errorIndices': 'apm-*', - 'apm_oss.metricsIndices': 'apm-*', + transaction: 'apm-*', + span: 'apm-*', + error: 'apm-*', + metric: 'apm-*', } as ApmIndicesConfig); expect(title).toBe('apm-*'); }); diff --git a/x-pack/plugins/apm/server/lib/index_pattern/get_apm_index_pattern_title.ts b/x-pack/plugins/apm/server/lib/index_pattern/get_apm_index_pattern_title.ts index e65f200130e9a..5e055ff1c2fdc 100644 --- a/x-pack/plugins/apm/server/lib/index_pattern/get_apm_index_pattern_title.ts +++ b/x-pack/plugins/apm/server/lib/index_pattern/get_apm_index_pattern_title.ts @@ -10,9 +10,9 @@ import { ApmIndicesConfig } from '../settings/apm_indices/get_apm_indices'; export function getApmIndexPatternTitle(apmIndicesConfig: ApmIndicesConfig) { return uniq([ - apmIndicesConfig['apm_oss.transactionIndices'], - apmIndicesConfig['apm_oss.spanIndices'], - apmIndicesConfig['apm_oss.errorIndices'], - apmIndicesConfig['apm_oss.metricsIndices'], + apmIndicesConfig.transaction, + apmIndicesConfig.span, + apmIndicesConfig.error, + apmIndicesConfig.metric, ]).join(','); } diff --git a/x-pack/plugins/apm/server/lib/metrics/by_agent/java/gc/fetch_and_transform_gc_metrics.ts b/x-pack/plugins/apm/server/lib/metrics/by_agent/java/gc/fetch_and_transform_gc_metrics.ts index ba35836452122..06138931c004e 100644 --- a/x-pack/plugins/apm/server/lib/metrics/by_agent/java/gc/fetch_and_transform_gc_metrics.ts +++ b/x-pack/plugins/apm/server/lib/metrics/by_agent/java/gc/fetch_and_transform_gc_metrics.ts @@ -85,7 +85,7 @@ export async function fetchAndTransformGcMetrics({ date_histogram: getMetricsDateHistogramParams({ start, end, - metricsInterval: config['xpack.apm.metricsInterval'], + metricsInterval: config.metricsInterval, }), aggs: { // get the max value diff --git a/x-pack/plugins/apm/server/lib/metrics/fetch_and_transform_metrics.ts b/x-pack/plugins/apm/server/lib/metrics/fetch_and_transform_metrics.ts index a3fce0368f4a5..581a0782e4d72 100644 --- a/x-pack/plugins/apm/server/lib/metrics/fetch_and_transform_metrics.ts +++ b/x-pack/plugins/apm/server/lib/metrics/fetch_and_transform_metrics.ts @@ -99,7 +99,7 @@ export async function fetchAndTransformMetrics({ date_histogram: getMetricsDateHistogramParams({ start, end, - metricsInterval: config['xpack.apm.metricsInterval'], + metricsInterval: config.metricsInterval, }), aggs, }, diff --git a/x-pack/plugins/apm/server/lib/observability_overview/get_transactions_per_minute.ts b/x-pack/plugins/apm/server/lib/observability_overview/get_transactions_per_minute.ts index bfa8d53d2a9fb..8c64670f5d2e9 100644 --- a/x-pack/plugins/apm/server/lib/observability_overview/get_transactions_per_minute.ts +++ b/x-pack/plugins/apm/server/lib/observability_overview/get_transactions_per_minute.ts @@ -16,7 +16,10 @@ import { getDocumentTypeFilterForAggregatedTransactions, getProcessorEventForAggregatedTransactions, } from '../helpers/aggregated_transactions'; -import { calculateThroughput } from '../helpers/calculate_throughput'; +import { + calculateThroughputWithInterval, + calculateThroughputWithRange, +} from '../helpers/calculate_throughput'; export async function getTransactionsPerMinute({ setup, @@ -24,9 +27,11 @@ export async function getTransactionsPerMinute({ searchAggregatedTransactions, start, end, + intervalString, }: { setup: Setup; - bucketSize: string; + bucketSize: number; + intervalString: string; searchAggregatedTransactions: boolean; start: number; end: number; @@ -64,12 +69,9 @@ export async function getTransactionsPerMinute({ timeseries: { date_histogram: { field: '@timestamp', - fixed_interval: bucketSize, + fixed_interval: intervalString, min_doc_count: 0, }, - aggs: { - throughput: { rate: { unit: 'minute' as const } }, - }, }, }, }, @@ -90,7 +92,7 @@ export async function getTransactionsPerMinute({ ) || aggregations.transactionType.buckets[0]; return { - value: calculateThroughput({ + value: calculateThroughputWithRange({ start, end, value: topTransactionTypeBucket?.doc_count || 0, @@ -98,7 +100,10 @@ export async function getTransactionsPerMinute({ timeseries: topTransactionTypeBucket?.timeseries.buckets.map((bucket) => ({ x: bucket.key, - y: bucket.throughput.value, + y: calculateThroughputWithInterval({ + bucketSize, + value: bucket.doc_count, + }), })) || [], }; } diff --git a/x-pack/plugins/apm/server/lib/rum_client/has_rum_data.ts b/x-pack/plugins/apm/server/lib/rum_client/has_rum_data.ts index 9409e94fa9ba9..ba35ac5c5c89c 100644 --- a/x-pack/plugins/apm/server/lib/rum_client/has_rum_data.ts +++ b/x-pack/plugins/apm/server/lib/rum_client/has_rum_data.ts @@ -56,7 +56,7 @@ export async function hasRumData({ const response = await apmEventClient.search('has_rum_data', params); return { - indices: setup.indices['apm_oss.transactionIndices']!, + indices: setup.indices.transaction, hasData: response.hits.total.value > 0, serviceName: response.aggregations?.services?.mostTraffic?.buckets?.[0]?.key, @@ -65,7 +65,7 @@ export async function hasRumData({ return { hasData: false, serviceName: undefined, - indices: setup.indices['apm_oss.transactionIndices']!, + indices: setup.indices.transaction, }; } } diff --git a/x-pack/plugins/apm/server/lib/search_strategies/failed_transactions_correlations/failed_transactions_correlations_search_service.ts b/x-pack/plugins/apm/server/lib/search_strategies/failed_transactions_correlations/failed_transactions_correlations_search_service.ts index 02ba0a8514b62..239cf39f15ffe 100644 --- a/x-pack/plugins/apm/server/lib/search_strategies/failed_transactions_correlations/failed_transactions_correlations_search_service.ts +++ b/x-pack/plugins/apm/server/lib/search_strategies/failed_transactions_correlations/failed_transactions_correlations_search_service.ts @@ -65,7 +65,7 @@ export const failedTransactionsCorrelationsSearchServiceProvider: FailedTransact const params: FailedTransactionsCorrelationsRequestParams & SearchStrategyServerParams = { ...searchServiceParams, - index: indices['apm_oss.transactionIndices'], + index: indices.transaction, includeFrozen, }; diff --git a/x-pack/plugins/apm/server/lib/search_strategies/latency_correlations/latency_correlations_search_service.ts b/x-pack/plugins/apm/server/lib/search_strategies/latency_correlations/latency_correlations_search_service.ts index 7e420c821a746..91f4a0d3349a4 100644 --- a/x-pack/plugins/apm/server/lib/search_strategies/latency_correlations/latency_correlations_search_service.ts +++ b/x-pack/plugins/apm/server/lib/search_strategies/latency_correlations/latency_correlations_search_service.ts @@ -67,7 +67,7 @@ export const latencyCorrelationsSearchServiceProvider: LatencyCorrelationsSearch const indices = await getApmIndices(); params = { ...searchServiceParams, - index: indices['apm_oss.transactionIndices'], + index: indices.transaction, includeFrozen, }; diff --git a/x-pack/plugins/apm/server/lib/search_strategies/queries/query_histogram_range_steps.test.ts b/x-pack/plugins/apm/server/lib/search_strategies/queries/query_histogram_range_steps.test.ts index 25ce39cbcf17b..ffc86c7ef6c32 100644 --- a/x-pack/plugins/apm/server/lib/search_strategies/queries/query_histogram_range_steps.test.ts +++ b/x-pack/plugins/apm/server/lib/search_strategies/queries/query_histogram_range_steps.test.ts @@ -106,8 +106,8 @@ describe('query_histogram_range_steps', () => { ); expect(resp.length).toEqual(100); - expect(resp[0]).toEqual(9.260965422132594); - expect(resp[99]).toEqual(18521.930844265193); + expect(resp[0]).toEqual(9); + expect(resp[99]).toEqual(18522); expect(esClientSearchMock).toHaveBeenCalledTimes(1); }); }); diff --git a/x-pack/plugins/apm/server/lib/search_strategies/queries/query_histogram_range_steps.ts b/x-pack/plugins/apm/server/lib/search_strategies/queries/query_histogram_range_steps.ts index 973787833577c..790919d193028 100644 --- a/x-pack/plugins/apm/server/lib/search_strategies/queries/query_histogram_range_steps.ts +++ b/x-pack/plugins/apm/server/lib/search_strategies/queries/query_histogram_range_steps.ts @@ -19,10 +19,11 @@ import { getRequestBase } from './get_request_base'; const getHistogramRangeSteps = (min: number, max: number, steps: number) => { // A d3 based scale function as a helper to get equally distributed bins on a log scale. + // We round the final values because the ES range agg we use won't accept numbers with decimals for `transaction.duration.us`. const logFn = scaleLog().domain([min, max]).range([1, steps]); return [...Array(steps).keys()] .map(logFn.invert) - .map((d) => (isNaN(d) ? 0 : d)); + .map((d) => (isNaN(d) ? 0 : Math.round(d))); }; export const getHistogramIntervalRequest = ( diff --git a/x-pack/plugins/apm/server/lib/search_strategies/search_strategy_provider.test.ts b/x-pack/plugins/apm/server/lib/search_strategies/search_strategy_provider.test.ts index 6e03c879f9b97..8a9d04df32036 100644 --- a/x-pack/plugins/apm/server/lib/search_strategies/search_strategy_provider.test.ts +++ b/x-pack/plugins/apm/server/lib/search_strategies/search_strategy_provider.test.ts @@ -90,10 +90,7 @@ const clientSearchMock = ( }; const getApmIndicesMock = async () => - ({ - // eslint-disable-next-line @typescript-eslint/naming-convention - 'apm_oss.transactionIndices': 'apm-*', - } as ApmIndicesConfig); + ({ transaction: 'apm-*' } as ApmIndicesConfig); describe('APM Correlations search strategy', () => { describe('strategy interface', () => { diff --git a/x-pack/plugins/apm/server/lib/service_map/get_service_anomalies.ts b/x-pack/plugins/apm/server/lib/service_map/get_service_anomalies.ts index 97c95e4e40045..9b2d79dc726ee 100644 --- a/x-pack/plugins/apm/server/lib/service_map/get_service_anomalies.ts +++ b/x-pack/plugins/apm/server/lib/service_map/get_service_anomalies.ts @@ -11,11 +11,7 @@ import { estypes } from '@elastic/elasticsearch'; import { ESSearchResponse } from '../../../../../../src/core/types/elasticsearch'; import { MlPluginSetup } from '../../../../ml/server'; import { PromiseReturnType } from '../../../../observability/typings/common'; -import { - getSeverity, - ML_ERRORS, - ML_TRANSACTION_LATENCY_DETECTOR_INDEX, -} from '../../../common/anomaly_detection'; +import { getSeverity, ML_ERRORS } from '../../../common/anomaly_detection'; import { ENVIRONMENT_ALL } from '../../../common/environment_filter_values'; import { getServiceHealthStatus } from '../../../common/service_health_status'; import { @@ -26,7 +22,6 @@ import { rangeQuery } from '../../../../observability/server'; import { withApmSpan } from '../../utils/with_apm_span'; import { getMlJobsWithAPMGroup } from '../anomaly_detection/get_ml_jobs_with_apm_group'; import { Setup } from '../helpers/setup_request'; -import { apmMlAnomalyQuery } from '../../../common/utils/apm_ml_anomaly_query'; export const DEFAULT_ANOMALIES: ServiceAnomaliesResponse = { mlJobIds: [], @@ -61,7 +56,7 @@ export async function getServiceAnomalies({ query: { bool: { filter: [ - ...apmMlAnomalyQuery(ML_TRANSACTION_LATENCY_DETECTOR_INDEX), + { terms: { result_type: ['model_plot', 'record'] } }, ...rangeQuery( Math.min(end - 30 * 60 * 1000, start), end, diff --git a/x-pack/plugins/apm/server/lib/service_map/get_service_map.ts b/x-pack/plugins/apm/server/lib/service_map/get_service_map.ts index 2497a85c0c774..ae511d0fed8f8 100644 --- a/x-pack/plugins/apm/server/lib/service_map/get_service_map.ts +++ b/x-pack/plugins/apm/server/lib/service_map/get_service_map.ts @@ -53,10 +53,7 @@ async function getConnectionData({ end, }); - const chunks = chunk( - traceIds, - setup.config['xpack.apm.serviceMapMaxTracesPerRequest'] - ); + const chunks = chunk(traceIds, setup.config.serviceMapMaxTracesPerRequest); const init = { connections: [], diff --git a/x-pack/plugins/apm/server/lib/service_map/get_service_map_service_node_info.test.ts b/x-pack/plugins/apm/server/lib/service_map/get_service_map_service_node_info.test.ts index 2129606e69fc3..afb88189a5fd2 100644 --- a/x-pack/plugins/apm/server/lib/service_map/get_service_map_service_node_info.test.ts +++ b/x-pack/plugins/apm/server/lib/service_map/get_service_map_service_node_info.test.ts @@ -70,9 +70,7 @@ describe('getServiceMapServiceNodeInfo', () => { indices: {}, start: 1593460053026000, end: 1593497863217000, - config: { - 'xpack.apm.metricsInterval': 30, - }, + config: { metricsInterval: 30 }, uiFilters: { environment: 'test environment' }, } as unknown as Setup; const serviceName = 'test service name'; diff --git a/x-pack/plugins/apm/server/lib/service_map/get_trace_sample_ids.ts b/x-pack/plugins/apm/server/lib/service_map/get_trace_sample_ids.ts index c1c11f7bf639a..7e16e69498e7c 100644 --- a/x-pack/plugins/apm/server/lib/service_map/get_trace_sample_ids.ts +++ b/x-pack/plugins/apm/server/lib/service_map/get_trace_sample_ids.ts @@ -60,13 +60,11 @@ export async function getTraceSampleIds({ query.bool.filter.push(...environmentQuery(environment)); const fingerprintBucketSize = serviceName - ? config['xpack.apm.serviceMapFingerprintBucketSize'] - : config['xpack.apm.serviceMapFingerprintGlobalBucketSize']; - + ? config.serviceMapFingerprintBucketSize + : config.serviceMapFingerprintGlobalBucketSize; const traceIdBucketSize = serviceName - ? config['xpack.apm.serviceMapTraceIdBucketSize'] - : config['xpack.apm.serviceMapTraceIdGlobalBucketSize']; - + ? config.serviceMapTraceIdBucketSize + : config.serviceMapTraceIdGlobalBucketSize; const samplerShardSize = traceIdBucketSize * 10; const params = { @@ -137,8 +135,7 @@ export async function getTraceSampleIds({ 'get_trace_sample_ids', params ); - // make sure at least one trace per composite/connection bucket - // is queried + // make sure at least one trace per composite/connection bucket is queried const traceIdsWithPriority = tracesSampleResponse.aggregations?.connections.buckets.flatMap((bucket) => bucket.sample.trace_ids.buckets.map((sampleDocBucket, index) => ({ diff --git a/x-pack/plugins/apm/server/lib/services/get_service_instances/get_service_instances_transaction_statistics.ts b/x-pack/plugins/apm/server/lib/services/get_service_instances/get_service_instances_transaction_statistics.ts index 089282d6f1c34..ec76e0d35e5c0 100644 --- a/x-pack/plugins/apm/server/lib/services/get_service_instances/get_service_instances_transaction_statistics.ts +++ b/x-pack/plugins/apm/server/lib/services/get_service_instances/get_service_instances_transaction_statistics.ts @@ -109,6 +109,9 @@ export async function getServiceInstancesTransactionStatistics< filter: [ { term: { [SERVICE_NAME]: serviceName } }, { term: { [TRANSACTION_TYPE]: transactionType } }, + ...getDocumentTypeFilterForAggregatedTransactions( + searchAggregatedTransactions + ), ...rangeQuery(start, end), ...environmentQuery(environment), ...kqlQuery(kuery), diff --git a/x-pack/plugins/apm/server/lib/services/get_service_transaction_group_detailed_statistics.ts b/x-pack/plugins/apm/server/lib/services/get_service_transaction_group_detailed_statistics.ts index adf0317ccf174..feab6d78f02c8 100644 --- a/x-pack/plugins/apm/server/lib/services/get_service_transaction_group_detailed_statistics.ts +++ b/x-pack/plugins/apm/server/lib/services/get_service_transaction_group_detailed_statistics.ts @@ -125,11 +125,6 @@ export async function getServiceTransactionGroupDetailedStatistics({ }, }, aggs: { - throughput_rate: { - rate: { - unit: 'minute', - }, - }, ...getLatencyAggregation(latencyAggregationType, field), [EVENT_OUTCOME]: { terms: { @@ -160,7 +155,7 @@ export async function getServiceTransactionGroupDetailedStatistics({ })); const throughput = bucket.timeseries.buckets.map((timeseriesBucket) => ({ x: timeseriesBucket.key, - y: timeseriesBucket.throughput_rate.value, + y: timeseriesBucket.doc_count, // sparklines only shows trend (no axis) })); const errorRate = bucket.timeseries.buckets.map((timeseriesBucket) => ({ x: timeseriesBucket.key, diff --git a/x-pack/plugins/apm/server/lib/services/get_service_transaction_groups.ts b/x-pack/plugins/apm/server/lib/services/get_service_transaction_groups.ts index d5a2006060395..fbc1e2880495b 100644 --- a/x-pack/plugins/apm/server/lib/services/get_service_transaction_groups.ts +++ b/x-pack/plugins/apm/server/lib/services/get_service_transaction_groups.ts @@ -57,7 +57,7 @@ export async function getServiceTransactionGroups({ end: number; }) { const { apmEventClient, config } = setup; - const bucketSize = config['xpack.apm.ui.transactionGroupBucketSize']; + const bucketSize = config.ui.transactionGroupBucketSize; const field = getTransactionDurationFieldForAggregatedTransactions( searchAggregatedTransactions diff --git a/x-pack/plugins/apm/server/lib/services/get_throughput.ts b/x-pack/plugins/apm/server/lib/services/get_throughput.ts index 76d6000a161e6..669203ad198b9 100644 --- a/x-pack/plugins/apm/server/lib/services/get_throughput.ts +++ b/x-pack/plugins/apm/server/lib/services/get_throughput.ts @@ -18,6 +18,7 @@ import { getProcessorEventForAggregatedTransactions, } from '../helpers/aggregated_transactions'; import { Setup } from '../helpers/setup_request'; +import { calculateThroughputWithInterval } from '../helpers/calculate_throughput'; interface Options { environment: string; @@ -30,7 +31,7 @@ interface Options { start: number; end: number; intervalString: string; - throughputUnit: 'minute' | 'second'; + bucketSize: number; } export async function getThroughput({ @@ -44,7 +45,7 @@ export async function getThroughput({ start, end, intervalString, - throughputUnit, + bucketSize, }: Options) { const { apmEventClient } = setup; @@ -86,13 +87,6 @@ export async function getThroughput({ min_doc_count: 0, extended_bounds: { min: start, max: end }, }, - aggs: { - throughput: { - rate: { - unit: throughputUnit, - }, - }, - }, }, }, }, @@ -107,7 +101,10 @@ export async function getThroughput({ response.aggregations?.timeseries.buckets.map((bucket) => { return { x: bucket.key, - y: bucket.throughput.value, + y: calculateThroughputWithInterval({ + bucketSize, + value: bucket.doc_count, + }), }; }) ?? [] ); diff --git a/x-pack/plugins/apm/server/lib/settings/apm_indices/get_apm_indices.ts b/x-pack/plugins/apm/server/lib/settings/apm_indices/get_apm_indices.ts index 0ade96682b362..107493af1a0c0 100644 --- a/x-pack/plugins/apm/server/lib/settings/apm_indices/get_apm_indices.ts +++ b/x-pack/plugins/apm/server/lib/settings/apm_indices/get_apm_indices.ts @@ -5,8 +5,6 @@ * 2.0. */ -import { merge } from 'lodash'; - import { SavedObjectsClient } from 'src/core/server'; import { PromiseReturnType } from '../../../../../observability/typings/common'; import { @@ -22,8 +20,6 @@ export { ApmIndicesConfig }; type ISavedObjectsClient = Pick; -export type ApmIndicesName = keyof ApmIndicesConfig; - async function getApmIndicesSavedObject( savedObjectsClient: ISavedObjectsClient ) { @@ -38,14 +34,12 @@ async function getApmIndicesSavedObject( export function getApmIndicesConfig(config: APMConfig): ApmIndicesConfig { return { - /* eslint-disable @typescript-eslint/naming-convention */ - 'apm_oss.sourcemapIndices': config['apm_oss.sourcemapIndices'], - 'apm_oss.errorIndices': config['apm_oss.errorIndices'], - 'apm_oss.onboardingIndices': config['apm_oss.onboardingIndices'], - 'apm_oss.spanIndices': config['apm_oss.spanIndices'], - 'apm_oss.transactionIndices': config['apm_oss.transactionIndices'], - 'apm_oss.metricsIndices': config['apm_oss.metricsIndices'], - /* eslint-enable @typescript-eslint/naming-convention */ + sourcemap: config.indices.sourcemap, + error: config.indices.error, + onboarding: config.indices.onboarding, + span: config.indices.span, + transaction: config.indices.transaction, + metric: config.indices.metric, // system indices, not configurable apmAgentConfigurationIndex: '.apm-agent-configuration', apmCustomLinkIndex: '.apm-custom-link', @@ -64,21 +58,12 @@ export async function getApmIndices({ savedObjectsClient ); const apmIndicesConfig = getApmIndicesConfig(config); - return merge({}, apmIndicesConfig, apmIndicesSavedObject); + return { ...apmIndicesConfig, ...apmIndicesSavedObject }; } catch (error) { return getApmIndicesConfig(config); } } -const APM_UI_INDICES: ApmIndicesName[] = [ - 'apm_oss.sourcemapIndices', - 'apm_oss.errorIndices', - 'apm_oss.onboardingIndices', - 'apm_oss.spanIndices', - 'apm_oss.transactionIndices', - 'apm_oss.metricsIndices', -]; - export async function getApmIndexSettings({ context, config, @@ -88,7 +73,7 @@ export async function getApmIndexSettings({ apmIndicesSavedObject = await getApmIndicesSavedObject( context.core.savedObjects.client ); - } catch (error) { + } catch (error: any) { if (error.output && error.output.statusCode === 404) { apmIndicesSavedObject = {}; } else { @@ -97,7 +82,11 @@ export async function getApmIndexSettings({ } const apmIndicesConfig = getApmIndicesConfig(config); - return APM_UI_INDICES.map((configurationName) => ({ + const apmIndices = Object.keys(config.indices) as Array< + keyof typeof config.indices + >; + + return apmIndices.map((configurationName) => ({ configurationName, defaultValue: apmIndicesConfig[configurationName], // value defined in kibana[.dev].yml savedValue: apmIndicesSavedObject[configurationName], // value saved via Saved Objects service diff --git a/x-pack/plugins/apm/server/lib/traces/__snapshots__/queries.test.ts.snap b/x-pack/plugins/apm/server/lib/traces/__snapshots__/queries.test.ts.snap index 53318fe5fe594..ea8f39f9d9b6d 100644 --- a/x-pack/plugins/apm/server/lib/traces/__snapshots__/queries.test.ts.snap +++ b/x-pack/plugins/apm/server/lib/traces/__snapshots__/queries.test.ts.snap @@ -37,7 +37,7 @@ Object { }, }, }, - "size": "myIndex", + "size": 1000, }, } `; diff --git a/x-pack/plugins/apm/server/lib/traces/get_trace_items.ts b/x-pack/plugins/apm/server/lib/traces/get_trace_items.ts index e940100edcf52..60a28fd9abdbd 100644 --- a/x-pack/plugins/apm/server/lib/traces/get_trace_items.ts +++ b/x-pack/plugins/apm/server/lib/traces/get_trace_items.ts @@ -24,7 +24,7 @@ export async function getTraceItems( end: number ) { const { apmEventClient, config } = setup; - const maxTraceItems = config['xpack.apm.ui.maxTraceItems']; + const maxTraceItems = config.ui.maxTraceItems; const excludedLogLevels = ['debug', 'info', 'warning']; const errorResponsePromise = apmEventClient.search('get_errors_docs', { @@ -80,9 +80,5 @@ export async function getTraceItems( const traceDocs = traceResponse.hits.hits.map((hit) => hit._source); const errorDocs = errorResponse.hits.hits.map((hit) => hit._source); - return { - exceedsMax, - traceDocs, - errorDocs, - }; + return { exceedsMax, traceDocs, errorDocs }; } diff --git a/x-pack/plugins/apm/server/lib/transactions/breakdown/index.test.ts b/x-pack/plugins/apm/server/lib/transactions/breakdown/index.test.ts index 6e9d0aad96b71..76cabd3e3af93 100644 --- a/x-pack/plugins/apm/server/lib/transactions/breakdown/index.test.ts +++ b/x-pack/plugins/apm/server/lib/transactions/breakdown/index.test.ts @@ -11,16 +11,15 @@ import noDataResponse from './mock_responses/no_data.json'; import dataResponse from './mock_responses/data.json'; import { APMConfig } from '../../..'; import { ENVIRONMENT_ALL } from '../../../../common/environment_filter_values'; - -const mockIndices = { - /* eslint-disable @typescript-eslint/naming-convention */ - 'apm_oss.sourcemapIndices': 'myIndex', - 'apm_oss.errorIndices': 'myIndex', - 'apm_oss.onboardingIndices': 'myIndex', - 'apm_oss.spanIndices': 'myIndex', - 'apm_oss.transactionIndices': 'myIndex', - 'apm_oss.metricsIndices': 'myIndex', - /* eslint-enable @typescript-eslint/naming-convention */ +import { ApmIndicesConfig } from '../../settings/apm_indices/get_apm_indices'; + +const mockIndices: ApmIndicesConfig = { + sourcemap: 'myIndex', + error: 'myIndex', + onboarding: 'myIndex', + span: 'myIndex', + transaction: 'myIndex', + metric: 'myIndex', apmAgentConfigurationIndex: 'myIndex', apmCustomLinkIndex: 'myIndex', }; diff --git a/x-pack/plugins/apm/server/lib/transactions/breakdown/index.ts b/x-pack/plugins/apm/server/lib/transactions/breakdown/index.ts index 62277dba8ac29..a5c11776c70b0 100644 --- a/x-pack/plugins/apm/server/lib/transactions/breakdown/index.ts +++ b/x-pack/plugins/apm/server/lib/transactions/breakdown/index.ts @@ -124,7 +124,7 @@ export async function getTransactionBreakdown({ date_histogram: getMetricsDateHistogramParams({ start, end, - metricsInterval: config['xpack.apm.metricsInterval'], + metricsInterval: config.metricsInterval, }), aggs: subAggs, }, diff --git a/x-pack/plugins/apm/server/lib/transactions/get_anomaly_data/fetcher.ts b/x-pack/plugins/apm/server/lib/transactions/get_anomaly_data/fetcher.ts index a7357bbc1dd34..a61e0614f5b1a 100644 --- a/x-pack/plugins/apm/server/lib/transactions/get_anomaly_data/fetcher.ts +++ b/x-pack/plugins/apm/server/lib/transactions/get_anomaly_data/fetcher.ts @@ -12,8 +12,6 @@ import { rangeQuery } from '../../../../../observability/server'; import { asMutableArray } from '../../../../common/utils/as_mutable_array'; import { withApmSpan } from '../../../utils/with_apm_span'; import { Setup } from '../../helpers/setup_request'; -import { apmMlAnomalyQuery } from '../../../../common/utils/apm_ml_anomaly_query'; -import { ML_TRANSACTION_LATENCY_DETECTOR_INDEX } from '../../../../common/anomaly_detection'; export type ESResponse = Exclude< PromiseReturnType, @@ -42,7 +40,7 @@ export function anomalySeriesFetcher({ query: { bool: { filter: [ - ...apmMlAnomalyQuery(ML_TRANSACTION_LATENCY_DETECTOR_INDEX), + { terms: { result_type: ['model_plot', 'record'] } }, { term: { partition_field_value: serviceName } }, { term: { by_field_value: transactionType } }, ...rangeQuery(start, end, 'timestamp'), diff --git a/x-pack/plugins/apm/server/plugin.ts b/x-pack/plugins/apm/server/plugin.ts index 2296227de2a33..d2d8dbf602364 100644 --- a/x-pack/plugins/apm/server/plugin.ts +++ b/x-pack/plugins/apm/server/plugin.ts @@ -5,8 +5,7 @@ * 2.0. */ -import { combineLatest } from 'rxjs'; -import { map, take } from 'rxjs/operators'; +import { take } from 'rxjs/operators'; import { CoreSetup, CoreStart, @@ -19,8 +18,7 @@ import { isEmpty, mapValues } from 'lodash'; import { SavedObjectsClient } from '../../../../src/core/server'; import { mappingFromFieldMap } from '../../rule_registry/common/mapping_from_field_map'; import { Dataset } from '../../rule_registry/server'; -import { APMConfig, APMXPackConfig, APM_SERVER_FEATURE_ID } from '.'; -import { mergeConfigs } from './index'; +import { APMConfig, APM_SERVER_FEATURE_ID } from '.'; import { UI_SETTINGS } from '../../../../src/plugins/data/common'; import { APM_FEATURE, registerFeaturesUsage } from './feature'; import { registerApmAlerts } from './lib/alerts/register_apm_alerts'; @@ -73,29 +71,23 @@ export class APMPlugin plugins: Omit ) { this.logger = this.initContext.logger.get(); - const config$ = this.initContext.config.create(); - const mergedConfig$ = combineLatest(plugins.apmOss.config$, config$).pipe( - map(([apmOssConfig, apmConfig]) => mergeConfigs(apmOssConfig, apmConfig)) - ); + const config$ = this.initContext.config.create(); core.savedObjects.registerType(apmIndices); core.savedObjects.registerType(apmTelemetry); core.savedObjects.registerType(apmServerSettings); - const currentConfig = mergeConfigs( - plugins.apmOss.config, - this.initContext.config.get() - ); + const currentConfig = this.initContext.config.get(); this.currentConfig = currentConfig; if ( plugins.taskManager && plugins.usageCollection && - currentConfig['xpack.apm.telemetryCollectionEnabled'] + currentConfig.telemetryCollectionEnabled ) { createApmTelemetry({ core, - config$: mergedConfig$, + config$, usageCollector: plugins.usageCollection, taskManager: plugins.taskManager, logger: this.logger, @@ -156,7 +148,7 @@ export class APMPlugin const boundGetApmIndices = async () => getApmIndices({ savedObjectsClient: await getInternalSavedObjectsClient(core), - config: await mergedConfig$.pipe(take(1)).toPromise(), + config: await config$.pipe(take(1)).toPromise(), }); boundGetApmIndices().then((indices) => { @@ -193,7 +185,7 @@ export class APMPlugin ruleDataClient, alerting: plugins.alerting, ml: plugins.ml, - config$: mergedConfig$, + config$, logger: this.logger!.get('rule'), }); } @@ -231,7 +223,7 @@ export class APMPlugin }); return { - config$: mergedConfig$, + config$, getApmIndices: boundGetApmIndices, createApmEventClient: async ({ request, diff --git a/x-pack/plugins/apm/server/routes/fleet.ts b/x-pack/plugins/apm/server/routes/fleet.ts index d8097228df0dc..2884c08ceb9a1 100644 --- a/x-pack/plugins/apm/server/routes/fleet.ts +++ b/x-pack/plugins/apm/server/routes/fleet.ts @@ -129,8 +129,7 @@ const getMigrationCheckRoute = createApmServerRoute({ options: { tags: ['access:apm'] }, handler: async (resources) => { const { plugins, context, config, request } = resources; - const cloudApmMigrationEnabled = - config['xpack.apm.agent.migrations.enabled']; + const cloudApmMigrationEnabled = config.agent.migrations.enabled; if (!plugins.fleet || !plugins.security) { throw Boom.internal(FLEET_SECURITY_REQUIRED_MESSAGE); } @@ -158,8 +157,7 @@ const createCloudApmPackagePolicyRoute = createApmServerRoute({ options: { tags: ['access:apm', 'access:apm_write'] }, handler: async (resources) => { const { plugins, context, config, request, logger } = resources; - const cloudApmMigrationEnabled = - config['xpack.apm.agent.migrations.enabled']; + const cloudApmMigrationEnabled = config.agent.migrations.enabled; if (!plugins.fleet || !plugins.security) { throw Boom.internal(FLEET_SECURITY_REQUIRED_MESSAGE); } diff --git a/x-pack/plugins/apm/server/routes/observability_overview.ts b/x-pack/plugins/apm/server/routes/observability_overview.ts index a99291ff32bb6..0dbebd061e8be 100644 --- a/x-pack/plugins/apm/server/routes/observability_overview.ts +++ b/x-pack/plugins/apm/server/routes/observability_overview.ts @@ -6,6 +6,7 @@ */ import * as t from 'io-ts'; +import { toNumberRt } from '@kbn/io-ts-utils'; import { setupRequest } from '../lib/helpers/setup_request'; import { getServiceCount } from '../lib/observability_overview/get_service_count'; import { getTransactionsPerMinute } from '../lib/observability_overview/get_transactions_per_minute'; @@ -28,12 +29,15 @@ const observabilityOverviewHasDataRoute = createApmServerRoute({ const observabilityOverviewRoute = createApmServerRoute({ endpoint: 'GET /internal/apm/observability_overview', params: t.type({ - query: t.intersection([rangeRt, t.type({ bucketSize: t.string })]), + query: t.intersection([ + rangeRt, + t.type({ bucketSize: toNumberRt, intervalString: t.string }), + ]), }), options: { tags: ['access:apm'] }, handler: async (resources) => { const setup = await setupRequest(resources); - const { bucketSize, start, end } = resources.params.query; + const { bucketSize, intervalString, start, end } = resources.params.query; const searchAggregatedTransactions = await getSearchAggregatedTransactions({ apmEventClient: setup.apmEventClient, @@ -57,6 +61,7 @@ const observabilityOverviewRoute = createApmServerRoute({ searchAggregatedTransactions, start, end, + intervalString, }), ]); return { serviceCount, transactionPerMinute }; diff --git a/x-pack/plugins/apm/server/routes/service_map.ts b/x-pack/plugins/apm/server/routes/service_map.ts index f9062ac13e049..17fb9d7c98c5f 100644 --- a/x-pack/plugins/apm/server/routes/service_map.ts +++ b/x-pack/plugins/apm/server/routes/service_map.ts @@ -33,7 +33,7 @@ const serviceMapRoute = createApmServerRoute({ options: { tags: ['access:apm'] }, handler: async (resources) => { const { config, context, params, logger } = resources; - if (!config['xpack.apm.serviceMapEnabled']) { + if (!config.serviceMapEnabled) { throw Boom.notFound(); } if (!isActivePlatinumLicense(context.licensing.license)) { @@ -81,7 +81,7 @@ const serviceMapServiceNodeRoute = createApmServerRoute({ handler: async (resources) => { const { config, context, params } = resources; - if (!config['xpack.apm.serviceMapEnabled']) { + if (!config.serviceMapEnabled) { throw Boom.notFound(); } if (!isActivePlatinumLicense(context.licensing.license)) { @@ -125,7 +125,7 @@ const serviceMapBackendNodeRoute = createApmServerRoute({ handler: async (resources) => { const { config, context, params } = resources; - if (!config['xpack.apm.serviceMapEnabled']) { + if (!config.serviceMapEnabled) { throw Boom.notFound(); } if (!isActivePlatinumLicense(context.licensing.license)) { diff --git a/x-pack/plugins/apm/server/routes/services.ts b/x-pack/plugins/apm/server/routes/services.ts index d4af7315b9c23..f1f29dc2f036c 100644 --- a/x-pack/plugins/apm/server/routes/services.ts +++ b/x-pack/plugins/apm/server/routes/services.ts @@ -12,7 +12,6 @@ import { uniq } from 'lodash'; import { latencyAggregationTypeRt } from '../../common/latency_aggregation_types'; import { ProfilingValueType } from '../../common/profiling'; import { getSearchAggregatedTransactions } from '../lib/helpers/aggregated_transactions'; -import { getThroughputUnit } from '../lib/helpers/calculate_throughput'; import { setupRequest } from '../lib/helpers/setup_request'; import { getServiceAnnotations } from '../lib/services/annotations'; import { getServices } from '../lib/services/get_services'; @@ -515,8 +514,6 @@ const serviceThroughputRoute = createApmServerRoute({ searchAggregatedTransactions, }); - const throughputUnit = getThroughputUnit(bucketSize); - const commonProps = { environment, kuery, @@ -525,8 +522,8 @@ const serviceThroughputRoute = createApmServerRoute({ setup, transactionType, transactionName, - throughputUnit, intervalString, + bucketSize, }; const [currentPeriod, previousPeriod] = await Promise.all([ @@ -550,7 +547,6 @@ const serviceThroughputRoute = createApmServerRoute({ currentPeriodTimeseries: currentPeriod, previousPeriodTimeseries: previousPeriod, }), - throughputUnit, }; }, }); diff --git a/x-pack/plugins/apm/server/routes/settings/apm_indices.ts b/x-pack/plugins/apm/server/routes/settings/apm_indices.ts index 1cba5f972c27e..156f4d1af0bb2 100644 --- a/x-pack/plugins/apm/server/routes/settings/apm_indices.ts +++ b/x-pack/plugins/apm/server/routes/settings/apm_indices.ts @@ -13,6 +13,7 @@ import { getApmIndexSettings, } from '../../lib/settings/apm_indices/get_apm_indices'; import { saveApmIndices } from '../../lib/settings/apm_indices/save_apm_indices'; +import { APMConfig } from '../..'; // get list of apm indices and values const apmIndexSettingsRoute = createApmServerRoute({ @@ -37,6 +38,10 @@ const apmIndicesRoute = createApmServerRoute({ }, }); +type SaveApmIndicesBodySchema = { + [Property in keyof APMConfig['indices']]: t.StringC; +}; + // save ui indices const saveApmIndicesRoute = createApmServerRoute({ endpoint: 'POST /internal/apm/settings/apm-indices/save', @@ -45,15 +50,13 @@ const saveApmIndicesRoute = createApmServerRoute({ }, params: t.type({ body: t.partial({ - /* eslint-disable @typescript-eslint/naming-convention */ - 'apm_oss.sourcemapIndices': t.string, - 'apm_oss.errorIndices': t.string, - 'apm_oss.onboardingIndices': t.string, - 'apm_oss.spanIndices': t.string, - 'apm_oss.transactionIndices': t.string, - 'apm_oss.metricsIndices': t.string, - /* eslint-enable @typescript-eslint/naming-convention */ - }), + sourcemap: t.string, + error: t.string, + onboarding: t.string, + span: t.string, + transaction: t.string, + metric: t.string, + } as SaveApmIndicesBodySchema), }), handler: async (resources) => { const { params, context } = resources; diff --git a/x-pack/plugins/apm/server/saved_objects/apm_indices.ts b/x-pack/plugins/apm/server/saved_objects/apm_indices.ts index df5267023ae89..4aa6c4953056a 100644 --- a/x-pack/plugins/apm/server/saved_objects/apm_indices.ts +++ b/x-pack/plugins/apm/server/saved_objects/apm_indices.ts @@ -7,34 +7,24 @@ import { SavedObjectsType } from 'src/core/server'; import { i18n } from '@kbn/i18n'; +import { updateApmOssIndexPaths } from './migrations/update_apm_oss_index_paths'; +import { ApmIndicesConfigName } from '..'; + +const properties: { [Property in ApmIndicesConfigName]: { type: 'keyword' } } = + { + sourcemap: { type: 'keyword' }, + error: { type: 'keyword' }, + onboarding: { type: 'keyword' }, + span: { type: 'keyword' }, + transaction: { type: 'keyword' }, + metric: { type: 'keyword' }, + }; export const apmIndices: SavedObjectsType = { name: 'apm-indices', hidden: false, namespaceType: 'agnostic', - mappings: { - properties: { - /* eslint-disable @typescript-eslint/naming-convention */ - 'apm_oss.sourcemapIndices': { - type: 'keyword', - }, - 'apm_oss.errorIndices': { - type: 'keyword', - }, - 'apm_oss.onboardingIndices': { - type: 'keyword', - }, - 'apm_oss.spanIndices': { - type: 'keyword', - }, - 'apm_oss.transactionIndices': { - type: 'keyword', - }, - 'apm_oss.metricsIndices': { - type: 'keyword', - }, - }, - }, + mappings: { properties }, management: { importableAndExportable: true, icon: 'apmApp', @@ -43,4 +33,10 @@ export const apmIndices: SavedObjectsType = { defaultMessage: 'APM Settings - Index', }), }, + migrations: { + '7.16.0': (doc) => { + const attributes = updateApmOssIndexPaths(doc.attributes); + return { ...doc, attributes }; + }, + }, }; diff --git a/x-pack/plugins/apm/server/saved_objects/migrations/update_apm_oss_index_paths.ts b/x-pack/plugins/apm/server/saved_objects/migrations/update_apm_oss_index_paths.ts new file mode 100644 index 0000000000000..72ba40db0ce05 --- /dev/null +++ b/x-pack/plugins/apm/server/saved_objects/migrations/update_apm_oss_index_paths.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. + */ + +const apmIndexConfigs = [ + ['sourcemap', 'apm_oss.sourcemapIndices'], + ['error', 'apm_oss.errorIndices'], + ['onboarding', 'apm_oss.onboardingIndices'], + ['span', 'apm_oss.spanIndices'], + ['transaction', 'apm_oss.transactionIndices'], + ['metric', 'apm_oss.metricsIndices'], +] as const; + +type ApmIndexConfigs = typeof apmIndexConfigs[number][0]; +type ApmIndicesSavedObjectAttributes = Partial<{ + [Property in ApmIndexConfigs]: string; +}>; +type DeprecatedApmIndexConfigPaths = typeof apmIndexConfigs[number][1]; +type DeprecatedApmIndicesSavedObjectAttributes = Partial<{ + [Property in DeprecatedApmIndexConfigPaths]: string; +}>; + +export function updateApmOssIndexPaths( + attributes: DeprecatedApmIndicesSavedObjectAttributes +) { + return apmIndexConfigs.reduce((attrs, [configPath, deprecatedConfigPath]) => { + const indexConfig: string | undefined = attributes[deprecatedConfigPath]; + if (indexConfig) { + attrs[configPath] = indexConfig; + } + return attrs; + }, {} as ApmIndicesSavedObjectAttributes); +} diff --git a/x-pack/plugins/apm/server/tutorial/envs/on_prem.ts b/x-pack/plugins/apm/server/tutorial/envs/on_prem.ts index acc0ce69e0e4e..ba99b0624c441 100644 --- a/x-pack/plugins/apm/server/tutorial/envs/on_prem.ts +++ b/x-pack/plugins/apm/server/tutorial/envs/on_prem.ts @@ -37,13 +37,7 @@ export function onPremInstructions({ apmConfig, isFleetPluginEnabled, }: { - apmConfig: Pick< - APMConfig, - | 'apm_oss.errorIndices' - | 'apm_oss.transactionIndices' - | 'apm_oss.metricsIndices' - | 'apm_oss.onboardingIndices' - >; + apmConfig: APMConfig; isFleetPluginEnabled: boolean; }): InstructionsSchema { const EDIT_CONFIG = createEditConfig(); @@ -149,7 +143,7 @@ export function onPremInstructions({ } ), esHitsCheck: { - index: apmConfig['apm_oss.onboardingIndices'], + index: apmConfig.indices.onboarding, query: { bool: { filter: [ @@ -242,9 +236,9 @@ export function onPremInstructions({ ), esHitsCheck: { index: [ - apmConfig['apm_oss.errorIndices'], - apmConfig['apm_oss.transactionIndices'], - apmConfig['apm_oss.metricsIndices'], + apmConfig.indices.error, + apmConfig.indices.transaction, + apmConfig.indices.metric, ], query: { bool: { diff --git a/x-pack/plugins/apm/server/tutorial/index.ts b/x-pack/plugins/apm/server/tutorial/index.ts index 66e6ffaed95a8..5caf2b4372483 100644 --- a/x-pack/plugins/apm/server/tutorial/index.ts +++ b/x-pack/plugins/apm/server/tutorial/index.ts @@ -67,7 +67,7 @@ export const tutorialProvider = ], }; - if (apmConfig['xpack.apm.ui.enabled']) { + if (apmConfig.ui.enabled) { // @ts-expect-error artifacts.application is readonly artifacts.application = { path: '/app/apm', diff --git a/x-pack/plugins/apm/server/types.ts b/x-pack/plugins/apm/server/types.ts index 325891d8c1d33..c686c42beb6ef 100644 --- a/x-pack/plugins/apm/server/types.ts +++ b/x-pack/plugins/apm/server/types.ts @@ -16,7 +16,6 @@ import { PluginStart as DataPluginStart, } from '../../../../src/plugins/data/server'; import { SpacesPluginSetup, SpacesPluginStart } from '../../spaces/server'; -import { APMOSSPluginSetup } from '../../../../src/plugins/apm_oss/server'; import { HomeServerPluginSetup, HomeServerPluginStart, @@ -71,10 +70,6 @@ interface DependencyMap { setup: SpacesPluginSetup; start: SpacesPluginStart; }; - apmOss: { - setup: APMOSSPluginSetup; - start: undefined; - }; home: { setup: HomeServerPluginSetup; start: HomeServerPluginStart; @@ -135,7 +130,6 @@ interface DependencyMap { const requiredDependencies = [ 'features', - 'apmOss', 'data', 'licensing', 'triggersActionsUi', diff --git a/x-pack/plugins/apm/server/utils/test_helpers.tsx b/x-pack/plugins/apm/server/utils/test_helpers.tsx index 7b6b549e07c8d..5cf5016aec2e9 100644 --- a/x-pack/plugins/apm/server/utils/test_helpers.tsx +++ b/x-pack/plugins/apm/server/utils/test_helpers.tsx @@ -12,6 +12,7 @@ import { ESSearchResponse, } from '../../../../../src/core/types/elasticsearch'; import { UxUIFilters } from '../../typings/ui_filters'; +import { ApmIndicesConfig } from '../lib/settings/apm_indices/get_apm_indices'; interface Options { mockResponse?: ( @@ -26,18 +27,7 @@ interface MockSetup { internalClient: any; config: APMConfig; uiFilters: UxUIFilters; - indices: { - /* eslint-disable @typescript-eslint/naming-convention */ - 'apm_oss.sourcemapIndices': string; - 'apm_oss.errorIndices': string; - 'apm_oss.onboardingIndices': string; - 'apm_oss.spanIndices': string; - 'apm_oss.transactionIndices': string; - 'apm_oss.metricsIndices': string; - /* eslint-enable @typescript-eslint/naming-convention */ - apmAgentConfigurationIndex: string; - apmCustomLinkIndex: string; - }; + indices: ApmIndicesConfig; } export async function inspectSearchParams( @@ -61,6 +51,16 @@ export async function inspectSearchParams( let response; let error; + const mockApmIndices: { + [Property in keyof APMConfig['indices']]: string; + } = { + sourcemap: 'myIndex', + error: 'myIndex', + onboarding: 'myIndex', + span: 'myIndex', + transaction: 'myIndex', + metric: 'myIndex', + }; const mockSetup = { apmEventClient: { search: spy } as any, internalClient: { search: spy } as any, @@ -76,8 +76,15 @@ export async function inspectSearchParams( switch (key) { default: return 'myIndex'; - - case 'xpack.apm.metricsInterval': + case 'indices': + return mockApmIndices; + case 'ui': + return { + enabled: true, + transactionGroupBucketSize: 1000, + maxTraceItems: 1000, + }; + case 'metricsInterval': return 30; } }, @@ -85,14 +92,7 @@ export async function inspectSearchParams( ) as APMConfig, uiFilters: options?.uiFilters ?? {}, indices: { - /* eslint-disable @typescript-eslint/naming-convention */ - 'apm_oss.sourcemapIndices': 'myIndex', - 'apm_oss.errorIndices': 'myIndex', - 'apm_oss.onboardingIndices': 'myIndex', - 'apm_oss.spanIndices': 'myIndex', - 'apm_oss.transactionIndices': 'myIndex', - 'apm_oss.metricsIndices': 'myIndex', - /* eslint-enable @typescript-eslint/naming-convention */ + ...mockApmIndices, apmAgentConfigurationIndex: 'myIndex', apmCustomLinkIndex: 'myIndex', }, diff --git a/x-pack/plugins/apm/tsconfig.json b/x-pack/plugins/apm/tsconfig.json index c1030d2a4be1d..5db20725dd785 100644 --- a/x-pack/plugins/apm/tsconfig.json +++ b/x-pack/plugins/apm/tsconfig.json @@ -19,7 +19,6 @@ ], "references": [ { "path": "../../../src/core/tsconfig.json" }, - { "path": "../../../src/plugins/apm_oss/tsconfig.json" }, { "path": "../../../src/plugins/data/tsconfig.json" }, { "path": "../../../src/plugins/embeddable/tsconfig.json" }, { "path": "../../../src/plugins/home/tsconfig.json" }, diff --git a/x-pack/plugins/apm/typings/common.d.ts b/x-pack/plugins/apm/typings/common.d.ts index b94eb6cd97b06..a3af717b5949b 100644 --- a/x-pack/plugins/apm/typings/common.d.ts +++ b/x-pack/plugins/apm/typings/common.d.ts @@ -27,3 +27,11 @@ type AllowUnknownObjectProperties = T extends object export type PromiseValueType> = UnwrapPromise; export type Maybe = T | null | undefined; + +export type RecursivePartial = { + [P in keyof T]?: T[P] extends Array + ? Array> + : T[P] extends object + ? RecursivePartial + : T[P]; +}; diff --git a/x-pack/plugins/banners/server/config.ts b/x-pack/plugins/banners/server/config.ts index 37b4c57fc2ce1..18c6dc7c04687 100644 --- a/x-pack/plugins/banners/server/config.ts +++ b/x-pack/plugins/banners/server/config.ts @@ -44,6 +44,8 @@ export const config: PluginConfigDescriptor = { const pluginConfig = get(rootConfig, fromPath); if (pluginConfig?.placement === 'header') { addDeprecation({ + configPath: 'xpack.banners.placement', + level: 'critical', message: 'The `header` value for xpack.banners.placement has been replaced by `top`', correctiveActions: { manualSteps: [ diff --git a/x-pack/plugins/canvas/types/state.ts b/x-pack/plugins/canvas/types/state.ts index 30ded5f2a9c7e..a3c770f12f225 100644 --- a/x-pack/plugins/canvas/types/state.ts +++ b/x-pack/plugins/canvas/types/state.ts @@ -7,10 +7,10 @@ import { KibanaContext } from 'src/plugins/data/common'; import { + AnyExpressionFunctionDefinition, Datatable, ExpressionValueFilter, ExpressionImage, - ExpressionFunction, PointSeries, Render, Style, @@ -34,7 +34,7 @@ export interface AppState { interface StoreAppState { basePath: string; - serverFunctions: ExpressionFunction[]; + serverFunctions: AnyExpressionFunctionDefinition[]; ready: boolean; } diff --git a/x-pack/plugins/data_visualizer/common/constants.ts b/x-pack/plugins/data_visualizer/common/constants.ts index f7bea807c3e61..5a3a1d8f2e5bf 100644 --- a/x-pack/plugins/data_visualizer/common/constants.ts +++ b/x-pack/plugins/data_visualizer/common/constants.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { i18n } from '@kbn/i18n'; import { KBN_FIELD_TYPES } from '../../../../src/plugins/data/common'; export const UI_SETTING_MAX_FILE_SIZE = 'fileUpload:maxFileSize'; @@ -39,3 +40,13 @@ export const NON_AGGREGATABLE_FIELD_TYPES = new Set([ KBN_FIELD_TYPES.GEO_SHAPE, KBN_FIELD_TYPES.HISTOGRAM, ]); + +export const FILE_DATA_VIS_TAB_ID = 'fileDataViz'; +export const applicationPath = `/app/home#/tutorial_directory/${FILE_DATA_VIS_TAB_ID}`; +export const featureTitle = i18n.translate('xpack.dataVisualizer.title', { + defaultMessage: 'Upload a file', +}); +export const featureDescription = i18n.translate('xpack.dataVisualizer.description', { + defaultMessage: 'Import your own CSV, NDJSON, or log file.', +}); +export const featureId = `file_data_visualizer`; diff --git a/x-pack/plugins/data_visualizer/kibana.json b/x-pack/plugins/data_visualizer/kibana.json index e7f2d71313abf..e63a6b4fa2100 100644 --- a/x-pack/plugins/data_visualizer/kibana.json +++ b/x-pack/plugins/data_visualizer/kibana.json @@ -17,7 +17,8 @@ "maps", "home", "lens", - "indexPatternFieldEditor" + "indexPatternFieldEditor", + "customIntegrations" ], "requiredBundles": [ "home", diff --git a/x-pack/plugins/data_visualizer/public/register_home.ts b/x-pack/plugins/data_visualizer/public/register_home.ts index 3e8973784433c..4f4601ae76977 100644 --- a/x-pack/plugins/data_visualizer/public/register_home.ts +++ b/x-pack/plugins/data_visualizer/public/register_home.ts @@ -9,8 +9,13 @@ import { i18n } from '@kbn/i18n'; import type { HomePublicPluginSetup } from '../../../../src/plugins/home/public'; import { FeatureCatalogueCategory } from '../../../../src/plugins/home/public'; import { FileDataVisualizerWrapper } from './lazy_load_bundle/component_wrapper'; - -const FILE_DATA_VIS_TAB_ID = 'fileDataViz'; +import { + featureDescription, + featureTitle, + FILE_DATA_VIS_TAB_ID, + applicationPath, + featureId, +} from '../common'; export function registerHomeAddData(home: HomePublicPluginSetup) { home.addData.registerAddDataTab({ @@ -24,15 +29,11 @@ export function registerHomeAddData(home: HomePublicPluginSetup) { export function registerHomeFeatureCatalogue(home: HomePublicPluginSetup) { home.featureCatalogue.register({ - id: `file_data_visualizer`, - title: i18n.translate('xpack.dataVisualizer.title', { - defaultMessage: 'Upload a file', - }), - description: i18n.translate('xpack.dataVisualizer.description', { - defaultMessage: 'Import your own CSV, NDJSON, or log file.', - }), + id: featureId, + title: featureTitle, + description: featureDescription, icon: 'document', - path: `/app/home#/tutorial_directory/${FILE_DATA_VIS_TAB_ID}`, + path: applicationPath, showOnHomePage: true, category: FeatureCatalogueCategory.DATA, order: 520, diff --git a/x-pack/plugins/data_visualizer/server/plugin.ts b/x-pack/plugins/data_visualizer/server/plugin.ts index 9db580959b116..e2e0637ef8f3f 100644 --- a/x-pack/plugins/data_visualizer/server/plugin.ts +++ b/x-pack/plugins/data_visualizer/server/plugin.ts @@ -8,12 +8,18 @@ import { CoreSetup, CoreStart, Plugin } from 'src/core/server'; import { StartDeps, SetupDeps } from './types'; import { dataVisualizerRoutes } from './routes'; +import { registerWithCustomIntegrations } from './register_custom_integration'; export class DataVisualizerPlugin implements Plugin { constructor() {} setup(coreSetup: CoreSetup, plugins: SetupDeps) { dataVisualizerRoutes(coreSetup); + + // home-plugin required + if (plugins.home && plugins.customIntegrations) { + registerWithCustomIntegrations(plugins.customIntegrations); + } } start(core: CoreStart) {} diff --git a/x-pack/plugins/data_visualizer/server/register_custom_integration.ts b/x-pack/plugins/data_visualizer/server/register_custom_integration.ts new file mode 100644 index 0000000000000..86aa3cd96d613 --- /dev/null +++ b/x-pack/plugins/data_visualizer/server/register_custom_integration.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 { CustomIntegrationsPluginSetup } from '../../../../src/plugins/custom_integrations/server'; +import { applicationPath, featureDescription, featureId, featureTitle } from '../common'; + +export function registerWithCustomIntegrations(customIntegrations: CustomIntegrationsPluginSetup) { + customIntegrations.registerCustomIntegration({ + id: featureId, + title: featureTitle, + description: featureDescription, + uiInternalPath: applicationPath, + isBeta: false, + icons: [ + { + type: 'eui', + src: 'addDataApp', + }, + ], + categories: ['upload_file'], + shipper: 'other', + }); +} diff --git a/x-pack/plugins/data_visualizer/server/types/deps.ts b/x-pack/plugins/data_visualizer/server/types/deps.ts index fe982b1fa5e1a..1f6dba0592f6f 100644 --- a/x-pack/plugins/data_visualizer/server/types/deps.ts +++ b/x-pack/plugins/data_visualizer/server/types/deps.ts @@ -7,10 +7,14 @@ import type { SecurityPluginStart } from '../../../security/server'; import type { UsageCollectionSetup } from '../../../../../src/plugins/usage_collection/server'; +import { CustomIntegrationsPluginSetup } from '../../../../../src/plugins/custom_integrations/server'; +import { HomeServerPluginSetup } from '../../../../../src/plugins/home/server'; export interface StartDeps { security?: SecurityPluginStart; } export interface SetupDeps { usageCollection: UsageCollectionSetup; + customIntegrations?: CustomIntegrationsPluginSetup; + home?: HomeServerPluginSetup; } diff --git a/x-pack/plugins/data_visualizer/tsconfig.json b/x-pack/plugins/data_visualizer/tsconfig.json index ee5f894305d5a..3b424ef8b9f65 100644 --- a/x-pack/plugins/data_visualizer/tsconfig.json +++ b/x-pack/plugins/data_visualizer/tsconfig.json @@ -11,6 +11,7 @@ { "path": "../../../src/core/tsconfig.json" }, { "path": "../../../src/plugins/data/tsconfig.json" }, { "path": "../../../src/plugins/usage_collection/tsconfig.json" }, + { "path": "../../../src/plugins/custom_integrations/tsconfig.json" }, { "path": "../security/tsconfig.json" }, { "path": "../file_upload/tsconfig.json" }, { "path": "../lens/tsconfig.json" }, diff --git a/x-pack/plugins/enterprise_search/kibana.json b/x-pack/plugins/enterprise_search/kibana.json index 5f33fa27c6640..7a844acfa9740 100644 --- a/x-pack/plugins/enterprise_search/kibana.json +++ b/x-pack/plugins/enterprise_search/kibana.json @@ -4,7 +4,7 @@ "kibanaVersion": "kibana", "requiredPlugins": ["features", "spaces", "licensing", "data", "charts", "infra"], "configPath": ["enterpriseSearch"], - "optionalPlugins": ["usageCollection", "security", "home", "cloud"], + "optionalPlugins": ["usageCollection", "security", "home", "cloud", "customIntegrations"], "server": true, "ui": true, "requiredBundles": ["home", "kibanaReact"], diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/components/crawl_rules_table.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/components/crawl_rules_table.tsx index d8d5d9d10b3b7..df7ea80779acf 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/components/crawl_rules_table.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/components/crawl_rules_table.tsx @@ -9,7 +9,16 @@ import React from 'react'; import { useActions } from 'kea'; -import { EuiCode, EuiFieldText, EuiLink, EuiSelect, EuiText } from '@elastic/eui'; +import { + EuiCode, + EuiFieldText, + EuiFlexGroup, + EuiFlexItem, + EuiIconTip, + EuiLink, + EuiSelect, + EuiText, +} from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; @@ -27,6 +36,7 @@ import { getReadableCrawlerPolicy, getReadableCrawlerRule, } from '../types'; +import { getCrawlRulePathPatternTooltip } from '../utils'; interface CrawlRulesTableProps { description?: React.ReactNode; @@ -130,13 +140,24 @@ export const CrawlRulesTable: React.FC = ({ }, { editingRender: (crawlRule, onChange, { isInvalid, isLoading }) => ( - onChange(e.target.value)} - disabled={isLoading} - isInvalid={isInvalid} - /> + + + onChange(e.target.value)} + disabled={isLoading} + isInvalid={isInvalid} + /> + + + + + ), render: (crawlRule) => {(crawlRule as CrawlRule).pattern}, name: i18n.translate( diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/utils.test.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/utils.test.ts index fc810ba8fd7cb..0fc608ac6f5e4 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/utils.test.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/utils.test.ts @@ -26,6 +26,7 @@ import { crawlRequestServerToClient, getDeleteDomainConfirmationMessage, getDeleteDomainSuccessMessage, + getCrawlRulePathPatternTooltip, } from './utils'; const DEFAULT_CRAWL_RULE: CrawlRule = { @@ -292,3 +293,28 @@ describe('getDeleteDomainSuccessMessage', () => { expect(getDeleteDomainSuccessMessage('https://elastic.co/')).toContain('https://elastic.co'); }); }); + +describe('getCrawlRulePathPatternTooltip', () => { + it('includes regular expression', () => { + const crawlRule: CrawlRule = { + id: '-', + policy: CrawlerPolicies.allow, + rule: CrawlerRules.regex, + pattern: '.*', + }; + + expect(getCrawlRulePathPatternTooltip(crawlRule)).toContain('regular expression'); + }); + + it('includes meta', () => { + const crawlRule: CrawlRule = { + id: '-', + policy: CrawlerPolicies.allow, + rule: CrawlerRules.beginsWith, + pattern: '/elastic', + }; + + expect(getCrawlRulePathPatternTooltip(crawlRule)).not.toContain('regular expression'); + expect(getCrawlRulePathPatternTooltip(crawlRule)).toContain('meta'); + }); +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/utils.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/utils.ts index 9c94040355d47..817f10b70dca5 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/utils.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/utils.ts @@ -16,6 +16,8 @@ import { CrawlerDomainValidationStep, CrawlRequestFromServer, CrawlRequest, + CrawlRule, + CrawlerRules, CrawlEventFromServer, CrawlEvent, } from './types'; @@ -159,3 +161,23 @@ export const getDeleteDomainSuccessMessage = (domainUrl: string) => { } ); }; + +export const getCrawlRulePathPatternTooltip = (crawlRule: CrawlRule) => { + if (crawlRule.rule === CrawlerRules.regex) { + return i18n.translate( + 'xpack.enterpriseSearch.appSearch.crawler.crawlRulesTable.regexPathPatternTooltip', + { + defaultMessage: + 'The path pattern is a regular expression compatible with the Ruby language regular expression engine.', + } + ); + } + + return i18n.translate( + 'xpack.enterpriseSearch.appSearch.crawler.crawlRulesTable.pathPatternTooltip', + { + defaultMessage: + 'The path pattern is a literal string except for the asterisk (*) character, which is a meta character that will match anything.', + } + ); +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/curations_logic.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/curations_logic.ts index e623379e58d3f..04d04b297050a 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/curations_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/curations_logic.ts @@ -23,7 +23,7 @@ import { EngineLogic, generateEnginePath } from '../engine'; import { DELETE_CONFIRMATION_MESSAGE, DELETE_SUCCESS_MESSAGE } from './constants'; import { Curation, CurationsAPIResponse } from './types'; -type CurationsPageTabs = 'overview' | 'settings'; +type CurationsPageTabs = 'overview' | 'settings' | 'history'; interface CurationsValues { dataLoading: boolean; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curation_suggestion/curation_suggestion.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curation_suggestion/curation_suggestion.tsx index 8e1e6487197f9..7539055253732 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curation_suggestion/curation_suggestion.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curation_suggestion/curation_suggestion.tsx @@ -132,7 +132,7 @@ export const CurationSuggestion: React.FC = () => { result={result} isMetaEngine={isMetaEngine} schemaForTypeHighlights={engine.schema} - resultPosition={index + 1} + resultPosition={index + existingCurationResults.length + 1} /> ))} @@ -152,7 +152,7 @@ export const CurationSuggestion: React.FC = () => { result={result} isMetaEngine={isMetaEngine} schemaForTypeHighlights={engine.schema} - resultPosition={index + 1} + resultPosition={index + suggestedPromotedDocuments.length + 1} /> ))} diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations.test.tsx index 7e357cae4343c..f7e9f5437fc3f 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations.test.tsx @@ -19,6 +19,7 @@ import { EuiTab } from '@elastic/eui'; import { getPageHeaderTabs, getPageTitle } from '../../../../test_helpers'; import { Curations } from './curations'; +import { CurationsHistory } from './curations_history/curations_history'; import { CurationsOverview } from './curations_overview'; import { CurationsSettings } from './curations_settings'; @@ -70,7 +71,10 @@ describe('Curations', () => { expect(actions.onSelectPageTab).toHaveBeenNthCalledWith(1, 'overview'); tabs.at(1).simulate('click'); - expect(actions.onSelectPageTab).toHaveBeenNthCalledWith(2, 'settings'); + expect(actions.onSelectPageTab).toHaveBeenNthCalledWith(2, 'history'); + + tabs.at(2).simulate('click'); + expect(actions.onSelectPageTab).toHaveBeenNthCalledWith(3, 'settings'); }); it('renders an overview view', () => { @@ -83,12 +87,22 @@ describe('Curations', () => { expect(wrapper.find(CurationsOverview)).toHaveLength(1); }); + it('renders a history view', () => { + setMockValues({ ...values, selectedPageTab: 'history' }); + const wrapper = shallow(); + const tabs = getPageHeaderTabs(wrapper).find(EuiTab); + + expect(tabs.at(1).prop('isSelected')).toEqual(true); + + expect(wrapper.find(CurationsHistory)).toHaveLength(1); + }); + it('renders a settings view', () => { setMockValues({ ...values, selectedPageTab: 'settings' }); const wrapper = shallow(); const tabs = getPageHeaderTabs(wrapper).find(EuiTab); - expect(tabs.at(1).prop('isSelected')).toEqual(true); + expect(tabs.at(2).prop('isSelected')).toEqual(true); expect(wrapper.find(CurationsSettings)).toHaveLength(1); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations.tsx index 9584b21424fe3..c55fde7626488 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations.tsx @@ -21,6 +21,7 @@ import { CURATIONS_OVERVIEW_TITLE, CREATE_NEW_CURATION_TITLE } from '../constant import { CurationsLogic } from '../curations_logic'; import { getCurationsBreadcrumbs } from '../utils'; +import { CurationsHistory } from './curations_history/curations_history'; import { CurationsOverview } from './curations_overview'; import { CurationsSettings } from './curations_settings'; @@ -39,6 +40,16 @@ export const Curations: React.FC = () => { isSelected: selectedPageTab === 'overview', onClick: () => onSelectPageTab('overview'), }, + { + label: i18n.translate( + 'xpack.enterpriseSearch.appSearch.engine.curations.historyPageTabLabel', + { + defaultMessage: 'History', + } + ), + isSelected: selectedPageTab === 'history', + onClick: () => onSelectPageTab('history'), + }, { label: i18n.translate( 'xpack.enterpriseSearch.appSearch.engine.curations.settingsPageTabLabel', @@ -74,6 +85,7 @@ export const Curations: React.FC = () => { isLoading={dataLoading && !curations.length} > {selectedPageTab === 'overview' && } + {selectedPageTab === 'history' && } {selectedPageTab === 'settings' && } ); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/components/curation_changes_panel.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/components/curation_changes_panel.test.tsx new file mode 100644 index 0000000000000..7fc06beaa86a9 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/components/curation_changes_panel.test.tsx @@ -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 React from 'react'; + +import { shallow } from 'enzyme'; + +import { DataPanel } from '../../../../data_panel'; + +import { CurationChangesPanel } from './curation_changes_panel'; + +describe('CurationChangesPanel', () => { + it('renders', () => { + const wrapper = shallow(); + + expect(wrapper.is(DataPanel)).toBe(true); + }); +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/components/curation_changes_panel.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/components/curation_changes_panel.tsx new file mode 100644 index 0000000000000..0aaf20485966e --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/components/curation_changes_panel.tsx @@ -0,0 +1,23 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { DataPanel } from '../../../../data_panel'; + +export const CurationChangesPanel: React.FC = () => { + return ( + Automated curation changes} + subtitle={A detailed log of recent changes to your automated curations} + iconType="visTable" + hasBorder + > + Embedded logs view goes here... + + ); +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/components/ignored_suggestions_panel.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/components/ignored_suggestions_panel.test.tsx new file mode 100644 index 0000000000000..b09981748f19c --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/components/ignored_suggestions_panel.test.tsx @@ -0,0 +1,25 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { shallow } from 'enzyme'; + +import { EuiBasicTable } from '@elastic/eui'; + +import { DataPanel } from '../../../../data_panel'; + +import { IgnoredSuggestionsPanel } from './ignored_suggestions_panel'; + +describe('IgnoredSuggestionsPanel', () => { + it('renders', () => { + const wrapper = shallow(); + + expect(wrapper.is(DataPanel)).toBe(true); + expect(wrapper.find(EuiBasicTable)).toHaveLength(1); + }); +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/components/ignored_suggestions_panel.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/components/ignored_suggestions_panel.tsx new file mode 100644 index 0000000000000..f2fdfd55a7e5a --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/components/ignored_suggestions_panel.tsx @@ -0,0 +1,53 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { CustomItemAction, EuiBasicTable, EuiBasicTableColumn, EuiLink } from '@elastic/eui'; + +import { DataPanel } from '../../../../data_panel'; +import { CurationSuggestion } from '../../../types'; + +export const IgnoredSuggestionsPanel: React.FC = () => { + const ignoredSuggestions: CurationSuggestion[] = []; + + const allowSuggestion = (query: string) => alert(query); + + const actions: Array> = [ + { + render: (item: CurationSuggestion) => { + return ( + allowSuggestion(item.query)} color="primary"> + Allow + + ); + }, + }, + ]; + + const columns: Array> = [ + { + field: 'query', + name: 'Query', + sortable: true, + }, + { + actions, + }, + ]; + + return ( + Ignored queries} + subtitle={You won’t be notified about suggestions for these queries} + iconType="eyeClosed" + hasBorder + > + + + ); +}; diff --git a/x-pack/test/functional/apps/reporting/index.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/components/index.ts similarity index 53% rename from x-pack/test/functional/apps/reporting/index.ts rename to x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/components/index.ts index 286693f01ac52..2e16d9bde8550 100644 --- a/x-pack/test/functional/apps/reporting/index.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/components/index.ts @@ -5,10 +5,6 @@ * 2.0. */ -import { FtrProviderContext } from '../../ftr_provider_context'; - -export default function ({ loadTestFile }: FtrProviderContext) { - describe('Reporting', function () { - loadTestFile(require.resolve('./reporting')); - }); -} +export { CurationChangesPanel } from './curation_changes_panel'; +export { IgnoredSuggestionsPanel } from './ignored_suggestions_panel'; +export { RejectedCurationsPanel } from './rejected_curations_panel'; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/components/rejected_curations_panel.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/components/rejected_curations_panel.test.tsx new file mode 100644 index 0000000000000..a40eb8895ad69 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/components/rejected_curations_panel.test.tsx @@ -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 React from 'react'; + +import { shallow } from 'enzyme'; + +import { DataPanel } from '../../../../data_panel'; + +import { RejectedCurationsPanel } from './rejected_curations_panel'; + +describe('RejectedCurationsPanel', () => { + it('renders', () => { + const wrapper = shallow(); + + expect(wrapper.is(DataPanel)).toBe(true); + }); +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/components/rejected_curations_panel.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/components/rejected_curations_panel.tsx new file mode 100644 index 0000000000000..51719b4eebbd7 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/components/rejected_curations_panel.tsx @@ -0,0 +1,23 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { DataPanel } from '../../../../data_panel'; + +export const RejectedCurationsPanel: React.FC = () => { + return ( + Rececntly rejected sugggestions} + subtitle={Recent suggestions that are still valid can be re-enabled from here} + iconType="crossInACircleFilled" + hasBorder + > + Embedded logs view goes here... + + ); +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/curations_history.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/curations_history.test.tsx new file mode 100644 index 0000000000000..1ebd4da694d54 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/curations_history.test.tsx @@ -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 React from 'react'; + +import { shallow } from 'enzyme'; + +import { + CurationChangesPanel, + IgnoredSuggestionsPanel, + RejectedCurationsPanel, +} from './components'; +import { CurationsHistory } from './curations_history'; + +describe('CurationsHistory', () => { + it('renders', () => { + const wrapper = shallow(); + + expect(wrapper.find(CurationChangesPanel)).toHaveLength(1); + expect(wrapper.find(RejectedCurationsPanel)).toHaveLength(1); + expect(wrapper.find(IgnoredSuggestionsPanel)).toHaveLength(1); + }); +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/curations_history.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/curations_history.tsx new file mode 100644 index 0000000000000..6db62820b1cdb --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/curations_history.tsx @@ -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 React from 'react'; + +import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; + +import { + CurationChangesPanel, + IgnoredSuggestionsPanel, + RejectedCurationsPanel, +} from './components'; + +export const CurationsHistory: React.FC = () => { + return ( + + + + + + + + + + + + + + + + ); +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/index.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/index.ts new file mode 100644 index 0000000000000..bddc156f7920e --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/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 { CurationsHistory } from './curations_history'; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/components/log_retention_callout.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/components/log_retention_callout.tsx index 1fd1a9a79b225..801ed296137c7 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/components/log_retention_callout.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/components/log_retention_callout.tsx @@ -19,12 +19,14 @@ import { AppLogic } from '../../../app_logic'; import { SETTINGS_PATH } from '../../../routes'; import { ANALYTICS_TITLE } from '../../analytics'; import { API_LOGS_TITLE } from '../../api_logs'; +import { CRAWLER_TITLE } from '../../crawler'; import { LogRetentionLogic, LogRetentionOptions, renderLogRetentionDate } from '../index'; const TITLE_MAP = { [LogRetentionOptions.Analytics]: ANALYTICS_TITLE, [LogRetentionOptions.API]: API_LOGS_TITLE, + [LogRetentionOptions.Crawler]: CRAWLER_TITLE, }; interface Props { diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/log_retention_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/log_retention_logic.test.ts index 251fd93069afe..20c5860160b78 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/log_retention_logic.test.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/log_retention_logic.test.ts @@ -33,6 +33,11 @@ describe('LogRetentionLogic', () => { enabled: true, retention_policy: { is_default: true, min_age_days: 180 }, }, + crawler: { + disabled_at: null, + enabled: true, + retention_policy: { is_default: true, min_age_days: 180 }, + }, }; const TYPICAL_CLIENT_LOG_RETENTION = { @@ -46,6 +51,11 @@ describe('LogRetentionLogic', () => { enabled: true, retentionPolicy: { isDefault: true, minAgeDays: 180 }, }, + crawler: { + disabledAt: null, + enabled: true, + retentionPolicy: { isDefault: true, minAgeDays: 180 }, + }, }; const DEFAULT_VALUES = { @@ -146,6 +156,11 @@ describe('LogRetentionLogic', () => { enabled: true, retentionPolicy: null, }, + crawler: { + disabledAt: null, + enabled: true, + retentionPolicy: null, + }, }); expect(LogRetentionLogic.values).toEqual({ @@ -161,6 +176,11 @@ describe('LogRetentionLogic', () => { enabled: true, retentionPolicy: null, }, + crawler: { + disabledAt: null, + enabled: true, + retentionPolicy: null, + }, }, }); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/constants.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/constants.tsx index c7c4d90d91ce8..e1e6820204d94 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/constants.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/constants.tsx @@ -37,6 +37,16 @@ const CAPITALIZATION_MAP = { { defaultMessage: 'API' } ), }, + [LogRetentionOptions.Crawler]: { + capitalized: i18n.translate( + 'xpack.enterpriseSearch.appSearch.logRetention.type.crawler.title.capitalized', + { defaultMessage: 'Web crawler' } + ), + lowercase: i18n.translate( + 'xpack.enterpriseSearch.appSearch.logRetention.type.crawler.title.lowercase', + { defaultMessage: 'web crawler' } + ), + }, }; interface Props { diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/types.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/types.ts index a03154b8c57c2..a2c615aee3a0e 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/types.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/types.ts @@ -8,11 +8,13 @@ export enum LogRetentionOptions { Analytics = 'analytics', API = 'api', + Crawler = 'crawler', } export interface LogRetention { [LogRetentionOptions.Analytics]: LogRetentionSettings; [LogRetentionOptions.API]: LogRetentionSettings; + [LogRetentionOptions.Crawler]: LogRetentionSettings; } export interface LogRetentionPolicy { @@ -29,6 +31,7 @@ export interface LogRetentionSettings { export interface LogRetentionServer { [LogRetentionOptions.Analytics]: LogRetentionServerSettings; [LogRetentionOptions.API]: LogRetentionServerSettings; + [LogRetentionOptions.Crawler]: LogRetentionServerSettings; } export interface LogRetentionServerPolicy { diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/utils/convert_log_retention.test.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/utils/convert_log_retention.test.ts index b67be6d435c2e..b6a5997209247 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/utils/convert_log_retention.test.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/utils/convert_log_retention.test.ts @@ -21,6 +21,11 @@ describe('convertLogRetentionFromServerToClient', () => { enabled: true, retention_policy: { is_default: true, min_age_days: 180 }, }, + crawler: { + disabled_at: null, + enabled: true, + retention_policy: { is_default: true, min_age_days: 180 }, + }, }) ).toEqual({ analytics: { @@ -33,6 +38,11 @@ describe('convertLogRetentionFromServerToClient', () => { enabled: true, retentionPolicy: { isDefault: true, minAgeDays: 180 }, }, + crawler: { + disabledAt: null, + enabled: true, + retentionPolicy: { isDefault: true, minAgeDays: 180 }, + }, }); }); @@ -49,6 +59,11 @@ describe('convertLogRetentionFromServerToClient', () => { enabled: true, retention_policy: { is_default: true, min_age_days: null }, }, + crawler: { + disabled_at: null, + enabled: true, + retention_policy: { is_default: true, min_age_days: null }, + }, }) ).toEqual({ analytics: { @@ -61,6 +76,11 @@ describe('convertLogRetentionFromServerToClient', () => { enabled: true, retentionPolicy: { isDefault: true, minAgeDays: null }, }, + crawler: { + disabledAt: null, + enabled: true, + retentionPolicy: { isDefault: true, minAgeDays: null }, + }, }); }); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/utils/convert_log_retention.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/utils/convert_log_retention.ts index cc8b84b667b68..fd2452d05f530 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/utils/convert_log_retention.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/utils/convert_log_retention.ts @@ -24,6 +24,9 @@ export const convertLogRetentionFromServerToClient = ( [LogRetentionOptions.API]: convertLogRetentionSettingsFromServerToClient( logRetention[LogRetentionOptions.API] ), + [LogRetentionOptions.Crawler]: convertLogRetentionSettingsFromServerToClient( + logRetention[LogRetentionOptions.Crawler] + ), }); const convertLogRetentionSettingsFromServerToClient = ({ diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_confirmation_modal.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_confirmation_modal.test.tsx index fc20a9dbc5519..d04b6613dc671 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_confirmation_modal.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_confirmation_modal.test.tsx @@ -39,6 +39,13 @@ describe('', () => { minAgeDays: 7, }, }, + crawler: { + enabled: true, + retentionPolicy: { + isDefault: true, + minAgeDays: 7, + }, + }, }, }; @@ -128,4 +135,42 @@ describe('', () => { expect(actions.closeModals).toHaveBeenCalled(); }); }); + + describe('crawler', () => { + it('renders the Crawler panel when openedModal is set to Crawler', () => { + setMockValues({ + ...values, + openedModal: LogRetentionOptions.Crawler, + }); + + const logRetentionPanel = shallow(); + expect( + logRetentionPanel.find('[data-test-subj="CrawlerLogRetentionConfirmationModal"]').length + ).toBe(1); + }); + + it('calls saveLogRetention on save when showing crawler', () => { + setMockValues({ + ...values, + openedModal: LogRetentionOptions.Crawler, + }); + + const logRetentionPanel = shallow(); + const genericConfirmationModal = logRetentionPanel.find(GenericConfirmationModal); + genericConfirmationModal.prop('onSave')(); + expect(actions.saveLogRetention).toHaveBeenCalledWith(LogRetentionOptions.Crawler, false); + }); + + it('calls closeModals on close', () => { + setMockValues({ + ...values, + openedModal: LogRetentionOptions.Crawler, + }); + + const logRetentionPanel = shallow(); + const genericConfirmationModal = logRetentionPanel.find(GenericConfirmationModal); + genericConfirmationModal.prop('onClose')(); + expect(actions.closeModals).toHaveBeenCalled(); + }); + }); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_confirmation_modal.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_confirmation_modal.tsx index 28d4257f2487c..694d41f11bbff 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_confirmation_modal.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_confirmation_modal.tsx @@ -133,6 +133,54 @@ export const LogRetentionConfirmationModal: React.FC = () => { onSave={() => saveLogRetention(LogRetentionOptions.API, false)} /> )} + + {openedModal === LogRetentionOptions.Crawler && ( + +

+ {i18n.translate( + 'xpack.enterpriseSearch.appSearch.settings.logRetention.modal.crawler.description', + { + defaultMessage: + 'When you disable writing, engines stop logging Web Crawler events. Your existing data is deleted according to the storage time frame.', + } + )} +

+

+ + {CANNOT_BE_RECOVERED_TEXT} + +

+ + } + target={DISABLE_TEXT} + onClose={closeModals} + onSave={() => saveLogRetention(LogRetentionOptions.Crawler, false)} + /> + )} ); }; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_panel.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_panel.test.tsx index 3f6bbe4307b57..0d096727d481c 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_panel.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_panel.test.tsx @@ -101,7 +101,7 @@ describe('', () => { ).toEqual(true); }); - it('enables both switches when isLogRetentionUpdating is false', () => { + it('enables all switches when isLogRetentionUpdating is false', () => { setMockValues({ isLogRetentionUpdating: false, logRetention: mockLogRetention({}), @@ -113,9 +113,12 @@ describe('', () => { expect( logRetentionPanel.find('[data-test-subj="LogRetentionPanelAPISwitch"]').prop('disabled') ).toEqual(false); + expect( + logRetentionPanel.find('[data-test-subj="LogRetentionPanelCrawlerSwitch"]').prop('disabled') + ).toEqual(false); }); - it('disables both switches when isLogRetentionUpdating is true', () => { + it('disables all switches when isLogRetentionUpdating is true', () => { setMockValues({ isLogRetentionUpdating: true, logRetention: mockLogRetention({}), @@ -128,6 +131,9 @@ describe('', () => { expect( logRetentionPanel.find('[data-test-subj="LogRetentionPanelAPISwitch"]').prop('disabled') ).toEqual(true); + expect( + logRetentionPanel.find('[data-test-subj="LogRetentionPanelCrawlerSwitch"]').prop('disabled') + ).toEqual(true); }); it('calls toggleLogRetention when analytics log retention option is changed', () => { @@ -150,7 +156,7 @@ describe('', () => { setMockValues({ isLogRetentionUpdating: false, logRetention: mockLogRetention({ - analytics: { + api: { enabled: false, }, }), @@ -159,6 +165,20 @@ describe('', () => { logRetentionPanel.find('[data-test-subj="LogRetentionPanelAPISwitch"]').simulate('change'); expect(actions.toggleLogRetention).toHaveBeenCalledWith('api'); }); + + it('calls toggleLogRetention when crawler log retention option is changed', () => { + setMockValues({ + isLogRetentionUpdating: false, + logRetention: mockLogRetention({ + crawler: { + enabled: false, + }, + }), + }); + const logRetentionPanel = shallow(); + logRetentionPanel.find('[data-test-subj="LogRetentionPanelCrawlerSwitch"]').simulate('change'); + expect(actions.toggleLogRetention).toHaveBeenCalledWith('crawler'); + }); }); const mockLogRetention = (logRetention: Partial) => { @@ -173,6 +193,11 @@ const mockLogRetention = (logRetention: Partial) => { enabled: true, retentionPolicy: { isDefault: true, minAgeDays: 180 }, }, + crawler: { + disabledAt: null, + enabled: true, + retentionPolicy: { isDefault: true, minAgeDays: 180 }, + }, }; return { @@ -184,5 +209,9 @@ const mockLogRetention = (logRetention: Partial) => { ...baseLogRetention.api, ...logRetention.api, }, + crawler: { + ...baseLogRetention.crawler, + ...logRetention.crawler, + }, }; }; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_panel.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_panel.tsx index 9012a30b950d6..22a3ea6473183 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_panel.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_panel.tsx @@ -32,6 +32,7 @@ export const LogRetentionPanel: React.FC = () => { const hasILM = logRetention !== null; const analyticsLogRetentionSettings = logRetention?.[LogRetentionOptions.Analytics]; const apiLogRetentionSettings = logRetention?.[LogRetentionOptions.API]; + const crawlerLogRetentionSettings = logRetention?.[LogRetentionOptions.Crawler]; useEffect(() => { fetchLogRetention(); @@ -100,6 +101,33 @@ export const LogRetentionPanel: React.FC = () => { data-test-subj="LogRetentionPanelAPISwitch" /> + + + + + {i18n.translate( + 'xpack.enterpriseSearch.appSearch.settings.logRetention.crawler.label', + { + defaultMessage: 'Web Crawler Logs', + } + )} + + {': '} + {hasILM && ( + + + + )} + + } + checked={!!crawlerLogRetentionSettings?.enabled} + onChange={() => toggleLogRetention(LogRetentionOptions.Crawler)} + disabled={isLogRetentionUpdating} + data-test-subj="LogRetentionPanelCrawlerSwitch" + /> +

diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/constants/actions.ts b/x-pack/plugins/enterprise_search/public/applications/shared/constants/actions.ts index cb05311e11998..d43217fba1443 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/constants/actions.ts +++ b/x-pack/plugins/enterprise_search/public/applications/shared/constants/actions.ts @@ -35,6 +35,11 @@ export const CANCEL_BUTTON_LABEL = i18n.translate( { defaultMessage: 'Cancel' } ); +export const START_BUTTON_LABEL = i18n.translate( + 'xpack.enterpriseSearch.actions.startButtonLabel', + { defaultMessage: 'Start' } +); + export const CONTINUE_BUTTON_LABEL = i18n.translate( 'xpack.enterpriseSearch.actions.continueButtonLabel', { defaultMessage: 'Continue' } diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/layout/personal_dashboard_sidebar/private_sources_sidebar.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/layout/personal_dashboard_sidebar/private_sources_sidebar.tsx index 6cd7a10fc7ade..c8eaffbfbec10 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/layout/personal_dashboard_sidebar/private_sources_sidebar.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/layout/personal_dashboard_sidebar/private_sources_sidebar.tsx @@ -35,10 +35,10 @@ export const PrivateSourcesSidebar = () => { : PRIVATE_VIEW_ONLY_PAGE_DESCRIPTION; const { - contentSource: { id = '', name = '' }, + contentSource: { id = '' }, } = useValues(SourceLogic); - const navItems = [{ id, name, items: useSourceSubNav() }]; + const navItems = [{ id, name: '', items: useSourceSubNav() }]; return ( <> diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/constants.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/constants.ts index 2cec9f617cd27..a43fb6f293457 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/constants.ts +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/constants.ts @@ -253,12 +253,12 @@ export const SOURCE_OBJ_TYPES = { defaultMessage: 'Bugs', }), ISSUES: i18n.translate('xpack.enterpriseSearch.workplaceSearch.sources.objTypes.issues', { - defaultMessage: 'Issues', + defaultMessage: 'Issues (including comments)', }), PULL_REQUESTS: i18n.translate( 'xpack.enterpriseSearch.workplaceSearch.sources.objTypes.pullRequests', { - defaultMessage: 'Pull Requests', + defaultMessage: 'Pull Requests (including comments)', } ), REPOSITORY_LIST: i18n.translate( diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/overview.test.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/overview.test.tsx index d99eac5de74e5..c9eb2e0afdf5e 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/overview.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/overview.test.tsx @@ -5,20 +5,21 @@ * 2.0. */ -import { setMockValues } from '../../../../__mocks__/kea_logic'; +import { setMockValues, setMockActions } from '../../../../__mocks__/kea_logic'; import { fullContentSources } from '../../../__mocks__/content_sources.mock'; import React from 'react'; import { shallow } from 'enzyme'; -import { EuiEmptyPrompt, EuiPanel, EuiTable } from '@elastic/eui'; +import { EuiConfirmModal, EuiEmptyPrompt, EuiPanel, EuiTable } from '@elastic/eui'; import { ComponentLoader } from '../../../components/shared/component_loader'; import { Overview } from './overview'; describe('Overview', () => { + const initializeSourceSynchronization = jest.fn(); const contentSource = fullContentSources[0]; const dataLoading = false; const isOrganization = true; @@ -31,6 +32,7 @@ describe('Overview', () => { beforeEach(() => { setMockValues({ ...mockValues }); + setMockActions({ initializeSourceSynchronization }); }); it('renders', () => { @@ -118,4 +120,14 @@ describe('Overview', () => { expect(wrapper.find('[data-test-subj="DocumentPermissionsDisabled"]')).toHaveLength(1); }); + + it('handles confirmModal submission', () => { + const wrapper = shallow(); + const button = wrapper.find('[data-test-subj="SyncButton"]'); + button.prop('onClick')!({} as any); + const modal = wrapper.find(EuiConfirmModal); + modal.prop('onConfirm')!({} as any); + + expect(initializeSourceSynchronization).toHaveBeenCalled(); + }); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/overview.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/overview.tsx index a4fe0329e6c42..9441f43dc253f 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/overview.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/overview.tsx @@ -5,11 +5,13 @@ * 2.0. */ -import React from 'react'; +import React, { useState } from 'react'; -import { useValues } from 'kea'; +import { useValues, useActions } from 'kea'; import { + EuiButton, + EuiConfirmModal, EuiEmptyPrompt, EuiFlexGroup, EuiFlexItem, @@ -30,7 +32,8 @@ import { } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; -import { EuiListGroupItemTo } from '../../../../shared/react_router_helpers'; +import { CANCEL_BUTTON_LABEL, START_BUTTON_LABEL } from '../../../../shared/constants'; +import { EuiListGroupItemTo, EuiLinkTo } from '../../../../shared/react_router_helpers'; import { AppLogic } from '../../../app_logic'; import aclImage from '../../../assets/supports_acl.svg'; import { ComponentLoader } from '../../../components/shared/component_loader'; @@ -48,7 +51,10 @@ import { DOCUMENT_PERMISSIONS_DOCS_URL, ENT_SEARCH_LICENSE_MANAGEMENT, EXTERNAL_IDENTITIES_DOCS_URL, + SYNC_FREQUENCY_PATH, + BLOCKED_TIME_WINDOWS_PATH, getGroupPath, + getContentSourcePath, } from '../../../routes'; import { SOURCES_NO_CONTENT_TITLE, @@ -77,6 +83,12 @@ import { LEARN_CUSTOM_FEATURES_BUTTON, DOC_PERMISSIONS_DESCRIPTION, CUSTOM_CALLOUT_TITLE, + SOURCE_SYNCHRONIZATION_TITLE, + SOURCE_SYNC_FREQUENCY_LINK_LABEL, + SOURCE_BLOCKED_TIME_WINDOWS_LINK_LABEL, + SOURCE_SYNCHRONIZATION_BUTTON_LABEL, + SOURCE_SYNC_CONFIRM_TITLE, + SOURCE_SYNC_CONFIRM_MESSAGE, } from '../constants'; import { SourceLogic } from '../source_logic'; @@ -84,6 +96,7 @@ import { SourceLayout } from './source_layout'; export const Overview: React.FC = () => { const { contentSource } = useValues(SourceLogic); + const { initializeSourceSynchronization } = useActions(SourceLogic); const { isOrganization } = useValues(AppLogic); const { @@ -99,8 +112,21 @@ export const Overview: React.FC = () => { indexPermissions, hasPermissions, isFederatedSource, + isIndexedSource, } = contentSource; + const [isSyncing, setIsSyncing] = useState(false); + const [isModalVisible, setIsModalVisible] = useState(false); + const closeModal = () => setIsModalVisible(false); + const handleSyncClick = () => setIsModalVisible(true); + const showSyncTriggerCallout = !custom && isIndexedSource && isOrganization; + + const onSyncConfirm = () => { + initializeSourceSynchronization(id); + setIsSyncing(true); + closeModal(); + }; + const DocumentSummary = () => { let totalDocuments = 0; const tableContent = summary?.map((item, index) => { @@ -451,9 +477,57 @@ export const Overview: React.FC = () => { ); + const syncTriggerCallout = ( + + + +

{SOURCE_SYNCHRONIZATION_TITLE}
+ + + + + {SOURCE_SYNCHRONIZATION_BUTTON_LABEL} + + + + + {SOURCE_SYNC_FREQUENCY_LINK_LABEL} + + ), + blockTimeWindowsLink: ( + + {SOURCE_BLOCKED_TIME_WINDOWS_LINK_LABEL} + + ), + }} + /> + + + + ); + + const syncConfirmModal = ( + +

{SOURCE_SYNC_CONFIRM_MESSAGE}

+
+ ); + return ( + {isModalVisible && syncConfirmModal} @@ -513,6 +587,7 @@ export const Overview: React.FC = () => { )} )} + {showSyncTriggerCallout && syncTriggerCallout} diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/source_sub_nav.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/source_sub_nav.tsx index cae1e8834cdd2..99597023303ff 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/source_sub_nav.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/source_sub_nav.tsx @@ -37,7 +37,7 @@ export const useSourceSubNav = () => { if (!id) return undefined; const isCustom = serviceType === CUSTOM_SERVICE_TYPE; - const showSynchronization = isIndexedSource && isOrganization; + const showSynchronization = isIndexedSource && isOrganization && !isCustom; const navItems: Array> = [ { diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/blocked_window_item.test.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/blocked_window_item.test.tsx index f3c01b8d94d37..183d336ea62da 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/blocked_window_item.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/blocked_window_item.test.tsx @@ -16,7 +16,7 @@ import { shallow } from 'enzyme'; import moment from 'moment'; import { - EuiButton, + EuiButtonIcon, EuiDatePicker, EuiDatePickerRange, EuiSelect, @@ -53,7 +53,7 @@ describe('BlockedWindowItem', () => { it('handles remove button click', () => { const wrapper = shallow(); - wrapper.find(EuiButton).simulate('click'); + wrapper.find(EuiButtonIcon).simulate('click'); expect(removeBlockedWindow).toHaveBeenCalledWith(0); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/blocked_window_item.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/blocked_window_item.tsx index 272efc6fc3c50..3399f41254004 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/blocked_window_item.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/blocked_window_item.tsx @@ -11,7 +11,7 @@ import { useActions, useValues } from 'kea'; import moment from 'moment'; import { - EuiButton, + EuiButtonIcon, EuiDatePicker, EuiDatePickerRange, EuiFlexGroup, @@ -179,9 +179,14 @@ export const BlockedWindowItem: React.FC = ({ blockedWindow, index }) => /> - removeBlockedWindow(index)}> - {REMOVE_BUTTON} - + removeBlockedWindow(index)} + aria-label={REMOVE_BUTTON} + title={REMOVE_BUTTON} + /> diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/frequency.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/frequency.tsx index a682e10269e6c..db4f80dc37f4b 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/frequency.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/frequency.tsx @@ -26,10 +26,10 @@ import { ViewContentHeader } from '../../../../components/shared/view_content_he import { NAV, RESET_BUTTON } from '../../../../constants'; import { DIFFERENT_SYNC_TYPES_DOCS_URL } from '../../../../routes'; import { + LEARN_MORE_LINK, SOURCE_FREQUENCY_DESCRIPTION, SOURCE_SYNC_FREQUENCY_TITLE, BLOCKED_TIME_WINDOWS_TITLE, - SYNC_FREQUENCY_LINK_LABEL, SYNC_UNSAVED_CHANGES_MESSAGE, } from '../../constants'; import { SourceLogic } from '../../source_logic'; @@ -84,16 +84,6 @@ export const Frequency: React.FC = ({ tabId }) => { ); - const docsLinks = ( - - - - {SYNC_FREQUENCY_LINK_LABEL} - - - - ); - return ( = ({ tabId }) => { /> + {SOURCE_FREQUENCY_DESCRIPTION}{' '} + + {LEARN_MORE_LINK} + + + } action={actions} /> - {docsLinks} diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/objects_and_assets.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/objects_and_assets.tsx index 54ce0563ddeb3..2dfa2a6420f7f 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/objects_and_assets.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/objects_and_assets.tsx @@ -27,11 +27,11 @@ import { ViewContentHeader } from '../../../../components/shared/view_content_he import { NAV, RESET_BUTTON } from '../../../../constants'; import { OBJECTS_AND_ASSETS_DOCS_URL } from '../../../../routes'; import { + LEARN_MORE_LINK, SYNC_MANAGEMENT_CONTENT_EXTRACTION_LABEL, SYNC_MANAGEMENT_THUMBNAILS_LABEL, SYNC_MANAGEMENT_THUMBNAILS_GLOBAL_CONFIG_LABEL, SOURCE_OBJECTS_AND_ASSETS_DESCRIPTION, - OBJECTS_AND_ASSETS_LINK_LABEL, SOURCE_OBJECTS_AND_ASSETS_LABEL, SYNC_UNSAVED_CHANGES_MESSAGE, } from '../../constants'; @@ -84,12 +84,16 @@ export const ObjectsAndAssets: React.FC = () => { /> + {SOURCE_OBJECTS_AND_ASSETS_DESCRIPTION}{' '} + + {LEARN_MORE_LINK} + + + } action={actions} /> - - {OBJECTS_AND_ASSETS_LINK_LABEL} - {SOURCE_OBJECTS_AND_ASSETS_LABEL} diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/synchronization.test.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/synchronization.test.tsx index fb9cdc6916fa9..2d1e8105c12b2 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/synchronization.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/synchronization.test.tsx @@ -12,7 +12,7 @@ import React from 'react'; import { shallow } from 'enzyme'; -import { EuiLink, EuiCallOut, EuiSwitch } from '@elastic/eui'; +import { EuiCallOut, EuiSwitch } from '@elastic/eui'; import { Synchronization } from './synchronization'; @@ -28,7 +28,6 @@ describe('Synchronization', () => { it('renders when config enabled', () => { const wrapper = shallow(); - expect(wrapper.find(EuiLink)).toHaveLength(1); expect(wrapper.find(EuiSwitch)).toHaveLength(1); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/synchronization.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/synchronization.tsx index e88d4d251fa54..dec275adb3c50 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/synchronization.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/synchronization.tsx @@ -15,12 +15,12 @@ import { ViewContentHeader } from '../../../../components/shared/view_content_he import { NAV } from '../../../../constants'; import { SYNCHRONIZATION_DOCS_URL } from '../../../../routes'; import { + LEARN_MORE_LINK, SOURCE_SYNCHRONIZATION_DESCRIPTION, SYNCHRONIZATION_DISABLED_TITLE, SYNCHRONIZATION_DISABLED_DESCRIPTION, SOURCE_SYNCHRONIZATION_TOGGLE_LABEL, SOURCE_SYNCHRONIZATION_TOGGLE_DESCRIPTION, - SYNCHRONIZATION_LINK_LABEL, } from '../../constants'; import { SourceLogic } from '../../source_logic'; import { SourceLayout } from '../source_layout'; @@ -65,11 +65,15 @@ export const Synchronization: React.FC = () => { > + {SOURCE_SYNCHRONIZATION_DESCRIPTION}{' '} + + {LEARN_MORE_LINK} + + + } /> - - {SYNCHRONIZATION_LINK_LABEL} - {isSyncConfigEnabled ? syncToggle : syncDisabledCallout} diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/constants.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/constants.ts index 14d0a7f196ae8..087716e565ad0 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/constants.ts +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/constants.ts @@ -531,7 +531,7 @@ export const SOURCE_SYNCHRONIZATION_DESCRIPTION = i18n.translate( 'xpack.enterpriseSearch.workplaceSearch.sources.sourceSynchronizationDescription', { defaultMessage: - 'Synchronization provides control over data being indexed from the content source. Enable synchronization of data from the content source to Workplace Search.', + 'Enable or disable synchronization of data from this content source to Workplace Search.', } ); @@ -539,7 +539,7 @@ export const SOURCE_FREQUENCY_DESCRIPTION = i18n.translate( 'xpack.enterpriseSearch.workplaceSearch.sources.sourceFrequencyDescription', { defaultMessage: - 'Schedule the frequency of data synchronization between Workplace search and the content source. Indexing schedules that occur less frequently lower the burden on third-party servers, while more frequent will ensure your data is up-to-date.', + 'Manage the frequency of data synchronization from Workplace search to this content source. Sync more frequently to ensure your data is up to date. Sync less frequently to reduce the burden on third party servers.', } ); @@ -547,7 +547,7 @@ export const SOURCE_OBJECTS_AND_ASSETS_DESCRIPTION = i18n.translate( 'xpack.enterpriseSearch.workplaceSearch.sources.sourceObjectsAndAssetsDescription', { defaultMessage: - 'Customize the indexing rules that determine what data is synchronized from this content source to Workplace Search.', + 'Customize the indexing rules that determine which objects and assets are synchronized from this content source to Workplace Search.', } ); @@ -579,52 +579,74 @@ export const SOURCE_SYNCHRONIZATION_FREQUENCY_TITLE = i18n.translate( } ); -export const SOURCE_SYNC_FREQUENCY_TITLE = i18n.translate( - 'xpack.enterpriseSearch.workplaceSearch.sources.sourceSyncFrequencyTitle', +export const SOURCE_SYNCHRONIZATION_TITLE = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.sources.sourceSynchronizationTitle', { - defaultMessage: 'Sync frequency', + defaultMessage: 'Synchronization', } ); -export const BLOCKED_TIME_WINDOWS_TITLE = i18n.translate( - 'xpack.enterpriseSearch.workplaceSearch.sources.blockedWindowsTitle', +export const SOURCE_SYNCHRONIZATION_BUTTON_LABEL = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.sources.sourceSynchronizationButtonLabel', { - defaultMessage: 'Blocked time windows', + defaultMessage: 'Synchronize content', } ); -export const SYNCHRONIZATION_LINK_LABEL = i18n.translate( - 'xpack.enterpriseSearch.workplaceSearch.sources.synchronizationLinkLabel', +export const SOURCE_SYNC_FREQUENCY_LINK_LABEL = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.sources.sourceSyncFrequencyLinkLabel', { - defaultMessage: 'Learn more about synchronization', + defaultMessage: 'sync frequency', } ); -export const SYNCHRONIZATION_DISABLED_TITLE = i18n.translate( - 'xpack.enterpriseSearch.workplaceSearch.sources.synchronizationDisabledTitle', +export const SOURCE_BLOCKED_TIME_WINDOWS_LINK_LABEL = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.sources.sourceBlockedTimeWindowsLinkLabel', { - defaultMessage: 'Source synchronization is disabled.', + defaultMessage: 'blocked time windows', } ); -export const SYNCHRONIZATION_DISABLED_DESCRIPTION = i18n.translate( - 'xpack.enterpriseSearch.workplaceSearch.sources.synchronizationDisabledDescription', +export const SOURCE_SYNC_CONFIRM_TITLE = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.sources.sourceSyncConfirmTitle', { - defaultMessage: 'Contact your administrator to enable synchronization controls.', + defaultMessage: 'Start new content sync?', } ); -export const SYNC_FREQUENCY_LINK_LABEL = i18n.translate( - 'xpack.enterpriseSearch.workplaceSearch.sources.syncFrequencyLinkLabel', +export const SOURCE_SYNC_CONFIRM_MESSAGE = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.sources.sourceSyncConfirmMessage', { - defaultMessage: 'Learn more about synchronization frequency', + defaultMessage: + 'Are you sure you would like to continue with this request and stop all other syncs?', } ); -export const OBJECTS_AND_ASSETS_LINK_LABEL = i18n.translate( - 'xpack.enterpriseSearch.workplaceSearch.sources.objectsAndAssetsLinkLabel', +export const SOURCE_SYNC_FREQUENCY_TITLE = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.sources.sourceSyncFrequencyTitle', { - defaultMessage: 'Learn more about Objects and assets', + defaultMessage: 'Sync frequency', + } +); + +export const BLOCKED_TIME_WINDOWS_TITLE = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.sources.blockedWindowsTitle', + { + defaultMessage: 'Blocked time windows', + } +); + +export const SYNCHRONIZATION_DISABLED_TITLE = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.sources.synchronizationDisabledTitle', + { + defaultMessage: 'Source synchronization is disabled.', + } +); + +export const SYNCHRONIZATION_DISABLED_DESCRIPTION = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.sources.synchronizationDisabledDescription', + { + defaultMessage: 'Contact your administrator to enable synchronization controls.', } ); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_logic.test.ts index 1fb4477cea5c0..fb88360de5df0 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_logic.test.ts +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_logic.test.ts @@ -429,6 +429,34 @@ describe('SourceLogic', () => { }); }); + describe('initializeSourceSynchronization', () => { + it('calls API and fetches fresh source state', async () => { + const initializeSourceSpy = jest.spyOn(SourceLogic.actions, 'initializeSource'); + const promise = Promise.resolve(contentSource); + http.post.mockReturnValue(promise); + SourceLogic.actions.initializeSourceSynchronization(contentSource.id); + + expect(http.post).toHaveBeenCalledWith('/internal/workplace_search/org/sources/123/sync'); + await promise; + expect(initializeSourceSpy).toHaveBeenCalledWith(contentSource.id); + }); + + it('handles error', async () => { + const error = { + response: { + error: 'this is an error', + status: 400, + }, + }; + const promise = Promise.reject(error); + http.post.mockReturnValue(promise); + SourceLogic.actions.initializeSourceSynchronization(contentSource.id); + await expectedAsyncError(promise); + + expect(flashAPIErrors).toHaveBeenCalledWith(error); + }); + }); + it('resetSourceState', () => { SourceLogic.actions.resetSourceState(); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_logic.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_logic.ts index d10400bc5ba2d..0b67e3f2da79b 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/source_logic.ts @@ -27,6 +27,7 @@ export interface SourceActions { onUpdateSourceName(name: string): string; setSearchResults(searchResultsResponse: SearchResultsResponse): SearchResultsResponse; initializeFederatedSummary(sourceId: string): { sourceId: string }; + initializeSourceSynchronization(sourceId: string): { sourceId: string }; onUpdateSummary(summary: DocumentSummaryItem[]): DocumentSummaryItem[]; setContentFilterValue(contentFilterValue: string): string; setActivePage(activePage: number): number; @@ -81,6 +82,7 @@ export const SourceLogic = kea>({ setActivePage: (activePage: number) => activePage, initializeSource: (sourceId: string) => ({ sourceId }), initializeFederatedSummary: (sourceId: string) => ({ sourceId }), + initializeSourceSynchronization: (sourceId: string) => ({ sourceId }), searchContentSourceDocuments: (sourceId: string) => ({ sourceId }), updateContentSource: (sourceId: string, source: SourceUpdatePayload) => ({ sourceId, source }), removeContentSource: (sourceId: string) => ({ @@ -110,6 +112,7 @@ export const SourceLogic = kea>({ { setContentSource: () => false, resetSourceState: () => true, + removeContentSource: () => true, }, ], buttonLoading: [ @@ -117,7 +120,6 @@ export const SourceLogic = kea>({ { setButtonNotLoading: () => false, resetSourceState: () => false, - removeContentSource: () => true, }, ], sectionLoading: [ @@ -254,6 +256,15 @@ export const SourceLogic = kea>({ actions.setButtonNotLoading(); } }, + initializeSourceSynchronization: async ({ sourceId }) => { + const route = `/internal/workplace_search/org/sources/${sourceId}/sync`; + try { + await HttpLogic.values.http.post(route); + actions.initializeSource(sourceId); + } catch (e) { + flashAPIErrors(e); + } + }, onUpdateSourceName: (name: string) => { flashSuccessToast( i18n.translate( diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/security/security.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/security/security.tsx index a971df8f89914..997d79f67cb13 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/security/security.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/security/security.tsx @@ -75,9 +75,6 @@ export const Security: React.FC = () => { }; const headerActions = [ - - {RESET_BUTTON} - , { > {SAVE_SETTINGS_BUTTON} , + + {RESET_BUTTON} + , ]; const allSourcesToggle = ( diff --git a/x-pack/plugins/enterprise_search/public/assets/source_icons/box.svg b/x-pack/plugins/enterprise_search/public/assets/source_icons/box.svg new file mode 100644 index 0000000000000..b1b542eadd59c --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/assets/source_icons/box.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/x-pack/plugins/enterprise_search/public/assets/source_icons/confluence_cloud.svg b/x-pack/plugins/enterprise_search/public/assets/source_icons/confluence_cloud.svg new file mode 100644 index 0000000000000..7aac36a6fe3c5 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/assets/source_icons/confluence_cloud.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/x-pack/plugins/enterprise_search/public/assets/source_icons/confluence_server.svg b/x-pack/plugins/enterprise_search/public/assets/source_icons/confluence_server.svg new file mode 100644 index 0000000000000..7aac36a6fe3c5 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/assets/source_icons/confluence_server.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/x-pack/plugins/enterprise_search/public/assets/source_icons/custom_api_source.svg b/x-pack/plugins/enterprise_search/public/assets/source_icons/custom_api_source.svg new file mode 100644 index 0000000000000..cc07fbbc50877 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/assets/source_icons/custom_api_source.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/x-pack/plugins/enterprise_search/public/assets/source_icons/dropbox.svg b/x-pack/plugins/enterprise_search/public/assets/source_icons/dropbox.svg new file mode 100644 index 0000000000000..01e5a7735de12 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/assets/source_icons/dropbox.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/x-pack/plugins/enterprise_search/public/assets/source_icons/github.svg b/x-pack/plugins/enterprise_search/public/assets/source_icons/github.svg new file mode 100644 index 0000000000000..aa9c3e5b45146 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/assets/source_icons/github.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/x-pack/plugins/enterprise_search/public/assets/source_icons/github_enterprise_server.svg b/x-pack/plugins/enterprise_search/public/assets/source_icons/github_enterprise_server.svg new file mode 100644 index 0000000000000..aa9c3e5b45146 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/assets/source_icons/github_enterprise_server.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/x-pack/plugins/enterprise_search/public/assets/source_icons/gmail.svg b/x-pack/plugins/enterprise_search/public/assets/source_icons/gmail.svg new file mode 100644 index 0000000000000..31fe60c6a63f9 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/assets/source_icons/gmail.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/x-pack/plugins/enterprise_search/public/assets/source_icons/google_drive.svg b/x-pack/plugins/enterprise_search/public/assets/source_icons/google_drive.svg new file mode 100644 index 0000000000000..f3fe82cd3cd98 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/assets/source_icons/google_drive.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/x-pack/plugins/enterprise_search/public/assets/source_icons/jira_cloud.svg b/x-pack/plugins/enterprise_search/public/assets/source_icons/jira_cloud.svg new file mode 100644 index 0000000000000..c12e55798d889 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/assets/source_icons/jira_cloud.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/x-pack/plugins/enterprise_search/public/assets/source_icons/jira_server.svg b/x-pack/plugins/enterprise_search/public/assets/source_icons/jira_server.svg new file mode 100644 index 0000000000000..4dfd0fd910079 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/assets/source_icons/jira_server.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/x-pack/plugins/enterprise_search/public/assets/source_icons/onedrive.svg b/x-pack/plugins/enterprise_search/public/assets/source_icons/onedrive.svg new file mode 100644 index 0000000000000..c390dff1e418f --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/assets/source_icons/onedrive.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/x-pack/plugins/enterprise_search/public/assets/source_icons/salesforce.svg b/x-pack/plugins/enterprise_search/public/assets/source_icons/salesforce.svg new file mode 100644 index 0000000000000..ef6d552949424 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/assets/source_icons/salesforce.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/x-pack/plugins/enterprise_search/public/assets/source_icons/salesforce_sandbox.svg b/x-pack/plugins/enterprise_search/public/assets/source_icons/salesforce_sandbox.svg new file mode 100644 index 0000000000000..ef6d552949424 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/assets/source_icons/salesforce_sandbox.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/x-pack/plugins/enterprise_search/public/assets/source_icons/servicenow.svg b/x-pack/plugins/enterprise_search/public/assets/source_icons/servicenow.svg new file mode 100644 index 0000000000000..6388ec44d21d7 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/assets/source_icons/servicenow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/x-pack/plugins/enterprise_search/public/assets/source_icons/sharepoint_online.svg b/x-pack/plugins/enterprise_search/public/assets/source_icons/sharepoint_online.svg new file mode 100644 index 0000000000000..aebfd7a8e49c0 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/assets/source_icons/sharepoint_online.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/x-pack/plugins/enterprise_search/public/assets/source_icons/slack.svg b/x-pack/plugins/enterprise_search/public/assets/source_icons/slack.svg new file mode 100644 index 0000000000000..8f6fc0c987eaa --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/assets/source_icons/slack.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/x-pack/plugins/enterprise_search/public/assets/source_icons/zendesk.svg b/x-pack/plugins/enterprise_search/public/assets/source_icons/zendesk.svg new file mode 100644 index 0000000000000..8afd143dd9a7c --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/assets/source_icons/zendesk.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/x-pack/plugins/enterprise_search/server/integrations.ts b/x-pack/plugins/enterprise_search/server/integrations.ts new file mode 100644 index 0000000000000..48909261243e8 --- /dev/null +++ b/x-pack/plugins/enterprise_search/server/integrations.ts @@ -0,0 +1,304 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license 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 { HttpServiceSetup } from 'src/core/server'; + +import type { IntegrationCategory } from '../../../../src/plugins/custom_integrations/common'; +import type { CustomIntegrationsPluginSetup } from '../../../../src/plugins/custom_integrations/server'; + +interface WorkplaceSearchIntegration { + id: string; + title: string; + description: string; + categories: IntegrationCategory[]; + uiInternalPath?: string; +} + +const workplaceSearchIntegrations: WorkplaceSearchIntegration[] = [ + { + id: 'box', + title: i18n.translate('xpack.enterpriseSearch.workplaceSearch.integrations.boxName', { + defaultMessage: 'Box', + }), + description: i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.integrations.boxDescription', + { + defaultMessage: 'Search over your files and folders stored on Box with Workplace Search.', + } + ), + categories: ['document_storage'], + }, + { + id: 'confluence_cloud', + title: i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.integrations.confluenceCloudName', + { + defaultMessage: 'Confluence Cloud', + } + ), + description: i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.integrations.confluenceCloudDescription', + { + defaultMessage: + 'Search over your organizational content on Confluence Cloud with Workplace Search.', + } + ), + categories: ['knowledge_platform'], + }, + { + id: 'confluence_server', + title: i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.integrations.confluenceServerName', + { + defaultMessage: 'Confluence Server', + } + ), + description: i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.integrations.confluenceServerDescription', + { + defaultMessage: + 'Search over your organizational content on Confluence Server with Workplace Search.', + } + ), + categories: ['knowledge_platform'], + }, + { + id: 'dropbox', + title: i18n.translate('xpack.enterpriseSearch.workplaceSearch.integrations.dropboxName', { + defaultMessage: 'Dropbox', + }), + description: i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.integrations.dropboxDescription', + { + defaultMessage: + 'Search over your files and folders stored on Dropbox with Workplace Search.', + } + ), + categories: ['document_storage'], + }, + { + id: 'github', + title: i18n.translate('xpack.enterpriseSearch.workplaceSearch.integrations.githubName', { + defaultMessage: 'GitHub', + }), + description: i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.integrations.githubDescription', + { + defaultMessage: 'Search over your projects and repos on GitHub with Workplace Search.', + } + ), + categories: ['software_development'], + }, + { + id: 'github_enterprise_server', + title: i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.integrations.githubEnterpriseServerName', + { + defaultMessage: 'GitHub Enterprise Server', + } + ), + description: i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.integrations.githubEnterpriseServerDescription', + { + defaultMessage: + 'Search over your projects and repos on GitHub Enterprise Server with Workplace Search.', + } + ), + categories: ['software_development'], + }, + { + id: 'gmail', + title: i18n.translate('xpack.enterpriseSearch.workplaceSearch.integrations.gmailName', { + defaultMessage: 'Gmail', + }), + description: i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.integrations.gmailDescription', + { + defaultMessage: 'Search over your emails managed by Gmail with Workplace Search.', + } + ), + categories: ['communication'], + }, + { + id: 'google_drive', + title: i18n.translate('xpack.enterpriseSearch.workplaceSearch.integrations.googleDriveName', { + defaultMessage: 'Google Drive', + }), + description: i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.integrations.googleDriveDescription', + { + defaultMessage: 'Search over your documents on Google Drive with Workplace Search.', + } + ), + categories: ['document_storage'], + }, + { + id: 'jira_cloud', + title: i18n.translate('xpack.enterpriseSearch.workplaceSearch.integrations.jiraCloudName', { + defaultMessage: 'Jira Cloud', + }), + description: i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.integrations.jiraCloudDescription', + { + defaultMessage: 'Search over your project workflow on Jira Cloud with Workplace Search.', + } + ), + categories: ['project_management'], + }, + { + id: 'jira_server', + title: i18n.translate('xpack.enterpriseSearch.workplaceSearch.integrations.jiraServerName', { + defaultMessage: 'Jira Server', + }), + description: i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.integrations.jiraServerDescription', + { + defaultMessage: 'Search over your project workflow on Jira Server with Workplace Search.', + } + ), + categories: ['project_management'], + }, + { + id: 'onedrive', + title: i18n.translate('xpack.enterpriseSearch.workplaceSearch.integrations.onedriveName', { + defaultMessage: 'OneDrive', + }), + description: i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.integrations.onedriveDescription', + { + defaultMessage: 'Search over your files stored on OneDrive with Workplace Search.', + } + ), + categories: ['document_storage'], + uiInternalPath: '/app/enterprise_search/workplace_search/sources/add/one_drive', + }, + { + id: 'salesforce', + title: i18n.translate('xpack.enterpriseSearch.workplaceSearch.integrations.salesforceName', { + defaultMessage: 'Salesforce', + }), + description: i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.integrations.salesforceDescription', + { + defaultMessage: 'Search over your content on Salesforce with Workplace Search.', + } + ), + categories: ['crm'], + }, + { + id: 'salesforce_sandbox', + title: i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.integrations.salesforceSandboxName', + { + defaultMessage: 'Salesforce Sandbox', + } + ), + description: i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.integrations.salesforceSandboxDescription', + { + defaultMessage: 'Search over your content on Salesforce Sandbox with Workplace Search.', + } + ), + categories: ['crm'], + }, + { + id: 'servicenow', + title: i18n.translate('xpack.enterpriseSearch.workplaceSearch.integrations.servicenowName', { + defaultMessage: 'ServiceNow', + }), + description: i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.integrations.servicenowDescription', + { + defaultMessage: 'Search over your content on ServiceNow with Workplace Search.', + } + ), + categories: ['enterprise_management'], + }, + { + id: 'sharepoint_online', + title: i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.integrations.sharepointOnlineName', + { + defaultMessage: 'SharePoint Online', + } + ), + description: i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.integrations.sharepointOnlineDescription', + { + defaultMessage: 'Search over your files stored on SharePoint Online with Workplace Search.', + } + ), + categories: ['document_storage'], + uiInternalPath: '/app/enterprise_search/workplace_search/sources/add/share_point', + }, + { + id: 'slack', + title: i18n.translate('xpack.enterpriseSearch.workplaceSearch.integrations.slackName', { + defaultMessage: 'Slack', + }), + description: i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.integrations.slackDescription', + { + defaultMessage: 'Search over your messages on Slack with Workplace Search.', + } + ), + categories: ['communication'], + }, + { + id: 'zendesk', + title: i18n.translate('xpack.enterpriseSearch.workplaceSearch.integrations.zendeskName', { + defaultMessage: 'Zendesk', + }), + description: i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.integrations.zendeskDescription', + { + defaultMessage: 'Search over your tickets on Zendesk with Workplace Search.', + } + ), + categories: ['customer_support'], + }, + { + id: 'custom_api_source', + title: i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.integrations.customApiSourceName', + { + defaultMessage: 'Custom API Source', + } + ), + description: i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.integrations.customApiSourceDescription', + { + defaultMessage: + 'Search over anything by building your own integration with Workplace Search.', + } + ), + categories: ['custom'], + uiInternalPath: '/app/enterprise_search/workplace_search/sources/add/custom', + }, +]; + +export const registerEnterpriseSearchIntegrations = ( + http: HttpServiceSetup, + customIntegrations: CustomIntegrationsPluginSetup +) => { + workplaceSearchIntegrations.forEach((integration) => { + customIntegrations.registerCustomIntegration({ + uiInternalPath: `/app/enterprise_search/workplace_search/sources/add/${integration.id}`, + icons: [ + { + type: 'svg', + src: http.basePath.prepend( + `/plugins/enterpriseSearch/assets/source_icons/${integration.id}.svg` + ), + }, + ], + isBeta: false, + shipper: 'enterprise_search', + ...integration, + }); + }); +}; diff --git a/x-pack/plugins/enterprise_search/server/plugin.ts b/x-pack/plugins/enterprise_search/server/plugin.ts index 26572134aa31c..1d58da5bbdd2b 100644 --- a/x-pack/plugins/enterprise_search/server/plugin.ts +++ b/x-pack/plugins/enterprise_search/server/plugin.ts @@ -15,6 +15,7 @@ import { KibanaRequest, DEFAULT_APP_CATEGORIES, } from '../../../../src/core/server'; +import { CustomIntegrationsPluginSetup } from '../../../../src/plugins/custom_integrations/server'; import { UsageCollectionSetup } from '../../../../src/plugins/usage_collection/server'; import { PluginSetupContract as FeaturesPluginSetup } from '../../features/server'; import { InfraPluginSetup } from '../../infra/server'; @@ -31,6 +32,7 @@ import { import { registerTelemetryUsageCollector as registerASTelemetryUsageCollector } from './collectors/app_search/telemetry'; import { registerTelemetryUsageCollector as registerESTelemetryUsageCollector } from './collectors/enterprise_search/telemetry'; import { registerTelemetryUsageCollector as registerWSTelemetryUsageCollector } from './collectors/workplace_search/telemetry'; +import { registerEnterpriseSearchIntegrations } from './integrations'; import { checkAccess } from './lib/check_access'; import { entSearchHttpAgent } from './lib/enterprise_search_http_agent'; @@ -55,6 +57,7 @@ interface PluginsSetup { security?: SecurityPluginSetup; features: FeaturesPluginSetup; infra: InfraPluginSetup; + customIntegrations?: CustomIntegrationsPluginSetup; } interface PluginsStart { @@ -80,11 +83,15 @@ export class EnterpriseSearchPlugin implements Plugin { public setup( { capabilities, http, savedObjects, getStartServices }: CoreSetup, - { usageCollection, security, features, infra }: PluginsSetup + { usageCollection, security, features, infra, customIntegrations }: PluginsSetup ) { const config = this.config; const log = this.logger; + if (customIntegrations) { + registerEnterpriseSearchIntegrations(http, customIntegrations); + } + /* * Initialize config.ssl.certificateAuthorities file(s) - required for all API calls (+ access checks) */ diff --git a/x-pack/plugins/enterprise_search/server/routes/app_search/settings.test.ts b/x-pack/plugins/enterprise_search/server/routes/app_search/settings.test.ts index aff9cd17dd001..d8ff7f1815a62 100644 --- a/x-pack/plugins/enterprise_search/server/routes/app_search/settings.test.ts +++ b/x-pack/plugins/enterprise_search/server/routes/app_search/settings.test.ts @@ -57,13 +57,21 @@ describe('log settings routes', () => { describe('validates', () => { it('validates good data', () => { - const request = { + mockRouter.shouldValidate({ body: { analytics: { enabled: true }, + }, + }); + mockRouter.shouldValidate({ + body: { api: { enabled: true }, }, - }; - mockRouter.shouldValidate(request); + }); + mockRouter.shouldValidate({ + body: { + crawler: { enabled: true }, + }, + }); }); it('rejects bad data', () => { diff --git a/x-pack/plugins/enterprise_search/server/routes/app_search/settings.ts b/x-pack/plugins/enterprise_search/server/routes/app_search/settings.ts index b83dfd9d9ef15..2d0ce1411761a 100644 --- a/x-pack/plugins/enterprise_search/server/routes/app_search/settings.ts +++ b/x-pack/plugins/enterprise_search/server/routes/app_search/settings.ts @@ -38,6 +38,11 @@ export function registerSettingsRoutes({ enabled: schema.boolean(), }) ), + crawler: schema.maybe( + schema.object({ + enabled: schema.boolean(), + }) + ), }), }, }, diff --git a/x-pack/plugins/enterprise_search/server/routes/app_search/source_engines.test.ts b/x-pack/plugins/enterprise_search/server/routes/app_search/source_engines.test.ts index 67edcc356e902..4374bbe88e183 100644 --- a/x-pack/plugins/enterprise_search/server/routes/app_search/source_engines.test.ts +++ b/x-pack/plugins/enterprise_search/server/routes/app_search/source_engines.test.ts @@ -92,6 +92,7 @@ describe('source engine routes', () => { it('creates a request to enterprise search', () => { expect(mockRequestHandler.createRequest).toHaveBeenCalledWith({ path: '/as/engines/:name/source_engines/bulk_create', + hasJsonResponse: false, }); }); }); @@ -145,6 +146,7 @@ describe('source engine routes', () => { it('creates a request to enterprise search', () => { expect(mockRequestHandler.createRequest).toHaveBeenCalledWith({ path: '/as/engines/:name/source_engines/:source_engine_name', + hasJsonResponse: false, }); }); }); diff --git a/x-pack/plugins/enterprise_search/server/routes/app_search/source_engines.ts b/x-pack/plugins/enterprise_search/server/routes/app_search/source_engines.ts index 1d41a82287b0e..79be0c9c29322 100644 --- a/x-pack/plugins/enterprise_search/server/routes/app_search/source_engines.ts +++ b/x-pack/plugins/enterprise_search/server/routes/app_search/source_engines.ts @@ -45,6 +45,7 @@ export function registerSourceEnginesRoutes({ }, enterpriseSearchRequestHandler.createRequest({ path: '/as/engines/:name/source_engines/bulk_create', + hasJsonResponse: false, }) ); @@ -60,6 +61,7 @@ export function registerSourceEnginesRoutes({ }, enterpriseSearchRequestHandler.createRequest({ path: '/as/engines/:name/source_engines/:source_engine_name', + hasJsonResponse: false, }) ); } diff --git a/x-pack/plugins/enterprise_search/server/routes/workplace_search/sources.test.ts b/x-pack/plugins/enterprise_search/server/routes/workplace_search/sources.test.ts index 706bc8a4853a7..961635c3f9001 100644 --- a/x-pack/plugins/enterprise_search/server/routes/workplace_search/sources.test.ts +++ b/x-pack/plugins/enterprise_search/server/routes/workplace_search/sources.test.ts @@ -42,6 +42,7 @@ import { registerOrgSourceDownloadDiagnosticsRoute, registerOrgSourceOauthConfigurationsRoute, registerOrgSourceOauthConfigurationRoute, + registerOrgSourceSynchronizeRoute, registerOauthConnectorParamsRoute, } from './sources'; @@ -1252,6 +1253,29 @@ describe('sources routes', () => { }); }); + describe('POST /internal/workplace_search/org/sources/{id}/sync', () => { + let mockRouter: MockRouter; + + beforeEach(() => { + jest.clearAllMocks(); + mockRouter = new MockRouter({ + method: 'post', + path: '/internal/workplace_search/org/sources/{id}/sync', + }); + + registerOrgSourceSynchronizeRoute({ + ...mockDependencies, + router: mockRouter.router, + }); + }); + + it('creates a request handler', () => { + expect(mockRequestHandler.createRequest).toHaveBeenCalledWith({ + path: '/ws/org/sources/:id/sync', + }); + }); + }); + describe('GET /internal/workplace_search/sources/create', () => { const tokenPackage = 'some_encrypted_secrets'; diff --git a/x-pack/plugins/enterprise_search/server/routes/workplace_search/sources.ts b/x-pack/plugins/enterprise_search/server/routes/workplace_search/sources.ts index 660294a5e1ddd..011fe341d6edf 100644 --- a/x-pack/plugins/enterprise_search/server/routes/workplace_search/sources.ts +++ b/x-pack/plugins/enterprise_search/server/routes/workplace_search/sources.ts @@ -891,6 +891,25 @@ export function registerOrgSourceOauthConfigurationRoute({ ); } +export function registerOrgSourceSynchronizeRoute({ + router, + enterpriseSearchRequestHandler, +}: RouteDependencies) { + router.post( + { + path: '/internal/workplace_search/org/sources/{id}/sync', + validate: { + params: schema.object({ + id: schema.string(), + }), + }, + }, + enterpriseSearchRequestHandler.createRequest({ + path: '/ws/org/sources/:id/sync', + }) + ); +} + // Same route is used for org and account. `state` passes the context. export function registerOauthConnectorParamsRoute({ router, @@ -956,5 +975,6 @@ export const registerSourcesRoutes = (dependencies: RouteDependencies) => { registerOrgSourceDownloadDiagnosticsRoute(dependencies); registerOrgSourceOauthConfigurationsRoute(dependencies); registerOrgSourceOauthConfigurationRoute(dependencies); + registerOrgSourceSynchronizeRoute(dependencies); registerOauthConnectorParamsRoute(dependencies); }; diff --git a/x-pack/plugins/event_log/server/index.ts b/x-pack/plugins/event_log/server/index.ts index deeee970ce68a..b643060415b19 100644 --- a/x-pack/plugins/event_log/server/index.ts +++ b/x-pack/plugins/event_log/server/index.ts @@ -33,6 +33,7 @@ export const config: PluginConfigDescriptor = { settings?.xpack?.eventLog?.enabled === true ) { addDeprecation({ + configPath: 'xpack.eventLog.enabled', message: `"xpack.eventLog.enabled" is deprecated. The ability to disable this plugin will be removed in 8.0.0.`, correctiveActions: { manualSteps: [`Remove "xpack.eventLog.enabled" from your kibana configs.`], diff --git a/x-pack/plugins/fleet/common/types/models/epm.ts b/x-pack/plugins/fleet/common/types/models/epm.ts index 1325d74f82b68..42bc93403b2bb 100644 --- a/x-pack/plugins/fleet/common/types/models/epm.ts +++ b/x-pack/plugins/fleet/common/types/models/epm.ts @@ -225,6 +225,7 @@ export type RegistrySearchResult = Pick< | 'internal' | 'data_streams' | 'policy_templates' + | 'categories' >; export type ScreenshotItem = RegistryImage | PackageSpecScreenshot; @@ -374,6 +375,7 @@ export interface IntegrationCardItem { icons: Array; integration: string; id: string; + categories: string[]; } export type PackagesGroupedByStatus = Record, PackageList>; diff --git a/x-pack/plugins/fleet/kibana.json b/x-pack/plugins/fleet/kibana.json index c4782156b1982..9de538ee91b8c 100644 --- a/x-pack/plugins/fleet/kibana.json +++ b/x-pack/plugins/fleet/kibana.json @@ -8,7 +8,7 @@ "server": true, "ui": true, "configPath": ["xpack", "fleet"], - "requiredPlugins": ["licensing", "data", "encryptedSavedObjects", "navigation", "customIntegrations"], + "requiredPlugins": ["licensing", "data", "encryptedSavedObjects", "navigation", "customIntegrations", "share"], "optionalPlugins": ["security", "features", "cloud", "usageCollection", "home", "globalSearch"], "extraPublicDirs": ["common"], "requiredBundles": ["kibanaReact", "esUiShared", "home", "infra", "kibanaUtils"] diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/step_configure_package.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/step_configure_package.tsx index 1ff5d20baec06..390e540f1b10f 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/step_configure_package.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/step_configure_package.tsx @@ -49,7 +49,6 @@ export const StepConfigurePackagePolicy: React.FunctionComponent<{ ); // Configure inputs (and their streams) - // Assume packages only export one config template for now const renderConfigureInputs = () => packagePolicyTemplates.length ? ( <> diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/index.tsx index 76994feb18fea..c1d0e089fcc65 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/index.tsx @@ -343,7 +343,7 @@ export const AgentPolicyDetailsPage: React.FunctionComponent = () => { /> )} - ; + ); }, [ diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/edit_package_policy_page/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/edit_package_policy_page/index.tsx index 4d940534c4a7b..840a5a71a63c7 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/edit_package_policy_page/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/edit_package_policy_page/index.tsx @@ -200,10 +200,19 @@ export const EditPackagePolicyForm = memo<{ if (packageData?.response) { setPackageInfo(packageData.response); - setValidationResults( - validatePackagePolicy(newPackagePolicy, packageData.response, safeLoad) + + const newValidationResults = validatePackagePolicy( + newPackagePolicy, + packageData.response, + safeLoad ); - setFormState('VALID'); + setValidationResults(newValidationResults); + + if (validationHasErrors(newValidationResults)) { + setFormState('INVALID'); + } else { + setFormState('VALID'); + } } } } diff --git a/x-pack/plugins/fleet/public/applications/integrations/app.tsx b/x-pack/plugins/fleet/public/applications/integrations/app.tsx index c5cc1e1892eda..c2f6f53627e38 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/app.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/app.tsx @@ -7,12 +7,10 @@ import React, { memo, useEffect, useState } from 'react'; import type { AppMountParameters } from 'kibana/public'; -import { EuiCode, EuiEmptyPrompt, EuiErrorBoundary, EuiPanel, EuiPortal } from '@elastic/eui'; +import { EuiErrorBoundary, EuiPortal } from '@elastic/eui'; import type { History } from 'history'; import { Router, Redirect, Route, Switch } from 'react-router-dom'; import { FormattedMessage } from '@kbn/i18n/react'; -import { i18n } from '@kbn/i18n'; -import styled from 'styled-components'; import useObservable from 'react-use/lib/useObservable'; import { @@ -39,41 +37,34 @@ import { Error, Loading, SettingFlyout } from './components'; import type { UIExtensionsStorage } from './types'; import { EPMApp } from './sections/epm'; -import { DefaultLayout, WithoutHeaderLayout } from './layouts'; +import { DefaultLayout } from './layouts'; import { PackageInstallProvider } from './hooks'; import { useBreadcrumbs, UIExtensionsContext } from './hooks'; +import { IntegrationsHeader } from './components/header'; const ErrorLayout = ({ children }: { children: JSX.Element }) => ( - - {children} - + {children} ); -const Panel = styled(EuiPanel)` - max-width: 500px; - margin-right: auto; - margin-left: auto; -`; - export const WithPermissionsAndSetup: React.FC = memo(({ children }) => { useBreadcrumbs('integrations'); const [isPermissionsLoading, setIsPermissionsLoading] = useState(false); - const [permissionsError, setPermissionsError] = useState(); const [isInitialized, setIsInitialized] = useState(false); const [initializationError, setInitializationError] = useState(null); useEffect(() => { (async () => { - setPermissionsError(undefined); setIsInitialized(false); setInitializationError(null); try { + // Attempt Fleet Setup if user has permissions, otherwise skip setIsPermissionsLoading(true); const permissionsResponse = await sendGetPermissionsCheck(); setIsPermissionsLoading(false); + if (permissionsResponse.data?.success) { try { const setupResponse = await sendSetup(); @@ -85,69 +76,20 @@ export const WithPermissionsAndSetup: React.FC = memo(({ children }) => { } setIsInitialized(true); } else { - setPermissionsError(permissionsResponse.data?.error || 'REQUEST_ERROR'); + setIsInitialized(true); } - } catch (err) { - setPermissionsError('REQUEST_ERROR'); + } catch { + // If there's an error checking permissions, default to proceeding without running setup + // User will only have access to EPM endpoints if they actually have permission + setIsInitialized(true); } })(); }, []); - if (isPermissionsLoading || permissionsError) { + if (isPermissionsLoading) { return ( - {isPermissionsLoading ? ( - - ) : permissionsError === 'REQUEST_ERROR' ? ( - - } - error={i18n.translate('xpack.fleet.permissionsRequestErrorMessageDescription', { - defaultMessage: 'There was a problem checking Fleet permissions', - })} - /> - ) : ( - - - {permissionsError === 'MISSING_SUPERUSER_ROLE' ? ( - - ) : ( - - )} - - } - body={ -

- {permissionsError === 'MISSING_SUPERUSER_ROLE' ? ( - superuser }} - /> - ) : ( - - )} -

- } - /> -
- )} +
); } @@ -186,41 +128,53 @@ export const IntegrationsAppContext: React.FC<{ history: AppMountParameters['history']; kibanaVersion: string; extensions: UIExtensionsStorage; + setHeaderActionMenu: AppMountParameters['setHeaderActionMenu']; /** For testing purposes only */ routerHistory?: History; // TODO remove -}> = memo(({ children, startServices, config, history, kibanaVersion, extensions }) => { - const isDarkMode = useObservable(startServices.uiSettings.get$('theme:darkMode')); +}> = memo( + ({ + children, + startServices, + config, + history, + kibanaVersion, + extensions, + setHeaderActionMenu, + }) => { + const isDarkMode = useObservable(startServices.uiSettings.get$('theme:darkMode')); - return ( - - - - - - - - - - - - - - {children} - - - - - - - - - - - - - - ); -}); + return ( + + + + + + + + + + + + + + + {children} + + + + + + + + + + + + + + ); + } +); export const AppRoutes = memo(() => { const { modal, setModal } = useUrlModal(); diff --git a/x-pack/plugins/fleet/public/applications/integrations/components/header/deployment_details.component.tsx b/x-pack/plugins/fleet/public/applications/integrations/components/header/deployment_details.component.tsx new file mode 100644 index 0000000000000..1fa673890fa82 --- /dev/null +++ b/x-pack/plugins/fleet/public/applications/integrations/components/header/deployment_details.component.tsx @@ -0,0 +1,120 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import styled from 'styled-components'; + +import { + EuiPopover, + EuiText, + EuiForm, + EuiFormRow, + EuiFieldText, + EuiCopy, + EuiButtonIcon, + EuiFlexGroup, + EuiFlexItem, + EuiButton, + EuiLink, + EuiHeaderLink, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; + +export interface Props { + endpointUrl: string; + cloudId: string; + managementUrl?: string; + learnMoreUrl: string; +} + +const Description = styled(EuiText)` + margin-bottom: ${({ theme }) => theme.eui.euiSizeL}; +`; + +export const DeploymentDetails = ({ endpointUrl, cloudId, learnMoreUrl, managementUrl }: Props) => { + const [isOpen, setIsOpen] = React.useState(false); + + const button = ( + setIsOpen(!isOpen)} iconType="iInCircle" iconSide="left" isActive> + {i18n.translate('xpack.fleet.integrations.deploymentButton', { + defaultMessage: 'View deployment details', + })} + + ); + + const management = managementUrl ? ( + + + + Create and manage API keys + + + + Learn more + + + + + ) : null; + + return ( + setIsOpen(false)} + button={button} + anchorPosition="downCenter" + > +
+ + Send data to Elastic from your applications by referencing your deployment and + Elasticsearch information. + + + + + + + + + + {(copy) => ( + + )} + + + + + + + + + + + + {(copy) => ( + + )} + + + + + {management} + +
+
+ ); +}; diff --git a/x-pack/plugins/fleet/public/applications/integrations/components/header/deployment_details.stories.tsx b/x-pack/plugins/fleet/public/applications/integrations/components/header/deployment_details.stories.tsx new file mode 100644 index 0000000000000..445bf471c0fe9 --- /dev/null +++ b/x-pack/plugins/fleet/public/applications/integrations/components/header/deployment_details.stories.tsx @@ -0,0 +1,56 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import type { Meta } from '@storybook/react'; +import { EuiHeader } from '@elastic/eui'; + +import { DeploymentDetails as ConnectedComponent } from './deployment_details'; +import type { Props as PureComponentProps } from './deployment_details.component'; +import { DeploymentDetails as PureComponent } from './deployment_details.component'; + +export default { + title: 'Sections/EPM/Deployment Details', + description: '', + decorators: [ + (storyFn) => { + const sections = [{ items: [] }, { items: [storyFn()] }]; + return ; + }, + ], +} as Meta; + +export const DeploymentDetails = () => { + return ; +}; + +DeploymentDetails.args = { + isCloudEnabled: true, +}; + +DeploymentDetails.argTypes = { + isCloudEnabled: { + type: { + name: 'boolean', + }, + defaultValue: true, + control: { + type: 'boolean', + }, + }, +}; + +export const Component = (props: PureComponentProps) => { + return ; +}; + +Component.args = { + cloudId: 'cloud-id', + endpointUrl: 'https://endpoint-url', + learnMoreUrl: 'https://learn-more-url', + managementUrl: 'https://management-url', +}; diff --git a/x-pack/plugins/fleet/public/applications/integrations/components/header/deployment_details.tsx b/x-pack/plugins/fleet/public/applications/integrations/components/header/deployment_details.tsx new file mode 100644 index 0000000000000..48c8fa56fb91b --- /dev/null +++ b/x-pack/plugins/fleet/public/applications/integrations/components/header/deployment_details.tsx @@ -0,0 +1,51 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { useStartServices } from '../../hooks'; + +import { DeploymentDetails as Component } from './deployment_details.component'; + +export const DeploymentDetails = () => { + const { share, cloud, docLinks } = useStartServices(); + + // If the cloud plugin isn't enabled, we can't display the flyout. + if (!cloud) { + return null; + } + + const { isCloudEnabled, cloudId, cname } = cloud; + + // If cloud isn't enabled, we don't have a cloudId or a cname, we can't display the flyout. + if (!isCloudEnabled || !cloudId || !cname) { + return null; + } + + // If the cname doesn't start with a known prefix, we can't display the flyout. + // TODO: dover - this is a short term solution, see https://github.com/elastic/kibana/pull/114287#issuecomment-940111026 + if ( + !( + cname.endsWith('elastic-cloud.com') || + cname.endsWith('found.io') || + cname.endsWith('found.no') + ) + ) { + return null; + } + + const cnameNormalized = cname.startsWith('.') ? cname.substring(1) : cname; + const endpointUrl = `https://${cloudId}.${cnameNormalized}`; + + const managementUrl = share.url.locators + .get('MANAGEMENT_APP_LOCATOR') + ?.useUrl({ sectionId: 'security', appId: 'api_keys' }); + + const learnMoreUrl = docLinks.links.fleet.apiKeysLearnMore; + + return ; +}; diff --git a/x-pack/plugins/fleet/public/applications/integrations/components/header/header.tsx b/x-pack/plugins/fleet/public/applications/integrations/components/header/header.tsx new file mode 100644 index 0000000000000..e87c63e98ef28 --- /dev/null +++ b/x-pack/plugins/fleet/public/applications/integrations/components/header/header.tsx @@ -0,0 +1,32 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { EuiHeaderSectionItem, EuiHeaderSection, EuiHeaderLinks } from '@elastic/eui'; + +import type { AppMountParameters } from 'kibana/public'; + +import { HeaderPortal } from './header_portal'; +import { DeploymentDetails } from './deployment_details'; + +export const IntegrationsHeader = ({ + setHeaderActionMenu, +}: { + setHeaderActionMenu: AppMountParameters['setHeaderActionMenu']; +}) => { + return ( + + + + + + + + + + ); +}; diff --git a/x-pack/plugins/fleet/public/applications/integrations/components/header/header_portal.tsx b/x-pack/plugins/fleet/public/applications/integrations/components/header/header_portal.tsx new file mode 100644 index 0000000000000..d3dbbcf9628ec --- /dev/null +++ b/x-pack/plugins/fleet/public/applications/integrations/components/header/header_portal.tsx @@ -0,0 +1,35 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { AppMountParameters } from 'kibana/public'; +import type { FC } from 'react'; +import React, { useEffect, useMemo } from 'react'; +import { createPortalNode, InPortal, OutPortal } from 'react-reverse-portal'; + +import { toMountPoint } from '../../../../../../../../src/plugins/kibana_react/public'; + +export interface Props { + setHeaderActionMenu: AppMountParameters['setHeaderActionMenu']; +} + +export const HeaderPortal: FC = ({ children, setHeaderActionMenu }) => { + const portalNode = useMemo(() => createPortalNode(), []); + + useEffect(() => { + setHeaderActionMenu((element) => { + const mount = toMountPoint(); + return mount(element); + }); + + return () => { + portalNode.unmount(); + setHeaderActionMenu(undefined); + }; + }, [portalNode, setHeaderActionMenu]); + + return {children}; +}; diff --git a/x-pack/plugins/fleet/public/applications/integrations/components/header/index.ts b/x-pack/plugins/fleet/public/applications/integrations/components/header/index.ts new file mode 100644 index 0000000000000..e0a342326d972 --- /dev/null +++ b/x-pack/plugins/fleet/public/applications/integrations/components/header/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 { IntegrationsHeader } from './header'; diff --git a/x-pack/plugins/fleet/public/applications/integrations/hooks/use_local_search.tsx b/x-pack/plugins/fleet/public/applications/integrations/hooks/use_local_search.tsx index a8ed849f50a8a..458c4d94f9cd4 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/hooks/use_local_search.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/hooks/use_local_search.tsx @@ -14,7 +14,7 @@ export const searchIdField = 'id'; export const fieldsToSearch = ['name', 'title', 'description']; export function useLocalSearch(packageList: IntegrationCardItem[]) { - const localSearchRef = useRef(null); + const localSearchRef = useRef(new LocalSearch(searchIdField)); useEffect(() => { const localSearch = new LocalSearch(searchIdField); diff --git a/x-pack/plugins/fleet/public/hooks/use_merge_epr_with_replacements.test.ts b/x-pack/plugins/fleet/public/applications/integrations/hooks/use_merge_epr_with_replacements.test.ts similarity index 82% rename from x-pack/plugins/fleet/public/hooks/use_merge_epr_with_replacements.test.ts rename to x-pack/plugins/fleet/public/applications/integrations/hooks/use_merge_epr_with_replacements.test.ts index 687fb01b04546..d5d8aa093e300 100644 --- a/x-pack/plugins/fleet/public/hooks/use_merge_epr_with_replacements.test.ts +++ b/x-pack/plugins/fleet/public/applications/integrations/hooks/use_merge_epr_with_replacements.test.ts @@ -5,10 +5,10 @@ * 2.0. */ -import type { PackageListItem } from '../../common/types/models'; -import type { CustomIntegration } from '../../../../../src/plugins/custom_integrations/common'; +import type { PackageListItem } from '../../../../common/types/models'; +import type { CustomIntegration } from '../../../../../../../src/plugins/custom_integrations/common'; -import type { IntegrationCategory } from '../../../../../src/plugins/custom_integrations/common'; +import type { IntegrationCategory } from '../../../../../../../src/plugins/custom_integrations/common'; import { useMergeEprPackagesWithReplacements } from './use_merge_epr_with_replacements'; @@ -46,7 +46,7 @@ describe('useMergeEprWithReplacements', () => { }, ]); - expect(useMergeEprPackagesWithReplacements(eprPackages, replacements, '')).toEqual([ + expect(useMergeEprPackagesWithReplacements(eprPackages, replacements)).toEqual([ { name: 'aws', release: 'ga', @@ -80,7 +80,7 @@ describe('useMergeEprWithReplacements', () => { }, ]); - expect(useMergeEprPackagesWithReplacements(eprPackages, replacements, '')).toEqual([ + expect(useMergeEprPackagesWithReplacements(eprPackages, replacements)).toEqual([ { eprOverlap: 'activemq', id: 'activemq-logs', @@ -108,7 +108,7 @@ describe('useMergeEprWithReplacements', () => { }, ]); - expect(useMergeEprPackagesWithReplacements(eprPackages, replacements, '')).toEqual([ + expect(useMergeEprPackagesWithReplacements(eprPackages, replacements)).toEqual([ { name: 'activemq', release: 'beta', @@ -120,32 +120,6 @@ describe('useMergeEprWithReplacements', () => { ]); }); - test('should respect category assignment', () => { - const eprPackages: PackageListItem[] = mockEprPackages([ - { - name: 'activemq', - release: 'beta', - }, - ]); - const replacements: CustomIntegration[] = mockIntegrations([ - { - id: 'prometheus', - categories: ['monitoring', 'datastore'], - }, - { - id: 'oracle', - categories: ['datastore'], - }, - ]); - - expect(useMergeEprPackagesWithReplacements(eprPackages, replacements, 'web')).toEqual([ - { - name: 'activemq', - release: 'beta', - }, - ]); - }); - test('should consists of all 3 types (ga eprs, replacements for non-ga eprs, replacements without epr equivalent', () => { const eprPackages: PackageListItem[] = mockEprPackages([ { @@ -190,7 +164,7 @@ describe('useMergeEprWithReplacements', () => { }, ]); - expect(useMergeEprPackagesWithReplacements(eprPackages, replacements, '')).toEqual([ + expect(useMergeEprPackagesWithReplacements(eprPackages, replacements)).toEqual([ { name: 'aws', release: 'ga', diff --git a/x-pack/plugins/fleet/public/hooks/use_merge_epr_with_replacements.ts b/x-pack/plugins/fleet/public/applications/integrations/hooks/use_merge_epr_with_replacements.ts similarity index 75% rename from x-pack/plugins/fleet/public/hooks/use_merge_epr_with_replacements.ts rename to x-pack/plugins/fleet/public/applications/integrations/hooks/use_merge_epr_with_replacements.ts index ac53badc2446d..4c59f0ef45123 100644 --- a/x-pack/plugins/fleet/public/hooks/use_merge_epr_with_replacements.ts +++ b/x-pack/plugins/fleet/public/applications/integrations/hooks/use_merge_epr_with_replacements.ts @@ -5,12 +5,9 @@ * 2.0. */ -import type { PackageListItem } from '../../common/types/models'; -import type { - CustomIntegration, - IntegrationCategory, -} from '../../../../../src/plugins/custom_integrations/common'; -import { filterCustomIntegrations } from '../../../../../src/plugins/custom_integrations/public'; +import type { PackageListItem } from '../../../../common/types/models'; +import type { CustomIntegration } from '../../../../../../../src/plugins/custom_integrations/common'; +import { filterCustomIntegrations } from '../../../../../../../src/plugins/custom_integrations/public'; // Export this as a utility to find replacements for a package (e.g. in the overview-page for an EPR package) function findReplacementsForEprPackage( @@ -26,17 +23,13 @@ function findReplacementsForEprPackage( export function useMergeEprPackagesWithReplacements( eprPackages: PackageListItem[], - replacements: CustomIntegration[], - category: IntegrationCategory | '' + replacements: CustomIntegration[] ): Array { const merged: Array = []; - - const filteredReplacements = replacements.filter((customIntegration) => { - return !category || customIntegration.categories.includes(category); - }); + const filteredReplacements = replacements; // Either select replacement or select beat - eprPackages.forEach((eprPackage) => { + eprPackages.forEach((eprPackage: PackageListItem) => { const hits = findReplacementsForEprPackage( filteredReplacements, eprPackage.name, diff --git a/x-pack/plugins/fleet/public/applications/integrations/index.tsx b/x-pack/plugins/fleet/public/applications/integrations/index.tsx index da8959a019ce5..0abb78f850076 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/index.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/index.tsx @@ -37,6 +37,7 @@ interface IntegrationsAppProps { history: AppMountParameters['history']; kibanaVersion: string; extensions: UIExtensionsStorage; + setHeaderActionMenu: AppMountParameters['setHeaderActionMenu']; } const IntegrationsApp = ({ basepath, @@ -45,6 +46,7 @@ const IntegrationsApp = ({ history, kibanaVersion, extensions, + setHeaderActionMenu, }: IntegrationsAppProps) => { return ( @@ -64,7 +67,7 @@ const IntegrationsApp = ({ export function renderApp( startServices: FleetStartServices, - { element, appBasePath, history }: AppMountParameters, + { element, appBasePath, history, setHeaderActionMenu }: AppMountParameters, config: FleetConfigType, kibanaVersion: string, extensions: UIExtensionsStorage @@ -77,6 +80,7 @@ export function renderApp( history={history} kibanaVersion={kibanaVersion} extensions={extensions} + setHeaderActionMenu={setHeaderActionMenu} />, element ); diff --git a/x-pack/plugins/fleet/public/applications/integrations/layouts/default.tsx b/x-pack/plugins/fleet/public/applications/integrations/layouts/default.tsx index e4de48a85c35a..0c46e1af301cf 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/layouts/default.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/layouts/default.tsx @@ -5,20 +5,12 @@ * 2.0. */ import React, { memo } from 'react'; -import { EuiFlexGroup, EuiFlexItem, EuiImage, EuiSpacer, EuiText } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiText } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; -import { i18n } from '@kbn/i18n'; - -import styled, { useTheme } from 'styled-components'; - -import type { EuiTheme } from 'src/plugins/kibana_react/common'; - import { useLink } from '../../../hooks'; import type { Section } from '../sections'; -import { useLinks } from '../hooks'; - import { WithHeaderLayout } from './'; interface Props { @@ -26,43 +18,18 @@ interface Props { children?: React.ReactNode; } -const Illustration = styled(EuiImage)` - margin-bottom: -68px; - width: 80%; -`; - -const HeroImage = memo(() => { - const { toSharedAssets } = useLinks(); - const theme = useTheme() as EuiTheme; - const IS_DARK_THEME = theme.darkMode; - - return ( - - ); -}); - export const DefaultLayout: React.FunctionComponent = memo(({ section, children }) => { const { getHref } = useLink(); return ( } leftColumn={

@@ -70,11 +37,11 @@ export const DefaultLayout: React.FunctionComponent = memo(({ section, ch - +

diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/integration_preference.stories.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/integration_preference.stories.tsx new file mode 100644 index 0000000000000..86b34f2415e2e --- /dev/null +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/integration_preference.stories.tsx @@ -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 React from 'react'; +import type { Meta } from '@storybook/react'; + +import { action } from '@storybook/addon-actions'; + +import { IntegrationPreference as Component } from './integration_preference'; + +export default { + title: 'Sections/EPM/Integration Preference', + description: '', + decorators: [ + (storyFn, { globals }) => ( +
+ {storyFn()} +
+ ), + ], +} as Meta; + +export const IntegrationPreference = () => { + return ; +}; diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/integration_preference.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/integration_preference.tsx new file mode 100644 index 0000000000000..ecc5c22c8d8ce --- /dev/null +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/integration_preference.tsx @@ -0,0 +1,120 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import styled from 'styled-components'; + +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n/react'; +import { + EuiPanel, + EuiLink, + EuiText, + EuiForm, + EuiRadioGroup, + EuiSpacer, + EuiIconTip, + EuiFlexGroup, + EuiFlexItem, +} from '@elastic/eui'; + +export type IntegrationPreferenceType = 'recommended' | 'beats' | 'agent'; + +interface Option { + type: IntegrationPreferenceType; + label: React.ReactNode; +} + +export interface Props { + initialType: IntegrationPreferenceType; + onChange: (type: IntegrationPreferenceType) => void; +} + +const link = ( + + + +); + +const title = ( + +); + +const recommendedTooltip = ( + +); + +const Item = styled(EuiFlexItem)` + padding-left: ${(props) => props.theme.eui.euiSizeXS}; +`; + +const options: Option[] = [ + { + type: 'recommended', + label: ( + + + {i18n.translate('xpack.fleet.epm.integrationPreference.recommendedLabel', { + defaultMessage: 'Recommended', + })} + + + + + + ), + }, + { + type: 'agent', + label: i18n.translate('xpack.fleet.epm.integrationPreference.elasticAgentLabel', { + defaultMessage: 'Elastic Agent only', + }), + }, + { + type: 'beats', + label: i18n.translate('xpack.fleet.epm.integrationPreference.beatsLabel', { + defaultMessage: 'Beats only', + }), + }, +]; + +export const IntegrationPreference = ({ initialType, onChange }: Props) => { + const [idSelected, setIdSelected] = React.useState(initialType); + const radios = options.map((option) => ({ + id: option.type, + value: option.type, + label: option.label, + })); + + return ( + + {title} + + + { + setIdSelected(id as IntegrationPreferenceType); + onChange(value as IntegrationPreferenceType); + }} + name="preference" + /> + + + ); +}; diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_card.stories.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_card.stories.tsx index bddbc4f027b4f..86bac94bc50cd 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_card.stories.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_card.stories.tsx @@ -22,7 +22,7 @@ export default { type Args = Omit & { width: number }; const args: Args = { - width: 250, + width: 280, title: 'Title', description: 'Description', name: 'beats', @@ -32,6 +32,7 @@ const args: Args = { url: '/', icons: [], integration: '', + categories: ['foobar'], }; const argTypes = { diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_card.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_card.tsx index a68499dbd8dd0..091eb4c97183d 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_card.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_card.tsx @@ -7,7 +7,7 @@ import React from 'react'; import styled from 'styled-components'; -import { EuiCard } from '@elastic/eui'; +import { EuiCard, EuiFlexItem, EuiBadge, EuiToolTip, EuiSpacer } from '@elastic/eui'; import { CardIcon } from '../../../../../components/package_icon'; import type { IntegrationCardItem } from '../../../../../../common/types/models/epm'; @@ -16,10 +16,10 @@ import { RELEASE_BADGE_DESCRIPTION, RELEASE_BADGE_LABEL } from './release_badge' export type PackageCardProps = IntegrationCardItem; -// adding the `href` causes EuiCard to use a `a` instead of a `button` -// `a` tags use `euiLinkColor` which results in blueish Badge text +// Min-height is roughly 3 lines of content. +// This keeps the cards from looking overly unbalanced because of content differences. const Card = styled(EuiCard)` - color: inherit; + min-height: 127px; `; export function PackageCard({ @@ -32,14 +32,28 @@ export function PackageCard({ url, release, }: PackageCardProps) { - const betaBadgeLabel = release && release !== 'ga' ? RELEASE_BADGE_LABEL[release] : undefined; - const betaBadgeLabelTooltipContent = - release && release !== 'ga' ? RELEASE_BADGE_DESCRIPTION[release] : undefined; + let releaseBadge: React.ReactNode | null = null; + + if (release && release !== 'ga') { + releaseBadge = ( + + + + + {RELEASE_BADGE_LABEL[release]} + + + + ); + } return ( } href={url} - betaBadgeLabel={betaBadgeLabel} - betaBadgeTooltipContent={betaBadgeLabelTooltipContent} target={url.startsWith('http') || url.startsWith('https') ? '_blank' : undefined} - /> + > + {releaseBadge} + ); } diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid.stories.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid.stories.tsx index e4bd1da842867..f43c18d167717 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid.stories.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid.stories.tsx @@ -47,6 +47,7 @@ export const List = (props: Args) => ( url: 'https://example.com', icons: [], integration: 'integation', + categories: ['web'], }, { title: 'Package Two', @@ -58,6 +59,7 @@ export const List = (props: Args) => ( url: 'https://example.com', icons: [], integration: 'integation', + categories: ['web'], }, { title: 'Package Three', @@ -69,6 +71,7 @@ export const List = (props: Args) => ( url: 'https://example.com', icons: [], integration: 'integation', + categories: ['web'], }, { title: 'Package Four', @@ -80,6 +83,7 @@ export const List = (props: Args) => ( url: 'https://example.com', icons: [], integration: 'integation', + categories: ['web'], }, { title: 'Package Five', @@ -91,6 +95,7 @@ export const List = (props: Args) => ( url: 'https://example.com', icons: [], integration: 'integation', + categories: ['web'], }, { title: 'Package Six', @@ -102,6 +107,7 @@ export const List = (props: Args) => ( url: 'https://example.com', icons: [], integration: 'integation', + categories: ['web'], }, ]} onSearchChange={action('onSearchChange')} diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid.tsx index 1cffd5292b6a2..00adb2a7b4ffb 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid.tsx @@ -5,8 +5,8 @@ * 2.0. */ -import type { ReactNode } from 'react'; -import React, { Fragment, useCallback, useState } from 'react'; +import type { ReactNode, FunctionComponent } from 'react'; +import React, { useCallback, useState, useRef, useEffect } from 'react'; import { EuiFlexGrid, EuiFlexGroup, @@ -20,7 +20,6 @@ import { import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; -import { useStartServices } from '../../../../../hooks'; import { Loading } from '../../../components'; import { useLocalSearch, searchIdField } from '../../../hooks'; @@ -30,8 +29,8 @@ import { PackageCard } from './package_card'; export interface Props { isLoading?: boolean; - controls?: ReactNode; - title: string; + controls?: ReactNode | ReactNode[]; + title?: string; list: IntegrationCardItem[]; initialSearch?: string; setSelectedCategory: (category: string) => void; @@ -40,7 +39,7 @@ export interface Props { callout?: JSX.Element | null; } -export function PackageListGrid({ +export const PackageListGrid: FunctionComponent = ({ isLoading, controls, title, @@ -50,9 +49,23 @@ export function PackageListGrid({ setSelectedCategory, showMissingIntegrationMessage = false, callout, -}: Props) { +}) => { const [searchTerm, setSearchTerm] = useState(initialSearch || ''); const localSearchRef = useLocalSearch(list); + const menuRef = useRef(null); + const [isSticky, setIsSticky] = useState(false); + const [windowScrollY] = useState(window.scrollY); + + useEffect(() => { + const menuRefCurrent = menuRef.current; + const onScroll = () => { + if (menuRefCurrent) { + setIsSticky(menuRefCurrent?.getBoundingClientRect().top < 110); + } + }; + window.addEventListener('scroll', onScroll); + return () => window.removeEventListener('scroll', onScroll); + }, [windowScrollY, isSticky]); const onQueryChange = ({ queryText: userInput, @@ -71,7 +84,7 @@ export function PackageListGrid({ setSearchTerm(''); }; - const controlsContent = ; + const controlsContent = ; let gridContent: JSX.Element; if (isLoading || !localSearchRef.current) { @@ -93,58 +106,68 @@ export function PackageListGrid({ } return ( - - {controlsContent} - - - {callout ? ( - <> - - {callout} - - ) : null} - - {gridContent} - {showMissingIntegrationMessage && ( - <> - - - - )} - - +
+ + + {controlsContent} + + + + {callout ? ( + <> + + {callout} + + ) : null} + + {gridContent} + {showMissingIntegrationMessage && ( + <> + + + + )} + + +
); -} +}; interface ControlsColumnProps { controls: ReactNode; - title: string; + title: string | undefined; + sticky: boolean; } -function ControlsColumn({ controls, title }: ControlsColumnProps) { +function ControlsColumn({ controls, title, sticky }: ControlsColumnProps) { + let titleContent; + if (title) { + titleContent = ( + <> + +

{title}

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

{title}

-
- - - {controls} - - -
+ + {titleContent} + {controls} + ); } @@ -196,20 +219,17 @@ function MissingIntegrationContent({ resetQuery, setSelectedCategory, }: MissingIntegrationContentProps) { - const { - application: { getUrlForApp }, - } = useStartServices(); const handleCustomInputsLinkClick = useCallback(() => { resetQuery(); setSelectedCategory('custom'); }, [resetQuery, setSelectedCategory]); return ( - +

@@ -227,14 +247,6 @@ function MissingIntegrationContent({ /> ), - beatsTutorialLink: ( - - - - ), }} />

diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/assets/assets.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/assets/assets.tsx index 6d075faeef308..a8d27580e0bd1 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/assets/assets.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/assets/assets.tsx @@ -9,6 +9,7 @@ import React, { useEffect, useState } from 'react'; import { Redirect } from 'react-router-dom'; import { FormattedMessage } from '@kbn/i18n/react'; import { EuiFlexGroup, EuiFlexItem, EuiTitle, EuiSpacer } from '@elastic/eui'; +import { groupBy } from 'lodash'; import { Loading, Error, ExtensionWrapper } from '../../../../../components'; @@ -67,8 +68,26 @@ export const AssetsPage = ({ packageInfo }: AssetsPanelProps) => { id, type, })); - const { savedObjects } = await savedObjectsClient.bulkGet(objectsToGet); - setAssetsSavedObjects(savedObjects as AssetSavedObject[]); + + // We don't have an API to know which SO types a user has access to, so instead we make a request for each + // SO type and ignore the 403 errors + const objectsByType = await Promise.all( + Object.entries(groupBy(objectsToGet, 'type')).map(([type, objects]) => + savedObjectsClient + .bulkGet(objects) + // Ignore privilege errors + .catch((e: any) => { + if (e?.body?.statusCode === 403) { + return { savedObjects: [] }; + } else { + throw e; + } + }) + .then(({ savedObjects }) => savedObjects as AssetSavedObject[]) + ) + ); + + setAssetsSavedObjects(objectsByType.flat()); } catch (e) { setFetchError(e); } finally { diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.test.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.test.tsx index d70b6c68016be..d442f8a13e27e 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.test.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.test.tsx @@ -11,6 +11,7 @@ import { act, cleanup } from '@testing-library/react'; import { INTEGRATIONS_ROUTING_PATHS, pagePathGetters } from '../../../../constants'; import type { + CheckPermissionsResponse, GetAgentPoliciesResponse, GetFleetStatusResponse, GetInfoResponse, @@ -23,6 +24,7 @@ import type { } from '../../../../../../../common/types/models'; import { agentPolicyRouteService, + appRoutesService, epmRouteService, fleetSetupRouteService, packagePolicyRouteService, @@ -260,6 +262,7 @@ interface EpmPackageDetailsResponseProvidersMock { fleetSetup: jest.MockedFunction<() => GetFleetStatusResponse>; packagePolicyList: jest.MockedFunction<() => GetPackagePoliciesResponse>; agentPolicyList: jest.MockedFunction<() => GetAgentPoliciesResponse>; + appCheckPermissions: jest.MockedFunction<() => CheckPermissionsResponse>; } const mockApiCalls = ( @@ -740,6 +743,10 @@ On Windows, the module was tested with Nginx installed from the Chocolatey repos }, }; + const appCheckPermissionsResponse: CheckPermissionsResponse = { + success: true, + }; + const mockedApiInterface: MockedApi = { waitForApi() { return new Promise((resolve) => { @@ -757,6 +764,7 @@ On Windows, the module was tested with Nginx installed from the Chocolatey repos fleetSetup: jest.fn().mockReturnValue(agentsSetupResponse), packagePolicyList: jest.fn().mockReturnValue(packagePoliciesResponse), agentPolicyList: jest.fn().mockReturnValue(agentPoliciesResponse), + appCheckPermissions: jest.fn().mockReturnValue(appCheckPermissionsResponse), }, }; @@ -792,6 +800,11 @@ On Windows, the module was tested with Nginx installed from the Chocolatey repos return mockedApiInterface.responseProvider.epmGetStats(); } + if (path === appRoutesService.getCheckPermissionsPath()) { + markApiCallAsHandled(); + return mockedApiInterface.responseProvider.appCheckPermissions(); + } + const err = new Error(`API [GET ${path}] is not MOCKED!`); // eslint-disable-next-line no-console console.error(err); diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.tsx index 82436eb4d3f51..ade290aab4e5e 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.tsx @@ -8,10 +8,12 @@ import type { ReactEventHandler } from 'react'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { Redirect, Route, Switch, useLocation, useParams, useHistory } from 'react-router-dom'; import styled from 'styled-components'; +import type { EuiToolTipProps } from '@elastic/eui'; import { EuiBetaBadge, EuiButton, EuiButtonEmpty, + EuiCallOut, EuiDescriptionList, EuiDescriptionListDescription, EuiDescriptionListTitle, @@ -19,6 +21,7 @@ import { EuiFlexItem, EuiSpacer, EuiText, + EuiToolTip, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; @@ -30,6 +33,7 @@ import { useUIExtension, useBreadcrumbs, useStartServices, + usePermissionCheck, } from '../../../../hooks'; import { PLUGIN_ID, @@ -61,6 +65,7 @@ import { OverviewPage } from './overview'; import { PackagePoliciesPage } from './policies'; import { SettingsPage } from './settings'; import { CustomViewPage } from './custom'; + import './index.scss'; export interface DetailParams { @@ -95,7 +100,11 @@ export function Detail() { const { getId: getAgentPolicyId } = useAgentPolicyContext(); const { pkgkey, panel } = useParams(); const { getHref } = useLink(); - const hasWriteCapabilites = useCapabilities().write; + const hasWriteCapabilities = useCapabilities().write; + const permissionCheck = usePermissionCheck(); + const missingSecurityConfiguration = + !permissionCheck.data?.success && permissionCheck.data?.error === 'MISSING_SECURITY'; + const userCanInstallIntegrations = hasWriteCapabilities && permissionCheck.data?.success; const history = useHistory(); const { pathname, search, hash } = useLocation(); const queryParams = useMemo(() => new URLSearchParams(search), [search]); @@ -127,9 +136,11 @@ export function Detail() { const { data: packageInfoData, error: packageInfoError, - isLoading, + isLoading: packageInfoLoading, } = useGetPackageInfoByKey(pkgkey); + const isLoading = packageInfoLoading || permissionCheck.isLoading; + const showCustomTab = useUIExtension(packageInfoData?.response.name ?? '', 'package-detail-custom') !== undefined; @@ -327,10 +338,9 @@ export function Detail() { { isDivider: true }, { content: ( - // eslint-disable-next-line @elastic/eui/href-or-on-click - + ) : ( + + ), + } + : undefined + } > - + ), }, ].map((item, index) => ( @@ -370,16 +397,17 @@ export function Detail() { ) : undefined, [ - getHref, - handleAddIntegrationPolicyClick, - hasWriteCapabilites, - integration, - integrationInfo, packageInfo, + updateAvailable, packageInstallStatus, + userCanInstallIntegrations, + getHref, pkgkey, - updateAvailable, + integration, agentPolicyIdFromContext, + handleAddIntegrationPolicyClick, + missingSecurityConfiguration, + integrationInfo?.title, ] ); @@ -407,7 +435,7 @@ export function Detail() { }, ]; - if (packageInstallStatus === InstallStatus.installed) { + if (userCanInstallIntegrations && packageInstallStatus === InstallStatus.installed) { tabs.push({ id: 'policies', name: ( @@ -443,21 +471,23 @@ export function Detail() { }); } - tabs.push({ - id: 'settings', - name: ( - - ), - isSelected: panel === 'settings', - 'data-test-subj': `tab-settings`, - href: getHref('integration_details_settings', { - pkgkey: packageInfoKey, - ...(integration ? { integration } : {}), - }), - }); + if (userCanInstallIntegrations) { + tabs.push({ + id: 'settings', + name: ( + + ), + isSelected: panel === 'settings', + 'data-test-subj': `tab-settings`, + href: getHref('integration_details_settings', { + pkgkey: packageInfoKey, + ...(integration ? { integration } : {}), + }), + }); + } if (showCustomTab) { tabs.push({ @@ -478,13 +508,55 @@ export function Detail() { } return tabs; - }, [packageInfo, panel, getHref, integration, packageInstallStatus, showCustomTab, CustomAssets]); + }, [ + packageInfo, + panel, + getHref, + integration, + userCanInstallIntegrations, + packageInstallStatus, + CustomAssets, + showCustomTab, + ]); + + const securityCallout = missingSecurityConfiguration ? ( + <> + + } + > + + + + ), + }} + /> + + + + ) : undefined; return ( @@ -526,3 +598,16 @@ export function Detail() { ); } + +type EuiButtonPropsFull = Parameters[0]; + +const EuiButtonWithTooltip: React.FC }> = + ({ tooltip: tooltipProps, ...buttonProps }) => { + return tooltipProps ? ( + + + + ) : ( + + ); + }; diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/available_packages.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/available_packages.tsx index 8aef9121bf67d..91b557d0db5b6 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/available_packages.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/available_packages.tsx @@ -5,9 +5,10 @@ * 2.0. */ -import React, { memo, useMemo } from 'react'; +import React, { memo, useMemo, useState } from 'react'; import { useLocation, useHistory, useParams } from 'react-router-dom'; -import { i18n } from '@kbn/i18n'; +import _ from 'lodash'; +import { EuiHorizontalRule, EuiFlexItem } from '@elastic/eui'; import { pagePathGetters } from '../../../../constants'; import { @@ -26,30 +27,56 @@ import type { CustomIntegration } from '../../../../../../../../../../src/plugin import type { PackageListItem } from '../../../../types'; -import type { IntegrationCategory } from '../../../../../../../../../../src/plugins/custom_integrations/common'; +import type { IntegrationCardItem } from '../../../../../../../common/types/models'; -import { useMergeEprPackagesWithReplacements } from '../../../../../../hooks/use_merge_epr_with_replacements'; +import { useMergeEprPackagesWithReplacements } from '../../../../hooks/use_merge_epr_with_replacements'; -import { mergeAndReplaceCategoryCounts } from './util'; -import { CategoryFacets } from './category_facets'; +import type { IntegrationPreferenceType } from '../../components/integration_preference'; +import { IntegrationPreference } from '../../components/integration_preference'; + +import { mergeCategoriesAndCount } from './util'; +import { ALL_CATEGORY, CategoryFacets } from './category_facets'; import type { CategoryFacet } from './category_facets'; import type { CategoryParams } from '.'; import { getParams, categoryExists, mapToCard } from '.'; +function getAllCategoriesFromIntegrations(pkg: PackageListItem) { + if (!doesPackageHaveIntegrations(pkg)) { + return pkg.categories; + } + + const allCategories = pkg.policy_templates?.reduce((accumulator, integration) => { + return [...accumulator, ...(integration.categories || [])]; + }, pkg.categories || []); + + return _.uniq(allCategories); +} + // Packages can export multiple integrations, aka `policy_templates` // In the case where packages ship >1 `policy_templates`, we flatten out the // list of packages by bringing all integrations to top-level so that // each integration is displayed as its own tile const packageListToIntegrationsList = (packages: PackageList): PackageList => { return packages.reduce((acc: PackageList, pkg) => { - const { policy_templates: policyTemplates = [], ...restOfPackage } = pkg; + const { + policy_templates: policyTemplates = [], + categories: topCategories = [], + ...restOfPackage + } = pkg; + + const topPackage = { + ...restOfPackage, + categories: getAllCategoriesFromIntegrations(pkg), + }; + return [ ...acc, - restOfPackage, + topPackage, ...(doesPackageHaveIntegrations(pkg) ? policyTemplates.map((integration) => { - const { name, title, description, icons } = integration; + const { name, title, description, icons, categories = [] } = integration; + const allCategories = [...topCategories, ...categories]; return { ...restOfPackage, id: `${restOfPackage}-${name}`, @@ -57,6 +84,7 @@ const packageListToIntegrationsList = (packages: PackageList): PackageList => { title, description, icons: icons || restOfPackage.icons, + categories: _.uniq(allCategories), }; }) : []), @@ -64,13 +92,10 @@ const packageListToIntegrationsList = (packages: PackageList): PackageList => { }, []); }; -const title = i18n.translate('xpack.fleet.epmList.allTitle', { - defaultMessage: 'Browse by category', -}); - // TODO: clintandrewhall - this component is hard to test due to the hooks, particularly those that use `http` // or `location` to load data. Ideally, we'll split this into "connected" and "pure" components. export const AvailablePackages: React.FC = memo(() => { + const [preference, setPreference] = useState('recommended'); useBreadcrumbs('integrations_all'); const { selectedCategory, searchParam } = getParams( @@ -79,7 +104,6 @@ export const AvailablePackages: React.FC = memo(() => { ); const history = useHistory(); - const { getHref, getAbsolutePath } = useLink(); function setSelectedCategory(categoryId: string) { @@ -92,118 +116,106 @@ export const AvailablePackages: React.FC = memo(() => { function setSearchTerm(search: string) { // Use .replace so the browser's back button is not tied to single keystroke - history.replace( - pagePathGetters.integrations_all({ category: selectedCategory, searchTerm: search })[1] - ); + history.replace(pagePathGetters.integrations_all({ searchTerm: search })[1]); } - const { data: allCategoryPackagesRes, isLoading: isLoadingAllPackages } = useGetPackages({ + const { data: eprPackages, isLoading: isLoadingAllPackages } = useGetPackages({ category: '', }); - const { data: categoryPackagesRes, isLoading: isLoadingCategoryPackages } = useGetPackages({ - category: selectedCategory, - }); - - const { data: categoriesRes, isLoading: isLoadingCategories } = useGetCategories({ - include_policy_templates: true, - }); - - const eprPackages = useMemo( - () => packageListToIntegrationsList(categoryPackagesRes?.response || []), - [categoryPackagesRes] - ); - - const allEprPackages = useMemo( - () => packageListToIntegrationsList(allCategoryPackagesRes?.response || []), - [allCategoryPackagesRes] + const eprIntegrationList = useMemo( + () => packageListToIntegrationsList(eprPackages?.response || []), + [eprPackages] ); const { value: replacementCustomIntegrations } = useGetReplacementCustomIntegrations(); const mergedEprPackages: Array = useMergeEprPackagesWithReplacements( - eprPackages || [], - replacementCustomIntegrations || [], - selectedCategory as IntegrationCategory + preference === 'beats' ? [] : eprIntegrationList, + preference === 'agent' ? [] : replacementCustomIntegrations || [] ); const { loading: isLoadingAppendCustomIntegrations, value: appendCustomIntegrations } = useGetAppendCustomIntegrations(); - const filteredAddableIntegrations = appendCustomIntegrations - ? appendCustomIntegrations.filter((integration: CustomIntegration) => { - if (!selectedCategory) { - return true; - } - return integration.categories.indexOf(selectedCategory as IntegrationCategory) >= 0; - }) - : []; - const eprAndCustomPackages: Array = [ ...mergedEprPackages, - ...filteredAddableIntegrations, + ...(appendCustomIntegrations || []), ]; - eprAndCustomPackages.sort((a, b) => { + const cards: IntegrationCardItem[] = eprAndCustomPackages.map((item) => { + return mapToCard(getAbsolutePath, getHref, item); + }); + + cards.sort((a, b) => { return a.title.localeCompare(b.title); }); + const { data: eprCategories, isLoading: isLoadingCategories } = useGetCategories({ + include_policy_templates: true, + }); + const categories = useMemo(() => { const eprAndCustomCategories: CategoryFacet[] = - isLoadingCategories || - isLoadingAppendCustomIntegrations || - !appendCustomIntegrations || - !categoriesRes + isLoadingCategories || !eprCategories ? [] - : mergeAndReplaceCategoryCounts( - categoriesRes.response as CategoryFacet[], - appendCustomIntegrations + : mergeCategoriesAndCount( + eprCategories.response as Array<{ id: string; title: string; count: number }>, + cards ); - return [ { - id: '', - count: (allEprPackages?.length || 0) + (appendCustomIntegrations?.length || 0), + ...ALL_CATEGORY, + count: cards.length, }, ...(eprAndCustomCategories ? eprAndCustomCategories : []), ] as CategoryFacet[]; - }, [ - allEprPackages?.length, - appendCustomIntegrations, - categoriesRes, - isLoadingAppendCustomIntegrations, - isLoadingCategories, - ]); + }, [cards, eprCategories, isLoadingCategories]); if (!isLoadingCategories && !categoryExists(selectedCategory, categories)) { history.replace(pagePathGetters.integrations_all({ category: '', searchTerm: searchParam })[1]); return null; } - const controls = categories ? ( - { - setSelectedCategory(id); - }} - /> - ) : null; + let controls = [ + + + , + , + ]; - const cards = eprAndCustomPackages.map((item) => { - return mapToCard(getAbsolutePath, getHref, item); + if (categories) { + controls = [ + + { + setSelectedCategory(id); + }} + /> + , + ...controls, + ]; + } + + const filteredCards = cards.filter((c) => { + if (selectedCategory === '') { + return true; + } + return c.categories.includes(selectedCategory); }); return ( ) : ( categories.map((category) => { - let title; - - if (category.id === 'updates_available') { - title = i18n.translate('xpack.fleet.epmList.updatesAvailableFilterLinkText', { - defaultMessage: 'Updates available', - }); - } else if (category.id === '') { - title = i18n.translate('xpack.fleet.epmList.allPackagesFilterLinkText', { - defaultMessage: 'All', - }); - } else { - title = INTEGRATION_CATEGORY_DISPLAY[category.id]; - } return ( onCategoryChange(category)} > - {title} + {category.title} ); }) diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/home.stories.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/home.stories.tsx index a95a6b750cddc..5526935ef38e6 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/home.stories.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/home.stories.tsx @@ -14,7 +14,6 @@ import { INTEGRATIONS_ROUTING_PATHS } from '../../../../constants'; import { EPMHomePage as Component } from '.'; export default { - component: Component, title: 'Sections/EPM/Home', }; diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/index.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/index.tsx index bbebf9e90b16c..2d1077f586a1a 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/index.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/index.tsx @@ -12,6 +12,7 @@ import type { DynamicPage, DynamicPagePathValues, StaticPage } from '../../../.. import { INTEGRATIONS_ROUTING_PATHS, INTEGRATIONS_SEARCH_QUERYPARAM } from '../../../../constants'; import { DefaultLayout } from '../../../../layouts'; +import type { IntegrationCategory } from '../../../../../../../../../../src/plugins/custom_integrations/common'; import type { CustomIntegration } from '../../../../../../../../../../src/plugins/custom_integrations/common'; import type { PackageListItem } from '../../../../types'; @@ -31,7 +32,10 @@ export const getParams = (params: CategoryParams, search: string) => { const selectedCategory = category || ''; const queryParams = new URLSearchParams(search); const searchParam = queryParams.get(INTEGRATIONS_SEARCH_QUERYPARAM) || ''; - return { selectedCategory, searchParam }; + return { selectedCategory, searchParam } as { + selectedCategory: IntegrationCategory & ''; + searchParam: string; + }; }; export const categoryExists = (category: string, categories: CategoryFacet[]) => { @@ -72,6 +76,7 @@ export const mapToCard = ( name: 'name' in item ? item.name || '' : '', version: 'version' in item ? item.version || '' : '', release: 'release' in item ? item.release : undefined, + categories: ((item.categories || []) as string[]).filter((c: string) => !!c), }; }; diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/installed_packages.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/installed_packages.tsx index 404e8820f90b7..efcdb7b169edf 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/installed_packages.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/installed_packages.tsx @@ -23,6 +23,7 @@ import { CategoryFacets } from './category_facets'; import type { CategoryParams } from '.'; import { getParams, categoryExists, mapToCard } from '.'; +import { ALL_CATEGORY } from './category_facets'; const AnnouncementLink = () => { const { docLinks } = useStartServices(); @@ -114,12 +115,15 @@ export const InstalledPackages: React.FC = memo(() => { const categories: CategoryFacet[] = useMemo( () => [ { - id: '', + ...ALL_CATEGORY, count: allInstalledPackages.length, }, { id: 'updates_available', count: updatablePackages.length, + title: i18n.translate('xpack.fleet.epmList.updatesAvailableFilterLinkText', { + defaultMessage: 'Updates available', + }), }, ], [allInstalledPackages.length, updatablePackages.length] @@ -135,7 +139,6 @@ export const InstalledPackages: React.FC = memo(() => { const controls = ( setSelectedCategory(id)} diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/util.ts b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/util.ts index 53a62555650ab..70902b2bc1897 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/util.ts +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/util.ts @@ -5,46 +5,57 @@ * 2.0. */ -import type { - CustomIntegration, - IntegrationCategory, -} from '../../../../../../../../../../src/plugins/custom_integrations/common'; +import type { IntegrationCategory } from '../../../../../../../../../../src/plugins/custom_integrations/common'; +import { INTEGRATION_CATEGORY_DISPLAY } from '../../../../../../../../../../src/plugins/custom_integrations/common'; + +import type { IntegrationCardItem } from '../../../../../../../common/types/models'; import type { CategoryFacet } from './category_facets'; -export function mergeAndReplaceCategoryCounts( - eprCounts: CategoryFacet[], - addableIntegrations: CustomIntegration[] +export function mergeCategoriesAndCount( + eprCategoryList: Array<{ id: string; title: string; count: number }>, // EPR-categories from backend call to EPR + cards: IntegrationCardItem[] ): CategoryFacet[] { - const merged: CategoryFacet[] = []; + const facets: CategoryFacet[] = []; - const addIfMissing = (category: string, count: number) => { - const match = merged.find((c) => { + const addIfMissing = (category: string, count: number, title: string) => { + const match = facets.find((c) => { return c.id === category; }); if (match) { match.count += count; } else { - merged.push({ - id: category as IntegrationCategory, + facets.push({ + id: category, count, + title, }); } }; - eprCounts.forEach((facet) => { - addIfMissing(facet.id, facet.count); + // Seed the list with the dynamic categories + eprCategoryList.forEach((facet) => { + addIfMissing(facet.id, 0, facet.title); }); - addableIntegrations.forEach((integration) => { - integration.categories.forEach((cat) => { - addIfMissing(cat, 1); + + // Count all the categories + cards.forEach((integration) => { + integration.categories.forEach((cat: string) => { + const title = INTEGRATION_CATEGORY_DISPLAY[cat as IntegrationCategory] + ? INTEGRATION_CATEGORY_DISPLAY[cat as IntegrationCategory] + : cat; + addIfMissing(cat, 1, title); }); }); - merged.sort((a, b) => { + const filledFacets = facets.filter((facet) => { + return facet.count > 0; + }); + + filledFacets.sort((a, b) => { return a.id.localeCompare(b.id); }); - return merged; + return filledFacets; } diff --git a/x-pack/plugins/fleet/public/components/header.tsx b/x-pack/plugins/fleet/public/components/header.tsx index 80cebe3b0b304..2a8b20240a4f6 100644 --- a/x-pack/plugins/fleet/public/components/header.tsx +++ b/x-pack/plugins/fleet/public/components/header.tsx @@ -43,6 +43,7 @@ export interface HeaderProps { leftColumn?: JSX.Element; rightColumn?: JSX.Element; rightColumnGrow?: EuiFlexItemProps['grow']; + topContent?: JSX.Element; tabs?: Array & { name?: JSX.Element | string }>; tabsClassName?: string; 'data-test-subj'?: string; @@ -61,6 +62,7 @@ export const Header: React.FC = ({ leftColumn, rightColumn, rightColumnGrow, + topContent, tabs, maxWidth, tabsClassName, @@ -68,6 +70,7 @@ export const Header: React.FC = ({ }) => ( + {topContent} { const { icons } = props; if (icons && icons.length === 1 && icons[0].type === 'eui') { - return ; + return ; } else if (icons && icons.length === 1 && icons[0].type === 'svg') { - return ; + return ; } else { return ; } diff --git a/x-pack/plugins/fleet/public/hooks/use_request/app.ts b/x-pack/plugins/fleet/public/hooks/use_request/app.ts index c84dd0fd15b44..c4a0f94869827 100644 --- a/x-pack/plugins/fleet/public/hooks/use_request/app.ts +++ b/x-pack/plugins/fleet/public/hooks/use_request/app.ts @@ -8,7 +8,7 @@ import { appRoutesService } from '../../services'; import type { CheckPermissionsResponse, GenerateServiceTokenResponse } from '../../types'; -import { sendRequest } from './use_request'; +import { sendRequest, useRequest } from './use_request'; export const sendGetPermissionsCheck = () => { return sendRequest({ @@ -23,3 +23,10 @@ export const sendGenerateServiceToken = () => { method: 'post', }); }; + +export const usePermissionCheck = () => { + return useRequest({ + path: appRoutesService.getCheckPermissionsPath(), + method: 'get', + }); +}; diff --git a/x-pack/plugins/fleet/public/mock/create_test_renderer.tsx b/x-pack/plugins/fleet/public/mock/create_test_renderer.tsx index d0724545ee902..a0a9ef405540a 100644 --- a/x-pack/plugins/fleet/public/mock/create_test_renderer.tsx +++ b/x-pack/plugins/fleet/public/mock/create_test_renderer.tsx @@ -41,6 +41,7 @@ export interface TestRenderer { kibanaVersion: string; AppWrapper: React.FC; render: UiRender; + setHeaderActionMenu: Function; } export const createFleetTestRendererMock = (): TestRenderer => { @@ -55,6 +56,7 @@ export const createFleetTestRendererMock = (): TestRenderer => { config: createConfigurationMock(), startInterface: createStartMock(extensions), kibanaVersion: '8.0.0', + setHeaderActionMenu: jest.fn(), AppWrapper: memo(({ children }) => { return ( { config: createConfigurationMock(), startInterface: createStartMock(extensions), kibanaVersion: '8.0.0', + setHeaderActionMenu: jest.fn(), AppWrapper: memo(({ children }) => { return ( { kibanaVersion={testRendererMocks.kibanaVersion} extensions={extensions} routerHistory={testRendererMocks.history} + setHeaderActionMenu={() => {}} > {children} diff --git a/x-pack/plugins/fleet/public/mock/plugin_dependencies.ts b/x-pack/plugins/fleet/public/mock/plugin_dependencies.ts index f78fe58a6ad88..0bf0213905e72 100644 --- a/x-pack/plugins/fleet/public/mock/plugin_dependencies.ts +++ b/x-pack/plugins/fleet/public/mock/plugin_dependencies.ts @@ -10,6 +10,7 @@ import { licensingMock } from '../../../licensing/public/mocks'; import { homePluginMock } from '../../../../../src/plugins/home/public/mocks'; import { navigationPluginMock } from '../../../../../src/plugins/navigation/public/mocks'; import { customIntegrationsMock } from '../../../../../src/plugins/custom_integrations/public/mocks'; +import { sharePluginMock } from '../../../../../src/plugins/share/public/mocks'; import type { MockedFleetSetupDeps, MockedFleetStartDeps } from './types'; @@ -27,5 +28,6 @@ export const createStartDepsMock = (): MockedFleetStartDeps => { data: dataPluginMock.createStartContract(), navigation: navigationPluginMock.createStartContract(), customIntegrations: customIntegrationsMock.createStart(), + share: sharePluginMock.createStartContract(), }; }; diff --git a/x-pack/plugins/fleet/public/plugin.ts b/x-pack/plugins/fleet/public/plugin.ts index d23bfcfe7b888..e1f263b0763e8 100644 --- a/x-pack/plugins/fleet/public/plugin.ts +++ b/x-pack/plugins/fleet/public/plugin.ts @@ -21,6 +21,8 @@ import type { CustomIntegrationsSetup, } from 'src/plugins/custom_integrations/public'; +import type { SharePluginStart } from 'src/plugins/share/public'; + import { DEFAULT_APP_CATEGORIES, AppNavLinkStatus } from '../../../../src/core/public'; import type { @@ -81,10 +83,12 @@ export interface FleetStartDeps { data: DataPublicPluginStart; navigation: NavigationPublicPluginStart; customIntegrations: CustomIntegrationsStart; + share: SharePluginStart; } export interface FleetStartServices extends CoreStart, FleetStartDeps { storage: Storage; + share: SharePluginStart; cloud?: CloudSetup; } @@ -134,6 +138,7 @@ export class FleetPlugin implements Plugin { data: dataPluginMock.createStartContract(), encryptedSavedObjectsStart: encryptedSavedObjectsMock.createStart(), savedObjects: savedObjectsServiceMock.createStartContract(), - security: securityMock.createStart(), + securitySetup: securityMock.createSetup(), + securityStart: securityMock.createStart(), logger: loggingSystemMock.create().get(), isProductionMode: true, configInitialValue: { diff --git a/x-pack/plugins/fleet/server/plugin.ts b/x-pack/plugins/fleet/server/plugin.ts index 6aad028666ee8..697ea0fa30d69 100644 --- a/x-pack/plugins/fleet/server/plugin.ts +++ b/x-pack/plugins/fleet/server/plugin.ts @@ -37,6 +37,7 @@ import { AGENT_POLICY_SAVED_OBJECT_TYPE, PACKAGE_POLICY_SAVED_OBJECT_TYPE, PACKAGES_SAVED_OBJECT_TYPE, + ASSETS_SAVED_OBJECT_TYPE, AGENT_SAVED_OBJECT_TYPE, ENROLLMENT_API_KEYS_SAVED_OBJECT_TYPE, PRECONFIGURATION_DELETION_RECORD_SAVED_OBJECT_TYPE, @@ -56,7 +57,7 @@ import { registerPreconfigurationRoutes, } from './routes'; -import type { ExternalCallback } from './types'; +import type { ExternalCallback, FleetRequestHandlerContext } from './types'; import type { ESIndexPatternService, AgentService, @@ -103,7 +104,8 @@ export interface FleetAppContext { data: DataPluginStart; encryptedSavedObjectsStart?: EncryptedSavedObjectsPluginStart; encryptedSavedObjectsSetup?: EncryptedSavedObjectsPluginSetup; - security?: SecurityPluginStart; + securitySetup?: SecurityPluginSetup; + securityStart?: SecurityPluginStart; config$?: Observable; configInitialValue: FleetConfigType; savedObjects: SavedObjectsServiceStart; @@ -122,6 +124,7 @@ const allSavedObjectTypes = [ AGENT_POLICY_SAVED_OBJECT_TYPE, PACKAGE_POLICY_SAVED_OBJECT_TYPE, PACKAGES_SAVED_OBJECT_TYPE, + ASSETS_SAVED_OBJECT_TYPE, AGENT_SAVED_OBJECT_TYPE, ENROLLMENT_API_KEYS_SAVED_OBJECT_TYPE, PRECONFIGURATION_DELETION_RECORD_SAVED_OBJECT_TYPE, @@ -164,14 +167,15 @@ export class FleetPlugin private licensing$!: Observable; private config$: Observable; private configInitialValue: FleetConfigType; - private cloud: CloudSetup | undefined; - private logger: Logger | undefined; + private cloud?: CloudSetup; + private logger?: Logger; private isProductionMode: FleetAppContext['isProductionMode']; private kibanaVersion: FleetAppContext['kibanaVersion']; private kibanaBranch: FleetAppContext['kibanaBranch']; - private httpSetup: HttpServiceSetup | undefined; - private encryptedSavedObjectsSetup: EncryptedSavedObjectsPluginSetup | undefined; + private httpSetup?: HttpServiceSetup; + private securitySetup?: SecurityPluginSetup; + private encryptedSavedObjectsSetup?: EncryptedSavedObjectsPluginSetup; constructor(private readonly initializerContext: PluginInitializerContext) { this.config$ = this.initializerContext.config.create(); @@ -187,6 +191,7 @@ export class FleetPlugin this.licensing$ = deps.licensing.license$; this.encryptedSavedObjectsSetup = deps.encryptedSavedObjects; this.cloud = deps.cloud; + this.securitySetup = deps.security; const config = this.configInitialValue; registerSavedObjects(core.savedObjects, deps.encryptedSavedObjects); @@ -226,13 +231,31 @@ export class FleetPlugin }); } - const router = core.http.createRouter(); + core.http.registerRouteHandlerContext( + 'fleet', + (coreContext, request) => ({ + epm: { + // Use a lazy getter to avoid constructing this client when not used by a request handler + get internalSoClient() { + return appContextService + .getSavedObjects() + .getScopedClient(request, { excludedWrappers: ['security'] }); + }, + }, + }) + ); + + const router = core.http.createRouter(); // Register usage collection registerFleetUsageCollector(core, config, deps.usageCollection); // Always register app routes for permissions checking registerAppRoutes(router); + // Allow read-only users access to endpoints necessary for Integrations UI + // Only some endpoints require superuser so we pass a raw IRouter here + registerEPMRoutes(router); + // For all the routes we enforce the user to have role superuser const routerSuperuserOnly = makeRouterEnforcingSuperuser(router); // Register rest of routes only if security is enabled @@ -243,7 +266,6 @@ export class FleetPlugin registerOutputRoutes(routerSuperuserOnly); registerSettingsRoutes(routerSuperuserOnly); registerDataStreamRoutes(routerSuperuserOnly); - registerEPMRoutes(routerSuperuserOnly); registerPreconfigurationRoutes(routerSuperuserOnly); // Conditional config routes @@ -260,7 +282,8 @@ export class FleetPlugin data: plugins.data, encryptedSavedObjectsStart: plugins.encryptedSavedObjects, encryptedSavedObjectsSetup: this.encryptedSavedObjectsSetup, - security: plugins.security, + securitySetup: this.securitySetup, + securityStart: plugins.security, configInitialValue: this.configInitialValue, config$: this.config$, savedObjects: core.savedObjects, diff --git a/x-pack/plugins/fleet/server/routes/app/index.ts b/x-pack/plugins/fleet/server/routes/app/index.ts index 025da6d79702c..43614f3a286b0 100644 --- a/x-pack/plugins/fleet/server/routes/app/index.ts +++ b/x-pack/plugins/fleet/server/routes/app/index.ts @@ -17,13 +17,15 @@ export const getCheckPermissionsHandler: RequestHandler = async (context, reques success: false, error: 'MISSING_SECURITY', }; - const body: CheckPermissionsResponse = { success: true }; - try { - const security = await appContextService.getSecurity(); + + if (!appContextService.hasSecurity() || !appContextService.getSecurityLicense().isEnabled()) { + return response.ok({ body: missingSecurityBody }); + } else { + const security = appContextService.getSecurity(); const user = security.authc.getCurrentUser(request); - // when ES security is disabled, but Kibana security plugin is not explicitly disabled, - // `authc.getCurrentUser()` does not error, instead it comes back as `null` + // Defensively handle situation where user is undefined (should only happen when ES security is disabled) + // This should be covered by the `getSecurityLicense().isEnabled()` check above, but we leave this for robustness. if (!user) { return response.ok({ body: missingSecurityBody, @@ -31,20 +33,15 @@ export const getCheckPermissionsHandler: RequestHandler = async (context, reques } if (!user?.roles.includes('superuser')) { - body.success = false; - body.error = 'MISSING_SUPERUSER_ROLE'; return response.ok({ - body, + body: { + success: false, + error: 'MISSING_SUPERUSER_ROLE', + } as CheckPermissionsResponse, }); } - return response.ok({ body: { success: true } }); - } catch (e) { - // when Kibana security plugin is explicitly disabled, - // `appContextService.getSecurity()` returns an error, so we catch it here - return response.ok({ - body: missingSecurityBody, - }); + return response.ok({ body: { success: true } as CheckPermissionsResponse }); } }; diff --git a/x-pack/plugins/fleet/server/routes/epm/handlers.ts b/x-pack/plugins/fleet/server/routes/epm/handlers.ts index 2324d1a423bfc..c98038427cafc 100644 --- a/x-pack/plugins/fleet/server/routes/epm/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/epm/handlers.ts @@ -9,7 +9,7 @@ import path from 'path'; import type { TypeOf } from '@kbn/config-schema'; import mime from 'mime-types'; -import type { RequestHandler, ResponseHeaders, KnownHeaders } from 'src/core/server'; +import type { ResponseHeaders, KnownHeaders } from 'src/core/server'; import type { GetInfoResponse, @@ -34,6 +34,7 @@ import type { DeletePackageRequestSchema, BulkUpgradePackagesFromRegistryRequestSchema, GetStatsRequestSchema, + FleetRequestHandler, UpdatePackageRequestSchema, } from '../../types'; import { @@ -57,7 +58,7 @@ import { getAsset } from '../../services/epm/archive/storage'; import { getPackageUsageStats } from '../../services/epm/packages/get'; import { updatePackage } from '../../services/epm/packages/update'; -export const getCategoriesHandler: RequestHandler< +export const getCategoriesHandler: FleetRequestHandler< undefined, TypeOf > = async (context, request, response) => { @@ -72,12 +73,12 @@ export const getCategoriesHandler: RequestHandler< } }; -export const getListHandler: RequestHandler< +export const getListHandler: FleetRequestHandler< undefined, TypeOf > = async (context, request, response) => { try { - const savedObjectsClient = context.core.savedObjects.client; + const savedObjectsClient = context.fleet.epm.internalSoClient; const res = await getPackages({ savedObjectsClient, ...request.query, @@ -93,9 +94,9 @@ export const getListHandler: RequestHandler< } }; -export const getLimitedListHandler: RequestHandler = async (context, request, response) => { +export const getLimitedListHandler: FleetRequestHandler = async (context, request, response) => { try { - const savedObjectsClient = context.core.savedObjects.client; + const savedObjectsClient = context.fleet.epm.internalSoClient; const res = await getLimitedPackages({ savedObjectsClient }); const body: GetLimitedPackagesResponse = { response: res, @@ -108,110 +109,105 @@ export const getLimitedListHandler: RequestHandler = async (context, request, re } }; -export const getFileHandler: RequestHandler> = async ( - context, - request, - response -) => { - try { - const { pkgName, pkgVersion, filePath } = request.params; - const savedObjectsClient = context.core.savedObjects.client; - const installation = await getInstallation({ savedObjectsClient, pkgName }); - const useLocalFile = pkgVersion === installation?.version; +export const getFileHandler: FleetRequestHandler> = + async (context, request, response) => { + try { + const { pkgName, pkgVersion, filePath } = request.params; + const savedObjectsClient = context.fleet.epm.internalSoClient; + const installation = await getInstallation({ savedObjectsClient, pkgName }); + const useLocalFile = pkgVersion === installation?.version; + + if (useLocalFile) { + const assetPath = `${pkgName}-${pkgVersion}/${filePath}`; + const fileBuffer = getArchiveEntry(assetPath); + // only pull local installation if we don't have it cached + const storedAsset = + !fileBuffer && (await getAsset({ savedObjectsClient, path: assetPath })); - if (useLocalFile) { - const assetPath = `${pkgName}-${pkgVersion}/${filePath}`; - const fileBuffer = getArchiveEntry(assetPath); - // only pull local installation if we don't have it cached - const storedAsset = !fileBuffer && (await getAsset({ savedObjectsClient, path: assetPath })); + // error, if neither is available + if (!fileBuffer && !storedAsset) { + return response.custom({ + body: `installed package file not found: ${filePath}`, + statusCode: 404, + }); + } + + // if storedAsset is not available, fileBuffer *must* be + // b/c we error if we don't have at least one, and storedAsset is the least likely + const { buffer, contentType } = storedAsset + ? { + contentType: storedAsset.media_type, + buffer: storedAsset.data_utf8 + ? Buffer.from(storedAsset.data_utf8, 'utf8') + : Buffer.from(storedAsset.data_base64, 'base64'), + } + : { + contentType: mime.contentType(path.extname(assetPath)), + buffer: fileBuffer, + }; + + if (!contentType) { + return response.custom({ + body: `unknown content type for file: ${filePath}`, + statusCode: 400, + }); + } - // error, if neither is available - if (!fileBuffer && !storedAsset) { return response.custom({ - body: `installed package file not found: ${filePath}`, - statusCode: 404, + body: buffer, + statusCode: 200, + headers: { + 'cache-control': 'max-age=10, public', + 'content-type': contentType, + }, }); - } - - // if storedAsset is not available, fileBuffer *must* be - // b/c we error if we don't have at least one, and storedAsset is the least likely - const { buffer, contentType } = storedAsset - ? { - contentType: storedAsset.media_type, - buffer: storedAsset.data_utf8 - ? Buffer.from(storedAsset.data_utf8, 'utf8') - : Buffer.from(storedAsset.data_base64, 'base64'), + } else { + const registryResponse = await getFile(pkgName, pkgVersion, filePath); + const headersToProxy: KnownHeaders[] = ['content-type', 'cache-control']; + const proxiedHeaders = headersToProxy.reduce((headers, knownHeader) => { + const value = registryResponse.headers.get(knownHeader); + if (value !== null) { + headers[knownHeader] = value; } - : { - contentType: mime.contentType(path.extname(assetPath)), - buffer: fileBuffer, - }; + return headers; + }, {} as ResponseHeaders); - if (!contentType) { return response.custom({ - body: `unknown content type for file: ${filePath}`, - statusCode: 400, + body: registryResponse.body, + statusCode: registryResponse.status, + headers: proxiedHeaders, }); } - - return response.custom({ - body: buffer, - statusCode: 200, - headers: { - 'cache-control': 'max-age=10, public', - 'content-type': contentType, - }, - }); - } else { - const registryResponse = await getFile(pkgName, pkgVersion, filePath); - const headersToProxy: KnownHeaders[] = ['content-type', 'cache-control']; - const proxiedHeaders = headersToProxy.reduce((headers, knownHeader) => { - const value = registryResponse.headers.get(knownHeader); - if (value !== null) { - headers[knownHeader] = value; - } - return headers; - }, {} as ResponseHeaders); - - return response.custom({ - body: registryResponse.body, - statusCode: registryResponse.status, - headers: proxiedHeaders, - }); + } catch (error) { + return defaultIngestErrorHandler({ error, response }); } - } catch (error) { - return defaultIngestErrorHandler({ error, response }); - } -}; + }; -export const getInfoHandler: RequestHandler> = async ( - context, - request, - response -) => { - try { - const { pkgkey } = request.params; - const savedObjectsClient = context.core.savedObjects.client; - // TODO: change epm API to /packageName/version so we don't need to do this - const { pkgName, pkgVersion } = splitPkgKey(pkgkey); - const res = await getPackageInfo({ savedObjectsClient, pkgName, pkgVersion }); - const body: GetInfoResponse = { - response: res, - }; - return response.ok({ body }); - } catch (error) { - return defaultIngestErrorHandler({ error, response }); - } -}; +export const getInfoHandler: FleetRequestHandler> = + async (context, request, response) => { + try { + const { pkgkey } = request.params; + const savedObjectsClient = context.fleet.epm.internalSoClient; + // TODO: change epm API to /packageName/version so we don't need to do this + const { pkgName, pkgVersion } = splitPkgKey(pkgkey); + const res = await getPackageInfo({ savedObjectsClient, pkgName, pkgVersion }); + const body: GetInfoResponse = { + response: res, + }; + return response.ok({ body }); + } catch (error) { + return defaultIngestErrorHandler({ error, response }); + } + }; -export const updatePackageHandler: RequestHandler< +export const updatePackageHandler: FleetRequestHandler< TypeOf, unknown, TypeOf > = async (context, request, response) => { try { const { pkgkey } = request.params; - const savedObjectsClient = context.core.savedObjects.client; + const savedObjectsClient = context.fleet.epm.internalSoClient; const { pkgName } = splitPkgKey(pkgkey); @@ -226,30 +222,27 @@ export const updatePackageHandler: RequestHandler< } }; -export const getStatsHandler: RequestHandler> = async ( - context, - request, - response -) => { - try { - const { pkgName } = request.params; - const savedObjectsClient = context.core.savedObjects.client; - const body: GetStatsResponse = { - response: await getPackageUsageStats({ savedObjectsClient, pkgName }), - }; - return response.ok({ body }); - } catch (error) { - return defaultIngestErrorHandler({ error, response }); - } -}; +export const getStatsHandler: FleetRequestHandler> = + async (context, request, response) => { + try { + const { pkgName } = request.params; + const savedObjectsClient = context.fleet.epm.internalSoClient; + const body: GetStatsResponse = { + response: await getPackageUsageStats({ savedObjectsClient, pkgName }), + }; + return response.ok({ body }); + } catch (error) { + return defaultIngestErrorHandler({ error, response }); + } + }; -export const installPackageFromRegistryHandler: RequestHandler< +export const installPackageFromRegistryHandler: FleetRequestHandler< TypeOf, undefined, TypeOf > = async (context, request, response) => { - const savedObjectsClient = context.core.savedObjects.client; - const esClient = context.core.elasticsearch.client.asCurrentUser; + const savedObjectsClient = context.fleet.epm.internalSoClient; + const esClient = context.core.elasticsearch.client.asInternalUser; const { pkgkey } = request.params; const res = await installPackage({ @@ -284,13 +277,13 @@ const bulkInstallServiceResponseToHttpEntry = ( } }; -export const bulkInstallPackagesFromRegistryHandler: RequestHandler< +export const bulkInstallPackagesFromRegistryHandler: FleetRequestHandler< undefined, undefined, TypeOf > = async (context, request, response) => { - const savedObjectsClient = context.core.savedObjects.client; - const esClient = context.core.elasticsearch.client.asCurrentUser; + const savedObjectsClient = context.fleet.epm.internalSoClient; + const esClient = context.core.elasticsearch.client.asInternalUser; const bulkInstalledResponses = await bulkInstallPackages({ savedObjectsClient, esClient, @@ -303,7 +296,7 @@ export const bulkInstallPackagesFromRegistryHandler: RequestHandler< return response.ok({ body }); }; -export const installPackageByUploadHandler: RequestHandler< +export const installPackageByUploadHandler: FleetRequestHandler< undefined, undefined, TypeOf @@ -314,8 +307,8 @@ export const installPackageByUploadHandler: RequestHandler< body: { message: 'Requires Enterprise license' }, }); } - const savedObjectsClient = context.core.savedObjects.client; - const esClient = context.core.elasticsearch.client.asCurrentUser; + const savedObjectsClient = context.fleet.epm.internalSoClient; + const esClient = context.core.elasticsearch.client.asInternalUser; const contentType = request.headers['content-type'] as string; // from types it could also be string[] or undefined but this is checked later const archiveBuffer = Buffer.from(request.body); @@ -336,15 +329,15 @@ export const installPackageByUploadHandler: RequestHandler< } }; -export const deletePackageHandler: RequestHandler< +export const deletePackageHandler: FleetRequestHandler< TypeOf, undefined, TypeOf > = async (context, request, response) => { try { const { pkgkey } = request.params; - const savedObjectsClient = context.core.savedObjects.client; - const esClient = context.core.elasticsearch.client.asCurrentUser; + const savedObjectsClient = context.fleet.epm.internalSoClient; + const esClient = context.core.elasticsearch.client.asInternalUser; const res = await removeInstallation({ savedObjectsClient, pkgkey, diff --git a/x-pack/plugins/fleet/server/routes/epm/index.ts b/x-pack/plugins/fleet/server/routes/epm/index.ts index 684547dc1862c..360f2ec1d446e 100644 --- a/x-pack/plugins/fleet/server/routes/epm/index.ts +++ b/x-pack/plugins/fleet/server/routes/epm/index.ts @@ -8,6 +8,7 @@ import type { IRouter } from 'src/core/server'; import { PLUGIN_ID, EPM_API_ROUTES } from '../../constants'; +import type { FleetRequestHandlerContext } from '../../types'; import { GetCategoriesRequestSchema, GetPackagesRequestSchema, @@ -20,6 +21,7 @@ import { GetStatsRequestSchema, UpdatePackageRequestSchema, } from '../../types'; +import { enforceSuperUser } from '../security'; import { getCategoriesHandler, @@ -37,7 +39,7 @@ import { const MAX_FILE_SIZE_BYTES = 104857600; // 100MB -export const registerRoutes = (router: IRouter) => { +export const registerRoutes = (router: IRouter) => { router.get( { path: EPM_API_ROUTES.CATEGORIES_PATTERN, @@ -60,7 +62,7 @@ export const registerRoutes = (router: IRouter) => { { path: EPM_API_ROUTES.LIMITED_LIST_PATTERN, validate: false, - options: { tags: [`access:${PLUGIN_ID}`] }, + options: { tags: [`access:${PLUGIN_ID}-read`] }, }, getLimitedListHandler ); @@ -69,7 +71,7 @@ export const registerRoutes = (router: IRouter) => { { path: EPM_API_ROUTES.STATS_PATTERN, validate: GetStatsRequestSchema, - options: { tags: [`access:${PLUGIN_ID}`] }, + options: { tags: [`access:${PLUGIN_ID}-read`] }, }, getStatsHandler ); @@ -98,7 +100,7 @@ export const registerRoutes = (router: IRouter) => { validate: UpdatePackageRequestSchema, options: { tags: [`access:${PLUGIN_ID}-all`] }, }, - updatePackageHandler + enforceSuperUser(updatePackageHandler) ); router.post( @@ -107,7 +109,7 @@ export const registerRoutes = (router: IRouter) => { validate: InstallPackageFromRegistryRequestSchema, options: { tags: [`access:${PLUGIN_ID}-all`] }, }, - installPackageFromRegistryHandler + enforceSuperUser(installPackageFromRegistryHandler) ); router.post( @@ -116,7 +118,7 @@ export const registerRoutes = (router: IRouter) => { validate: BulkUpgradePackagesFromRegistryRequestSchema, options: { tags: [`access:${PLUGIN_ID}-all`] }, }, - bulkInstallPackagesFromRegistryHandler + enforceSuperUser(bulkInstallPackagesFromRegistryHandler) ); router.post( @@ -132,7 +134,7 @@ export const registerRoutes = (router: IRouter) => { }, }, }, - installPackageByUploadHandler + enforceSuperUser(installPackageByUploadHandler) ); router.delete( @@ -141,6 +143,6 @@ export const registerRoutes = (router: IRouter) => { validate: DeletePackageRequestSchema, options: { tags: [`access:${PLUGIN_ID}-all`] }, }, - deletePackageHandler + enforceSuperUser(deletePackageHandler) ); }; diff --git a/x-pack/plugins/fleet/server/routes/security.ts b/x-pack/plugins/fleet/server/routes/security.ts index 60011dcf3d33f..33a510c27f04e 100644 --- a/x-pack/plugins/fleet/server/routes/security.ts +++ b/x-pack/plugins/fleet/server/routes/security.ts @@ -5,14 +5,22 @@ * 2.0. */ -import type { IRouter, RequestHandler } from 'src/core/server'; +import type { IRouter, RequestHandler, RequestHandlerContext } from 'src/core/server'; import { appContextService } from '../services'; -export function enforceSuperUser( - handler: RequestHandler -): RequestHandler { +export function enforceSuperUser( + handler: RequestHandler +): RequestHandler { return function enforceSuperHandler(context, req, res) { + if (!appContextService.hasSecurity() || !appContextService.getSecurityLicense().isEnabled()) { + return res.forbidden({ + body: { + message: `Access to this API requires that security is enabled`, + }, + }); + } + const security = appContextService.getSecurity(); const user = security.authc.getCurrentUser(req); if (!user) { @@ -36,7 +44,9 @@ export function enforceSuperUser( }; } -export function makeRouterEnforcingSuperuser(router: IRouter): IRouter { +export function makeRouterEnforcingSuperuser( + router: IRouter +): IRouter { return { get: (options, handler) => router.get(options, enforceSuperUser(handler)), delete: (options, handler) => router.delete(options, enforceSuperUser(handler)), diff --git a/x-pack/plugins/fleet/server/routes/setup/handlers.test.ts b/x-pack/plugins/fleet/server/routes/setup/handlers.test.ts index bd82989a9e828..b39c6e7686110 100644 --- a/x-pack/plugins/fleet/server/routes/setup/handlers.test.ts +++ b/x-pack/plugins/fleet/server/routes/setup/handlers.test.ts @@ -5,13 +5,14 @@ * 2.0. */ -import { httpServerMock } from 'src/core/server/mocks'; +import { httpServerMock, savedObjectsClientMock } from 'src/core/server/mocks'; import type { PostFleetSetupResponse } from '../../../common'; import { RegistryError } from '../../errors'; import { createAppContextStartContractMock, xpackMocks } from '../../mocks'; import { appContextService } from '../../services/app_context'; import { setupFleet } from '../../services/setup'; +import type { FleetRequestHandlerContext } from '../../types'; import { fleetSetupHandler } from './handlers'; @@ -24,12 +25,19 @@ jest.mock('../../services/setup', () => { const mockSetupFleet = setupFleet as jest.MockedFunction; describe('FleetSetupHandler', () => { - let context: ReturnType; + let context: FleetRequestHandlerContext; let response: ReturnType; let request: ReturnType; beforeEach(async () => { - context = xpackMocks.createRequestHandlerContext(); + context = { + ...xpackMocks.createRequestHandlerContext(), + fleet: { + epm: { + internalSoClient: savedObjectsClientMock.create(), + }, + }, + }; response = httpServerMock.createResponseFactory(); request = httpServerMock.createKibanaRequest({ method: 'post', @@ -53,7 +61,10 @@ describe('FleetSetupHandler', () => { ); await fleetSetupHandler(context, request, response); - const expectedBody: PostFleetSetupResponse = { isInitialized: true, nonFatalErrors: [] }; + const expectedBody: PostFleetSetupResponse = { + isInitialized: true, + nonFatalErrors: [], + }; expect(response.customError).toHaveBeenCalledTimes(0); expect(response.ok).toHaveBeenCalledWith({ body: expectedBody }); }); diff --git a/x-pack/plugins/fleet/server/routes/setup/handlers.ts b/x-pack/plugins/fleet/server/routes/setup/handlers.ts index 6311b9d970d35..c5b2ef0ade26f 100644 --- a/x-pack/plugins/fleet/server/routes/setup/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/setup/handlers.ts @@ -12,6 +12,7 @@ import type { GetFleetStatusResponse, PostFleetSetupResponse } from '../../../co import { setupFleet } from '../../services/setup'; import { hasFleetServers } from '../../services/fleet_server'; import { defaultIngestErrorHandler } from '../../errors'; +import type { FleetRequestHandler } from '../../types'; export const getFleetStatusHandler: RequestHandler = async (context, request, response) => { try { @@ -42,20 +43,28 @@ export const getFleetStatusHandler: RequestHandler = async (context, request, re } }; -export const fleetSetupHandler: RequestHandler = async (context, request, response) => { +export const fleetSetupHandler: FleetRequestHandler = async (context, request, response) => { try { - const soClient = context.core.savedObjects.client; - const esClient = context.core.elasticsearch.client.asCurrentUser; + const soClient = context.fleet.epm.internalSoClient; + const esClient = context.core.elasticsearch.client.asInternalUser; const setupStatus = await setupFleet(soClient, esClient); const body: PostFleetSetupResponse = { ...setupStatus, - nonFatalErrors: setupStatus.nonFatalErrors.map((e) => { + nonFatalErrors: setupStatus.nonFatalErrors.flatMap((e) => { // JSONify the error object so it can be displayed properly in the UI - const error = e.error ?? e; - return { - name: error.name, - message: error.message, - }; + if ('error' in e) { + return { + name: e.error.name, + message: e.error.message, + }; + } else { + return e.errors.map((upgradePackagePolicyError: any) => { + return { + name: upgradePackagePolicyError.key, + message: upgradePackagePolicyError.message, + }; + }); + } }), }; diff --git a/x-pack/plugins/fleet/server/routes/setup/index.ts b/x-pack/plugins/fleet/server/routes/setup/index.ts index d64c9f24f2610..591b9c832172d 100644 --- a/x-pack/plugins/fleet/server/routes/setup/index.ts +++ b/x-pack/plugins/fleet/server/routes/setup/index.ts @@ -10,9 +10,11 @@ import type { IRouter } from 'src/core/server'; import { PLUGIN_ID, AGENTS_SETUP_API_ROUTES, SETUP_API_ROUTE } from '../../constants'; import type { FleetConfigType } from '../../../common'; +import type { FleetRequestHandlerContext } from '../../types/request_context'; + import { getFleetStatusHandler, fleetSetupHandler } from './handlers'; -export const registerFleetSetupRoute = (router: IRouter) => { +export const registerFleetSetupRoute = (router: IRouter) => { router.post( { path: SETUP_API_ROUTE, @@ -26,7 +28,7 @@ export const registerFleetSetupRoute = (router: IRouter) => { }; // That route is used by agent to setup Fleet -export const registerCreateFleetSetupRoute = (router: IRouter) => { +export const registerCreateFleetSetupRoute = (router: IRouter) => { router.post( { path: AGENTS_SETUP_API_ROUTES.CREATE_PATTERN, @@ -37,7 +39,7 @@ export const registerCreateFleetSetupRoute = (router: IRouter) => { ); }; -export const registerGetFleetStatusRoute = (router: IRouter) => { +export const registerGetFleetStatusRoute = (router: IRouter) => { router.get( { path: AGENTS_SETUP_API_ROUTES.INFO_PATTERN, @@ -48,7 +50,10 @@ export const registerGetFleetStatusRoute = (router: IRouter) => { ); }; -export const registerRoutes = (router: IRouter, config: FleetConfigType) => { +export const registerRoutes = ( + router: IRouter, + config: FleetConfigType +) => { // Ingest manager setup registerFleetSetupRoute(router); diff --git a/x-pack/plugins/fleet/server/services/app_context.ts b/x-pack/plugins/fleet/server/services/app_context.ts index 1fb34a9a399eb..a1e6ef4545aef 100644 --- a/x-pack/plugins/fleet/server/services/app_context.ts +++ b/x-pack/plugins/fleet/server/services/app_context.ts @@ -22,7 +22,7 @@ import type { EncryptedSavedObjectsPluginSetup, } from '../../../encrypted_saved_objects/server'; -import type { SecurityPluginStart } from '../../../security/server'; +import type { SecurityPluginStart, SecurityPluginSetup } from '../../../security/server'; import type { FleetConfigType } from '../../common'; import type { ExternalCallback, @@ -39,7 +39,8 @@ class AppContextService { private encryptedSavedObjectsSetup: EncryptedSavedObjectsPluginSetup | undefined; private data: DataPluginStart | undefined; private esClient: ElasticsearchClient | undefined; - private security: SecurityPluginStart | undefined; + private securitySetup: SecurityPluginSetup | undefined; + private securityStart: SecurityPluginStart | undefined; private config$?: Observable; private configSubject$?: BehaviorSubject; private savedObjects: SavedObjectsServiceStart | undefined; @@ -56,7 +57,8 @@ class AppContextService { this.esClient = appContext.elasticsearch.client.asInternalUser; this.encryptedSavedObjects = appContext.encryptedSavedObjectsStart?.getClient(); this.encryptedSavedObjectsSetup = appContext.encryptedSavedObjectsSetup; - this.security = appContext.security; + this.securitySetup = appContext.securitySetup; + this.securityStart = appContext.securityStart; this.savedObjects = appContext.savedObjects; this.isProductionMode = appContext.isProductionMode; this.cloud = appContext.cloud; @@ -92,14 +94,21 @@ class AppContextService { } public getSecurity() { - if (!this.security) { + if (!this.hasSecurity()) { throw new Error('Security service not set.'); } - return this.security; + return this.securityStart!; + } + + public getSecurityLicense() { + if (!this.hasSecurity()) { + throw new Error('Security service not set.'); + } + return this.securitySetup!.license; } public hasSecurity() { - return !!this.security; + return !!this.securitySetup && !!this.securityStart; } public getCloud() { diff --git a/x-pack/plugins/fleet/server/services/epm/agent/agent.test.ts b/x-pack/plugins/fleet/server/services/epm/agent/agent.test.ts index 1be0f73a347e9..ed5d6473760ff 100644 --- a/x-pack/plugins/fleet/server/services/epm/agent/agent.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/agent/agent.test.ts @@ -29,7 +29,7 @@ foo: {{bar}} some_text_field: {{should_be_text}} multi_text_field: {{#each multi_text}} - - {{this}} + - !!str {{this}} {{/each}} `; const vars = { @@ -37,7 +37,7 @@ multi_text_field: password: { type: 'password', value: '' }, optional_field: { type: 'text', value: undefined }, bar: { type: 'text', value: 'bar' }, - should_be_text: { type: 'text', value: '1234' }, + should_be_text: { type: 'text', value: 'textvalue' }, multi_text: { type: 'text', value: ['1234', 'foo', 'bar'] }, }; @@ -49,7 +49,7 @@ multi_text_field: processors: [{ add_locale: null }], password: '', foo: 'bar', - some_text_field: '1234', + some_text_field: 'textvalue', multi_text_field: ['1234', 'foo', 'bar'], }); }); @@ -217,12 +217,13 @@ input: logs }); }); - it('should escape string values when necessary', () => { + it('should suport !!str for string values', () => { const stringTemplate = ` my-package: asteriskOnly: {{asteriskOnly}} startsWithAsterisk: {{startsWithAsterisk}} - numeric: {{numeric}} + numeric_with_str: !!str {{numeric}} + numeric_without_str: {{numeric}} mixed: {{mixed}} concatenatedEnd: {{a}}{{b}} concatenatedMiddle: {{c}}{{d}} @@ -245,7 +246,8 @@ my-package: 'my-package': { asteriskOnly: '*', startsWithAsterisk: '*lala', - numeric: '100', + numeric_with_str: '100', + numeric_without_str: 100, mixed: '1s', concatenatedEnd: '/opt/package/*/logs/my.log*', concatenatedMiddle: '/opt/*/package/logs/*my.log', diff --git a/x-pack/plugins/fleet/server/services/epm/agent/agent.ts b/x-pack/plugins/fleet/server/services/epm/agent/agent.ts index a0d14e6962a8d..a01643b22cf9d 100644 --- a/x-pack/plugins/fleet/server/services/epm/agent/agent.ts +++ b/x-pack/plugins/fleet/server/services/epm/agent/agent.ts @@ -58,14 +58,6 @@ function replaceVariablesInYaml(yamlVariables: { [k: string]: any }, yaml: any) return yaml; } -const maybeEscapeString = (value: string) => { - // Numeric strings need to be quoted to stay strings. - if (value.length && !isNaN(+value)) { - return `"${value}"`; - } - return value; -}; - function buildTemplateVariables(variables: PackagePolicyConfigRecord, templateStr: string) { const yamlValues: { [k: string]: any } = {}; const vars = Object.entries(variables).reduce((acc, [key, recordEntry]) => { @@ -92,16 +84,6 @@ function buildTemplateVariables(variables: PackagePolicyConfigRecord, templateSt const yamlKeyPlaceholder = `##${key}##`; varPart[lastKeyPart] = recordEntry.value ? `"${yamlKeyPlaceholder}"` : null; yamlValues[yamlKeyPlaceholder] = recordEntry.value ? safeLoad(recordEntry.value) : null; - } else if ( - recordEntry.type && - (recordEntry.type === 'text' || recordEntry.type === 'string') && - recordEntry.value?.length - ) { - if (Array.isArray(recordEntry.value)) { - varPart[lastKeyPart] = recordEntry.value.map((value: string) => maybeEscapeString(value)); - } else { - varPart[lastKeyPart] = maybeEscapeString(recordEntry.value); - } } else { varPart[lastKeyPart] = recordEntry.value; } diff --git a/x-pack/plugins/fleet/server/services/epm/archive/cache.ts b/x-pack/plugins/fleet/server/services/epm/archive/cache.ts index 7f479dc5d6b63..676c3aa571a0f 100644 --- a/x-pack/plugins/fleet/server/services/epm/archive/cache.ts +++ b/x-pack/plugins/fleet/server/services/epm/archive/cache.ts @@ -67,3 +67,11 @@ export const setPackageInfo = ({ }; export const deletePackageInfo = (args: SharedKey) => packageInfoCache.delete(sharedKey(args)); + +export const clearPackageFileCache = (args: SharedKey) => { + const fileList = getArchiveFilelist(args) ?? []; + fileList.forEach((filePath) => { + deleteArchiveEntry(filePath); + }); + deleteArchiveFilelist(args); +}; diff --git a/x-pack/plugins/fleet/server/services/epm/archive/index.ts b/x-pack/plugins/fleet/server/services/epm/archive/index.ts index b08ec815a394d..7c590eb1bcd39 100644 --- a/x-pack/plugins/fleet/server/services/epm/archive/index.ts +++ b/x-pack/plugins/fleet/server/services/epm/archive/index.ts @@ -16,6 +16,7 @@ import { setArchiveFilelist, deleteArchiveFilelist, deletePackageInfo, + clearPackageFileCache, } from './cache'; import type { SharedKey } from './cache'; import { getBufferExtractor } from './extract'; @@ -42,6 +43,9 @@ export async function unpackBufferToCache({ archiveBuffer: Buffer; installSource: InstallSource; }): Promise { + // Make sure any buffers from previous installations from registry or upload are deleted first + clearPackageFileCache({ name, version }); + const entries = await unpackBufferEntries(archiveBuffer, contentType); const paths: string[] = []; entries.forEach((entry) => { diff --git a/x-pack/plugins/fleet/server/services/epm/packages/get.ts b/x-pack/plugins/fleet/server/services/epm/packages/get.ts index d4f988e5fba8c..8d3c1fbe0daa4 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/get.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/get.ts @@ -53,7 +53,6 @@ export async function getPackages( }); // get the installed packages const packageSavedObjects = await getPackageSavedObjects(savedObjectsClient); - // filter out any internal packages const savedObjectsVisible = packageSavedObjects.saved_objects.filter( (o) => !o.attributes.internal @@ -70,7 +69,6 @@ export async function getPackages( } // Get package names for packages which cannot have more than one package policy on an agent policy -// Assume packages only export one policy template for now export async function getLimitedPackages(options: { savedObjectsClient: SavedObjectsClientContract; }): Promise { diff --git a/x-pack/plugins/fleet/server/services/epm/registry/index.ts b/x-pack/plugins/fleet/server/services/epm/registry/index.ts index 2dff3f43f3ec1..aa2c3f1d4da3c 100644 --- a/x-pack/plugins/fleet/server/services/epm/registry/index.ts +++ b/x-pack/plugins/fleet/server/services/epm/registry/index.ts @@ -96,16 +96,12 @@ export async function fetchList(params?: SearchParams): Promise { const registryUrl = getRegistryUrl(); - const kibanaVersion = appContextService.getKibanaVersion().split('-')[0]; // may be x.y.z-SNAPSHOT - const kibanaBranch = appContextService.getKibanaBranch(); const url = new URL( `${registryUrl}/search?package=${packageName}&internal=true&experimental=true` ); - // on master, request all packages regardless of version - if (kibanaVersion && kibanaBranch !== 'master') { - url.searchParams.set('kibana.version', kibanaVersion); - } + setKibanaVersion(url); + const res = await fetchUrl(url.toString()); const searchResults = JSON.parse(res); if (searchResults.length) { diff --git a/x-pack/plugins/fleet/server/services/managed_package_policies.test.ts b/x-pack/plugins/fleet/server/services/managed_package_policies.test.ts index a53b1fe648905..52c1c71446d64 100644 --- a/x-pack/plugins/fleet/server/services/managed_package_policies.test.ts +++ b/x-pack/plugins/fleet/server/services/managed_package_policies.test.ts @@ -18,7 +18,7 @@ jest.mock('./app_context', () => { ...jest.requireActual('./app_context'), appContextService: { getLogger: jest.fn(() => { - return { debug: jest.fn() }; + return { error: jest.fn() }; }), }, }; @@ -27,7 +27,9 @@ jest.mock('./app_context', () => { describe('managed package policies', () => { afterEach(() => { (packagePolicyService.get as jest.Mock).mockReset(); + (packagePolicyService.getUpgradeDryRunDiff as jest.Mock).mockReset(); (getPackageInfo as jest.Mock).mockReset(); + (packagePolicyService.upgrade as jest.Mock).mockReset(); }); it('should not upgrade policies for non-managed package', async () => { @@ -54,6 +56,16 @@ describe('managed package policies', () => { } ); + (packagePolicyService.getUpgradeDryRunDiff as jest.Mock).mockImplementationOnce( + (savedObjectsClient: any, id: string) => { + return { + name: 'non-managed-package-policy', + diff: [{ id: 'foo' }, { id: 'bar' }], + hasErrors: false, + }; + } + ); + (getPackageInfo as jest.Mock).mockImplementationOnce( ({ savedObjectsClient, pkgName, pkgVersion }) => ({ name: pkgName, @@ -91,6 +103,16 @@ describe('managed package policies', () => { } ); + (packagePolicyService.getUpgradeDryRunDiff as jest.Mock).mockImplementationOnce( + (savedObjectsClient: any, id: string) => { + return { + name: 'non-managed-package-policy', + diff: [{ id: 'foo' }, { id: 'bar' }], + hasErrors: false, + }; + } + ); + (getPackageInfo as jest.Mock).mockImplementationOnce( ({ savedObjectsClient, pkgName, pkgVersion }) => ({ name: pkgName, @@ -103,4 +125,84 @@ describe('managed package policies', () => { expect(packagePolicyService.upgrade).toBeCalledWith(soClient, esClient, ['managed-package-id']); }); + + describe('when dry run reports conflicts', () => { + it('should return errors + diff without performing upgrade', async () => { + const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + const soClient = savedObjectsClientMock.create(); + + (packagePolicyService.get as jest.Mock).mockImplementationOnce( + (savedObjectsClient: any, id: string) => { + return { + id, + inputs: {}, + version: '', + revision: 1, + updated_at: '', + updated_by: '', + created_at: '', + created_by: '', + package: { + name: 'conflicting-package', + title: 'Conflicting Package', + version: '0.0.1', + }, + }; + } + ); + + (packagePolicyService.getUpgradeDryRunDiff as jest.Mock).mockImplementationOnce( + (savedObjectsClient: any, id: string) => { + return { + name: 'conflicting-package-policy', + diff: [ + { id: 'foo' }, + { id: 'bar', errors: [{ key: 'some.test.value', message: 'Conflict detected' }] }, + ], + hasErrors: true, + }; + } + ); + + (getPackageInfo as jest.Mock).mockImplementationOnce( + ({ savedObjectsClient, pkgName, pkgVersion }) => ({ + name: pkgName, + version: pkgVersion, + keepPoliciesUpToDate: true, + }) + ); + + const result = await upgradeManagedPackagePolicies(soClient, esClient, [ + 'conflicting-package-policy', + ]); + + expect(result).toEqual([ + { + packagePolicyId: 'conflicting-package-policy', + diff: [ + { + id: 'foo', + }, + { + id: 'bar', + errors: [ + { + key: 'some.test.value', + message: 'Conflict detected', + }, + ], + }, + ], + errors: [ + { + key: 'some.test.value', + message: 'Conflict detected', + }, + ], + }, + ]); + + expect(packagePolicyService.upgrade).not.toBeCalled(); + }); + }); }); diff --git a/x-pack/plugins/fleet/server/services/managed_package_policies.ts b/x-pack/plugins/fleet/server/services/managed_package_policies.ts index 73f85525f4c60..25e2482892712 100644 --- a/x-pack/plugins/fleet/server/services/managed_package_policies.ts +++ b/x-pack/plugins/fleet/server/services/managed_package_policies.ts @@ -7,12 +7,19 @@ import type { ElasticsearchClient, SavedObjectsClientContract } from 'src/core/server'; +import type { UpgradePackagePolicyDryRunResponseItem } from '../../common'; import { AUTO_UPDATE_PACKAGES } from '../../common'; import { appContextService } from './app_context'; -import { getPackageInfo } from './epm/packages'; +import { getInstallation, getPackageInfo } from './epm/packages'; import { packagePolicyService } from './package_policy'; +export interface UpgradeManagedPackagePoliciesResult { + packagePolicyId: string; + diff: UpgradePackagePolicyDryRunResponseItem['diff']; + errors: any; +} + /** * Upgrade any package policies for packages installed through setup that are denoted as `AUTO_UPGRADE` packages * or have the `keep_policies_up_to_date` flag set to `true` @@ -21,8 +28,8 @@ export const upgradeManagedPackagePolicies = async ( soClient: SavedObjectsClientContract, esClient: ElasticsearchClient, packagePolicyIds: string[] -) => { - const policyIdsToUpgrade: string[] = []; +): Promise => { + const results: UpgradeManagedPackagePoliciesResult[] = []; for (const packagePolicyId of packagePolicyIds) { const packagePolicy = await packagePolicyService.get(soClient, packagePolicyId); @@ -37,22 +44,50 @@ export const upgradeManagedPackagePolicies = async ( pkgVersion: packagePolicy.package.version, }); + const installedPackage = await getInstallation({ + savedObjectsClient: soClient, + pkgName: packagePolicy.package.name, + }); + + const isPolicyVersionAlignedWithInstalledVersion = + packageInfo.version === installedPackage?.version; + const shouldUpgradePolicies = - AUTO_UPDATE_PACKAGES.some((pkg) => pkg.name === packageInfo.name) || - packageInfo.keepPoliciesUpToDate; + !isPolicyVersionAlignedWithInstalledVersion && + (AUTO_UPDATE_PACKAGES.some((pkg) => pkg.name === packageInfo.name) || + packageInfo.keepPoliciesUpToDate); if (shouldUpgradePolicies) { - policyIdsToUpgrade.push(packagePolicy.id); - } - } - - if (policyIdsToUpgrade.length) { - appContextService - .getLogger() - .debug( - `Upgrading ${policyIdsToUpgrade.length} package policies: ${policyIdsToUpgrade.join(', ')}` + // Since upgrades don't report diffs/errors, we need to perform a dry run first in order + // to notify the user of any granular policy upgrade errors that occur during Fleet's + // preconfiguration check + const dryRunResults = await packagePolicyService.getUpgradeDryRunDiff( + soClient, + packagePolicyId ); - await packagePolicyService.upgrade(soClient, esClient, policyIdsToUpgrade); + if (dryRunResults.hasErrors) { + const errors = dryRunResults.diff?.[1].errors; + appContextService + .getLogger() + .error( + new Error( + `Error upgrading package policy ${packagePolicyId}: ${JSON.stringify(errors)}` + ) + ); + + results.push({ packagePolicyId, diff: dryRunResults.diff, errors }); + continue; + } + + try { + await packagePolicyService.upgrade(soClient, esClient, [packagePolicyId]); + results.push({ packagePolicyId, diff: dryRunResults.diff, errors: [] }); + } catch (error) { + results.push({ packagePolicyId, diff: dryRunResults.diff, errors: [error] }); + } + } } + + return results; }; diff --git a/x-pack/plugins/fleet/server/services/package_policy.test.ts b/x-pack/plugins/fleet/server/services/package_policy.test.ts index 8b5a46dc675fc..0b6b3579f7b87 100644 --- a/x-pack/plugins/fleet/server/services/package_policy.test.ts +++ b/x-pack/plugins/fleet/server/services/package_policy.test.ts @@ -1273,6 +1273,105 @@ describe('Package policy service', () => { }); }); + describe('when variable is undefined in original object and policy_template is undefined', () => { + it('adds the variable definition to the resulting object', () => { + const basePackagePolicy: NewPackagePolicy = { + name: 'base-package-policy', + description: 'Base Package Policy', + namespace: 'default', + enabled: true, + policy_id: 'xxxx', + output_id: 'xxxx', + package: { + name: 'test-package', + title: 'Test Package', + version: '0.0.1', + }, + inputs: [ + { + type: 'logs', + policy_template: 'template_1', + enabled: true, + vars: { + path: { + type: 'text', + value: ['/var/log/logfile.log'], + }, + }, + streams: [], + }, + ], + }; + + const packageInfo: PackageInfo = { + name: 'test-package', + description: 'Test Package', + title: 'Test Package', + version: '0.0.1', + latestVersion: '0.0.1', + release: 'experimental', + format_version: '1.0.0', + owner: { github: 'elastic/fleet' }, + policy_templates: [ + { + name: 'template_1', + title: 'Template 1', + description: 'Template 1', + inputs: [ + { + type: 'logs', + title: 'Log', + description: 'Log Input', + vars: [ + { + name: 'path', + type: 'text', + }, + { + name: 'path_2', + type: 'text', + }, + ], + }, + ], + }, + ], + // @ts-ignore + assets: {}, + }; + + const inputsOverride: NewPackagePolicyInput[] = [ + { + type: 'logs', + enabled: true, + streams: [], + policy_template: undefined, // preconfigured input overrides don't have a policy_template + vars: { + path: { + type: 'text', + value: '/var/log/new-logfile.log', + }, + path_2: { + type: 'text', + value: '/var/log/custom.log', + }, + }, + }, + ]; + + const result = overridePackageInputs( + basePackagePolicy, + packageInfo, + // TODO: Update this type assertion when the `InputsOverride` type is updated such + // that it no longer causes unresolvable type errors when used directly + inputsOverride as InputsOverride[], + false + ); + + expect(result.inputs[0]?.vars?.path_2.value).toEqual('/var/log/custom.log'); + }); + }); + describe('when an input of the same type exists under multiple policy templates', () => { it('adds variable definitions to the proper streams', () => { const basePackagePolicy: NewPackagePolicy = { diff --git a/x-pack/plugins/fleet/server/services/package_policy.ts b/x-pack/plugins/fleet/server/services/package_policy.ts index 546e267b8402b..b7772892f542a 100644 --- a/x-pack/plugins/fleet/server/services/package_policy.ts +++ b/x-pack/plugins/fleet/server/services/package_policy.ts @@ -996,9 +996,13 @@ export function overridePackageInputs( ]; for (const override of inputsOverride) { - let originalInput = inputs.find( - (i) => i.type === override.type && i.policy_template === override.policy_template - ); + // Preconfiguration does not currently support multiple policy templates, so overrides will have an undefined + // policy template, so we only match on `type` in that case. + let originalInput = override.policy_template + ? inputs.find( + (i) => i.type === override.type && i.policy_template === override.policy_template + ) + : inputs.find((i) => i.type === override.type); // If there's no corresponding input on the original package policy, just // take the override value from the new package as-is. This case typically diff --git a/x-pack/plugins/fleet/server/services/preconfiguration.ts b/x-pack/plugins/fleet/server/services/preconfiguration.ts index a878af64aa05e..3b322e1112d6a 100644 --- a/x-pack/plugins/fleet/server/services/preconfiguration.ts +++ b/x-pack/plugins/fleet/server/services/preconfiguration.ts @@ -35,13 +35,14 @@ import { agentPolicyService, addPackageToAgentPolicy } from './agent_policy'; import type { InputsOverride } from './package_policy'; import { overridePackageInputs } from './package_policy'; import { appContextService } from './app_context'; +import type { UpgradeManagedPackagePoliciesResult } from './managed_package_policies'; import { upgradeManagedPackagePolicies } from './managed_package_policies'; import { outputService } from './output'; interface PreconfigurationResult { policies: Array<{ id: string; updated_at: string }>; packages: string[]; - nonFatalErrors: PreconfigurationError[]; + nonFatalErrors: Array; } function isPreconfiguredOutputDifferentFromCurrent( @@ -326,16 +327,15 @@ export async function ensurePreconfiguredPackagesAndPolicies( } } - try { - const fulfilledPolicyPackagePolicyIds = fulfilledPolicies.flatMap( - ({ policy }) => policy?.package_policies as string[] - ); + const fulfilledPolicyPackagePolicyIds = fulfilledPolicies + .filter(({ policy }) => policy?.package_policies) + .flatMap(({ policy }) => policy?.package_policies as string[]); - await upgradeManagedPackagePolicies(soClient, esClient, fulfilledPolicyPackagePolicyIds); - // Swallow errors that occur when upgrading - } catch (error) { - appContextService.getLogger().error(error); - } + const packagePolicyUpgradeResults = await upgradeManagedPackagePolicies( + soClient, + esClient, + fulfilledPolicyPackagePolicyIds + ); return { policies: fulfilledPolicies.map((p) => @@ -353,7 +353,7 @@ export async function ensurePreconfiguredPackagesAndPolicies( } ), packages: fulfilledPackages.map((pkg) => pkgToPkgKey(pkg)), - nonFatalErrors: [...rejectedPackages, ...rejectedPolicies], + nonFatalErrors: [...rejectedPackages, ...rejectedPolicies, ...packagePolicyUpgradeResults], }; } diff --git a/x-pack/plugins/fleet/server/services/setup.ts b/x-pack/plugins/fleet/server/services/setup.ts index 08c580d80c804..37d79c1bb691d 100644 --- a/x-pack/plugins/fleet/server/services/setup.ts +++ b/x-pack/plugins/fleet/server/services/setup.ts @@ -32,10 +32,13 @@ import { ensureDefaultComponentTemplate } from './epm/elasticsearch/template/ins import { getInstallations, installPackage } from './epm/packages'; import { isPackageInstalled } from './epm/packages/install'; import { pkgToPkgKey } from './epm/registry'; +import type { UpgradeManagedPackagePoliciesResult } from './managed_package_policies'; export interface SetupStatus { isInitialized: boolean; - nonFatalErrors: Array; + nonFatalErrors: Array< + PreconfigurationError | DefaultPackagesInstallationError | UpgradeManagedPackagePoliciesResult + >; } export async function setupFleet( diff --git a/x-pack/plugins/fleet/server/types/index.tsx b/x-pack/plugins/fleet/server/types/index.tsx index 63e6c277ed710..5bdd95ef0b874 100644 --- a/x-pack/plugins/fleet/server/types/index.tsx +++ b/x-pack/plugins/fleet/server/types/index.tsx @@ -96,3 +96,4 @@ export interface BulkActionResult { export * from './models'; export * from './rest_spec'; export * from './extensions'; +export { FleetRequestHandler, FleetRequestHandlerContext } from './request_context'; diff --git a/x-pack/plugins/fleet/server/types/request_context.ts b/x-pack/plugins/fleet/server/types/request_context.ts new file mode 100644 index 0000000000000..a3b414119b685 --- /dev/null +++ b/x-pack/plugins/fleet/server/types/request_context.ts @@ -0,0 +1,39 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { + KibanaResponseFactory, + RequestHandler, + RequestHandlerContext, + RouteMethod, + SavedObjectsClientContract, +} from '../../../../../src/core/server'; + +/** @internal */ +export interface FleetRequestHandlerContext extends RequestHandlerContext { + fleet: { + epm: { + /** + * Saved Objects client configured to use kibana_system privileges instead of end-user privileges. Should only be + * used by routes that have additional privilege checks for authorization (such as requiring superuser). + */ + readonly internalSoClient: SavedObjectsClientContract; + }; + }; +} + +/** + * Convenience type for request handlers in Fleet that includes the FleetRequestHandlerContext type + * @internal + */ +export type FleetRequestHandler< + P = unknown, + Q = unknown, + B = unknown, + Method extends RouteMethod = any, + ResponseFactory extends KibanaResponseFactory = KibanaResponseFactory +> = RequestHandler; diff --git a/x-pack/plugins/fleet/storybook/context/cloud.ts b/x-pack/plugins/fleet/storybook/context/cloud.ts new file mode 100644 index 0000000000000..bed72c8ac4db7 --- /dev/null +++ b/x-pack/plugins/fleet/storybook/context/cloud.ts @@ -0,0 +1,23 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { CloudSetup } from '../../../cloud/public'; + +export const getCloud = ({ isCloudEnabled }: { isCloudEnabled: boolean }) => { + const cloud: CloudSetup = { + isCloudEnabled, + baseUrl: 'https://base.url', + cloudId: 'cloud-id', + cname: 'found.io', + deploymentUrl: 'https://deployment.url', + organizationUrl: 'https://organization.url', + profileUrl: 'https://profile.url', + snapshotsUrl: 'https://snapshots.url', + }; + + return cloud; +}; diff --git a/x-pack/plugins/fleet/storybook/context/doc_links.ts b/x-pack/plugins/fleet/storybook/context/doc_links.ts index 56287dd9116a9..bb6d8086d1cd8 100644 --- a/x-pack/plugins/fleet/storybook/context/doc_links.ts +++ b/x-pack/plugins/fleet/storybook/context/doc_links.ts @@ -10,9 +10,12 @@ import type { DocLinksStart } from 'kibana/public'; export const getDocLinks = () => { const docLinks: DocLinksStart = { links: { + elasticStackGetStarted: + 'https://www.elastic.co/guide/en/elastic-stack-get-started/current/get-started-elastic-stack.html', fleet: { learnMoreBlog: 'https://www.elastic.co/blog/elastic-agent-and-fleet-make-it-easier-to-integrate-your-systems-with-elastic', + apiKeysLearnMore: 'https://www.elastic.co/guide/en/kibana/master/api-keys.html', }, }, } as unknown as DocLinksStart; diff --git a/x-pack/plugins/fleet/storybook/context/fixtures/packages.ts b/x-pack/plugins/fleet/storybook/context/fixtures/packages.ts index 2a6012272d4b8..dfe8e905be089 100644 --- a/x-pack/plugins/fleet/storybook/context/fixtures/packages.ts +++ b/x-pack/plugins/fleet/storybook/context/fixtures/packages.ts @@ -6,4527 +6,307 @@ */ import type { GetPackagesResponse } from '../../../public/types'; -import { ElasticsearchAssetType, KibanaSavedObjectType } from '../../../common/types'; export const response: GetPackagesResponse['response'] = [ { - name: 'apache', - title: 'Apache', - version: '0.8.1', - release: 'experimental', - description: 'Apache Integration', - type: 'integration', - download: '/epr/apache/apache-0.8.1.zip', - path: '/package/apache/0.8.1', - icons: [ - { - src: '/img/logo_apache.svg', - path: '/package/apache/0.8.1/img/logo_apache.svg', - title: 'Apache Logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'apache', - title: 'Apache logs and metrics', - description: 'Collect logs and metrics from Apache instances', - }, - ], - id: 'apache', - status: 'not_installed', - }, - { - name: 'apm', - title: 'Elastic APM', - version: '0.4.0', - release: 'beta', - description: 'Ingest APM data', - type: 'integration', - download: '/epr/apm/apm-0.4.0.zip', - path: '/package/apm/0.4.0', - icons: [ - { - src: '/img/logo_apm.svg', - path: '/package/apm/0.4.0/img/logo_apm.svg', - title: 'APM Logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'apmserver', - title: 'Elastic APM Integration', - description: 'Elastic APM Integration', - }, - ], - id: 'apm', - status: 'not_installed', - }, - { - name: 'auditd', - title: 'Auditd', - version: '1.2.0', - release: 'ga', - description: 'This Elastic integration collects and parses logs from the Audit daemon (auditd)', - type: 'integration', - download: '/epr/auditd/auditd-1.2.0.zip', - path: '/package/auditd/1.2.0', - icons: [ - { - src: '/img/linux.svg', - path: '/package/auditd/1.2.0/img/linux.svg', - title: 'linux', - size: '299x354', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'auditd', - title: 'Auditd logs', - description: 'Collect logs from Auditd instances', - }, - ], - id: 'auditd', - status: 'not_installed', - }, - { - name: 'aws', - title: 'AWS', - version: '0.10.7', - release: 'beta', - description: 'This integration collects logs and metrics from Amazon Web Services (AWS)', - type: 'integration', - download: '/epr/aws/aws-0.10.7.zip', - path: '/package/aws/0.10.7', - icons: [ - { - src: '/img/logo_aws.svg', - path: '/package/aws/0.10.7/img/logo_aws.svg', - title: 'logo aws', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'billing', - title: 'AWS Billing', - description: 'Collect AWS billing metrics', - icons: [ - { - src: '/img/logo_billing.svg', - path: '/package/aws/0.10.7/img/logo_billing.svg', - title: 'AWS Billing logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'cloudtrail', - title: 'AWS Cloudtrail', - description: 'Collect logs from AWS Cloudtrail', - icons: [ - { - src: '/img/logo_cloudtrail.svg', - path: '/package/aws/0.10.7/img/logo_cloudtrail.svg', - title: 'AWS Cloudtrail logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'cloudwatch', - title: 'AWS CloudWatch', - description: 'Collect logs and metrics from CloudWatch', - icons: [ - { - src: '/img/logo_cloudwatch.svg', - path: '/package/aws/0.10.7/img/logo_cloudwatch.svg', - title: 'AWS CloudWatch logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'dynamodb', - title: 'AWS DynamoDB', - description: 'Collect AWS DynamoDB metrics', - icons: [ - { - src: '/img/logo_dynamodb.svg', - path: '/package/aws/0.10.7/img/logo_dynamodb.svg', - title: 'AWS DynamoDB logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'ebs', - title: 'AWS EBS', - description: 'Collect AWS EBS metrics', - icons: [ - { - src: '/img/logo_ebs.svg', - path: '/package/aws/0.10.7/img/logo_ebs.svg', - title: 'AWS EBS logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'ec2', - title: 'AWS EC2', - description: 'Collect logs and metrics from EC2 service', - icons: [ - { - src: '/img/logo_ec2.svg', - path: '/package/aws/0.10.7/img/logo_ec2.svg', - title: 'AWS EC2 logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'elb', - title: 'AWS ELB', - description: 'Collect logs and metrics from ELB service', - icons: [ - { - src: '/img/logo_elb.svg', - path: '/package/aws/0.10.7/img/logo_elb.svg', - title: 'AWS ELB logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'lambda', - title: 'AWS Lambda', - description: 'Collect AWS Lambda metrics', - icons: [ - { - src: '/img/logo_lambda.svg', - path: '/package/aws/0.10.7/img/logo_lambda.svg', - title: 'AWS Lambda logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'natgateway', - title: 'AWS NATGateway', - description: 'Collect AWS NATGateway metrics', - icons: [ - { - src: '/img/logo_natgateway.svg', - path: '/package/aws/0.10.7/img/logo_natgateway.svg', - title: 'AWS NATGateway logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'rds', - title: 'AWS RDS', - description: 'Collect AWS RDS metrics', - icons: [ - { - src: '/img/logo_rds.svg', - path: '/package/aws/0.10.7/img/logo_rds.svg', - title: 'AWS RDS logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 's3', - title: 'AWS S3', - description: 'Collect AWS S3 metrics', - icons: [ - { - src: '/img/logo_s3.svg', - path: '/package/aws/0.10.7/img/logo_s3.svg', - title: 'AWS S3 logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'sns', - title: 'AWS SNS', - description: 'Collect AWS SNS metrics', - icons: [ - { - src: '/img/logo_sns.svg', - path: '/package/aws/0.10.7/img/logo_sns.svg', - title: 'AWS SNS logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'sqs', - title: 'AWS SQS', - description: 'Collect AWS SQS metrics', - icons: [ - { - src: '/img/logo_sqs.svg', - path: '/package/aws/0.10.7/img/logo_sqs.svg', - title: 'AWS SQS logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'transitgateway', - title: 'AWS Transit Gateway', - description: 'Collect AWS Transit Gateway metrics', - icons: [ - { - src: '/img/logo_transitgateway.svg', - path: '/package/aws/0.10.7/img/logo_transitgateway.svg', - title: 'AWS Transit Gateway logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'usage', - title: 'AWS Usage', - description: 'Collect AWS Usage metrics', - }, - { - name: 'vpcflow', - title: 'AWS VPC Flow', - description: 'Collect AWS vpcflow logs', - icons: [ - { - src: '/img/logo_vpcflow.svg', - path: '/package/aws/0.10.7/img/logo_vpcflow.svg', - title: 'AWS VPC logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'vpn', - title: 'AWS VPN', - description: 'Collect AWS VPN metrics', - icons: [ - { - src: '/img/logo_vpn.svg', - path: '/package/aws/0.10.7/img/logo_vpn.svg', - title: 'AWS VPN logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - ], - id: 'aws', - status: 'not_installed', - }, - { - name: 'azure', - title: 'Azure Logs', - version: '0.8.5', - release: 'beta', - description: 'This Elastic integration collects logs from Azure', - type: 'integration', - download: '/epr/azure/azure-0.8.5.zip', - path: '/package/azure/0.8.5', - icons: [ - { - src: '/img/azure_logs_logo.png', - path: '/package/azure/0.8.5/img/azure_logs_logo.png', - title: 'logo azure', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'adlogs', - title: 'Azure Active Directory logs', - description: 'Azure Directory logs integration', - icons: [ - { - src: '/img/active_directory_logo.png', - path: '/package/azure/0.8.5/img/active_directory_logo.png', - title: 'logo azure', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'platformlogs', - title: 'Azure platform logs', - description: 'Azure platform logs integration', - icons: [ - { - src: '/img/platformlogs_logo.png', - path: '/package/azure/0.8.5/img/platformlogs_logo.png', - title: 'logo azure', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'activitylogs', - title: 'Azure activity logs', - description: 'Azure activity logs integration', - icons: [ - { - src: '/img/platformlogs_logo.png', - path: '/package/azure/0.8.5/img/platformlogs_logo.png', - title: 'logo azure', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'springcloudlogs', - title: 'Azure Spring Cloud logs', - description: 'Azure Spring Cloud logs integration', - icons: [ - { - src: '/img/spring_logs.svg', - path: '/package/azure/0.8.5/img/spring_logs.svg', - title: 'logo azure', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - ], - id: 'azure', - status: 'not_installed', - }, - { - name: 'azure_application_insights', - title: 'Azure Application Insights Metrics Overview', - version: '0.1.0', - release: 'beta', - description: 'Azure Application Insights', - type: 'integration', - download: '/epr/azure_application_insights/azure_application_insights-0.1.0.zip', - path: '/package/azure_application_insights/0.1.0', - icons: [ - { - src: '/img/app_insights.png', - path: '/package/azure_application_insights/0.1.0/img/app_insights.png', - title: 'logo docker', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'app_insights', - title: 'Azure Application Insights metrics', - description: 'Azure Application Insights Metrics Integration', - icons: [ - { - src: '/img//app_insights.png', - path: '/package/azure_application_insights/0.1.0/img/app_insights.png', - title: 'logo azure', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'app_state', - title: 'Azure Application State Insights metrics', - description: 'Azure Application State Insights Metrics Integration', - icons: [ - { - src: '/img/application_insights_blue.png', - path: '/package/azure_application_insights/0.1.0/img/application_insights_blue.png', - title: 'logo azure', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - ], - id: 'azure_application_insights', - status: 'not_installed', - }, - { - name: 'azure_metrics', - title: 'Azure resource metrics', - version: '0.3.2', - release: 'beta', - description: 'This Elastic integration collects and aggregates metrics from Azure resources', - type: 'integration', - download: '/epr/azure_metrics/azure_metrics-0.3.2.zip', - path: '/package/azure_metrics/0.3.2', - icons: [ - { - src: '/img/azure_metrics_logo.png', - path: '/package/azure_metrics/0.3.2/img/azure_metrics_logo.png', - title: 'logo docker', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'monitor', - title: 'Azure Monitor metrics', - description: 'Azure Monitor Metrics Integration', - icons: [ - { - src: '/img/monitor_logo.png', - path: '/package/azure_metrics/0.3.2/img/monitor_logo.png', - title: 'logo azure', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'compute_vm', - title: 'Azure Virtual Machines metrics', - description: 'Azure Virtual Machines Metrics Integration', - icons: [ - { - src: '/img/compute_vm_logo.png', - path: '/package/azure_metrics/0.3.2/img/compute_vm_logo.png', - title: 'logo azure', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'compute_vm_scaleset', - title: 'Azure Virtual Machines Scaleset metrics', - description: 'Azure Virtual Machines Scaleset Metrics Integration', - icons: [ - { - src: '/img/compute_vm_scaleset_logo.png', - path: '/package/azure_metrics/0.3.2/img/compute_vm_scaleset_logo.png', - title: 'logo azure', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'container_registry', - title: 'Azure Container Registry metrics', - description: 'Azure Container Registry Metrics Integration', - icons: [ - { - src: '/img/container_registry_logo.png', - path: '/package/azure_metrics/0.3.2/img/container_registry_logo.png', - title: 'logo azure', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'container_instance', - title: 'Azure Container Instance metrics', - description: 'Azure Container Instance Metrics Integration', - icons: [ - { - src: '/img/container_instance_logo.png', - path: '/package/azure_metrics/0.3.2/img/container_instance_logo.png', - title: 'logo azure', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'container_service', - title: 'Azure Container Service metrics', - description: 'Azure Container Service Metrics Integration', - icons: [ - { - src: '/img/container_service_logo.png', - path: '/package/azure_metrics/0.3.2/img/container_service_logo.png', - title: 'logo azure', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'database_account', - title: 'Azure Database Account metrics', - description: 'Azure Database Account Metrics Integration', - icons: [ - { - src: '/img/database_account_logo.png', - path: '/package/azure_metrics/0.3.2/img/database_account_logo.png', - title: 'logo azure', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'storage_account', - title: 'Azure Storage Account metrics', - description: 'Azure Storage Account Metrics Integration', - icons: [ - { - src: '/img/storage_account_logo.png', - path: '/package/azure_metrics/0.3.2/img/storage_account_logo.png', - title: 'logo azure', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - ], - id: 'azure_metrics', - status: 'not_installed', - }, - { - name: 'barracuda', - title: 'Barracuda', - version: '0.4.0', - release: 'experimental', - description: 'Barracuda Integration', - type: 'integration', - download: '/epr/barracuda/barracuda-0.4.0.zip', - path: '/package/barracuda/0.4.0', - icons: [ - { - src: '/img/logo.svg', - path: '/package/barracuda/0.4.0/img/logo.svg', - title: 'Barracuda logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'barracuda', - title: 'Barracuda logs', - description: 'Collect Barracuda logs from syslog or a file.', - }, - ], - id: 'barracuda', - status: 'not_installed', - }, - { - name: 'bluecoat', - title: 'Blue Coat Director', - version: '0.3.0', - release: 'experimental', - description: 'Blue Coat Director Integration', - type: 'integration', - download: '/epr/bluecoat/bluecoat-0.3.0.zip', - path: '/package/bluecoat/0.3.0', - policy_templates: [ - { - name: 'director', - title: 'Blue Coat Director', - description: 'Collect Blue Coat Director logs from syslog or a file.', - }, - ], - id: 'bluecoat', - status: 'not_installed', - }, - { - name: 'carbonblack_edr', - title: 'VMware Carbon Black EDR', - version: '0.2.0', - release: 'experimental', - description: 'Carbon Black EDR Integration', - type: 'integration', - download: '/epr/carbonblack_edr/carbonblack_edr-0.2.0.zip', - path: '/package/carbonblack_edr/0.2.0', - policy_templates: [ - { - name: 'log', - title: 'Carbon Black EDR logs', - description: 'Collect logs from Carbon Black EDR', - }, - ], - id: 'carbonblack_edr', - status: 'not_installed', - }, - { - name: 'cef', - title: 'CEF', - version: '0.5.2', - release: 'experimental', - description: 'This Elastic integration collects logs in common event format (CEF)', - type: 'integration', - download: '/epr/cef/cef-0.5.2.zip', - path: '/package/cef/0.5.2', - policy_templates: [ - { - name: 'cef', - title: 'CEF logs', - description: 'Collect logs from CEF instances', - }, - ], - id: 'cef', - status: 'not_installed', - }, - { - name: 'checkpoint', - title: 'Check Point', - version: '0.8.2', - release: 'experimental', - description: 'This Elastic integration collects logs from Check Point products', - type: 'integration', - download: '/epr/checkpoint/checkpoint-0.8.2.zip', - path: '/package/checkpoint/0.8.2', - icons: [ - { - src: '/img/checkpoint-logo.svg', - path: '/package/checkpoint/0.8.2/img/checkpoint-logo.svg', - title: 'Check Point', - size: '216x216', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'checkpoint', - title: 'Check Point logs', - description: 'Collect logs from Check Point instances', - }, - ], - id: 'checkpoint', - status: 'not_installed', - }, - { - name: 'cisco', - title: 'Cisco', - version: '0.10.0', - release: 'experimental', - description: 'Cisco Integration', - type: 'integration', - download: '/epr/cisco/cisco-0.10.0.zip', - path: '/package/cisco/0.10.0', - icons: [ - { - src: '/img/cisco.svg', - path: '/package/cisco/0.10.0/img/cisco.svg', - title: 'cisco', - size: '216x216', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'cisco', - title: 'Cisco logs', - description: 'Collect logs from Cisco instances', - }, - ], - id: 'cisco', - status: 'not_installed', - }, - { - name: 'crowdstrike', - title: 'CrowdStrike', - version: '0.6.0', - release: 'experimental', - description: 'CrowdStrike Integration', - type: 'integration', - download: '/epr/crowdstrike/crowdstrike-0.6.0.zip', - path: '/package/crowdstrike/0.6.0', - icons: [ - { - src: '/img/logo-integrations-crowdstrike.svg', - path: '/package/crowdstrike/0.6.0/img/logo-integrations-crowdstrike.svg', - title: 'CrowdStrike', - size: '216x216', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'crowdstrike', - title: 'CrowdStrike Falcon logs', - description: 'Collect logs from CrowdStrike Falcon', - }, - ], - id: 'crowdstrike', - status: 'not_installed', - }, - { - name: 'cyberark', - title: 'Cyber-Ark - Deprecated', - version: '0.3.0', - release: 'experimental', - description: - "Cyber-Ark Integration - Deprecated: Use 'CyberArk Privileged Access Security' instead.", - type: 'integration', - download: '/epr/cyberark/cyberark-0.3.0.zip', - path: '/package/cyberark/0.3.0', - icons: [ - { - src: '/img/logo.svg', - path: '/package/cyberark/0.3.0/img/logo.svg', - title: 'CyberArk logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'cyberark', - title: 'CyberArk logs', - description: 'Collect CyberArk logs from syslog or a file.', - }, - ], - id: 'cyberark', - status: 'not_installed', - }, - { - name: 'cyberarkpas', - title: 'CyberArk Privileged Access Security', - version: '1.2.3', - release: 'beta', - description: 'This Elastic integration collects logs from CyberArk', - type: 'integration', - download: '/epr/cyberarkpas/cyberarkpas-1.2.3.zip', - path: '/package/cyberarkpas/1.2.3', - icons: [ - { - src: '/img/logo.svg', - path: '/package/cyberarkpas/1.2.3/img/logo.svg', - title: 'CyberArk logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'cyberarkpas', - title: 'CyberArk Privileged Access Security audit logs', - description: 'Collect logs from Vault instances', - }, - ], - id: 'cyberarkpas', - status: 'not_installed', - }, - { - name: 'cylance', - title: 'CylanceProtect', - version: '0.3.0', - release: 'experimental', - description: 'CylanceProtect Integration', - type: 'integration', - download: '/epr/cylance/cylance-0.3.0.zip', - path: '/package/cylance/0.3.0', - icons: [ - { - src: '/img/logo.svg', - path: '/package/cylance/0.3.0/img/logo.svg', - title: 'CylanceProtect logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'protect', - title: 'CylanceProtect', - description: 'Collect CylanceProtect logs from syslog or a file.', - }, - ], - id: 'cylance', - status: 'not_installed', - }, - { - name: 'elastic_agent', - title: 'Elastic Agent', - version: '1.0.0', - release: 'ga', - description: 'This Elastic integration collects metrics from Elastic Agent', - type: 'integration', - download: '/epr/elastic_agent/elastic_agent-1.0.0.zip', - path: '/package/elastic_agent/1.0.0', - icons: [ - { - src: '/img/logo_elastic_agent.svg', - path: '/package/elastic_agent/1.0.0/img/logo_elastic_agent.svg', - title: 'logo Elastic Agent', - size: '64x64', - type: 'image/svg+xml', - }, - ], - id: 'elastic_agent', - status: 'installed', - savedObject: { - type: 'epm-packages', - id: 'elastic_agent', - attributes: { - installed_kibana: [ - { - id: 'elastic_agent-f47f18cc-9c7d-4278-b2ea-a6dee816d395', - type: KibanaSavedObjectType.dashboard, - }, - { - id: 'elastic_agent-47d87552-8421-4cfc-bc5d-4a7205f5b007', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'elastic_agent-93a8a11d-b2da-4ef3-81dc-c7040560ffde', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'elastic_agent-a11c250a-865f-4eb2-9441-882d229313be', - type: KibanaSavedObjectType.visualization, - }, - ], - installed_es: [ - { - id: 'metrics-elastic_agent.elastic_agent', - type: ElasticsearchAssetType.indexTemplate, - }, - { - id: 'metrics-elastic_agent.elastic_agent@mappings', - type: ElasticsearchAssetType.componentTemplate, - }, - { - id: 'metrics-elastic_agent.elastic_agent@custom', - type: ElasticsearchAssetType.componentTemplate, - }, - ], - package_assets: [ - { - id: '0100ed87-1b21-5959-9ee3-6f6fe60b0126', - type: 'epm-packages-assets', - }, - { - id: '79617489-e64c-5867-aa21-131d3f76d7c0', - type: 'epm-packages-assets', - }, - { - id: 'c1da5c89-8489-5a28-b7d8-d71f3680193e', - type: 'epm-packages-assets', - }, - { - id: 'e2ebdefd-4511-57c6-81bd-9b206d5de396', - type: 'epm-packages-assets', - }, - { - id: 'aae8cab7-af27-5e71-9a95-a76e20ccfd0f', - type: 'epm-packages-assets', - }, - { - id: '14935ecd-d51c-59c8-8c2b-fc0a3c94c3bc', - type: 'epm-packages-assets', - }, - { - id: '0173d8b8-3625-5a87-9ff9-b6885d475e58', - type: 'epm-packages-assets', - }, - { - id: '2c518c0e-44b7-5121-9cbe-b9794317fc65', - type: 'epm-packages-assets', - }, - { - id: 'c5d0bc02-78bc-558f-a26e-406aeaeb0a6b', - type: 'epm-packages-assets', - }, - { - id: '38e9b2ce-4833-594b-95e6-d4dc663ecd6a', - type: 'epm-packages-assets', - }, - { - id: '12996859-f0e4-51f5-b842-a34781b11164', - type: 'epm-packages-assets', - }, - { - id: '70b80a43-df71-5e8c-887d-c09114998a72', - type: 'epm-packages-assets', - }, - { - id: 'bd50d62b-1f81-56ce-accf-82fe25f2723e', - type: 'epm-packages-assets', - }, - ], - es_index_patterns: { - elastic_agent: 'metrics-elastic_agent.elastic_agent-*', - }, - name: 'elastic_agent', - version: '1.0.0', - internal: false, - removable: false, - install_version: '1.0.0', - install_status: 'installed', - install_started_at: '2021-08-25T19:44:41.090Z', - install_source: 'registry', - keep_policies_up_to_date: false, - }, - references: [], - coreMigrationVersion: '7.14.0', - updated_at: '2021-08-25T19:45:01.491Z', - version: 'Wzc3NjQsNF0=', - // score: 0, TODO: this is not represented in any type, but is returned by the API, - }, - }, - { - name: 'endpoint', - title: 'Endpoint Security', - version: '1.0.0', - release: 'ga', - description: - 'Protect your hosts with threat prevention, detection, and deep security data visibility.', - type: 'integration', - download: '/epr/endpoint/endpoint-1.0.0.zip', - path: '/package/endpoint/1.0.0', - icons: [ - { - src: '/img/security-logo-color-64px.svg', - path: '/package/endpoint/1.0.0/img/security-logo-color-64px.svg', - size: '16x16', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'endpoint', - title: 'Endpoint Security Integration', - description: 'Interact with the endpoint.', - }, - ], - id: 'endpoint', - status: 'not_installed', - }, - { - name: 'f5', - title: 'F5', - version: '0.4.0', - release: 'experimental', - description: 'F5 Integration', - type: 'integration', - download: '/epr/f5/f5-0.4.0.zip', - path: '/package/f5/0.4.0', - icons: [ - { - src: '/img/logo.svg', - path: '/package/f5/0.4.0/img/logo.svg', - title: 'Big-IP Access Policy Manager logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'F5', - title: 'F5 logs', - description: 'Collect F5 logs from syslog or a file.', - }, - ], - id: 'f5', - status: 'not_installed', - }, - { - name: 'fleet_server', - title: 'Fleet Server', - version: '1.0.1', - release: 'ga', - description: 'Centrally manage Elastic Agents with the Fleet Server integration', - type: 'integration', - download: '/epr/fleet_server/fleet_server-1.0.1.zip', - path: '/package/fleet_server/1.0.1', - icons: [ - { - src: '/img/logo_fleet_server.svg', - path: '/package/fleet_server/1.0.1/img/logo_fleet_server.svg', - title: 'logo Fleet Server', - size: '64x64', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'fleet_server', - title: 'Fleet Server', - description: 'Fleet Server setup', - }, - ], - id: 'fleet_server', - status: 'installed', - savedObject: { - type: 'epm-packages', - id: 'fleet_server', - attributes: { - installed_kibana: [], - installed_es: [], - package_assets: [ - { - id: '4a805c49-0059-52f4-bdc0-56388a9708a7', - type: 'epm-packages-assets', - }, - { - id: '738689f4-0777-5219-ac20-5517c593f6f6', - type: 'epm-packages-assets', - }, - { - id: '1e5f0249-d9a4-5259-8905-e830165185da', - type: 'epm-packages-assets', - }, - { - id: '67e878de-de6e-5123-ad62-caff2e59ef9b', - type: 'epm-packages-assets', - }, - { - id: 'fa44229e-987c-58d5-bef9-95dbaedbe2d8', - type: 'epm-packages-assets', - }, - ], - es_index_patterns: {}, - name: 'fleet_server', - version: '1.0.1', - internal: false, - removable: false, - install_version: '1.0.1', - install_status: 'installed', - install_started_at: '2021-08-25T19:44:37.078Z', - install_source: 'registry', - keep_policies_up_to_date: false, - }, - references: [], - coreMigrationVersion: '7.14.0', - updated_at: '2021-08-25T19:44:53.517Z', - version: 'WzczMTIsNF0=', - // score: 0, TODO: this is not represented in any type, but is returned by the API, - }, - }, - { - name: 'fortinet', - title: 'Fortinet', - version: '1.1.2', - release: 'ga', - description: 'This Elastic integration collects logs from Fortinet instances', - type: 'integration', - download: '/epr/fortinet/fortinet-1.1.2.zip', - path: '/package/fortinet/1.1.2', - icons: [ - { - src: '/img/fortinet-logo.svg', - path: '/package/fortinet/1.1.2/img/fortinet-logo.svg', - title: 'Fortinet', - size: '216x216', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'fortinet', - title: 'Fortinet logs', - description: 'Collect logs from Fortinet instances', - }, - ], - id: 'fortinet', - status: 'not_installed', - }, - { - name: 'gcp', - title: 'Google Cloud Platform (GCP)', - version: '0.2.0', - release: 'experimental', - description: 'Google Cloud Platform (GCP) Integration', - type: 'integration', - download: '/epr/gcp/gcp-0.2.0.zip', - path: '/package/gcp/0.2.0', - icons: [ - { - src: '/img/logo_gcp.svg', - path: '/package/gcp/0.2.0/img/logo_gcp.svg', - title: 'logo gcp', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'gcp', - title: 'Google Cloud Platform (GCP) logs', - description: 'Collect logs from Google Cloud Platform (GCP) instances', - }, - ], - id: 'gcp', - status: 'not_installed', - }, - { - name: 'google_workspace', - title: 'Google Workspace', - version: '0.7.3', - release: 'experimental', - description: 'This Elastic integration collects logs from Google Workspace APIs', - type: 'integration', - download: '/epr/google_workspace/google_workspace-0.7.3.zip', - path: '/package/google_workspace/0.7.3', - icons: [ - { - src: '/img/logo.svg', - path: '/package/google_workspace/0.7.3/img/logo.svg', - title: 'logo Google', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'google_workspace', - title: 'Google Workspace logs', - description: 'Collect logs from Google Workspace APIs', - }, - ], - id: 'google_workspace', - status: 'not_installed', - }, - { - name: 'haproxy', - title: 'HAProxy', - version: '0.4.0', - release: 'experimental', - description: 'HAProxy Integration', - type: 'integration', - download: '/epr/haproxy/haproxy-0.4.0.zip', - path: '/package/haproxy/0.4.0', - icons: [ - { - src: '/img/logo_haproxy.svg', - path: '/package/haproxy/0.4.0/img/logo_haproxy.svg', - title: 'logo HAProxy', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'haproxy', - title: 'HAProxy logs and metrics', - description: 'Collect logs and metrics from HAProxy instances', - }, - ], - id: 'haproxy', - status: 'not_installed', - }, - { - name: 'iis', - title: 'IIS', - version: '0.5.0', - release: 'beta', - description: 'IIS Integration', - type: 'integration', - download: '/epr/iis/iis-0.5.0.zip', - path: '/package/iis/0.5.0', - icons: [ - { - src: '/img/iis.svg', - path: '/package/iis/0.5.0/img/iis.svg', - title: 'iis', - size: '100x100', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'iis', - title: 'IIS logs and metrics', - description: 'Collect logs and metrics from IIS instances', - }, - ], - id: 'iis', - status: 'not_installed', - }, - { - name: 'imperva', - title: 'Imperva SecureSphere', - version: '0.3.0', - release: 'experimental', - description: 'Imperva SecureSphere Integration', - type: 'integration', - download: '/epr/imperva/imperva-0.3.0.zip', - path: '/package/imperva/0.3.0', - policy_templates: [ - { - name: 'securesphere', - title: 'Imperva SecureSphere', - description: 'Collect Imperva SecureSphere logs from syslog or a file.', - }, - ], - id: 'imperva', - status: 'not_installed', - }, - { - name: 'infoblox', - title: 'Infoblox NIOS', - version: '0.3.0', - release: 'experimental', - description: 'Infoblox NIOS Integration', - type: 'integration', - download: '/epr/infoblox/infoblox-0.3.0.zip', - path: '/package/infoblox/0.3.0', - icons: [ - { - src: '/img/logo.svg', - path: '/package/infoblox/0.3.0/img/logo.svg', - title: 'Infoblox NIOS logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'nios', - title: 'Infoblox NIOS', - description: 'Collect Infoblox NIOS logs from syslog or a file.', - }, - ], - id: 'infoblox', - status: 'not_installed', - }, - { - name: 'iptables', - title: 'Iptables', - version: '0.5.0', - release: 'experimental', - description: 'This Elastic integration collects logs from Iptables instances', - type: 'integration', - download: '/epr/iptables/iptables-0.5.0.zip', - path: '/package/iptables/0.5.0', - icons: [ - { - src: '/img/linux.svg', - path: '/package/iptables/0.5.0/img/linux.svg', - title: 'linux', - size: '299x354', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'iptables', - title: 'Iptables logs', - description: 'Collect logs from iptables instances', - }, - ], - id: 'iptables', - status: 'not_installed', - }, - { - name: 'juniper', - title: 'Juniper', - version: '0.7.0', - release: 'experimental', - description: 'Juniper Integration', - type: 'integration', - download: '/epr/juniper/juniper-0.7.0.zip', - path: '/package/juniper/0.7.0', - icons: [ - { - src: '/img/logo.svg', - path: '/package/juniper/0.7.0/img/logo.svg', - title: 'Juniper logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'juniper', - title: 'Juniper logs', - description: 'Collect Juniper logs from syslog or a file.', - }, - ], - id: 'juniper', - status: 'not_installed', - }, - { - name: 'kafka', - title: 'Kafka', - version: '0.5.0', - release: 'experimental', - description: 'Kafka Integration', - type: 'integration', - download: '/epr/kafka/kafka-0.5.0.zip', - path: '/package/kafka/0.5.0', - icons: [ - { - src: '/img/logo_kafka.svg', - path: '/package/kafka/0.5.0/img/logo_kafka.svg', - title: 'logo kafka', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'kafka', - title: 'Kafka logs and metrics', - description: 'Collect logs and metrics from Kafka brokers', - }, - ], - id: 'kafka', - status: 'not_installed', - }, - { - name: 'kubernetes', - title: 'Kubernetes', - version: '0.8.0', - release: 'experimental', - description: 'Kubernetes Integration', - type: 'integration', - download: '/epr/kubernetes/kubernetes-0.8.0.zip', - path: '/package/kubernetes/0.8.0', - icons: [ - { - src: '/img/logo_kubernetes.svg', - path: '/package/kubernetes/0.8.0/img/logo_kubernetes.svg', - title: 'Logo Kubernetes', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'kubelet', - title: 'Kubelet', - description: 'Collect metrics from Kubernetes Kubelet API', - icons: [ - { - src: '/img/logo_kubernetes.svg', - path: '/package/kubernetes/0.8.0/img/logo_kubernetes.svg', - title: 'Logo Kubernetes', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'kube-state-metrics', - title: 'kube-state-metrics', - description: 'Collect metrics from kube-state-metrics', - icons: [ - { - src: '/img/logo_kubernetes.svg', - path: '/package/kubernetes/0.8.0/img/logo_kubernetes.svg', - title: 'Logo Kubernetes', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'kube-apiserver', - title: 'kube-apiserver', - description: 'Collect metrics from Kubernetes API Server', - icons: [ - { - src: '/img/logo_kubernetes.svg', - path: '/package/kubernetes/0.8.0/img/logo_kubernetes.svg', - title: 'Logo Kubernetes', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'kube-proxy', - title: 'kube-proxy', - description: 'Collect metrics from Kubernetes Proxy', - icons: [ - { - src: '/img/logo_kubernetes.svg', - path: '/package/kubernetes/0.8.0/img/logo_kubernetes.svg', - title: 'Logo Kubernetes', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'kube-scheduler', - title: 'kube-scheduler', - description: 'Collect metrics from Kubernetes Scheduler', - icons: [ - { - src: '/img/logo_kubernetes.svg', - path: '/package/kubernetes/0.8.0/img/logo_kubernetes.svg', - title: 'Logo Kubernetes', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'kube-controller-manager', - title: 'kube-controller-manager', - description: 'Collect metrics from Kubernetes controller-manager', - icons: [ - { - src: '/img/logo_kubernetes.svg', - path: '/package/kubernetes/0.8.0/img/logo_kubernetes.svg', - title: 'Logo Kubernetes', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - { - name: 'events', - title: 'Events', - description: 'Collect events from Kubernetes API server', - icons: [ - { - src: '/img/logo_kubernetes.svg', - path: '/package/kubernetes/0.8.0/img/logo_kubernetes.svg', - title: 'Logo Kubernetes', - size: '32x32', - type: 'image/svg+xml', - }, - ], - }, - ], - id: 'kubernetes', - status: 'not_installed', - }, - { - name: 'linux', - title: 'Linux', - version: '0.4.1', - release: 'beta', - description: 'Linux Integration', - type: 'integration', - download: '/epr/linux/linux-0.4.1.zip', - path: '/package/linux/0.4.1', - policy_templates: [ - { - name: 'system', - title: 'Linux kernel metrics', - description: 'Collect system metrics from Linux operating systems', - }, - ], - id: 'linux', - status: 'not_installed', - }, - { - name: 'log', - title: 'Custom logs', - version: '0.4.6', - release: 'experimental', - description: 'Collect your custom logs.\n', - type: 'integration', - download: '/epr/log/log-0.4.6.zip', - path: '/package/log/0.4.6', - icons: [ - { - src: '/img/icon.svg', - path: '/package/log/0.4.6/img/icon.svg', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'logs', - title: 'Custom logs', - description: 'Collect your custom log files.', - }, - ], - id: 'log', - status: 'not_installed', - }, - { - name: 'microsoft', - title: 'Microsoft', - version: '0.6.0', - release: 'experimental', - description: 'Microsoft Integration', - type: 'integration', - download: '/epr/microsoft/microsoft-0.6.0.zip', - path: '/package/microsoft/0.6.0', - icons: [ - { - src: '/img/logo.svg', - path: '/package/microsoft/0.6.0/img/logo.svg', - title: 'Microsoft logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'microsoft', - title: 'Microsoft', - description: 'Collect logs from Microsoft products', - }, - ], - id: 'microsoft', - status: 'not_installed', - }, - { - name: 'mongodb', - title: 'MongoDB', - version: '0.6.0', - release: 'experimental', - description: 'MongoDB Integration', - type: 'integration', - download: '/epr/mongodb/mongodb-0.6.0.zip', - path: '/package/mongodb/0.6.0', - icons: [ - { - src: '/img/logo_mongodb.svg', - path: '/package/mongodb/0.6.0/img/logo_mongodb.svg', - title: 'logo mongodb', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'mongodb', - title: 'MongoDB logs and metrics', - description: 'Collect logs and metrics from MongoDB instances', - }, - ], - id: 'mongodb', - status: 'not_installed', - }, - { - name: 'mysql', - title: 'MySQL', - version: '0.5.0', - release: 'beta', - description: 'MySQL Integration', - type: 'integration', - download: '/epr/mysql/mysql-0.5.0.zip', - path: '/package/mysql/0.5.0', - icons: [ - { - src: '/img/logo_mysql.svg', - path: '/package/mysql/0.5.0/img/logo_mysql.svg', - title: 'logo mysql', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'mysql', - title: 'MySQL logs and metrics', - description: 'Collect logs and metrics from MySQL instances', - }, - ], - id: 'mysql', - status: 'not_installed', - }, - { - name: 'nats', - title: 'NATS', - version: '0.4.0', - release: 'experimental', - description: 'NATS Integration', - type: 'integration', - download: '/epr/nats/nats-0.4.0.zip', - path: '/package/nats/0.4.0', - icons: [ - { - src: '/img/nats.svg', - path: '/package/nats/0.4.0/img/nats.svg', - title: 'NATS Logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'nats', - title: 'NATS Logs and Metrics', - description: 'Collect logs and metrics from NATS instances', - }, - ], - id: 'nats', - status: 'not_installed', - }, - { - name: 'netflow', - title: 'NetFlow', - version: '1.2.0', - release: 'ga', - description: 'This Elastic integration collects logs from NetFlow', - type: 'integration', - download: '/epr/netflow/netflow-1.2.0.zip', - path: '/package/netflow/1.2.0', - policy_templates: [ - { - name: 'netflow', - title: 'NetFlow logs', - description: 'Collect Netflow logs from networks via UDP', - }, - ], - id: 'netflow', - status: 'not_installed', - }, - { - name: 'netscout', - title: 'Arbor Peakflow SP', - version: '0.3.0', - release: 'experimental', - description: 'Arbor Peakflow SP Integration', - type: 'integration', - download: '/epr/netscout/netscout-0.3.0.zip', - path: '/package/netscout/0.3.0', - icons: [ - { - src: '/img/logo.svg', - path: '/package/netscout/0.3.0/img/logo.svg', - title: 'Arbor Peakflow SP logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'sightline', - title: 'Arbor Peakflow SP', - description: 'Collect Arbor Peakflow SP logs from syslog or a file.', - }, - ], - id: 'netscout', - status: 'not_installed', - }, - { - name: 'nginx', - title: 'Nginx', - version: '0.7.0', - release: 'experimental', - description: 'Nginx Integration', - type: 'integration', - download: '/epr/nginx/nginx-0.7.0.zip', - path: '/package/nginx/0.7.0', - icons: [ - { - src: '/img/logo_nginx.svg', - path: '/package/nginx/0.7.0/img/logo_nginx.svg', - title: 'logo nginx', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'nginx', - title: 'Nginx logs and metrics', - description: 'Collect logs and metrics from Nginx instances', - }, - ], - id: 'nginx', - status: 'not_installed', - }, - { - name: 'nginx_ingress_controller', - title: 'Nginx Ingress Controller', - version: '0.2.0', - release: 'experimental', - description: 'Nginx Ingress Controller Integration', - type: 'integration', - download: '/epr/nginx_ingress_controller/nginx_ingress_controller-0.2.0.zip', - path: '/package/nginx_ingress_controller/0.2.0', - icons: [ - { - src: '/img/logo_nginx.svg', - path: '/package/nginx_ingress_controller/0.2.0/img/logo_nginx.svg', - title: 'Nginx logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'nginx_ingress_controller', - title: 'Nginx Ingress Controller logs', - description: 'Collect logs from Nginx Ingress Controller instances', - }, - ], - id: 'nginx_ingress_controller', - status: 'not_installed', - }, - { - name: 'o365', - title: 'Office 365', - version: '1.1.4', - release: 'ga', - description: 'This Elastic integration collects events from Microsoft Office 365', - type: 'integration', - download: '/epr/o365/o365-1.1.4.zip', - path: '/package/o365/1.1.4', - icons: [ - { - src: '/img/logo-integrations-microsoft-365.svg', - path: '/package/o365/1.1.4/img/logo-integrations-microsoft-365.svg', - title: 'Microsoft Office 365', - size: '216x216', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'o365', - title: 'Office 365 logs', - description: 'Collect logs from Office 365', - }, - ], - id: 'o365', - status: 'not_installed', - }, - { - name: 'okta', - title: 'Okta', - version: '1.2.0', - release: 'ga', - description: 'This Elastic integration collects events from Okta', - type: 'integration', - download: '/epr/okta/okta-1.2.0.zip', - path: '/package/okta/1.2.0', - icons: [ - { - src: '/img/okta-logo.svg', - path: '/package/okta/1.2.0/img/okta-logo.svg', - title: 'Okta', - size: '216x216', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'okta', - title: 'Okta logs', - description: 'Collect logs from Okta', - }, - ], - id: 'okta', - status: 'not_installed', - }, - { - name: 'osquery', - title: 'Osquery Log Collection', - version: '0.6.0', - release: 'experimental', - description: 'This Elastic integration collects logs from Osquery instances', - type: 'integration', - download: '/epr/osquery/osquery-0.6.0.zip', - path: '/package/osquery/0.6.0', - icons: [ - { - src: '/img/logo_osquery.svg', - path: '/package/osquery/0.6.0/img/logo_osquery.svg', - title: 'logo osquery', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'osquery', - title: 'Osquery logs', - description: 'Collect logs from Osquery instances', - }, - ], - id: 'osquery', - status: 'not_installed', - }, - { - name: 'osquery_manager', - title: 'Osquery Manager', - version: '0.3.2', - release: 'beta', - description: - 'Centrally manage osquery deployments, run live queries, and schedule recurring queries', - type: 'integration', - download: '/epr/osquery_manager/osquery_manager-0.3.2.zip', - path: '/package/osquery_manager/0.3.2', - icons: [ - { - src: '/img/logo_osquery.svg', - path: '/package/osquery_manager/0.3.2/img/logo_osquery.svg', - title: 'logo osquery', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'osquery_manager', - title: 'Osquery Manager', - description: - 'Send interactive or scheduled queries to the osquery instances executed by the elastic-agent.', - }, - ], - id: 'osquery_manager', - status: 'not_installed', - }, - { - name: 'panw', - title: 'Palo Alto Networks', - version: '1.1.3', - release: 'ga', - description: 'Palo Alto Networks Integration', - type: 'integration', - download: '/epr/panw/panw-1.1.3.zip', - path: '/package/panw/1.1.3', - icons: [ - { - src: '/img/logo-integrations-paloalto-networks.svg', - path: '/package/panw/1.1.3/img/logo-integrations-paloalto-networks.svg', - title: 'Palo Alto Networks', - size: '216x216', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'panw', - title: 'Palo Alto Networks PAN-OS firewall logs', - description: 'Collect logs from Palo Alto Networks PAN-OS firewall', - }, - ], - id: 'panw', - status: 'not_installed', - }, - { - name: 'postgresql', - title: 'PostgreSQL', - version: '0.5.0', - release: 'experimental', - description: 'PostgreSQL Integration', - type: 'integration', - download: '/epr/postgresql/postgresql-0.5.0.zip', - path: '/package/postgresql/0.5.0', - icons: [ - { - src: '/img/logo_postgres.svg', - path: '/package/postgresql/0.5.0/img/logo_postgres.svg', - title: 'logo postgres', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'postgresql', - title: 'PostgreSQL logs and metrics', - description: 'Collect logs and metrics from PostgreSQL instances', - }, - ], - id: 'postgresql', - status: 'not_installed', - }, - { - name: 'prometheus', - title: 'Prometheus', - version: '0.4.1', - release: 'experimental', - description: 'Prometheus Integration', - type: 'integration', - download: '/epr/prometheus/prometheus-0.4.1.zip', - path: '/package/prometheus/0.4.1', - icons: [ - { - src: '/img/logo_prometheus.svg', - path: '/package/prometheus/0.4.1/img/logo_prometheus.svg', - title: 'logo prometheus', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'prometheus', - title: 'Prometheus metrics', - description: 'Collect metrics from Prometheus instances', - }, - ], - id: 'prometheus', - status: 'not_installed', - }, - { - name: 'proofpoint', - title: 'Proofpoint Email Security', - version: '0.2.0', - release: 'experimental', - description: 'Proofpoint Email Security Integration', - type: 'integration', - download: '/epr/proofpoint/proofpoint-0.2.0.zip', - path: '/package/proofpoint/0.2.0', - icons: [ - { - src: '/img/logo.svg', - path: '/package/proofpoint/0.2.0/img/logo.svg', - title: 'Proofpoint Email Security logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'proofpoint', - title: 'Proofpoint logs', - description: 'Collect Proofpoint logs from syslog or a file.', - }, - ], - id: 'proofpoint', - status: 'not_installed', - }, - { - name: 'rabbitmq', - title: 'RabbitMQ', - version: '0.4.1', - release: 'experimental', - description: 'RabbitMQ Integration', - type: 'integration', - download: '/epr/rabbitmq/rabbitmq-0.4.1.zip', - path: '/package/rabbitmq/0.4.1', - icons: [ - { - src: '/img/logo_rabbitmq.svg', - path: '/package/rabbitmq/0.4.1/img/logo_rabbitmq.svg', - title: 'RabbitMQ Logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'rabbitmq', - title: 'RabbitMQ logs and metrics', - description: 'Collect logs and metrics from RabbitMQ instances', - }, - ], - id: 'rabbitmq', - status: 'not_installed', - }, - { - name: 'radware', - title: 'Radware DefensePro', - version: '0.4.0', - release: 'experimental', - description: 'This Elastic integration collects logs from Radware DefensePro', - type: 'integration', - download: '/epr/radware/radware-0.4.0.zip', - path: '/package/radware/0.4.0', - icons: [ - { - src: '/img/logo.svg', - path: '/package/radware/0.4.0/img/logo.svg', - title: 'Radware DefensePro logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'defensepro', - title: 'Radware DefensePro', - description: 'Collect Radware DefensePro logs from syslog or a file.', - }, - ], - id: 'radware', - status: 'not_installed', - }, - { - name: 'redis', - title: 'Redis', - version: '0.5.0', - release: 'experimental', - description: 'Redis Integration', - type: 'integration', - download: '/epr/redis/redis-0.5.0.zip', - path: '/package/redis/0.5.0', - icons: [ - { - src: '/img/logo_redis.svg', - path: '/package/redis/0.5.0/img/logo_redis.svg', - title: 'logo redis', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'redis', - title: 'Redis logs and metrics', - description: 'Collect logs and metrics from Redis instances', - }, - ], - id: 'redis', - status: 'not_installed', - }, - { - name: 'santa', - title: 'Google Santa', - version: '0.4.0', - release: 'experimental', - description: 'This Elastic integration collects logs from Google Santa instances', - type: 'integration', - download: '/epr/santa/santa-0.4.0.zip', - path: '/package/santa/0.4.0', - icons: [ - { - src: '/img/icon.svg', - path: '/package/santa/0.4.0/img/icon.svg', - title: 'Google Santa', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'santa', - title: 'Google Santa logs', - description: 'Collect logs from Google Santa instances', - }, - ], - id: 'santa', - status: 'not_installed', - }, - { - name: 'security_detection_engine', - title: 'Prebuilt Security Detection Rules', - version: '0.14.1', + name: 'ga_not_installed', + title: 'a. GA, Not Installed', + version: '0.0.1', release: 'ga', - description: 'Prebuilt detection rules for Elastic Security', - type: 'integration', - download: '/epr/security_detection_engine/security_detection_engine-0.14.1.zip', - path: '/package/security_detection_engine/0.14.1', - icons: [ - { - src: '/img/security-logo-color-64px.svg', - path: '/package/security_detection_engine/0.14.1/img/security-logo-color-64px.svg', - size: '16x16', - type: 'image/svg+xml', - }, - ], - id: 'security_detection_engine', - status: 'not_installed', - }, - { - name: 'sonicwall', - title: 'Sonicwall-FW', - version: '0.3.0', - release: 'experimental', - description: 'Sonicwall-FW Integration', - type: 'integration', - download: '/epr/sonicwall/sonicwall-0.3.0.zip', - path: '/package/sonicwall/0.3.0', - icons: [ - { - src: '/img/logo.svg', - path: '/package/sonicwall/0.3.0/img/logo.svg', - title: 'Sonicwall-FW logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'firewall', - title: 'Sonicwall-FW', - description: 'Collect Sonicwall-FW logs from syslog or a file.', - }, - ], - id: 'sonicwall', - status: 'not_installed', - }, - { - name: 'sophos', - title: 'Sophos', - version: '0.4.0', - release: 'experimental', - description: 'Sophos Integration', + description: 'A package that is GA, but not installed', type: 'integration', - download: '/epr/sophos/sophos-0.4.0.zip', - path: '/package/sophos/0.4.0', - icons: [ - { - src: '/img/logo.svg', - path: '/package/sophos/0.4.0/img/logo.svg', - title: 'Sophos logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'sophos', - title: 'Sophos logs', - description: 'Collect Sophos logs from syslog or a file.', - }, - ], - id: 'sophos', + download: '/epr/ga/not_installed', + path: '/package/ga/not_installed', + id: 'ga_not_installed', status: 'not_installed', + categories: ['aws', 'azure'], }, { - name: 'squid', - title: 'Squid', - version: '0.3.0', - release: 'experimental', - description: 'Squid Integration', + name: 'ga_beats', + title: 'b. GA, has Beats', + version: '0.0.2', + release: 'ga', + description: 'A package that is GA, not installed, with Beats', type: 'integration', - download: '/epr/squid/squid-0.3.0.zip', - path: '/package/squid/0.3.0', - policy_templates: [ - { - name: 'log', - title: 'Squid', - description: 'Collect Squid logs from syslog or a file.', - }, - ], - id: 'squid', + download: '/epr/ga/not_installed/beats', + path: '/package/ga/not_installed/beats', + id: 'ga_not_installed_beat', status: 'not_installed', + categories: ['azure', 'cloud', 'config_management'], }, { - name: 'stan', - title: 'STAN', - version: '0.2.0', - release: 'beta', - description: 'NATS Streaming Integration', + name: 'ga_installed', + title: 'c. GA, Installed', + version: '0.0.3', + release: 'ga', + description: 'A package that is GA and installed', type: 'integration', - download: '/epr/stan/stan-0.2.0.zip', - path: '/package/stan/0.2.0', - icons: [ - { - src: '/img/stan.svg', - path: '/package/stan/0.2.0/img/stan.svg', - title: 'STAN Logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'stan', - title: 'STAN Logs and Metrics', - description: 'Collect logs and metrics from STAN instances', + download: '/epr/ga/installed', + path: '/package/ga/installed', + id: 'ga_installed', + status: 'installed', + savedObject: { + type: 'epm-packages', + id: 'ga_installed', + attributes: { + installed_kibana: [], + installed_es: [], + package_assets: [], + es_index_patterns: {}, + name: 'ga_installed', + version: '0.0.3', + internal: false, + removable: false, + install_version: '0.0.3', + install_status: 'installed', + install_started_at: '2021-08-25T19:44:37.078Z', + install_source: 'registry', + keep_policies_up_to_date: false, }, - ], - id: 'stan', - status: 'not_installed', + references: [], + coreMigrationVersion: '7.14.0', + updated_at: '2021-08-25T19:44:53.517Z', + version: 'WzczMTIsNF0=', + }, + categories: ['cloud', 'containers'], }, { - name: 'suricata', - title: 'Suricata', - version: '1.2.0', + name: 'ga_installed_update', + title: 'd. GA, Installed, Update', + version: '0.0.4', release: 'ga', - description: 'This Elastic integration collects events from Suricata instances', + description: 'A package that is GA, installed, with update', type: 'integration', - download: '/epr/suricata/suricata-1.2.0.zip', - path: '/package/suricata/1.2.0', - icons: [ - { - src: '/img/suricata.svg', - path: '/package/suricata/1.2.0/img/suricata.svg', - title: 'suricata', - size: '309x309', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'suricata', - title: 'Suricata logs', - description: 'Collect logs from Suricata instances', + download: '/epr/ga/installed/update', + path: '/package/ga/installed/update', + id: 'ga_installed_update', + status: 'installed', + savedObject: { + type: 'epm-packages', + id: 'ga_installed_update', + attributes: { + installed_kibana: [], + installed_es: [], + package_assets: [], + es_index_patterns: {}, + name: 'ga_installed_update', + version: '0.0.1', + internal: false, + removable: false, + install_version: '0.0.1', + install_status: 'installed', + install_started_at: '2021-08-25T19:44:37.078Z', + install_source: 'registry', + keep_policies_up_to_date: false, }, - ], - id: 'suricata', - status: 'not_installed', + references: [], + coreMigrationVersion: '7.14.0', + updated_at: '2021-08-25T19:44:53.517Z', + version: 'WzczMTIsNF0=', + }, + categories: ['cloud', 'crm', 'custom'], }, { - name: 'symantec', - title: 'Symantec AntiVirus/Endpoint Protection', - version: '0.1.2', - release: 'experimental', - description: 'Symantec AntiVirus/Endpoint Protection Integration', + name: 'beta_not_installed', + title: 'e. Beta, Not Installed', + version: '0.0.5', + release: 'beta', + description: 'A package that is Beta, and not installed', type: 'integration', - download: '/epr/symantec/symantec-0.1.2.zip', - path: '/package/symantec/0.1.2', - icons: [ - { - src: '/img/logo.svg', - path: '/package/symantec/0.1.2/img/logo.svg', - title: 'Symantec AntiVirus/Endpoint Protection logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'symantec', - title: 'Symantec AntiVirus/Endpoint Protection logs', - description: 'Collect Symantec AntiVirus/Endpoint Protection logs from syslog or a file.', - }, - ], - id: 'symantec', + download: '/epr/beta/not_installed', + path: '/package/beta/not_installed', + id: 'beta_not_installed', status: 'not_installed', }, { - name: 'synthetics', - title: 'Elastic Synthetics', - version: '0.3.0', + name: 'beta_beats', + title: 'f. Beta, has Beats', + version: '0.0.6', release: 'beta', - description: 'This Elastic integration allows you to monitor the availability of your services', + description: 'A package that is Beta, not installed, with Beats', type: 'integration', - download: '/epr/synthetics/synthetics-0.3.0.zip', - path: '/package/synthetics/0.3.0', - icons: [ - { - src: '/img/uptime-logo-color-64px.svg', - path: '/package/synthetics/0.3.0/img/uptime-logo-color-64px.svg', - size: '16x16', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'synthetics', - title: 'Elastic Synthetics', - description: 'Perform synthetic health checks on network endpoints.', - }, - ], - id: 'synthetics', + download: '/epr/beta/not_installed/beats', + path: '/package/beta/not_installed/beats', + id: 'beta_beats', status: 'not_installed', + categories: ['datastore', 'elastic_stack', 'google_cloud'], }, { - name: 'system', - title: 'System', - version: '1.1.2', - release: 'ga', - description: 'This Elastic integration collects logs and metrics from your servers', + name: 'beta_installed', + title: 'g. Beta, Installed', + version: '0.0.6', + release: 'beta', + description: 'A package that is Beta and installed', type: 'integration', - download: '/epr/system/system-1.1.2.zip', - path: '/package/system/1.1.2', - icons: [ - { - src: '/img/system.svg', - path: '/package/system/1.1.2/img/system.svg', - title: 'system', - size: '1000x1000', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'system', - title: 'System logs and metrics', - description: 'Collect logs and metrics from System instances', - }, - ], - id: 'system', + download: '/epr/beta/installed', + path: '/package/beta/installed', + id: 'beta_installed', status: 'installed', savedObject: { type: 'epm-packages', - id: 'system', + id: 'beta_installed', attributes: { - installed_kibana: [ - { - id: 'system-01c54730-fee6-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.dashboard, - }, - { - id: 'system-035846a0-a249-11e9-a422-d144027429da', - type: KibanaSavedObjectType.dashboard, - }, - { - id: 'system-0d3f2380-fa78-11e6-ae9b-81e5311e8cab', - type: KibanaSavedObjectType.dashboard, - }, - { - id: 'system-277876d0-fa2c-11e6-bbd3-29c986c96e5a', - type: KibanaSavedObjectType.dashboard, - }, - { - id: 'system-5517a150-f9ce-11e6-8115-a7c18106d86a', - type: KibanaSavedObjectType.dashboard, - }, - { - id: 'system-71f720f0-ff18-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.dashboard, - }, - { - id: 'system-79ffd6e0-faa0-11e6-947f-177f697178b8', - type: KibanaSavedObjectType.dashboard, - }, - { - id: 'system-8223bed0-b9e9-11e9-b6a2-c9b4015c4baf', - type: KibanaSavedObjectType.dashboard, - }, - { - id: 'system-Logs-syslog-dashboard', - type: KibanaSavedObjectType.dashboard, - }, - { - id: 'system-Metrics-system-overview', - type: KibanaSavedObjectType.dashboard, - }, - { - id: 'system-Winlogbeat-dashboard', - type: KibanaSavedObjectType.dashboard, - }, - { - id: 'system-bae11b00-9bfc-11ea-87e4-49f31ec44891', - type: KibanaSavedObjectType.dashboard, - }, - { - id: 'system-bb858830-f412-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.dashboard, - }, - { - id: 'system-d401ef40-a7d5-11e9-a422-d144027429da', - type: KibanaSavedObjectType.dashboard, - }, - { - id: 'system-f49f3170-9ffc-11ea-87e4-49f31ec44891', - type: KibanaSavedObjectType.dashboard, - }, - { - id: 'system-006d75f0-9c03-11ea-87e4-49f31ec44891', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-0620c3d0-bcd4-11e9-b6a2-c9b4015c4baf', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-0622da40-9bfd-11ea-87e4-49f31ec44891', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-089b85d0-1b16-11e7-b09e-037021c4f8df', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-0cb2d940-bcde-11e9-b6a2-c9b4015c4baf', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-0f2f5280-feeb-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-102efd20-bcdd-11e9-b6a2-c9b4015c4baf', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-117f5a30-9b71-11ea-87e4-49f31ec44891', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-12667040-fa80-11e6-a1df-a78bd7504d38', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-162d7ab0-a7d6-11e9-a422-d144027429da', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-175a5760-a7d5-11e9-a422-d144027429da', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-18348f30-a24d-11e9-a422-d144027429da', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-19e123b0-4d5a-11e7-aee5-fdc812cc3bec', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-1aae9140-1b93-11e7-8ada-3df93aab833e', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-1b5f17d0-feea-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-1b6725f0-ff1d-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-1f271bc0-231a-11ea-8405-516218e3d268', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-2084e300-a884-11e9-a422-d144027429da', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-21aadac0-9c0b-11ea-87e4-49f31ec44891', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-25f31ee0-9c23-11ea-87e4-49f31ec44891', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-26732e20-1b91-11e7-bec4-a5e9ec5cab8b', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-26877510-9b72-11ea-87e4-49f31ec44891', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-2c71e0f0-9c0d-11ea-87e4-49f31ec44891', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-2dc6b820-b9e8-11e9-b6a2-c9b4015c4baf', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-2e224660-1b19-11e7-b09e-037021c4f8df', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-327417e0-8462-11e7-bab8-bd2f0fb42c54', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-33462600-9b47-11ea-87e4-49f31ec44891', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-341ffe70-f9ce-11e6-8115-a7c18106d86a', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-346bb290-fa80-11e6-a1df-a78bd7504d38', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-34f97ee0-1b96-11e7-8ada-3df93aab833e', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-3cec3eb0-f9d3-11e6-8a3e-2b904044ea1d', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-3d65d450-a9c3-11e7-af20-67db8aecb295', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-400b63e0-f49a-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-421f0610-af98-11e9-a422-d144027429da', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-4ac8f5f0-bcfe-11e9-b6a2-c9b4015c4baf', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-4b683ac0-a7d7-11e9-a422-d144027429da', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-4bedf650-9ffd-11ea-87e4-49f31ec44891', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-4d546850-1b15-11e7-b09e-037021c4f8df', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-4e4bb1e0-1b1b-11e7-b09e-037021c4f8df', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-51164310-fa2b-11e6-bbd3-29c986c96e5a', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-522ee670-1b92-11e7-bec4-a5e9ec5cab8b', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-546febc0-f49b-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-568a8130-bcde-11e9-b6a2-c9b4015c4baf', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-58fb9480-9b46-11ea-87e4-49f31ec44891', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-590a60f0-5d87-11e7-8884-1bb4c3b890e4', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-5bb93ed0-a249-11e9-a422-d144027429da', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-5c7af030-fa2a-11e6-bbd3-29c986c96e5a', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-5c9ee410-9b74-11ea-87e4-49f31ec44891', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-5d117970-9ffd-11ea-87e4-49f31ec44891', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-5d92b100-bce8-11e9-b6a2-c9b4015c4baf', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-5dd15c00-fa78-11e6-ae9b-81e5311e8cab', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-5e19ff80-231c-11ea-8405-516218e3d268', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-5e7f0ed0-bcd2-11e9-b6a2-c9b4015c4baf', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-5eeaafd0-fee7-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-60301890-ff1d-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-6b7b9a40-faa1-11e6-86b1-cd7735ff7e23', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-6f0f2ea0-f414-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-729443b0-a7d6-11e9-a422-d144027429da', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-7322f9f0-ff1c-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-78b74f30-f9cd-11e6-8115-a7c18106d86a', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-7a329a00-a7d5-11e9-a422-d144027429da', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-7cdb1330-4d1a-11e7-a196-69b9a7a020a9', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-7de2e3f0-9b4d-11ea-87e4-49f31ec44891', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-804dd400-a248-11e9-a422-d144027429da', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-825fdb80-4d1d-11e7-b5f2-2b7c1895bf32', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-83e12df0-1b91-11e7-bec4-a5e9ec5cab8b', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-84502430-bce8-11e9-b6a2-c9b4015c4baf', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-855899e0-1b1c-11e7-b09e-037021c4f8df', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-855957d0-bcdd-11e9-b6a2-c9b4015c4baf', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-860706a0-9bfd-11ea-87e4-49f31ec44891', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-8ef59f90-6ab8-11ea-896f-0d70f7ec3956', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-8f20c950-bcd4-11e9-b6a2-c9b4015c4baf', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-96976150-4d5d-11e7-aa29-87a97a796de6', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-97c70300-ff1c-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-98884120-f49d-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-99381c80-4d60-11e7-9a4c-ed99bbcaa42b', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-9dd22440-ff1d-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-9e534190-f49d-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-Event-Levels', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-Navigation', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-Number-of-Events-Over-Time-By-Event-Log', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-Number-of-Events', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-Sources', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-Syslog-events-by-hostname', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-Syslog-hostnames-and-processes', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-Top-Event-IDs', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-a13bf640-fee8-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-a3c3f350-9b6d-11ea-87e4-49f31ec44891', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-a5f664c0-f49a-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-a79395f0-6aba-11ea-896f-0d70f7ec3956', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-a909b930-685f-11ea-896f-0d70f7ec3956', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-aa31c9d0-9b75-11ea-87e4-49f31ec44891', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-ab2d1e90-1b1a-11e7-b09e-037021c4f8df', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-ab6f8d80-bce8-11e9-b6a2-c9b4015c4baf', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-abd44840-9c0f-11ea-87e4-49f31ec44891', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-abf96c10-bcea-11e9-b6a2-c9b4015c4baf', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-b5f38780-fee6-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-b89b0c90-9b41-11ea-87e4-49f31ec44891', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-bb9cf7a0-f49d-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-bc165210-f4b8-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-bf45dc50-ff1a-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-bfa5e400-1b16-11e7-b09e-037021c4f8df', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-c2ea73f0-a4bd-11e9-a422-d144027429da', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-c359b020-bcdd-11e9-b6a2-c9b4015c4baf', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-c5e3cf90-4d60-11e7-9a4c-ed99bbcaa42b', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-c6f2ffd0-4d17-11e7-a196-69b9a7a020a9', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-c9d959f0-ff1d-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-caf4d2b0-9b76-11ea-87e4-49f31ec44891', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-ce867840-f49e-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-d16bb400-f9cc-11e6-8115-a7c18106d86a', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-d2e80340-4d5c-11e7-aa29-87a97a796de6', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-d3166e80-1b91-11e7-bec4-a5e9ec5cab8b', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-d3a5fec0-ff18-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-d56ee420-fa79-11e6-a1df-a78bd7504d38', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-d770b040-9b35-11ea-87e4-49f31ec44891', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-da2110c0-bcea-11e9-b6a2-c9b4015c4baf', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-da5ffe40-bcd9-11e9-b6a2-c9b4015c4baf', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-dc589770-fa2b-11e6-bbd3-29c986c96e5a', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-e0f001c0-1b18-11e7-b09e-037021c4f8df', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-e121b140-fa78-11e6-a1df-a78bd7504d38', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-e20c02d0-9b48-11ea-87e4-49f31ec44891', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-e22c6f40-f498-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-e2516c10-a249-11e9-a422-d144027429da', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-ee0319a0-bcd4-11e9-b6a2-c9b4015c4baf', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-ee292bc0-f499-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-f398d2f0-fa77-11e6-ae9b-81e5311e8cab', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-f42f3b20-fee6-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-fa876300-231a-11ea-8405-516218e3d268', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-fe064790-1b1f-11e7-bec4-a5e9ec5cab8b', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-fee83900-f49f-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-ffebe440-f419-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.visualization, - }, - { - id: 'system-06b6b060-7a80-11ea-bc9a-0baf2ca323a3', - type: KibanaSavedObjectType.search, - }, - { - id: 'system-324686c0-fefb-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.search, - }, - { - id: 'system-62439dc0-f9c9-11e6-a747-6121780e0414', - type: KibanaSavedObjectType.search, - }, - { - id: 'system-6f4071a0-7a78-11ea-bc9a-0baf2ca323a3', - type: KibanaSavedObjectType.search, - }, - { - id: 'system-757510b0-a87f-11e9-a422-d144027429da', - type: KibanaSavedObjectType.search, - }, - { - id: 'system-7e178c80-fee1-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.search, - }, - { - id: 'system-8030c1b0-fa77-11e6-ae9b-81e5311e8cab', - type: KibanaSavedObjectType.search, - }, - { - id: 'system-9066d5b0-fef2-11e9-8405-516218e3d268', - type: KibanaSavedObjectType.search, - }, - { - id: 'system-Syslog-system-logs', - type: KibanaSavedObjectType.search, - }, - { - id: 'system-b6f321e0-fa25-11e6-bbd3-29c986c96e5a', - type: KibanaSavedObjectType.search, - }, - { - id: 'system-ce71c9a0-a25e-11e9-a422-d144027429da', - type: KibanaSavedObjectType.search, - }, - { - id: 'system-eb0039f0-fa7f-11e6-a1df-a78bd7504d38', - type: KibanaSavedObjectType.search, - }, - ], - installed_es: [ - { - id: 'logs-system.application-1.1.2', - type: ElasticsearchAssetType.ingestPipeline, - }, - { - id: 'logs-system.auth-1.1.2', - type: ElasticsearchAssetType.ingestPipeline, - }, - { - id: 'logs-system.security-1.1.2', - type: ElasticsearchAssetType.ingestPipeline, - }, - { - id: 'logs-system.syslog-1.1.2', - type: ElasticsearchAssetType.ingestPipeline, - }, - { - id: 'logs-system.system-1.1.2', - type: ElasticsearchAssetType.ingestPipeline, - }, - { - id: 'logs-system.application', - type: ElasticsearchAssetType.indexTemplate, - }, - { - id: 'logs-system.application@custom', - type: ElasticsearchAssetType.componentTemplate, - }, - { - id: 'logs-system.auth', - type: ElasticsearchAssetType.indexTemplate, - }, - { - id: 'logs-system.auth@custom', - type: ElasticsearchAssetType.componentTemplate, - }, - { - id: 'metrics-system.core', - type: ElasticsearchAssetType.indexTemplate, - }, - { - id: 'metrics-system.core@custom', - type: ElasticsearchAssetType.componentTemplate, - }, - { - id: 'metrics-system.cpu', - type: ElasticsearchAssetType.indexTemplate, - }, - { - id: 'metrics-system.cpu@custom', - type: ElasticsearchAssetType.componentTemplate, - }, - { - id: 'metrics-system.diskio', - type: ElasticsearchAssetType.indexTemplate, - }, - { - id: 'metrics-system.diskio@custom', - type: ElasticsearchAssetType.componentTemplate, - }, - { - id: 'metrics-system.filesystem', - type: ElasticsearchAssetType.indexTemplate, - }, - { - id: 'metrics-system.filesystem@custom', - type: ElasticsearchAssetType.componentTemplate, - }, - { - id: 'metrics-system.fsstat', - type: ElasticsearchAssetType.indexTemplate, - }, - { - id: 'metrics-system.fsstat@custom', - type: ElasticsearchAssetType.componentTemplate, - }, - { - id: 'metrics-system.load', - type: ElasticsearchAssetType.indexTemplate, - }, - { - id: 'metrics-system.load@custom', - type: ElasticsearchAssetType.componentTemplate, - }, - { - id: 'metrics-system.memory', - type: ElasticsearchAssetType.indexTemplate, - }, - { - id: 'metrics-system.memory@custom', - type: ElasticsearchAssetType.componentTemplate, - }, - { - id: 'metrics-system.network', - type: ElasticsearchAssetType.indexTemplate, - }, - { - id: 'metrics-system.network@custom', - type: ElasticsearchAssetType.componentTemplate, - }, - { - id: 'metrics-system.process', - type: ElasticsearchAssetType.indexTemplate, - }, - { - id: 'metrics-system.process@custom', - type: ElasticsearchAssetType.componentTemplate, - }, - { - id: 'metrics-system.process.summary', - type: ElasticsearchAssetType.indexTemplate, - }, - { - id: 'metrics-system.process.summary@custom', - type: ElasticsearchAssetType.componentTemplate, - }, - { - id: 'logs-system.security', - type: ElasticsearchAssetType.indexTemplate, - }, - { - id: 'logs-system.security@custom', - type: ElasticsearchAssetType.componentTemplate, - }, - { - id: 'metrics-system.socket_summary', - type: ElasticsearchAssetType.indexTemplate, - }, - { - id: 'metrics-system.socket_summary@custom', - type: ElasticsearchAssetType.componentTemplate, - }, - { - id: 'logs-system.syslog', - type: ElasticsearchAssetType.indexTemplate, - }, - { - id: 'logs-system.syslog@custom', - type: ElasticsearchAssetType.componentTemplate, - }, - { - id: 'logs-system.system', - type: ElasticsearchAssetType.indexTemplate, - }, - { - id: 'logs-system.system@custom', - type: ElasticsearchAssetType.componentTemplate, - }, - { - id: 'metrics-system.uptime', - type: ElasticsearchAssetType.indexTemplate, - }, - { - id: 'metrics-system.uptime@custom', - type: ElasticsearchAssetType.componentTemplate, - }, - ], - package_assets: [ - { - id: '24d5bf0e-9d18-5d4c-aab5-e9df683e6c33', - type: 'epm-packages-assets', - }, - { - id: '033fb05a-aacc-5c41-8119-13d52078cf32', - type: 'epm-packages-assets', - }, - { - id: '0b9501d6-2870-5324-b9cf-94ff8cb15e7b', - type: 'epm-packages-assets', - }, - { - id: '88adfac5-87a3-59dd-82f3-be0b4f05c79c', - type: 'epm-packages-assets', - }, - { - id: '91812a40-865b-532c-85bb-c129f0e5470b', - type: 'epm-packages-assets', - }, - { - id: 'bbdae0f8-fbc2-506f-9749-e490ee259cac', - type: 'epm-packages-assets', - }, - { - id: 'a477e3dd-34ff-584e-a5a7-c1c4c2f0cd50', - type: 'epm-packages-assets', - }, - { - id: '9d8784ac-73e3-53d4-8cee-4f89f0ad8510', - type: 'epm-packages-assets', - }, - { - id: 'd4fb583d-0f95-598c-8583-59fc833fad36', - type: 'epm-packages-assets', - }, - { - id: '2503b12c-045c-55a4-9091-c9ec8782248a', - type: 'epm-packages-assets', - }, - { - id: '559fb8fe-6f73-5c7a-ad8d-cd6baba9fd84', - type: 'epm-packages-assets', - }, - { - id: 'cd1d1a1a-f595-5b7f-a416-2f54db379e8e', - type: 'epm-packages-assets', - }, - { - id: '997dc457-7d6e-53c6-b35d-82e6095ac2e5', - type: 'epm-packages-assets', - }, - { - id: '34a2d52c-5041-5c1b-86f7-6edc3384afe9', - type: 'epm-packages-assets', - }, - { - id: '95a53c9e-0a7c-5bb5-9b5c-a2dba086c014', - type: 'epm-packages-assets', - }, - { - id: '1d2390ea-960b-5bd8-ac7c-eb139e57081e', - type: 'epm-packages-assets', - }, - { - id: 'd04ed332-2098-53e5-8b0b-974f4cb8034a', - type: 'epm-packages-assets', - }, - { - id: '568fdd73-d459-5477-9428-e181f7ccf72b', - type: 'epm-packages-assets', - }, - { - id: '97f78283-b529-5993-a841-e8a00eb7da85', - type: 'epm-packages-assets', - }, - { - id: '72db591c-96ed-58ea-a9d7-ee06a2b674d6', - type: 'epm-packages-assets', - }, - { - id: '4102bc21-6624-5a43-90d7-748f0daa6d32', - type: 'epm-packages-assets', - }, - { - id: 'b42ab304-eff7-5996-801f-40bf5577f260', - type: 'epm-packages-assets', - }, - { - id: '32311c4b-847a-5bf0-b24c-1b77ef6e9325', - type: 'epm-packages-assets', - }, - { - id: '6720333f-5f42-58b0-9661-044119397ec1', - type: 'epm-packages-assets', - }, - { - id: 'a021b06f-138b-5927-9abe-3a85d29e6a9a', - type: 'epm-packages-assets', - }, - { - id: '8f2e20d2-dd8f-52f5-b30f-52ef101b32fc', - type: 'epm-packages-assets', - }, - { - id: 'ecd6a951-5656-5c34-b682-b9db70c0502d', - type: 'epm-packages-assets', - }, - { - id: 'ab696da3-6e5b-5da8-b0cd-4d80e95129fd', - type: 'epm-packages-assets', - }, - { - id: 'ddb89b63-b237-58f3-ba8e-ac7dc7d13bce', - type: 'epm-packages-assets', - }, - { - id: 'a45e7e27-141a-5096-8114-bb0b2bae6754', - type: 'epm-packages-assets', - }, - { - id: '4ccce089-3138-54d5-9767-a9434be05289', - type: 'epm-packages-assets', - }, - { - id: 'c5fba17b-85d2-578d-9814-80cb70ad6460', - type: 'epm-packages-assets', - }, - { - id: '8eaba418-f01b-5607-a289-6100b6cda900', - type: 'epm-packages-assets', - }, - { - id: '69d3b6ab-8c55-5eff-bfec-a1d5638d113b', - type: 'epm-packages-assets', - }, - { - id: 'e974ece1-e21d-5ac8-91a2-1d98e6390777', - type: 'epm-packages-assets', - }, - { - id: '1babb631-2aea-5849-ae09-f6438b68694d', - type: 'epm-packages-assets', - }, - { - id: 'ad6ec580-9a98-5f16-b41f-e12586ed98ee', - type: 'epm-packages-assets', - }, - { - id: 'e31da25f-a2ad-5d7a-b8cb-e0c4ff0036e8', - type: 'epm-packages-assets', - }, - { - id: '0b84ce72-ead3-537f-b9f9-79d094d78d4e', - type: 'epm-packages-assets', - }, - { - id: '6dc4776d-f0e7-5b22-ba46-6cd2e82510c0', - type: 'epm-packages-assets', - }, - { - id: '5e341b4d-3a5d-57c7-80ff-af294bf9cc5d', - type: 'epm-packages-assets', - }, - { - id: 'e85af2d2-8d80-5a20-8dc2-43af03df4af9', - type: 'epm-packages-assets', - }, - { - id: '563da411-7931-51df-9086-9e7974d61401', - type: 'epm-packages-assets', - }, - { - id: '4e10bff7-6c0c-55f6-88c0-241844d03eba', - type: 'epm-packages-assets', - }, - { - id: 'fd405691-51b6-55e2-ada4-cfe2e7ac05ee', - type: 'epm-packages-assets', - }, - { - id: '55f2d173-9c93-578a-85db-cc1f8c081a6a', - type: 'epm-packages-assets', - }, - { - id: 'd60b0710-0b00-5bf0-ae84-88fe6867e8b7', - type: 'epm-packages-assets', - }, - { - id: '17b1e231-6c6f-5cdd-aac1-a5d2fb5ad77e', - type: 'epm-packages-assets', - }, - { - id: 'b14839c1-f0b1-5972-a33d-c27fffdecdea', - type: 'epm-packages-assets', - }, - { - id: '5c90f8d0-1303-52c9-98fd-c887a10b5156', - type: 'epm-packages-assets', - }, - { - id: '576f2cb7-c3f7-54cd-8867-7f5db0ea0181', - type: 'epm-packages-assets', - }, - { - id: 'f1d3b54c-ac5c-5b16-bbc8-6fa7a30a830d', - type: 'epm-packages-assets', - }, - { - id: '140002b7-becc-5d5e-94cd-6d0d2509fe76', - type: 'epm-packages-assets', - }, - { - id: '00d83ffe-f12c-5b14-bf88-4dd56f61035d', - type: 'epm-packages-assets', - }, - { - id: '5bac3cbc-0bfd-5a90-8705-4ce8d009725d', - type: 'epm-packages-assets', - }, - { - id: '2e69cfa6-1114-5b12-bb3d-1c0c03ee1342', - type: 'epm-packages-assets', - }, - { - id: 'c222cb4c-081e-5177-9ba3-d74da589ff3f', - type: 'epm-packages-assets', - }, - { - id: '57bccf05-7422-5d2d-bb77-7483568c9224', - type: 'epm-packages-assets', - }, - { - id: '65891658-69fd-5c65-a6da-49129ce35bad', - type: 'epm-packages-assets', - }, - { - id: 'ed38f380-d847-51a5-9642-fc7cabaa05ca', - type: 'epm-packages-assets', - }, - { - id: '4d941e9d-48b2-5d34-8367-e42b94749731', - type: 'epm-packages-assets', - }, - { - id: '97d561ac-86ec-5897-b81c-497bdc2a1161', - type: 'epm-packages-assets', - }, - { - id: 'd487aacb-1cfe-5f61-8a15-11537fe0697c', - type: 'epm-packages-assets', - }, - { - id: '4db2b1d9-a85d-5e63-92f2-1b6c2b78cf06', - type: 'epm-packages-assets', - }, - { - id: '03709276-036a-5e07-bfeb-38b2b64139f9', - type: 'epm-packages-assets', - }, - { - id: '7c3b4348-d34c-5e15-bf53-1ed674b05b21', - type: 'epm-packages-assets', - }, - { - id: 'f01f1b2e-0da0-562e-9b45-7522f7c3e77b', - type: 'epm-packages-assets', - }, - { - id: '2d997745-8418-561e-86f4-788f2eb4fb0c', - type: 'epm-packages-assets', - }, - { - id: '03a1c87a-a43b-5257-aaf5-3be4f4d632ba', - type: 'epm-packages-assets', - }, - { - id: 'a37af953-176e-5e32-85c5-da9671ce4f2e', - type: 'epm-packages-assets', - }, - { - id: '784c1144-fcdb-5684-9aa5-76ff1bc47324', - type: 'epm-packages-assets', - }, - { - id: '5c874611-e4ec-5353-8d4c-7841f09c3051', - type: 'epm-packages-assets', - }, - { - id: 'ddf93bfe-6d21-57d4-be98-cdf365bb3f13', - type: 'epm-packages-assets', - }, - { - id: '417e458b-3741-5de1-b5e8-501a1a9e0f6b', - type: 'epm-packages-assets', - }, - { - id: '136bbf6d-0a63-5088-8685-2c6d26f03f59', - type: 'epm-packages-assets', - }, - { - id: '1c913ab0-9afa-5f79-865e-e44a47d066f1', - type: 'epm-packages-assets', - }, - { - id: 'f74391c4-6e8a-5a27-9486-8525f52b36c5', - type: 'epm-packages-assets', - }, - { - id: '087058d0-e7bf-59d0-896a-0dcb9d9a570b', - type: 'epm-packages-assets', - }, - { - id: 'ce860d2b-f771-5a08-8225-7cf1afd96fcd', - type: 'epm-packages-assets', - }, - { - id: '3a06e9da-ebc7-5531-a980-23e3cb86de02', - type: 'epm-packages-assets', - }, - { - id: '711f1455-9e07-5c3a-a11f-f362c08fb452', - type: 'epm-packages-assets', - }, - { - id: 'f574e863-e38a-5a0d-b578-0ed946b5468a', - type: 'epm-packages-assets', - }, - { - id: '29181820-83c6-5127-988a-269451896254', - type: 'epm-packages-assets', - }, - { - id: '763a3348-e7cb-546a-ad86-81958a1689b9', - type: 'epm-packages-assets', - }, - { - id: 'a0dec889-17d3-5ac2-b95d-04bbfdce3157', - type: 'epm-packages-assets', - }, - { - id: 'db23f433-b1e1-54ba-9afa-02e70163e83c', - type: 'epm-packages-assets', - }, - { - id: '5f11a1bf-597e-5487-a095-7659c392a5bb', - type: 'epm-packages-assets', - }, - { - id: '2e262321-fdb2-593b-a72b-3db407216633', - type: 'epm-packages-assets', - }, - { - id: '58f5919e-5785-5fef-90e8-38395e0038db', - type: 'epm-packages-assets', - }, - { - id: 'be985ede-d853-5e83-900b-df3e5aa9bd3a', - type: 'epm-packages-assets', - }, - { - id: '79d24ce5-e559-55d4-a472-66d264c25ab6', - type: 'epm-packages-assets', - }, - { - id: 'e3efa70d-c7da-5989-b258-887a79bf39de', - type: 'epm-packages-assets', - }, - { - id: '5cc41639-8151-5dcb-91db-9cbc6915b1d3', - type: 'epm-packages-assets', - }, - { - id: '083e964e-4e48-5271-822b-8f7b2dce4dd8', - type: 'epm-packages-assets', - }, - { - id: '8d79b461-55a3-53e6-9d6b-b92864a7d5f0', - type: 'epm-packages-assets', - }, - { - id: '7e761fd5-62c9-5f77-9427-213578f7498f', - type: 'epm-packages-assets', - }, - { - id: '0e06037c-ce0f-50d2-a16a-a32e5f632da8', - type: 'epm-packages-assets', - }, - { - id: 'a6a05d73-19a4-52ba-b3d1-02eaaf3d7b9b', - type: 'epm-packages-assets', - }, - { - id: 'df5075ba-5910-566f-ba84-84bb8c692cc9', - type: 'epm-packages-assets', - }, - { - id: '7f9ae2a5-e086-50c9-924b-45dddb8b76d6', - type: 'epm-packages-assets', - }, - { - id: 'b486d488-4f6c-5f29-acf2-f793369d6188', - type: 'epm-packages-assets', - }, - { - id: '389a7808-4698-5039-87cb-6ab4f7e1eae0', - type: 'epm-packages-assets', - }, - { - id: 'e02a82bf-bf0b-5e92-9b5a-8285ad1a52eb', - type: 'epm-packages-assets', - }, - { - id: '9379b6e7-e5f5-5ba9-b174-9125cb1ee76c', - type: 'epm-packages-assets', - }, - { - id: '4fd4d826-5ea7-58a7-a246-2b449569f602', - type: 'epm-packages-assets', - }, - { - id: '231f9666-6a08-53d2-a0ab-8da2b82f7ada', - type: 'epm-packages-assets', - }, - { - id: 'b8e0ada0-cb83-54ee-b924-f088c198ecc7', - type: 'epm-packages-assets', - }, - { - id: '2dbdc626-9a1b-5576-a8c6-aa182c97d228', - type: 'epm-packages-assets', - }, - { - id: '1c12a013-82b5-52da-b873-94798ec7d2ce', - type: 'epm-packages-assets', - }, - { - id: '9d9f32b2-eb0f-584f-972e-a326879e0bfe', - type: 'epm-packages-assets', - }, - { - id: 'f1431004-2baa-54a0-b791-318d72757154', - type: 'epm-packages-assets', - }, - { - id: 'cc411f61-3734-5fb4-97c5-c61ff2e1b05a', - type: 'epm-packages-assets', - }, - { - id: '1719a42f-f653-55a6-b879-fa7bca79f77f', - type: 'epm-packages-assets', - }, - { - id: '8d29b0e4-042a-556a-ac3f-9c4de92cf77e', - type: 'epm-packages-assets', - }, - { - id: 'd74b45f5-001f-5ec1-8665-e7e95b0f233d', - type: 'epm-packages-assets', - }, - { - id: '55fdbd3b-2f4a-5aec-9224-fb34c4f1c212', - type: 'epm-packages-assets', - }, - { - id: 'd7215663-4278-5148-a57b-befecdc2123f', - type: 'epm-packages-assets', - }, - { - id: 'e1c31072-ca11-5a08-b192-c6b6b330476c', - type: 'epm-packages-assets', - }, - { - id: '7345876f-234b-5bc1-bddd-125e83b60255', - type: 'epm-packages-assets', - }, - { - id: 'd3f8cdbd-105c-59c7-b5d8-34bf18b0cb46', - type: 'epm-packages-assets', - }, - { - id: 'f070a7df-6dae-58d8-96f2-d030c4cc5184', - type: 'epm-packages-assets', - }, - { - id: '9b7a9c7a-c925-51fa-8942-af378816c0bf', - type: 'epm-packages-assets', - }, - { - id: '9af0ba7a-52a7-56a8-a2f4-0d8fef143757', - type: 'epm-packages-assets', - }, - { - id: '91b93121-5088-5930-b9ac-fa9a643537ec', - type: 'epm-packages-assets', - }, - { - id: 'b9ed8fdd-58f1-5523-9e74-f20cc12d787b', - type: 'epm-packages-assets', - }, - { - id: '6e111583-649e-5edf-b66f-01f43467511a', - type: 'epm-packages-assets', - }, - { - id: '2f72a5e2-6c88-5a63-a599-5862799c6ca9', - type: 'epm-packages-assets', - }, - { - id: '6b12bc40-b5a9-52ad-b797-a159448652fb', - type: 'epm-packages-assets', - }, - { - id: '26d03b35-8b9f-5fde-820d-6267f1aebf53', - type: 'epm-packages-assets', - }, - { - id: '059f27cd-e074-5f10-bd40-b0760788ee91', - type: 'epm-packages-assets', - }, - { - id: '6c580e87-8fc1-54f6-85ab-9393e0e4d37d', - type: 'epm-packages-assets', - }, - { - id: '666e0e06-7597-5c4a-8195-d7972b8f2e08', - type: 'epm-packages-assets', - }, - { - id: '51a0f0e9-2c37-5fb0-8b66-cb6178c52801', - type: 'epm-packages-assets', - }, - { - id: '7b26a89b-a12b-5270-aa62-341b202f8fe8', - type: 'epm-packages-assets', - }, - { - id: '958fad54-be5f-5179-82fa-8f621a9323f0', - type: 'epm-packages-assets', - }, - { - id: '0964f86c-3118-5bc1-8af8-7db1d0394ef0', - type: 'epm-packages-assets', - }, - { - id: 'da7acbc4-da77-5f87-a0f2-8e4a3f298172', - type: 'epm-packages-assets', - }, - { - id: 'b051c802-cadd-543f-99d2-a9a1d7fba243', - type: 'epm-packages-assets', - }, - { - id: 'af53017a-2dba-5fd7-8eea-7752e67e388a', - type: 'epm-packages-assets', - }, - { - id: '6f9cbba4-a2fb-580b-a9d5-73a79dea8263', - type: 'epm-packages-assets', - }, - { - id: '9b7019a3-66fb-5a45-bee2-00242a1e1770', - type: 'epm-packages-assets', - }, - { - id: 'f1d12e9e-af81-56d7-81d7-596adb6d1146', - type: 'epm-packages-assets', - }, - { - id: 'cd59bacd-892e-5202-9641-a02a720fbdb2', - type: 'epm-packages-assets', - }, - { - id: '4bbda699-6819-58f4-ac75-a59adb263ebe', - type: 'epm-packages-assets', - }, - { - id: '5fad7deb-4489-5ac5-b9fb-5b847204b9ac', - type: 'epm-packages-assets', - }, - { - id: '12aca1cb-f4bb-5878-bfee-d7d45a8c0e81', - type: 'epm-packages-assets', - }, - { - id: 'f3ab06ad-c1f1-556c-92a1-173e357afb8c', - type: 'epm-packages-assets', - }, - { - id: '165aab12-d901-5568-8f9a-ab5b74e54867', - type: 'epm-packages-assets', - }, - { - id: '87d7174f-dc0a-5f90-a98c-b4777035360c', - type: 'epm-packages-assets', - }, - { - id: '0975161e-aa3a-59ac-bf20-4811844a8aab', - type: 'epm-packages-assets', - }, - { - id: '44d5ce37-7b61-5494-9685-b56968bac54d', - type: 'epm-packages-assets', - }, - { - id: 'e2e58028-d78d-5702-bb30-8bb081a457ea', - type: 'epm-packages-assets', - }, - { - id: 'bda60661-3ee7-5c69-9ef5-5cfd55ff1cae', - type: 'epm-packages-assets', - }, - { - id: 'f800cd09-c76e-5d2e-b639-da9fa99520eb', - type: 'epm-packages-assets', - }, - { - id: '80aa97ca-d0bc-5cab-afa8-1a8c11682edd', - type: 'epm-packages-assets', - }, - { - id: 'f815750f-f03c-5cb8-a45e-20b9a3a7bc22', - type: 'epm-packages-assets', - }, - { - id: '6f8d92f7-80f4-584c-81a6-50543701adb9', - type: 'epm-packages-assets', - }, - { - id: '93a1a4f5-0554-5089-a59b-6ca3319459ad', - type: 'epm-packages-assets', - }, - { - id: '9ff13f94-2687-520e-be62-c6d0b2c89218', - type: 'epm-packages-assets', - }, - { - id: '672c62d6-c24a-52ba-904e-3a502d591e79', - type: 'epm-packages-assets', - }, - { - id: 'b90ac874-628b-57ca-9663-dca9632a8c45', - type: 'epm-packages-assets', - }, - { - id: '3dbe7093-69aa-517e-8301-405e48e59051', - type: 'epm-packages-assets', - }, - { - id: '19752e35-ee5c-5683-8a9b-d129ff71c162', - type: 'epm-packages-assets', - }, - { - id: '93e79ab8-6d64-5d99-974d-89521c354b45', - type: 'epm-packages-assets', - }, - { - id: '46d66f9e-6fac-5004-9bd0-2d6078f0739d', - type: 'epm-packages-assets', - }, - { - id: '50257938-fd37-5d8b-8ae9-93ea39a47e9c', - type: 'epm-packages-assets', - }, - { - id: 'b799ffc1-7e6e-5da6-b6cd-842bda37d01f', - type: 'epm-packages-assets', - }, - { - id: 'a7a292ea-4e3f-5c1a-bb9a-3b466165a429', - type: 'epm-packages-assets', - }, - { - id: 'aa66e955-a443-5fe5-96c3-00199a9fb5d0', - type: 'epm-packages-assets', - }, - { - id: '39a22cf9-b766-5241-ad8b-d18b9aa8df50', - type: 'epm-packages-assets', - }, - { - id: '8d0b51b9-2bb4-575a-a149-51733de8003a', - type: 'epm-packages-assets', - }, - { - id: '60c3f393-3171-5890-8239-0c631fc3a14a', - type: 'epm-packages-assets', - }, - { - id: '69cd3134-5051-548f-9758-494c6354ff35', - type: 'epm-packages-assets', - }, - { - id: '6b556824-89f1-5d3b-8bee-d59ecf874c11', - type: 'epm-packages-assets', - }, - { - id: 'dc73b22f-a8ac-5170-8cbb-7d4d38d8bc00', - type: 'epm-packages-assets', - }, - { - id: '3b6cc790-f311-5f79-8bbb-d658d81edd38', - type: 'epm-packages-assets', - }, - { - id: '040a0b65-35a6-5813-92e2-feeb6a40b018', - type: 'epm-packages-assets', - }, - { - id: '188f4e4a-45c1-5cc7-8278-feed4336bec6', - type: 'epm-packages-assets', - }, - { - id: '54c52c7a-baec-5382-802e-33c6870d59f9', - type: 'epm-packages-assets', - }, - { - id: '573ec1c9-da4d-57ef-82be-967aef48d83f', - type: 'epm-packages-assets', - }, - { - id: '6c737ba6-11c0-587e-b8e0-ec2e866371e1', - type: 'epm-packages-assets', - }, - { - id: '26a2a1b7-38d1-5740-9a27-bd17e027f7b2', - type: 'epm-packages-assets', - }, - { - id: '051fdd40-0212-5321-aeeb-1728e7ae53d7', - type: 'epm-packages-assets', - }, - { - id: '04c6eaec-4640-50b0-9efe-a642b4aae216', - type: 'epm-packages-assets', - }, - { - id: 'f3a8de34-d8f4-50ca-a886-43baf333f5be', - type: 'epm-packages-assets', - }, - { - id: 'd9368d92-e820-597f-9218-b2aa932c434b', - type: 'epm-packages-assets', - }, - { - id: 'd29075e3-40d0-580a-aaec-b03cdb617cc0', - type: 'epm-packages-assets', - }, - { - id: 'f1a54648-7c44-5c4f-8424-4042cca607e6', - type: 'epm-packages-assets', - }, - { - id: '2861cc7c-b7a2-5b15-b278-4db559dc0a5d', - type: 'epm-packages-assets', - }, - { - id: '51d0ae10-229b-5899-9da5-9121b44a86bf', - type: 'epm-packages-assets', - }, - { - id: 'dcb7e0df-b8e6-5734-a66d-1ce6bc7c0223', - type: 'epm-packages-assets', - }, - { - id: '9e989e61-490b-526d-9e54-3f91c36e79c7', - type: 'epm-packages-assets', - }, - { - id: 'cd257f39-46bf-5f9c-aa3c-39f0e0ca7597', - type: 'epm-packages-assets', - }, - { - id: '33853dbc-7979-5d20-aa98-160e5ebc4244', - type: 'epm-packages-assets', - }, - { - id: '9048c9e2-18a3-5119-981a-d7ca191be801', - type: 'epm-packages-assets', - }, - { - id: '1a1733e0-9f09-5ac6-a419-21d2f1b9666e', - type: 'epm-packages-assets', - }, - { - id: 'f7ac8629-a4f6-5c98-90fd-b0477fccba74', - type: 'epm-packages-assets', - }, - { - id: '68520af7-8007-5905-899c-072de167f361', - type: 'epm-packages-assets', - }, - { - id: 'a2b18338-7df4-51a2-a73d-1a8b437515b8', - type: 'epm-packages-assets', - }, - { - id: '0fc2b9aa-eca6-538c-a837-5201dcb11a71', - type: 'epm-packages-assets', - }, - { - id: '92836dfc-f2c6-5bb2-a894-1380e17b43f8', - type: 'epm-packages-assets', - }, - { - id: '4c0a30e6-c549-569b-b30c-357a30b8da3d', - type: 'epm-packages-assets', - }, - { - id: '2668e8ff-b1df-5101-aaf0-7a5b05c366d3', - type: 'epm-packages-assets', - }, - { - id: 'cf821d9d-2e6c-551a-b531-9ce5c435b7e4', - type: 'epm-packages-assets', - }, - { - id: 'dedc165b-ae21-5ac4-a7b3-7c3edc6630ba', - type: 'epm-packages-assets', - }, - { - id: '31e07239-4a6e-57ec-89b5-583d6b2709a5', - type: 'epm-packages-assets', - }, - { - id: '93ffa150-4107-5505-9236-7fdcec538c4f', - type: 'epm-packages-assets', - }, - { - id: '0d97ad87-b383-5ea8-b801-25b680c2d7d0', - type: 'epm-packages-assets', - }, - { - id: '8aa84a63-fb84-50f3-bd3f-c7bb29a89af6', - type: 'epm-packages-assets', - }, - { - id: 'c85d8839-6640-5a78-9ea6-7f03ba9fc51a', - type: 'epm-packages-assets', - }, - { - id: 'c074a913-ea70-5480-b7ed-07a9a93f40cf', - type: 'epm-packages-assets', - }, - { - id: 'fbcec175-4095-5e91-ad9e-437a1ac9584f', - type: 'epm-packages-assets', - }, - { - id: '5e3614f8-067a-54bc-b951-b3ea030b9be3', - type: 'epm-packages-assets', - }, - { - id: '2974eddc-3a5f-5a09-bc62-93538b50fc70', - type: 'epm-packages-assets', - }, - { - id: 'bf6d6ef7-7789-5b9c-aae5-6fe8db72cb24', - type: 'epm-packages-assets', - }, - { - id: 'd67e0090-fa3b-5e61-a904-1ad701254182', - type: 'epm-packages-assets', - }, - { - id: '9f9f0f9c-8d63-5665-9fb7-8a9f45fe247a', - type: 'epm-packages-assets', - }, - { - id: '23b847fa-f386-5d10-b0b7-504831bf03d3', - type: 'epm-packages-assets', - }, - { - id: '48e9edd3-6275-5651-94dc-f84d59c5e000', - type: 'epm-packages-assets', - }, - { - id: '2db92138-78cc-5d57-954f-7384e50e0d46', - type: 'epm-packages-assets', - }, - { - id: '06f39986-ae21-5f3e-b784-01e82f323dc2', - type: 'epm-packages-assets', - }, - { - id: '2de02893-ff19-5910-9f99-6dda03d7c5e8', - type: 'epm-packages-assets', - }, - { - id: 'f4ab1085-e651-58e3-a3f1-61013e49c52a', - type: 'epm-packages-assets', - }, - { - id: 'e05ef072-d40c-5e96-95f9-9e5d6b8fdfd8', - type: 'epm-packages-assets', - }, - { - id: '6a9e30e1-6e29-51ca-b139-b9455471c4aa', - type: 'epm-packages-assets', - }, - { - id: '25fe3eb0-81f5-50d3-96bf-1cf520fb5f2b', - type: 'epm-packages-assets', - }, - { - id: '3b2ff5fb-e011-5996-b4d8-1350dea44011', - type: 'epm-packages-assets', - }, - { - id: '1c403bef-ee6d-5914-9821-ac8493b69842', - type: 'epm-packages-assets', - }, - { - id: '8b020f17-1522-552d-8e6b-c1dd232dcf84', - type: 'epm-packages-assets', - }, - { - id: 'e31a648e-9344-5837-919d-60038e37bcc2', - type: 'epm-packages-assets', - }, - { - id: '5b9412ab-3b86-53e3-9d37-ba297e3e9d82', - type: 'epm-packages-assets', - }, - { - id: 'd0517d7f-d352-5d42-a69b-be1e8f29facc', - type: 'epm-packages-assets', - }, - { - id: '31b00140-beb8-59b4-bab8-a2b3110ee028', - type: 'epm-packages-assets', - }, - { - id: '7a14010e-0af3-52f9-9cc6-4abbd711a2ec', - type: 'epm-packages-assets', - }, - { - id: '42bf2853-8f0b-51ed-a83f-43a0eef0e69c', - type: 'epm-packages-assets', - }, - { - id: '6ab1c44b-fb31-58f2-bea3-89610bb85033', - type: 'epm-packages-assets', - }, - { - id: 'b40691b2-a9fa-5ed8-92b6-dddcba93778c', - type: 'epm-packages-assets', - }, - { - id: '8efe38d9-648a-5e7d-8491-51d24406ae87', - type: 'epm-packages-assets', - }, - { - id: '2c02d373-6c2c-5312-9a6d-4c823e95cce9', - type: 'epm-packages-assets', - }, - { - id: '3976bb6c-5bc6-586e-92a9-a94ac1844a80', - type: 'epm-packages-assets', - }, - { - id: '036f7167-6000-5a73-8c21-3dc079973054', - type: 'epm-packages-assets', - }, - { - id: '7c7f845d-4824-5387-94ac-589d1c1b8536', - type: 'epm-packages-assets', - }, - { - id: 'af7d2530-6254-50bf-8d6d-1fdb86bbea12', - type: 'epm-packages-assets', - }, - { - id: 'cb22ffac-9010-56b5-bb51-feeb1ff49903', - type: 'epm-packages-assets', - }, - { - id: '526b63f6-76da-5cb6-a511-8b6ef368d8be', - type: 'epm-packages-assets', - }, - { - id: '02d6549b-7f9f-5360-bf21-183cb9065b50', - type: 'epm-packages-assets', - }, - { - id: '918f71de-1ab1-5662-a50e-a1a235f9cdfe', - type: 'epm-packages-assets', - }, - { - id: '8d0c593b-c7ae-5190-ba74-caeefb473f06', - type: 'epm-packages-assets', - }, - { - id: 'b4928fed-4b26-5721-8982-8e985c54c151', - type: 'epm-packages-assets', - }, - { - id: 'dff8573e-b91b-56ee-99e1-7b605e4e0b78', - type: 'epm-packages-assets', - }, - { - id: '999ecb6a-d0ef-5f09-b93b-f5ef5041e928', - type: 'epm-packages-assets', - }, - { - id: '30a65433-4678-5252-8588-1c2d5eb06c82', - type: 'epm-packages-assets', - }, - { - id: '86ab9714-31e7-5625-98c7-d303eac35336', - type: 'epm-packages-assets', - }, - { - id: '3d13b34b-1254-5feb-bf46-84ed005468ba', - type: 'epm-packages-assets', - }, - { - id: '6c1f565a-7fb4-5b3e-a4bb-a8072306f869', - type: 'epm-packages-assets', - }, - { - id: '6c305802-12f6-58fd-9979-fc52fc494c74', - type: 'epm-packages-assets', - }, - { - id: 'b7cfc3ba-0e9d-50dc-b52a-6d2f91f94d27', - type: 'epm-packages-assets', - }, - { - id: 'abc29ba1-5bf2-5685-a518-e8ab9b5ab174', - type: 'epm-packages-assets', - }, - { - id: '85a9890a-7c64-5113-9ca8-0da157eefb1a', - type: 'epm-packages-assets', - }, - { - id: '27661e6f-a30a-5365-bd1d-2cb1b5c0d41a', - type: 'epm-packages-assets', - }, - { - id: '3b9ddf7f-133c-53c4-bb01-e32e18896ae5', - type: 'epm-packages-assets', - }, - { - id: '08811d02-e3ed-5645-a2a8-f300fe7d166c', - type: 'epm-packages-assets', - }, - { - id: '8f6eb04b-4313-5d5a-ac05-354914d0f98d', - type: 'epm-packages-assets', - }, - { - id: '8a871681-368e-5039-b739-4048738a1d62', - type: 'epm-packages-assets', - }, - { - id: '46e7dfa4-17d7-596f-8cba-b675155e527b', - type: 'epm-packages-assets', - }, - { - id: 'a67744b6-e2ee-51f7-b366-0a90acd0db55', - type: 'epm-packages-assets', - }, - { - id: 'ddf46bcf-9a54-5703-b900-e0eab0387954', - type: 'epm-packages-assets', - }, - { - id: '42fd7566-ac3c-58f9-95f0-f1113bd6c7b4', - type: 'epm-packages-assets', - }, - { - id: '7b4f945b-99a0-5660-8707-2669e601f1de', - type: 'epm-packages-assets', - }, - { - id: 'c902879a-cd96-5911-b5c3-b59a299ad537', - type: 'epm-packages-assets', - }, - { - id: '74aee54b-85e5-5022-92ff-f185cfc4206a', - type: 'epm-packages-assets', - }, - { - id: 'aeec412b-aa37-5f4c-84ae-d9c2ecab908d', - type: 'epm-packages-assets', - }, - { - id: '1a21a3d5-c1cf-5e91-85e9-208b8b151d73', - type: 'epm-packages-assets', - }, - { - id: '980d1022-5fa3-5ba0-bb2e-d69404dd6bef', - type: 'epm-packages-assets', - }, - { - id: 'e4473aed-5c33-5dea-a2d3-a91ac13117d8', - type: 'epm-packages-assets', - }, - ], - es_index_patterns: { - application: 'logs-system.application-*', - auth: 'logs-system.auth-*', - core: 'metrics-system.core-*', - cpu: 'metrics-system.cpu-*', - diskio: 'metrics-system.diskio-*', - filesystem: 'metrics-system.filesystem-*', - fsstat: 'metrics-system.fsstat-*', - load: 'metrics-system.load-*', - memory: 'metrics-system.memory-*', - network: 'metrics-system.network-*', - process: 'metrics-system.process-*', - process_summary: 'metrics-system.process.summary-*', - security: 'logs-system.security-*', - socket_summary: 'metrics-system.socket_summary-*', - syslog: 'logs-system.syslog-*', - system: 'logs-system.system-*', - uptime: 'metrics-system.uptime-*', - }, - name: 'system', - version: '1.1.2', + installed_kibana: [], + installed_es: [], + package_assets: [], + es_index_patterns: {}, + name: 'beta_installed', + version: '0.0.6', internal: false, removable: false, - install_version: '1.1.2', + install_version: '0.0.6', install_status: 'installed', - install_started_at: '2021-08-25T19:44:43.380Z', + install_started_at: '2021-08-25T19:44:37.078Z', install_source: 'registry', keep_policies_up_to_date: false, }, references: [], coreMigrationVersion: '7.14.0', - updated_at: '2021-08-25T19:45:12.096Z', - version: 'Wzc3NjUsNF0=', - // score: 0, TODO: this is not represented in any type, but is returned by the API + updated_at: '2021-08-25T19:44:53.517Z', + version: 'WzczMTIsNF0=', }, + categories: ['elastic_stack', 'languages'], }, { - name: 'tomcat', - title: 'Apache Tomcat', - version: '0.3.0', - release: 'experimental', - description: 'Apache Tomcat Integration', + name: 'beta_installed_update', + title: 'h. Beta, Installed, Update', + version: '0.0.7', + release: 'beta', + description: 'A package that is Beta, installed, with update', type: 'integration', - download: '/epr/tomcat/tomcat-0.3.0.zip', - path: '/package/tomcat/0.3.0', - icons: [ - { - src: '/img/logo.svg', - path: '/package/tomcat/0.3.0/img/logo.svg', - title: 'Apache Tomcat logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'log', - title: 'Apache Tomcat', - description: 'Collect Apache Tomcat logs from syslog or a file.', + download: '/epr/beta/installed', + path: '/package/beta/installed', + id: 'beta_installed_update', + status: 'installed', + savedObject: { + type: 'epm-packages', + id: 'beta_installed_update', + attributes: { + installed_kibana: [], + installed_es: [], + package_assets: [], + es_index_patterns: {}, + name: 'beta_installed_update', + version: '0.0.3', + internal: false, + removable: false, + install_version: '0.0.3', + install_status: 'installed', + install_started_at: '2021-08-25T19:44:37.078Z', + install_source: 'registry', + keep_policies_up_to_date: false, }, - ], - id: 'tomcat', - status: 'not_installed', + references: [], + coreMigrationVersion: '7.14.0', + updated_at: '2021-08-25T19:44:53.517Z', + version: 'WzczMTIsNF0=', + }, + categories: ['message_queue', 'monitoring'], }, { - name: 'traefik', - title: 'Traefik', - version: '0.3.0', + name: 'exp_not_installed', + title: 'i. Experimental, Not Installed', + version: '0.0.8', release: 'experimental', - description: 'Traefik Integration', - type: 'integration', - download: '/epr/traefik/traefik-0.3.0.zip', - path: '/package/traefik/0.3.0', - icons: [ - { - src: '/img/traefik.svg', - path: '/package/traefik/0.3.0/img/traefik.svg', - title: 'traefik', - size: '259x296', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'traefik', - title: 'Traefik logs and metrics', - description: 'Collect logs and metrics from Traefik instances', - }, - ], - id: 'traefik', - status: 'not_installed', - }, - { - name: 'windows', - title: 'Windows', - version: '1.0.0', - release: 'ga', - description: 'Windows Integration', + description: 'A package that is Experimental and not installed', type: 'integration', - download: '/epr/windows/windows-1.0.0.zip', - path: '/package/windows/1.0.0', - icons: [ - { - src: '/img/logo_windows.svg', - path: '/package/windows/1.0.0/img/logo_windows.svg', - title: 'logo windows', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'windows', - title: 'Windows logs and metrics', - description: 'Collect logs and metrics from Windows instances', - }, - ], - id: 'windows', + download: '/epr/exp/not_installed', + path: '/package/exp/not_installed', + id: 'exp_not_installed', status: 'not_installed', + categories: ['monitoring', 'network', 'notification'], }, { - name: 'winlog', - title: 'Custom Windows event logs', - version: '0.4.0', + name: 'exp_beats', + title: 'j. Experimental, has Beats', + version: '0.0.9', release: 'experimental', - description: 'This Elastic integration collects custom Windows event logs', - type: 'integration', - download: '/epr/winlog/winlog-0.4.0.zip', - path: '/package/winlog/0.4.0', - icons: [ - { - src: '/img/logo_windows.svg', - path: '/package/winlog/0.4.0/img/logo_windows.svg', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'winlogs', - title: 'Custom Windows event logs', - description: 'Collect your custom Windows event logs.', - }, - ], - id: 'winlog', - status: 'not_installed', - }, - { - name: 'zeek', - title: 'Zeek', - version: '1.3.0', - release: 'ga', - description: 'This Elastic integration collects logs from Zeek', + description: 'A package that is Experimental and not installed', type: 'integration', - download: '/epr/zeek/zeek-1.3.0.zip', - path: '/package/zeek/1.3.0', - icons: [ - { - src: '/img/zeek.svg', - path: '/package/zeek/1.3.0/img/zeek.svg', - title: 'zeek', - size: '214x203', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'zeek', - title: 'Zeek logs', - description: 'Collect logs from Zeek instances', - }, - ], - id: 'zeek', + download: '/epr/exp/not_installed/beats', + path: '/package/exp/not_installed/beats', + id: 'exp_beats', status: 'not_installed', - }, - { - name: 'zerofox', - title: 'ZeroFox', - version: '0.1.1', - release: 'experimental', - description: 'ZeroFox Cloud Platform', - type: 'integration', - download: '/epr/zerofox/zerofox-0.1.1.zip', - path: '/package/zerofox/0.1.1', - icons: [ - { - src: '/img/logo.svg', - path: '/package/zerofox/0.1.1/img/logo.svg', - title: 'logo ZeroFox', - size: '32x32', - type: 'image/svg+xml', - }, - ], policy_templates: [ { - name: 'zerofox', - title: 'ZeroFox Alerts', - description: 'Collect alert from the ZeroFox API', + name: '', + description: '', + title: '', + categories: ['datastore'], }, ], - id: 'zerofox', - status: 'not_installed', + categories: ['version_control', 'web'], }, { - name: 'zookeeper', - title: 'ZooKeeper', - version: '0.3.1', + name: 'exp_installed', + title: 'k. Experimental, Installed', + version: '0.0.10', release: 'experimental', - description: 'ZooKeeper Integration', - type: 'integration', - download: '/epr/zookeeper/zookeeper-0.3.1.zip', - path: '/package/zookeeper/0.3.1', - icons: [ - { - src: '/img/zookeeper.svg', - path: '/package/zookeeper/0.3.1/img/zookeeper.svg', - title: 'zookeeper', - size: '754x754', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'zookeeper', - title: 'ZooKeeper metrics', - description: 'Collect metrics from ZooKeeper instances', - }, - ], - id: 'zookeeper', - status: 'not_installed', - }, - { - name: 'zoom', - title: 'Zoom', - version: '0.6.0', - release: 'beta', - description: 'This Elastic integration collects logs from Zoom', + description: 'A package that is experimental and installed', type: 'integration', - download: '/epr/zoom/zoom-0.6.0.zip', - path: '/package/zoom/0.6.0', - icons: [ - { - src: '/img/zoom_blue.svg', - path: '/package/zoom/0.6.0/img/zoom_blue.svg', - title: 'Zoom', - size: '516x240', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'zoom', - title: 'Zoom logs', - description: 'Collect logs from Zoom instances', + download: '/epr/exp/installed', + path: '/package/exp/installed', + id: 'exp_installed', + status: 'installed', + savedObject: { + type: 'epm-packages', + id: 'exp_installed', + attributes: { + installed_kibana: [], + installed_es: [], + package_assets: [], + es_index_patterns: {}, + name: 'exp_installed', + version: '0.0.10', + internal: false, + removable: false, + install_version: '0.0.10', + install_status: 'installed', + install_started_at: '2021-08-25T19:44:37.078Z', + install_source: 'registry', + keep_policies_up_to_date: false, }, - ], - id: 'zoom', - status: 'not_installed', + references: [], + coreMigrationVersion: '7.14.0', + updated_at: '2021-08-25T19:44:53.517Z', + version: 'WzczMTIsNF0=', + }, + categories: ['os_system', 'productivity'], }, { - name: 'zscaler', - title: 'Zscaler NSS', - version: '0.2.0', + name: 'exp_installed_update', + title: 'l. Experimental, Installed, Update', + version: '0.0.11', release: 'experimental', - description: 'Zscaler NSS Integration', + description: 'A package that is experimental, installed, with update', type: 'integration', - download: '/epr/zscaler/zscaler-0.2.0.zip', - path: '/package/zscaler/0.2.0', - icons: [ - { - src: '/img/logo.svg', - path: '/package/zscaler/0.2.0/img/logo.svg', - title: 'Zscaler NSS logo', - size: '32x32', - type: 'image/svg+xml', - }, - ], - policy_templates: [ - { - name: 'zia', - title: 'Zscaler NSS', - description: 'Collect Zscaler NSS logs from syslog or a file.', + download: '/epr/exp/installed', + path: '/package/exp/installed', + id: 'exp_installed_update', + status: 'installed', + savedObject: { + type: 'epm-packages', + id: 'exp_installed_update', + attributes: { + installed_kibana: [], + installed_es: [], + package_assets: [], + es_index_patterns: {}, + name: 'exp_installed_update', + version: '0.0.8', + internal: false, + removable: false, + install_version: '0.0.8', + install_status: 'installed', + install_started_at: '2021-08-25T19:44:37.078Z', + install_source: 'registry', + keep_policies_up_to_date: false, }, - ], - id: 'zscaler', - status: 'not_installed', + references: [], + coreMigrationVersion: '7.14.0', + updated_at: '2021-08-25T19:44:53.517Z', + version: 'WzczMTIsNF0=', + }, + categories: ['aws', 'cloud', 'elastic_stack'], }, ]; diff --git a/x-pack/plugins/fleet/storybook/context/fixtures/replacement_integrations.ts b/x-pack/plugins/fleet/storybook/context/fixtures/replacement_integrations.ts new file mode 100644 index 0000000000000..db3725ffe664c --- /dev/null +++ b/x-pack/plugins/fleet/storybook/context/fixtures/replacement_integrations.ts @@ -0,0 +1,62 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { CustomIntegration } from '../../../../../../src/plugins/custom_integrations/common'; + +export const integrations: CustomIntegration[] = [ + { + id: 'b.ga_beats', + categories: ['azure', 'cloud', 'config_management'], + description: 'Beats for a GA package that is not installed', + isBeta: false, + shipper: 'beats', + icons: [ + { + type: 'eui', + src: 'logoBeats', + }, + ], + title: 'b. GA, has Beats', + type: 'ui_link', + uiInternalPath: '/', + eprOverlap: 'ga_beats', + }, + { + id: 'f.beta_beats', + categories: ['azure', 'cloud', 'config_management'], + description: 'Beats for a beta package that is not installed', + isBeta: false, + shipper: 'beats', + icons: [ + { + type: 'eui', + src: 'logoBeats', + }, + ], + title: 'f. Beta, has Beats', + type: 'ui_link', + uiInternalPath: '/', + eprOverlap: 'beta_beats', + }, + { + id: 'j.exp_beats', + categories: ['azure', 'cloud', 'config_management'], + description: 'Beats for an experimental package that is not installed', + isBeta: false, + shipper: 'beats', + icons: [ + { + type: 'eui', + src: 'logoBeats', + }, + ], + title: 'j. Experimental, has Beats', + type: 'ui_link', + uiInternalPath: '/', + eprOverlap: 'exp_beats', + }, +]; diff --git a/x-pack/plugins/fleet/storybook/context/http.ts b/x-pack/plugins/fleet/storybook/context/http.ts index c52429c243ba9..3e515c075a595 100644 --- a/x-pack/plugins/fleet/storybook/context/http.ts +++ b/x-pack/plugins/fleet/storybook/context/http.ts @@ -27,6 +27,7 @@ export const getHttp = (basepath = BASE_PATH) => { serverBasePath: basepath, }, get: (async (path: string, options: HttpFetchOptions) => { + action('get')(path, options); // TODO: all of this needs revision, as it's far too clunky... but it works for now, // with the few paths we're supporting. if (path === '/api/fleet/agents/setup') { @@ -74,6 +75,11 @@ export const getHttp = (basepath = BASE_PATH) => { return await import('./fixtures/integration.okta'); } + if (path.startsWith('/api/fleet/check-permissions')) { + return { success: true }; + } + + action(path)('KP: UNSUPPORTED ROUTE'); return {}; }) as HttpHandler, } as unknown as HttpStart; diff --git a/x-pack/plugins/fleet/storybook/context/index.tsx b/x-pack/plugins/fleet/storybook/context/index.tsx index 6d563346e917d..e6c0726e755c2 100644 --- a/x-pack/plugins/fleet/storybook/context/index.tsx +++ b/x-pack/plugins/fleet/storybook/context/index.tsx @@ -28,6 +28,8 @@ import { getUiSettings } from './ui_settings'; import { getNotifications } from './notifications'; import { stubbedStartServices } from './stubs'; import { getDocLinks } from './doc_links'; +import { getCloud } from './cloud'; +import { getShare } from './share'; // TODO: clintandrewhall - this is not ideal, or complete. The root context of Fleet applications // requires full start contracts of its dependencies. As a result, we have to mock all of those contracts @@ -36,6 +38,7 @@ import { getDocLinks } from './doc_links'; // // Expect this to grow as components that are given Stories need access to mocked services. export const StorybookContext: React.FC<{ storyContext?: StoryContext }> = ({ + storyContext, children: storyChildren, }) => { const basepath = ''; @@ -46,10 +49,12 @@ export const StorybookContext: React.FC<{ storyContext?: StoryContext }> = ({ ...stubbedStartServices, application: getApplication(), chrome: getChrome(), + cloud: getCloud({ isCloudEnabled: storyContext?.args.isCloudEnabled }), + customIntegrations: { + ContextProvider: getStorybookContextProvider(), + }, docLinks: getDocLinks(), http: getHttp(), - notifications: getNotifications(), - uiSettings: getUiSettings(), i18n: { Context: function I18nContext({ children }) { return {children}; @@ -58,15 +63,18 @@ export const StorybookContext: React.FC<{ storyContext?: StoryContext }> = ({ injectedMetadata: { getInjectedVar: () => null, }, - customIntegrations: { - ContextProvider: getStorybookContextProvider(), - }, + notifications: getNotifications(), + share: getShare(), + uiSettings: getUiSettings(), }; setHttpClient(startServices.http); setCustomIntegrations({ getAppendCustomIntegrations: async () => [], - getReplacementCustomIntegrations: async () => [], + getReplacementCustomIntegrations: async () => { + const { integrations } = await import('./fixtures/replacement_integrations'); + return integrations; + }, }); const config = { @@ -78,12 +86,20 @@ export const StorybookContext: React.FC<{ storyContext?: StoryContext }> = ({ } as unknown as FleetConfigType; const extensions = {}; - const kibanaVersion = '1.2.3'; + const setHeaderActionMenu = () => {}; return ( {storyChildren} diff --git a/x-pack/plugins/fleet/storybook/context/share.ts b/x-pack/plugins/fleet/storybook/context/share.ts new file mode 100644 index 0000000000000..b6a8dfbcdcb67 --- /dev/null +++ b/x-pack/plugins/fleet/storybook/context/share.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 { SharePluginStart } from 'src/plugins/share/public'; + +export const getShare = () => { + const share: SharePluginStart = { + url: { + locators: { + get: () => ({ + useUrl: () => 'https://locator.url', + }), + }, + }, + } as unknown as SharePluginStart; + + return share; +}; diff --git a/x-pack/plugins/fleet/storybook/context/stubs.tsx b/x-pack/plugins/fleet/storybook/context/stubs.tsx index a7db4bd8f68cd..f72b176bd8d7b 100644 --- a/x-pack/plugins/fleet/storybook/context/stubs.tsx +++ b/x-pack/plugins/fleet/storybook/context/stubs.tsx @@ -14,8 +14,7 @@ type Stubs = | 'fatalErrors' | 'navigation' | 'overlays' - | 'savedObjects' - | 'cloud'; + | 'savedObjects'; type StubbedStartServices = Pick; @@ -27,5 +26,4 @@ export const stubbedStartServices: StubbedStartServices = { navigation: {} as FleetStartServices['navigation'], overlays: {} as FleetStartServices['overlays'], savedObjects: {} as FleetStartServices['savedObjects'], - cloud: {} as FleetStartServices['cloud'], }; diff --git a/x-pack/plugins/fleet/storybook/decorator.tsx b/x-pack/plugins/fleet/storybook/decorator.tsx index 8e68249809574..93870809c94bb 100644 --- a/x-pack/plugins/fleet/storybook/decorator.tsx +++ b/x-pack/plugins/fleet/storybook/decorator.tsx @@ -11,5 +11,5 @@ import type { DecoratorFn } from '@storybook/react'; import { StorybookContext } from './context'; export const decorator: DecoratorFn = (story, storybook) => { - return {story()}; + return {story()}; }; diff --git a/x-pack/plugins/graph/public/services/workspace/graph_client_workspace.d.ts b/x-pack/plugins/graph/public/services/workspace/graph_client_workspace.d.ts index b369ec6c5762c..18d08d8da31d8 100644 --- a/x-pack/plugins/graph/public/services/workspace/graph_client_workspace.d.ts +++ b/x-pack/plugins/graph/public/services/workspace/graph_client_workspace.d.ts @@ -5,6 +5,6 @@ * 2.0. */ -import { Workspace, WorkspaceOptions } from '../types'; +import { Workspace, WorkspaceOptions } from '../../types'; declare function createWorkspace(options: WorkspaceOptions): Workspace; diff --git a/x-pack/plugins/infra/public/containers/with_kuery_autocompletion.tsx b/x-pack/plugins/infra/public/containers/with_kuery_autocompletion.tsx index 0e5ef1ca78033..2b0aaf5175b88 100644 --- a/x-pack/plugins/infra/public/containers/with_kuery_autocompletion.tsx +++ b/x-pack/plugins/infra/public/containers/with_kuery_autocompletion.tsx @@ -83,7 +83,6 @@ class WithKueryAutocompletionComponent extends React.Component< query: expression, selectionStart: cursorPosition, selectionEnd: cursorPosition, - // @ts-expect-error (until data service updates to new types) indexPatterns: [indexPattern], boolFilter: [], })) || []; diff --git a/x-pack/plugins/infra/public/metrics_overview_fetchers.test.ts b/x-pack/plugins/infra/public/metrics_overview_fetchers.test.ts index e6ffbc30fe24d..c2e60090d81f3 100644 --- a/x-pack/plugins/infra/public/metrics_overview_fetchers.test.ts +++ b/x-pack/plugins/infra/public/metrics_overview_fetchers.test.ts @@ -56,7 +56,8 @@ describe('Metrics UI Observability Homepage Functions', () => { const fetchData = createMetricsFetchData(mockedGetStartServices); const endTime = moment('2020-07-02T13:25:11.629Z'); const startTime = endTime.clone().subtract(1, 'h'); - const bucketSize = '300s'; + const bucketSize = 300; + const intervalString = '300s'; const response = await fetchData({ absoluteTime: { start: startTime.valueOf(), @@ -67,12 +68,13 @@ describe('Metrics UI Observability Homepage Functions', () => { end: 'now', }, bucketSize, + intervalString, }); expect(core.http.post).toHaveBeenCalledTimes(1); expect(core.http.post).toHaveBeenCalledWith('/api/metrics/overview/top', { body: JSON.stringify({ sourceId: 'default', - bucketSize, + bucketSize: intervalString, size: 5, timerange: { from: startTime.valueOf(), diff --git a/x-pack/plugins/infra/public/metrics_overview_fetchers.ts b/x-pack/plugins/infra/public/metrics_overview_fetchers.ts index 57017d25ecc64..c69ed451ea6d6 100644 --- a/x-pack/plugins/infra/public/metrics_overview_fetchers.ts +++ b/x-pack/plugins/infra/public/metrics_overview_fetchers.ts @@ -27,7 +27,7 @@ export const createMetricsHasData = export const createMetricsFetchData = (getStartServices: InfraClientCoreSetup['getStartServices']) => - async ({ absoluteTime, bucketSize }: FetchDataParams): Promise => { + async ({ absoluteTime, intervalString }: FetchDataParams): Promise => { const [coreServices] = await getStartServices(); const { http } = coreServices; @@ -36,7 +36,7 @@ export const createMetricsFetchData = const overviewRequest: TopNodesRequest = { sourceId: 'default', - bucketSize, + bucketSize: intervalString, size: 5, timerange: { from: start, diff --git a/x-pack/plugins/infra/public/utils/logs_overview_fetchers.ts b/x-pack/plugins/infra/public/utils/logs_overview_fetchers.ts index 67db6a4721941..c813bd3dae781 100644 --- a/x-pack/plugins/infra/public/utils/logs_overview_fetchers.ts +++ b/x-pack/plugins/infra/public/utils/logs_overview_fetchers.ts @@ -138,7 +138,7 @@ function buildLogOverviewAggregations(logParams: LogParams, params: FetchDataPar series: { date_histogram: { field: logParams.timestampField, - fixed_interval: params.bucketSize, + fixed_interval: params.intervalString, }, }, }, diff --git a/x-pack/plugins/infra/public/utils/logs_overview_fetches.test.ts b/x-pack/plugins/infra/public/utils/logs_overview_fetches.test.ts index 4fcb83fd02754..d0349ab20710f 100644 --- a/x-pack/plugins/infra/public/utils/logs_overview_fetches.test.ts +++ b/x-pack/plugins/infra/public/utils/logs_overview_fetches.test.ts @@ -29,7 +29,8 @@ const mockedCallFetchLogSourceConfigurationAPI = const DEFAULT_PARAMS = { absoluteTime: { start: 1593430680000, end: 1593430800000 }, relativeTime: { start: 'now-2m', end: 'now' }, // Doesn't matter for the test - bucketSize: '30s', // Doesn't matter for the test + intervalString: '30s', // Doesn't matter for the test + bucketSize: 30, // Doesn't matter for the test }; function setup() { diff --git a/x-pack/plugins/lens/public/app_plugin/__snapshots__/app.test.tsx.snap b/x-pack/plugins/lens/public/app_plugin/__snapshots__/app.test.tsx.snap index 51adf7737fd4b..ca14bc908eb80 100644 --- a/x-pack/plugins/lens/public/app_plugin/__snapshots__/app.test.tsx.snap +++ b/x-pack/plugins/lens/public/app_plugin/__snapshots__/app.test.tsx.snap @@ -28,39 +28,8 @@ Array [ Symbol(kCapture): false, }, }, - "inspect": [Function], - }, - "showNoDataPopover": [Function], - }, - Object {}, - ], - Array [ - Object { - "lensInspector": Object { - "adapters": Object { - "expression": ExpressionsInspectorAdapter { - "_ast": Object {}, - "_events": Object {}, - "_eventsCount": 0, - "_maxListeners": undefined, - Symbol(kCapture): false, - }, - "requests": RequestAdapter { - "_events": Object {}, - "_eventsCount": 0, - "_maxListeners": undefined, - "requests": Map {}, - Symbol(kCapture): false, - }, - "tables": TablesAdapter { - "_events": Object {}, - "_eventsCount": 0, - "_maxListeners": undefined, - "_tables": Object {}, - Symbol(kCapture): false, - }, - }, - "inspect": [Function], + "close": [MockFunction], + "inspect": [MockFunction], }, "showNoDataPopover": [Function], }, diff --git a/x-pack/plugins/lens/public/app_plugin/app.test.tsx b/x-pack/plugins/lens/public/app_plugin/app.test.tsx index 0b800940e1787..b55d424c0db48 100644 --- a/x-pack/plugins/lens/public/app_plugin/app.test.tsx +++ b/x-pack/plugins/lens/public/app_plugin/app.test.tsx @@ -812,7 +812,7 @@ describe('Lens App', () => { await runInspect(instance); - expect(services.inspector.open).toHaveBeenCalledTimes(1); + expect(services.inspector.inspect).toHaveBeenCalledTimes(1); }); }); diff --git a/x-pack/plugins/lens/public/app_plugin/app.tsx b/x-pack/plugins/lens/public/app_plugin/app.tsx index ae2edaa1b98d3..5638a35d1cc6d 100644 --- a/x-pack/plugins/lens/public/app_plugin/app.tsx +++ b/x-pack/plugins/lens/public/app_plugin/app.tsx @@ -37,7 +37,7 @@ import { getLastKnownDocWithoutPinnedFilters, runSaveLensVisualization, } from './save_modal_container'; -import { getLensInspectorService, LensInspector } from '../lens_inspector_service'; +import { LensInspector } from '../lens_inspector_service'; import { getEditPath } from '../../common'; export type SaveProps = Omit & { @@ -66,7 +66,7 @@ export function App({ data, chrome, uiSettings, - inspector, + inspector: lensInspector, application, notifications, savedObjectsTagging, @@ -101,8 +101,6 @@ export function App({ const [isSaveModalVisible, setIsSaveModalVisible] = useState(false); const [lastKnownDoc, setLastKnownDoc] = useState(undefined); - const lensInspector = getLensInspectorService(inspector); - useEffect(() => { if (currentDoc) { setLastKnownDoc(currentDoc); diff --git a/x-pack/plugins/lens/public/app_plugin/mounter.tsx b/x-pack/plugins/lens/public/app_plugin/mounter.tsx index de091fd305e85..d4bc59a1e9e2c 100644 --- a/x-pack/plugins/lens/public/app_plugin/mounter.tsx +++ b/x-pack/plugins/lens/public/app_plugin/mounter.tsx @@ -6,7 +6,7 @@ */ import React, { FC, useCallback } from 'react'; -import { DeepPartial } from '@reduxjs/toolkit'; +import { PreloadedState } from '@reduxjs/toolkit'; import { AppMountParameters, CoreSetup, CoreStart } from 'kibana/public'; import { FormattedMessage, I18nProvider } from '@kbn/i18n/react'; import { HashRouter, Route, RouteComponentProps, Switch } from 'react-router-dom'; @@ -41,6 +41,7 @@ import { LensState, } from '../state_management'; import { getPreloadedState } from '../state_management/lens_slice'; +import { getLensInspectorService } from '../lens_inspector_service'; export async function getLensServices( coreStart: CoreStart, @@ -65,7 +66,7 @@ export async function getLensServices( return { data, storage, - inspector, + inspector: getLensInspectorService(inspector), navigation, fieldFormats, stateTransfer, @@ -192,7 +193,7 @@ export async function mountApp( const emptyState = getPreloadedState(storeDeps) as LensAppState; const lensStore: LensRootStore = makeConfigureStore(storeDeps, { lens: emptyState, - } as DeepPartial); + } as PreloadedState); const EditorRenderer = React.memo( (props: { id?: string; history: History; editByValue?: boolean }) => { @@ -278,6 +279,7 @@ export async function mountApp( return () => { data.search.session.clear(); unmountComponentAtNode(params.element); + lensServices.inspector.close(); unlistenParentHistory(); lensStore.dispatch(navigateAway()); }; diff --git a/x-pack/plugins/lens/public/app_plugin/types.ts b/x-pack/plugins/lens/public/app_plugin/types.ts index 8a3a848ffa204..a5cd8bfef71f3 100644 --- a/x-pack/plugins/lens/public/app_plugin/types.ts +++ b/x-pack/plugins/lens/public/app_plugin/types.ts @@ -21,7 +21,6 @@ import type { import type { DataPublicPluginStart } from '../../../../../src/plugins/data/public'; import type { UsageCollectionStart } from '../../../../../src/plugins/usage_collection/public'; import type { DashboardStart } from '../../../../../src/plugins/dashboard/public'; -import type { Start as InspectorStart } from '../../../../../src/plugins/inspector/public'; import type { LensEmbeddableInput } from '../embeddable/embeddable'; import type { NavigationPublicPluginStart } from '../../../../../src/plugins/navigation/public'; import type { LensAttributeService } from '../lens_attribute_service'; @@ -105,7 +104,7 @@ export interface LensAppServices { dashboard: DashboardStart; fieldFormats: FieldFormatsStart; data: DataPublicPluginStart; - inspector: InspectorStart; + inspector: LensInspector; uiSettings: IUiSettingsClient; application: ApplicationStart; notifications: NotificationsStart; diff --git a/x-pack/plugins/lens/public/lens_inspector_service.ts b/x-pack/plugins/lens/public/lens_inspector_service.ts index d9573962f12d4..6cac381871d73 100644 --- a/x-pack/plugins/lens/public/lens_inspector_service.ts +++ b/x-pack/plugins/lens/public/lens_inspector_service.ts @@ -8,6 +8,7 @@ import type { Adapters, InspectorOptions, + InspectorSession, Start as InspectorStartContract, } from '../../../../src/plugins/inspector/public'; @@ -15,9 +16,19 @@ import { createDefaultInspectorAdapters } from '../../../../src/plugins/expressi export const getLensInspectorService = (inspector: InspectorStartContract) => { const adapters: Adapters = createDefaultInspectorAdapters(); + let overlayRef: InspectorSession | undefined; return { adapters, - inspect: (options?: InspectorOptions) => inspector.open(adapters, options), + inspect: (options?: InspectorOptions) => { + overlayRef = inspector.open(adapters, options); + overlayRef.onClose.then(() => { + if (overlayRef) { + overlayRef = undefined; + } + }); + return overlayRef; + }, + close: () => overlayRef?.close(), }; }; diff --git a/x-pack/plugins/lens/public/mocks.tsx b/x-pack/plugins/lens/public/mocks.tsx index cb9ab11998105..989c858b1f29d 100644 --- a/x-pack/plugins/lens/public/mocks.tsx +++ b/x-pack/plugins/lens/public/mocks.tsx @@ -16,7 +16,7 @@ import moment from 'moment'; import { Provider } from 'react-redux'; import { act } from 'react-dom/test-utils'; import { ReactExpressionRendererProps } from 'src/plugins/expressions/public'; -import { DeepPartial } from '@reduxjs/toolkit'; +import { PreloadedState } from '@reduxjs/toolkit'; import { LensPublicStart } from '.'; import { visualizationTypes } from './xy_visualization/types'; import { navigationPluginMock } from '../../../../src/plugins/navigation/public/mocks'; @@ -56,6 +56,7 @@ import { DatasourceMap, VisualizationMap, } from './types'; +import { getLensInspectorService } from './lens_inspector_service'; export function mockDatasourceStates() { return { @@ -417,7 +418,11 @@ export function makeDefaultServices( navigation: navigationStartMock, notifications: core.notifications, attributeService: makeAttributeService(), - inspector: inspectorPluginMock.createStartContract(), + inspector: { + adapters: getLensInspectorService(inspectorPluginMock.createStartContract()).adapters, + inspect: jest.fn(), + close: jest.fn(), + }, dashboard: dashboardPluginMock.createStartContract(), presentationUtil: presentationUtilPluginMock.createStartContract(core), savedObjectsClient: core.savedObjects.client, @@ -479,7 +484,7 @@ export function makeLensStore({ resolvedDateRange: getResolvedDateRange(data.query.timefilter.timefilter), ...preloadedState, }, - } as DeepPartial); + } as PreloadedState); const origDispatch = store.dispatch; store.dispatch = jest.fn(dispatch || origDispatch); diff --git a/x-pack/plugins/lens/public/state_management/index.ts b/x-pack/plugins/lens/public/state_management/index.ts index cc83cc612f32d..0aa7185931c5a 100644 --- a/x-pack/plugins/lens/public/state_management/index.ts +++ b/x-pack/plugins/lens/public/state_management/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { configureStore, getDefaultMiddleware, DeepPartial } from '@reduxjs/toolkit'; +import { configureStore, getDefaultMiddleware, PreloadedState } from '@reduxjs/toolkit'; import { createLogger } from 'redux-logger'; import { useDispatch, useSelector, TypedUseSelectorHook } from 'react-redux'; import { makeLensReducer, lensActions } from './lens_slice'; @@ -36,7 +36,7 @@ export const { export const makeConfigureStore = ( storeDeps: LensStoreDeps, - preloadedState: DeepPartial + preloadedState: PreloadedState ) => { const middleware = [ ...getDefaultMiddleware({ diff --git a/x-pack/plugins/lens/public/xy_visualization/expression.tsx b/x-pack/plugins/lens/public/xy_visualization/expression.tsx index 87462e71f3cf6..7aee537ebbedd 100644 --- a/x-pack/plugins/lens/public/xy_visualization/expression.tsx +++ b/x-pack/plugins/lens/public/xy_visualization/expression.tsx @@ -67,6 +67,7 @@ import { getThresholdRequiredPaddings, ThresholdAnnotations, } from './expression_thresholds'; +import { computeOverallDataDomain } from './threshold_helpers'; declare global { interface Window { @@ -250,6 +251,10 @@ export function XYChart({ const chartBaseTheme = chartsThemeService.useChartsBaseTheme(); const darkMode = chartsThemeService.useDarkMode(); const filteredLayers = getFilteredLayers(layers, data); + const layersById = filteredLayers.reduce((memo, layer) => { + memo[layer.layerId] = layer; + return memo; + }, {} as Record); const handleCursorUpdate = useActiveCursor(chartsActiveCursorService, chartRef, { datatables: Object.values(data.tables), @@ -386,7 +391,7 @@ export function XYChart({ const extent = axis.groupId === 'left' ? yLeftExtent : yRightExtent; const hasBarOrArea = Boolean( axis.series.some((series) => { - const seriesType = filteredLayers.find((l) => l.layerId === series.layer)?.seriesType; + const seriesType = layersById[series.layer]?.seriesType; return seriesType?.includes('bar') || seriesType?.includes('area'); }) ); @@ -406,20 +411,15 @@ export function XYChart({ ); if (!fit && axisHasThreshold) { // Remove this once the chart will support automatic annotation fit for other type of charts - for (const series of axis.series) { - const table = data.tables[series.layer]; - for (const row of table.rows) { - for (const column of table.columns) { - if (column.id === series.accessor) { - const value = row[column.id]; - if (typeof value === 'number') { - // keep the 0 in view - max = Math.max(value, max || 0, 0); - min = Math.min(value, min || 0, 0); - } - } - } - } + const { min: computedMin, max: computedMax } = computeOverallDataDomain( + filteredLayers, + axis.series.map(({ accessor }) => accessor), + data.tables + ); + + if (computedMin != null && computedMax != null) { + max = Math.max(computedMax, max || 0); + min = Math.min(computedMin, min || 0); } for (const { layerId, yConfig } of thresholdLayers) { const table = data.tables[layerId]; diff --git a/x-pack/plugins/lens/public/xy_visualization/state_helpers.ts b/x-pack/plugins/lens/public/xy_visualization/state_helpers.ts index 4edf7fdf5e512..14a82011cb526 100644 --- a/x-pack/plugins/lens/public/xy_visualization/state_helpers.ts +++ b/x-pack/plugins/lens/public/xy_visualization/state_helpers.ts @@ -26,6 +26,10 @@ export function isPercentageSeries(seriesType: SeriesType) { ); } +export function isStackedChart(seriesType: SeriesType) { + return seriesType.includes('stacked'); +} + export function isHorizontalChart(layers: Array<{ seriesType: SeriesType }>) { return layers.every((l) => isHorizontalSeries(l.seriesType)); } diff --git a/x-pack/plugins/lens/public/xy_visualization/threshold_helpers.test.ts b/x-pack/plugins/lens/public/xy_visualization/threshold_helpers.test.ts new file mode 100644 index 0000000000000..d7286de0316d6 --- /dev/null +++ b/x-pack/plugins/lens/public/xy_visualization/threshold_helpers.test.ts @@ -0,0 +1,569 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { XYLayerConfig } from '../../common/expressions'; +import { FramePublicAPI } from '../types'; +import { computeOverallDataDomain, getStaticValue } from './threshold_helpers'; + +function getActiveData(json: Array<{ id: string; rows: Array> }>) { + return json.reduce((memo, { id, rows }) => { + const columns = Object.keys(rows[0]).map((columnId) => ({ + id: columnId, + name: columnId, + meta: { type: 'number' as const }, + })); + memo[id] = { + type: 'datatable' as const, + columns, + rows, + }; + return memo; + }, {} as NonNullable); +} + +describe('threshold helpers', () => { + describe('getStaticValue', () => { + const hasDateHistogram = () => false; + const hasAllNumberHistogram = () => true; + + it('should return fallback value on missing data', () => { + expect(getStaticValue([], 'x', {}, hasAllNumberHistogram)).toBe(100); + }); + + it('should return fallback value on no-configuration/missing hit on current data', () => { + // no-config: missing layer + expect( + getStaticValue( + [], + 'x', + { + activeData: getActiveData([ + { id: 'id-a', rows: Array(3).fill({ a: 100, b: 100, c: 100 }) }, + ]), + }, + hasAllNumberHistogram + ) + ).toBe(100); + // accessor id has no hit in data + expect( + getStaticValue( + [{ layerId: 'id-a', seriesType: 'area' } as XYLayerConfig], // missing xAccessor for groupId == x + 'x', + { + activeData: getActiveData([ + { id: 'id-a', rows: Array(3).fill({ a: 100, b: 100, c: 100 }) }, + ]), + }, + hasAllNumberHistogram + ) + ).toBe(100); + expect( + getStaticValue( + [ + { + layerId: 'id-a', + seriesType: 'area', + layerType: 'data', + accessors: ['d'], + } as XYLayerConfig, + ], // missing hit of accessor "d" in data + 'yLeft', + { + activeData: getActiveData([ + { id: 'id-a', rows: Array(3).fill({ a: 100, b: 100, c: 100 }) }, + ]), + }, + hasAllNumberHistogram + ) + ).toBe(100); + expect( + getStaticValue( + [ + { + layerId: 'id-a', + seriesType: 'area', + layerType: 'data', + accessors: ['a'], + } as XYLayerConfig, + ], // missing yConfig fallbacks to left axis, but the requested group is yRight + 'yRight', + { + activeData: getActiveData([ + { id: 'id-a', rows: Array(3).fill({ a: 100, b: 100, c: 100 }) }, + ]), + }, + hasAllNumberHistogram + ) + ).toBe(100); + expect( + getStaticValue( + [ + { + layerId: 'id-a', + seriesType: 'area', + layerType: 'data', + accessors: ['a'], + } as XYLayerConfig, + ], // same as above with x groupId + 'x', + { + activeData: getActiveData([ + { id: 'id-a', rows: Array(3).fill({ a: 100, b: 100, c: 100 }) }, + ]), + }, + hasAllNumberHistogram + ) + ).toBe(100); + }); + + it('should work for no yConfig defined and fallback to left axis', () => { + expect( + getStaticValue( + [ + { + layerId: 'id-a', + seriesType: 'area', + layerType: 'data', + accessors: ['a'], + } as XYLayerConfig, + ], + 'yLeft', + { + activeData: getActiveData([ + { id: 'id-a', rows: Array(3).fill({ a: 100, b: 100, c: 100 }) }, + ]), + }, + hasAllNumberHistogram + ) + ).toBe(75); // 3/4 of "a" only + }); + + it('should extract axis side from yConfig', () => { + expect( + getStaticValue( + [ + { + layerId: 'id-a', + seriesType: 'area', + layerType: 'data', + accessors: ['a'], + yConfig: [{ forAccessor: 'a', axisMode: 'right' }], + } as XYLayerConfig, + ], + 'yRight', + { + activeData: getActiveData([ + { id: 'id-a', rows: Array(3).fill({ a: 100, b: 100, c: 100 }) }, + ]), + }, + hasAllNumberHistogram + ) + ).toBe(75); // 3/4 of "a" only + }); + + it('should correctly distribute axis on left and right with different formatters when in auto', () => { + const tables = getActiveData([ + { id: 'id-a', rows: Array(3).fill({ a: 100, b: 200, c: 100 }) }, + ]); + tables['id-a'].columns[0].meta.params = { id: 'number' }; // a: number formatter + tables['id-a'].columns[1].meta.params = { id: 'percent' }; // b: percent formatter + expect( + getStaticValue( + [ + { + layerId: 'id-a', + seriesType: 'area', + layerType: 'data', + accessors: ['a', 'b'], + } as XYLayerConfig, + ], + 'yLeft', + { activeData: tables }, + hasAllNumberHistogram + ) + ).toBe(75); // 3/4 of "a" only + expect( + getStaticValue( + [ + { + layerId: 'id-a', + seriesType: 'area', + layerType: 'data', + accessors: ['a', 'b'], + } as XYLayerConfig, + ], + 'yRight', + { activeData: tables }, + hasAllNumberHistogram + ) + ).toBe(150); // 3/4 of "b" only + }); + + it('should ignore hasHistogram for left or right axis', () => { + const tables = getActiveData([ + { id: 'id-a', rows: Array(3).fill({ a: 100, b: 200, c: 100 }) }, + ]); + tables['id-a'].columns[0].meta.params = { id: 'number' }; // a: number formatter + tables['id-a'].columns[1].meta.params = { id: 'percent' }; // b: percent formatter + expect( + getStaticValue( + [ + { + layerId: 'id-a', + seriesType: 'area', + layerType: 'data', + accessors: ['a', 'b'], + } as XYLayerConfig, + ], + 'yLeft', + { activeData: tables }, + hasDateHistogram + ) + ).toBe(75); // 3/4 of "a" only + expect( + getStaticValue( + [ + { + layerId: 'id-a', + seriesType: 'area', + layerType: 'data', + accessors: ['a', 'b'], + } as XYLayerConfig, + ], + 'yRight', + { activeData: tables }, + hasDateHistogram + ) + ).toBe(150); // 3/4 of "b" only + }); + + it('should early exit for x group if a date histogram is detected', () => { + expect( + getStaticValue( + [ + { + layerId: 'id-a', + seriesType: 'area', + layerType: 'data', + xAccessor: 'a', + accessors: [], + } as XYLayerConfig, + ], + 'x', // this is influenced by the callback + { + activeData: getActiveData([ + { id: 'id-a', rows: Array(3).fill({ a: 100, b: 100, c: 100 }) }, + ]), + }, + hasDateHistogram + ) + ).toBe(100); + }); + + it('should not force zero-based interval for x group', () => { + expect( + getStaticValue( + [ + { + layerId: 'id-a', + seriesType: 'area', + layerType: 'data', + xAccessor: 'a', + accessors: [], + } as XYLayerConfig, + ], + 'x', + { + activeData: getActiveData([ + { + id: 'id-a', + rows: Array(3) + .fill(1) + .map((_, i) => ({ a: i % 2 ? 33 : 50 })), + }, + ]), + }, + hasAllNumberHistogram + ) + ).toBe(45.75); // 33 (min) + (50 - 33) * 3/4 + }); + }); + + describe('computeOverallDataDomain', () => { + it('should compute the correct value for a single layer with stacked series', () => { + for (const seriesType of ['bar_stacked', 'bar_horizontal_stacked', 'area_stacked']) + expect( + computeOverallDataDomain( + [{ layerId: 'id-a', seriesType, accessors: ['a', 'b', 'c'] } as XYLayerConfig], + ['a', 'b', 'c'], + getActiveData([ + { + id: 'id-a', + rows: Array(3) + .fill(1) + .map((_, i) => ({ + a: i === 0 ? 25 : null, + b: i === 1 ? 50 : null, + c: i === 2 ? 75 : null, + })), + }, + ]) + ) + ).toEqual({ min: 0, max: 150 }); // there's just one series with 150, so the lowerbound fallbacks to 0 + }); + + it('should work for percentage series', () => { + for (const seriesType of [ + 'bar_percentage_stacked', + 'bar_horizontal_percentage_stacked', + 'area_percentage_stacked', + ]) + expect( + computeOverallDataDomain( + [{ layerId: 'id-a', seriesType, accessors: ['a', 'b', 'c'] } as XYLayerConfig], + ['a', 'b', 'c'], + getActiveData([ + { + id: 'id-a', + rows: Array(3) + .fill(1) + .map((_, i) => ({ + a: i === 0 ? 0.25 : null, + b: i === 1 ? 0.25 : null, + c: i === 2 ? 0.25 : null, + })), + }, + ]) + ) + ).toEqual({ min: 0, max: 0.75 }); + }); + + it('should compute the correct value for multiple layers with stacked series', () => { + for (const seriesType of ['bar_stacked', 'bar_horizontal_stacked', 'area_stacked']) { + expect( + computeOverallDataDomain( + [ + { layerId: 'id-a', seriesType, accessors: ['a', 'b', 'c'] }, + { layerId: 'id-b', seriesType, accessors: ['d', 'e', 'f'] }, + ] as XYLayerConfig[], + ['a', 'b', 'c', 'd', 'e', 'f'], + getActiveData([ + { id: 'id-a', rows: [{ a: 25, b: 100, c: 100 }] }, + { id: 'id-b', rows: [{ d: 50, e: 50, f: 50 }] }, + ]) + ) + ).toEqual({ min: 0, max: 375 }); + // same as before but spread on 3 rows with nulls + expect( + computeOverallDataDomain( + [ + { layerId: 'id-a', seriesType, accessors: ['a', 'b', 'c'] }, + { layerId: 'id-b', seriesType, accessors: ['d', 'e', 'f'] }, + ] as XYLayerConfig[], + ['a', 'b', 'c', 'd', 'e', 'f'], + getActiveData([ + { + id: 'id-a', + rows: Array(3) + .fill(1) + .map((_, i) => ({ + a: i === 0 ? 25 : null, + b: i === 1 ? 100 : null, + c: i === 2 ? 100 : null, + })), + }, + { + id: 'id-b', + rows: Array(3) + .fill(1) + .map((_, i) => ({ + d: i === 0 ? 50 : null, + e: i === 1 ? 50 : null, + f: i === 2 ? 50 : null, + })), + }, + ]) + ) + ).toEqual({ min: 0, max: 375 }); + } + }); + + it('should compute the correct value for multiple layers with non-stacked series', () => { + for (const seriesType of ['bar', 'bar_horizontal', 'line', 'area']) + expect( + computeOverallDataDomain( + [ + { layerId: 'id-a', seriesType, accessors: ['a', 'b', 'c'] }, + { layerId: 'id-b', seriesType, accessors: ['d', 'e', 'f'] }, + ] as XYLayerConfig[], + ['a', 'b', 'c', 'd', 'e', 'f'], + getActiveData([ + { id: 'id-a', rows: Array(3).fill({ a: 100, b: 100, c: 100 }) }, + { id: 'id-b', rows: Array(3).fill({ d: 50, e: 50, f: 50 }) }, + ]) + ) + ).toEqual({ min: 50, max: 100 }); + }); + + it('should compute the correct value for mixed series (stacked + non-stacked)', () => { + for (const nonStackedSeries of ['bar', 'bar_horizontal', 'line', 'area']) { + for (const stackedSeries of ['bar_stacked', 'bar_horizontal_stacked', 'area_stacked']) { + expect( + computeOverallDataDomain( + [ + { layerId: 'id-a', seriesType: nonStackedSeries, accessors: ['a', 'b', 'c'] }, + { layerId: 'id-b', seriesType: stackedSeries, accessors: ['d', 'e', 'f'] }, + ] as XYLayerConfig[], + ['a', 'b', 'c', 'd', 'e', 'f'], + getActiveData([ + { id: 'id-a', rows: [{ a: 100, b: 100, c: 100 }] }, + { id: 'id-b', rows: [{ d: 50, e: 50, f: 50 }] }, + ]) + ) + ).toEqual({ + min: 0, // min is 0 as there is at least one stacked series + max: 150, // max is id-b layer accessor sum + }); + } + } + }); + + it('should compute the correct value for a histogram stacked chart', () => { + for (const seriesType of ['bar_stacked', 'bar_horizontal_stacked', 'area_stacked']) + expect( + computeOverallDataDomain( + [ + { layerId: 'id-a', seriesType, xAccessor: 'c', accessors: ['a', 'b'] }, + { layerId: 'id-b', seriesType, xAccessor: 'f', accessors: ['d', 'e'] }, + ] as XYLayerConfig[], + ['a', 'b', 'd', 'e'], + getActiveData([ + { + id: 'id-a', + rows: Array(3) + .fill(1) + .map((_, i) => ({ a: 50 * i, b: 100 * i, c: i })), + }, + { + id: 'id-b', + rows: Array(3) + .fill(1) + .map((_, i) => ({ d: 25 * (i + 1), e: i % 2 ? 100 : null, f: i })), + }, + ]) + ) + ).toEqual({ min: 0, max: 375 }); + }); + + it('should compute the correct value for a histogram non-stacked chart', () => { + for (const seriesType of ['bar', 'bar_horizontal', 'line', 'area']) + expect( + computeOverallDataDomain( + [ + { layerId: 'id-a', seriesType, xAccessor: 'c', accessors: ['a', 'b'] }, + { layerId: 'id-b', seriesType, xAccessor: 'f', accessors: ['d', 'e'] }, + ] as XYLayerConfig[], + ['a', 'b', 'd', 'e'], + getActiveData([ + { + id: 'id-a', + rows: Array(3) + .fill(1) + .map((_, i) => ({ a: 50 * i, b: 100 * i, c: i })), + }, + { + id: 'id-b', + rows: Array(3) + .fill(1) + .map((_, i) => ({ d: 25 * (i + 1), e: i % 2 ? 100 : null, f: i })), + }, + ]) + ) + ).toEqual({ min: 0, max: 200 }); + }); + + it('should compute the result taking into consideration negative-based intervals too', () => { + // stacked + expect( + computeOverallDataDomain( + [ + { + layerId: 'id-a', + seriesType: 'area_stacked', + accessors: ['a', 'b', 'c'], + } as XYLayerConfig, + ], + ['a', 'b', 'c'], + getActiveData([ + { + id: 'id-a', + rows: Array(3) + .fill(1) + .map((_, i) => ({ + a: i === 0 ? -100 : null, + b: i === 1 ? 200 : null, + c: i === 2 ? 100 : null, + })), + }, + ]) + ) + ).toEqual({ min: 0, max: 200 }); // it is stacked, so max is the sum and 0 is the fallback + expect( + computeOverallDataDomain( + [{ layerId: 'id-a', seriesType: 'area', accessors: ['a', 'b', 'c'] } as XYLayerConfig], + ['a', 'b', 'c'], + getActiveData([ + { + id: 'id-a', + rows: Array(3) + .fill(1) + .map((_, i) => ({ + a: i === 0 ? -100 : null, + b: i === 1 ? 200 : null, + c: i === 2 ? 100 : null, + })), + }, + ]) + ) + ).toEqual({ min: -100, max: 200 }); + }); + + it('should return no result if no layers or accessors are passed', () => { + expect( + computeOverallDataDomain( + [], + ['a', 'b', 'c'], + getActiveData([{ id: 'id-a', rows: Array(3).fill({ a: 100, b: 100, c: 100 }) }]) + ) + ).toEqual({ min: undefined, max: undefined }); + }); + + it('should return no result if data or table is not available', () => { + expect( + computeOverallDataDomain( + [ + { layerId: 'id-a', seriesType: 'area', accessors: ['a', 'b', 'c'] }, + { layerId: 'id-b', seriesType: 'line', accessors: ['d', 'e', 'f'] }, + ] as XYLayerConfig[], + ['a', 'b'], + getActiveData([{ id: 'id-c', rows: [{ a: 100, b: 100 }] }]) // mind the layer id here + ) + ).toEqual({ min: undefined, max: undefined }); + + expect( + computeOverallDataDomain( + [ + { layerId: 'id-a', seriesType: 'bar', accessors: ['a', 'b', 'c'] }, + { layerId: 'id-b', seriesType: 'bar_stacked' }, + ] as XYLayerConfig[], + ['a', 'b'], + getActiveData([]) + ) + ).toEqual({ min: undefined, max: undefined }); + }); + }); +}); diff --git a/x-pack/plugins/lens/public/xy_visualization/threshold_helpers.tsx b/x-pack/plugins/lens/public/xy_visualization/threshold_helpers.tsx index ec47350709473..8bf5f84b15bad 100644 --- a/x-pack/plugins/lens/public/xy_visualization/threshold_helpers.tsx +++ b/x-pack/plugins/lens/public/xy_visualization/threshold_helpers.tsx @@ -5,12 +5,13 @@ * 2.0. */ +import { partition } from 'lodash'; import { layerTypes } from '../../common'; import type { XYLayerConfig, YConfig } from '../../common/expressions'; import { Datatable } from '../../../../../src/plugins/expressions/public'; import type { DatasourcePublicAPI, FramePublicAPI } from '../types'; import { groupAxesByType } from './axes_configuration'; -import { isPercentageSeries } from './state_helpers'; +import { isPercentageSeries, isStackedChart } from './state_helpers'; import type { XYState } from './types'; import { checkScaleOperation } from './visualization_helpers'; @@ -91,14 +92,22 @@ export function getStaticValue( // filter and organize data dimensions into threshold groups // now pick the columnId in the active data - const { dataLayer, accessor } = getAccessorCriteriaForGroup(groupId, dataLayers, activeData); - if (groupId === 'x' && dataLayer && !layerHasNumberHistogram(dataLayer)) { + const { + dataLayers: filteredLayers, + untouchedDataLayers, + accessors, + } = getAccessorCriteriaForGroup(groupId, dataLayers, activeData); + if ( + groupId === 'x' && + filteredLayers.length && + !untouchedDataLayers.some(layerHasNumberHistogram) + ) { return fallbackValue; } return ( computeStaticValueForGroup( - dataLayer, - accessor, + filteredLayers, + accessors, activeData, groupId !== 'x' // histogram axis should compute the min based on the current data ) || fallbackValue @@ -111,54 +120,123 @@ function getAccessorCriteriaForGroup( activeData: FramePublicAPI['activeData'] ) { switch (groupId) { - case 'x': - const dataLayer = dataLayers.find(({ xAccessor }) => xAccessor); + case 'x': { + const filteredDataLayers = dataLayers.filter(({ xAccessor }) => xAccessor); + // need to reshape the dataLayers to match the other accessors format return { - dataLayer, - accessor: dataLayer?.xAccessor, + dataLayers: filteredDataLayers.map(({ accessors, xAccessor, ...rest }) => ({ + ...rest, + accessors: [xAccessor] as string[], + })), + // need the untouched ones for some checks later on + untouchedDataLayers: filteredDataLayers, + accessors: filteredDataLayers.map(({ xAccessor }) => xAccessor) as string[], }; - case 'yLeft': + } + case 'yLeft': { const { left } = groupAxesByType(dataLayers, activeData); + const leftIds = new Set(left.map(({ layer }) => layer)); + const filteredDataLayers = dataLayers.filter(({ layerId }) => leftIds.has(layerId)); return { - dataLayer: dataLayers.find(({ layerId }) => layerId === left[0]?.layer), - accessor: left[0]?.accessor, + dataLayers: filteredDataLayers, + untouchedDataLayers: filteredDataLayers, + accessors: left.map(({ accessor }) => accessor), }; - case 'yRight': + } + case 'yRight': { const { right } = groupAxesByType(dataLayers, activeData); + const rightIds = new Set(right.map(({ layer }) => layer)); + const filteredDataLayers = dataLayers.filter(({ layerId }) => rightIds.has(layerId)); return { - dataLayer: dataLayers.find(({ layerId }) => layerId === right[0]?.layer), - accessor: right[0]?.accessor, + dataLayers: filteredDataLayers, + untouchedDataLayers: filteredDataLayers, + accessors: right.map(({ accessor }) => accessor), }; + } + } +} + +export function computeOverallDataDomain( + dataLayers: Array>, + accessorIds: string[], + activeData: NonNullable +) { + const accessorMap = new Set(accessorIds); + let min: number | undefined; + let max: number | undefined; + const [stacked, unstacked] = partition(dataLayers, ({ seriesType }) => + isStackedChart(seriesType) + ); + for (const { layerId, accessors } of unstacked) { + const table = activeData[layerId]; + if (table) { + for (const accessor of accessors) { + if (accessorMap.has(accessor)) { + for (const row of table.rows) { + const value = row[accessor]; + if (typeof value === 'number') { + // when not stacked, do not keep the 0 + max = max != null ? Math.max(value, max) : value; + min = min != null ? Math.min(value, min) : value; + } + } + } + } + } + } + // stacked can span multiple layers, so compute an overall max/min by bucket + const stackedResults: Record = {}; + for (const { layerId, accessors, xAccessor } of stacked) { + const table = activeData[layerId]; + if (table) { + for (const accessor of accessors) { + if (accessorMap.has(accessor)) { + for (const row of table.rows) { + const value = row[accessor]; + // start with a shared bucket + let bucket = 'shared'; + // but if there's an xAccessor use it as new bucket system + if (xAccessor) { + bucket = row[xAccessor]; + } + if (typeof value === 'number') { + stackedResults[bucket] = stackedResults[bucket] ?? 0; + stackedResults[bucket] += value; + } + } + } + } + } + } + + for (const value of Object.values(stackedResults)) { + // for stacked extents keep 0 in view + max = Math.max(value, max || 0, 0); + min = Math.min(value, min || 0, 0); } + + return { min, max }; } function computeStaticValueForGroup( - dataLayer: XYLayerConfig | undefined, - accessorId: string | undefined, + dataLayers: Array>, + accessorIds: string[], activeData: NonNullable, - minZeroBased: boolean + minZeroOrNegativeBase: boolean = true ) { const defaultThresholdFactor = 3 / 4; - if (dataLayer && accessorId) { - if (isPercentageSeries(dataLayer?.seriesType)) { + if (dataLayers.length && accessorIds.length) { + if (dataLayers.some(({ seriesType }) => isPercentageSeries(seriesType))) { return defaultThresholdFactor; } - const tableId = Object.keys(activeData).find((key) => - activeData[key].columns.some(({ id }) => id === accessorId) - ); - if (tableId) { - const columnMax = activeData[tableId].rows.reduce( - (max, row) => Math.max(row[accessorId], max), - -Infinity - ); - const columnMin = activeData[tableId].rows.reduce( - (max, row) => Math.min(row[accessorId], max), - Infinity - ); + + const { min, max } = computeOverallDataDomain(dataLayers, accessorIds, activeData); + + if (min != null && max != null && isFinite(min) && isFinite(max)) { // Custom axis bounds can go below 0, so consider also lower values than 0 - const finalMinValue = minZeroBased ? Math.min(0, columnMin) : columnMin; - const interval = columnMax - finalMinValue; + const finalMinValue = minZeroOrNegativeBase ? Math.min(0, min) : min; + const interval = max - finalMinValue; return Number((finalMinValue + interval * defaultThresholdFactor).toFixed(2)); } } diff --git a/x-pack/plugins/license_management/__jest__/__snapshots__/upload_license.test.tsx.snap b/x-pack/plugins/license_management/__jest__/__snapshots__/upload_license.test.tsx.snap index 6591afafff00f..db9647d03f8e2 100644 --- a/x-pack/plugins/license_management/__jest__/__snapshots__/upload_license.test.tsx.snap +++ b/x-pack/plugins/license_management/__jest__/__snapshots__/upload_license.test.tsx.snap @@ -156,11 +156,11 @@ exports[`UploadLicense should display a modal when license requires acknowledgem @@ -1108,11 +1108,11 @@ exports[`UploadLicense should display an error when ES says license is expired 1 @@ -1820,11 +1820,11 @@ exports[`UploadLicense should display an error when ES says license is invalid 1 @@ -2532,11 +2532,11 @@ exports[`UploadLicense should display an error when submitting invalid JSON 1`] @@ -3244,11 +3244,11 @@ exports[`UploadLicense should display error when ES returns error 1`] = ` diff --git a/x-pack/plugins/lists/public/exceptions/api.test.ts b/x-pack/plugins/lists/public/exceptions/api.test.ts index a196999d14943..65c11bfc1dfd0 100644 --- a/x-pack/plugins/lists/public/exceptions/api.test.ts +++ b/x-pack/plugins/lists/public/exceptions/api.test.ts @@ -759,7 +759,7 @@ describe('Exceptions Lists API', () => { }); expect(httpMock.fetch).toHaveBeenCalledWith('/api/exception_lists/_export', { - method: 'GET', + method: 'POST', query: { id: 'some-id', list_id: 'list-id', diff --git a/x-pack/plugins/lists/server/routes/export_exception_list_route.ts b/x-pack/plugins/lists/server/routes/export_exception_list_route.ts index a238d0e6529ff..aa30c8a7d435d 100644 --- a/x-pack/plugins/lists/server/routes/export_exception_list_route.ts +++ b/x-pack/plugins/lists/server/routes/export_exception_list_route.ts @@ -6,6 +6,7 @@ */ import { transformError } from '@kbn/securitysolution-es-utils'; +import { transformDataToNdjson } from '@kbn/securitysolution-utils'; import { exportExceptionListQuerySchema } from '@kbn/securitysolution-io-ts-list-types'; import { EXCEPTION_LIST_URL } from '@kbn/securitysolution-list-constants'; @@ -14,7 +15,7 @@ import type { ListsPluginRouter } from '../types'; import { buildRouteValidation, buildSiemResponse, getExceptionListClient } from './utils'; export const exportExceptionListRoute = (router: ListsPluginRouter): void => { - router.get( + router.post( { options: { tags: ['access:lists-read'], @@ -26,6 +27,7 @@ export const exportExceptionListRoute = (router: ListsPluginRouter): void => { }, async (context, request, response) => { const siemResponse = buildSiemResponse(response); + try { const { id, list_id: listId, namespace_type: namespaceType } = request.query; const exceptionLists = getExceptionListClient(context); @@ -37,11 +39,10 @@ export const exportExceptionListRoute = (router: ListsPluginRouter): void => { if (exceptionList == null) { return siemResponse.error({ - body: `list_id: ${listId} does not exist`, + body: `exception list with list_id: ${listId} does not exist`, statusCode: 400, }); } else { - const { exportData: exportList } = getExport([exceptionList]); const listItems = await exceptionLists.findExceptionListItem({ filter: undefined, listId, @@ -51,19 +52,15 @@ export const exportExceptionListRoute = (router: ListsPluginRouter): void => { sortField: 'exception-list.created_at', sortOrder: 'desc', }); + const exceptionItems = listItems?.data ?? []; - const { exportData: exportListItems, exportDetails } = getExport(listItems?.data ?? []); - - const responseBody = [ - exportList, - exportListItems, - { exception_list_items_details: exportDetails }, - ]; + const { exportData } = getExport([exceptionList, ...exceptionItems]); + const { exportDetails } = getExportDetails(exceptionItems); // TODO: Allow the API to override the name of the file to export const fileName = exceptionList.list_id; return response.ok({ - body: transformDataToNdjson(responseBody), + body: `${exportData}${exportDetails}`, headers: { 'Content-Disposition': `attachment; filename="${fileName}"`, 'Content-Type': 'application/ndjson', @@ -81,24 +78,23 @@ export const exportExceptionListRoute = (router: ListsPluginRouter): void => { ); }; -const transformDataToNdjson = (data: unknown[]): string => { - if (data.length !== 0) { - const dataString = data.map((dataItem) => JSON.stringify(dataItem)).join('\n'); - return `${dataString}\n`; - } else { - return ''; - } -}; - export const getExport = ( data: unknown[] ): { exportData: string; - exportDetails: string; } => { const ndjson = transformDataToNdjson(data); + + return { exportData: ndjson }; +}; + +export const getExportDetails = ( + items: unknown[] +): { + exportDetails: string; +} => { const exportDetails = JSON.stringify({ - exported_count: data.length, + exported_list_items_count: items.length, }); - return { exportData: ndjson, exportDetails: `${exportDetails}\n` }; + return { exportDetails: `${exportDetails}\n` }; }; diff --git a/x-pack/plugins/maps/server/index.ts b/x-pack/plugins/maps/server/index.ts index 4e5dfcf1f94c4..6a846bc245824 100644 --- a/x-pack/plugins/maps/server/index.ts +++ b/x-pack/plugins/maps/server/index.ts @@ -34,6 +34,7 @@ export const config: PluginConfigDescriptor = { return completeConfig; } addDeprecation({ + configPath: 'xpack.maps.showMapVisualizationTypes', message: i18n.translate('xpack.maps.deprecation.showMapVisualizationTypes.message', { defaultMessage: 'xpack.maps.showMapVisualizationTypes is deprecated and is no longer used', @@ -59,6 +60,7 @@ export const config: PluginConfigDescriptor = { return completeConfig; } addDeprecation({ + configPath: 'map.proxyElasticMapsServiceInMaps', documentationUrl: `https://www.elastic.co/guide/en/kibana/${branch}/maps-connect-to-ems.html#elastic-maps-server`, message: i18n.translate('xpack.maps.deprecation.proxyEMS.message', { defaultMessage: 'map.proxyElasticMapsServiceInMaps is deprecated and is no longer used', @@ -86,6 +88,7 @@ export const config: PluginConfigDescriptor = { return completeConfig; } addDeprecation({ + configPath: 'map.regionmap', message: i18n.translate('xpack.maps.deprecation.regionmap.message', { defaultMessage: 'map.regionmap is deprecated and is no longer used', }), diff --git a/x-pack/plugins/ml/common/types/kibana.ts b/x-pack/plugins/ml/common/types/kibana.ts index 7783a02c2dd37..cc7b68b40149f 100644 --- a/x-pack/plugins/ml/common/types/kibana.ts +++ b/x-pack/plugins/ml/common/types/kibana.ts @@ -8,7 +8,6 @@ // custom edits or fixes for default kibana types which are incomplete import type { SimpleSavedObject } from 'kibana/public'; -import type { IndexPatternAttributes } from 'src/plugins/data/common'; import type { FieldFormatsRegistry } from '../../../../../src/plugins/field_formats/common'; export type IndexPatternTitle = string; @@ -18,7 +17,6 @@ export interface Route { k7Breadcrumbs: () => any; } -export type IndexPatternSavedObject = SimpleSavedObject; // TODO define saved object type export type SavedSearchSavedObject = SimpleSavedObject; diff --git a/x-pack/plugins/ml/kibana.json b/x-pack/plugins/ml/kibana.json index 310ac5d65c986..9ed05bbdc2edf 100644 --- a/x-pack/plugins/ml/kibana.json +++ b/x-pack/plugins/ml/kibana.json @@ -8,6 +8,7 @@ ], "requiredPlugins": [ "data", + "dataViews", "cloud", "features", "dataVisualizer", diff --git a/x-pack/plugins/ml/public/application/app.tsx b/x-pack/plugins/ml/public/application/app.tsx index c7e457c0b5e00..6259cecae78b5 100644 --- a/x-pack/plugins/ml/public/application/app.tsx +++ b/x-pack/plugins/ml/public/application/app.tsx @@ -135,6 +135,7 @@ export const renderApp = ( urlGenerators: deps.share.urlGenerators, maps: deps.maps, dataVisualizer: deps.dataVisualizer, + dataViews: deps.data.dataViews, }); appMountParams.onAppLeave((actions) => actions.default()); diff --git a/x-pack/plugins/ml/public/application/components/data_grid/common.ts b/x-pack/plugins/ml/public/application/components/data_grid/common.ts index a64594e86a757..6fc6f298e73d8 100644 --- a/x-pack/plugins/ml/public/application/components/data_grid/common.ts +++ b/x-pack/plugins/ml/public/application/components/data_grid/common.ts @@ -19,12 +19,9 @@ import { i18n } from '@kbn/i18n'; import { CoreSetup } from 'src/core/public'; -import { - IndexPattern, - IFieldType, - ES_FIELD_TYPES, - KBN_FIELD_TYPES, -} from '../../../../../../../src/plugins/data/public'; +import { ES_FIELD_TYPES, KBN_FIELD_TYPES } from '../../../../../../../src/plugins/data/public'; + +import type { DataView, DataViewField } from '../../../../../../../src/plugins/data_views/common'; import { DEFAULT_RESULTS_FIELD } from '../../../../common/constants/data_frame_analytics'; import { extractErrorMessage } from '../../../../common/util/errors'; @@ -72,7 +69,7 @@ export const euiDataGridToolbarSettings = { showFullScreenSelector: false, }; -export const getFieldsFromKibanaIndexPattern = (indexPattern: IndexPattern): string[] => { +export const getFieldsFromKibanaIndexPattern = (indexPattern: DataView): string[] => { const allFields = indexPattern.fields.map((f) => f.name); const indexPatternFields: string[] = allFields.filter((f) => { if (indexPattern.metaFields.includes(f)) { @@ -98,7 +95,7 @@ export const getFieldsFromKibanaIndexPattern = (indexPattern: IndexPattern): str * @param RuntimeMappings */ export function getCombinedRuntimeMappings( - indexPattern: IndexPattern | undefined, + indexPattern: DataView | undefined, runtimeMappings?: RuntimeMappings ): RuntimeMappings | undefined { let combinedRuntimeMappings = {}; @@ -219,7 +216,7 @@ export const getDataGridSchemaFromESFieldType = ( }; export const getDataGridSchemaFromKibanaFieldType = ( - field: IFieldType | undefined + field: DataViewField | undefined ): string | undefined => { // Built-in values are ['boolean', 'currency', 'datetime', 'numeric', 'json'] // To fall back to the default string schema it needs to be undefined. @@ -312,7 +309,7 @@ export const getTopClasses = (row: Record, mlResultsField: string): }; export const useRenderCellValue = ( - indexPattern: IndexPattern | undefined, + indexPattern: DataView | undefined, pagination: IndexPagination, tableItems: DataGridItem[], resultsField?: string, diff --git a/x-pack/plugins/ml/public/application/components/data_recognizer/data_recognizer.d.ts b/x-pack/plugins/ml/public/application/components/data_recognizer/data_recognizer.d.ts index ff6363ea2cc6e..fb9648f5ef4af 100644 --- a/x-pack/plugins/ml/public/application/components/data_recognizer/data_recognizer.d.ts +++ b/x-pack/plugins/ml/public/application/components/data_recognizer/data_recognizer.d.ts @@ -7,10 +7,10 @@ import { FC } from 'react'; import { SavedSearchSavedObject } from '../../../../common/types/kibana'; -import type { IIndexPattern } from '../../../../../../../src/plugins/data/public'; +import type { DataView } from '../../../../../../../src/plugins/data_views/public'; declare const DataRecognizer: FC<{ - indexPattern: IIndexPattern; + indexPattern: DataView; savedSearch: SavedSearchSavedObject | null; results: { count: number; diff --git a/x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.test.tsx b/x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.test.tsx index f9f8d9a370bab..72641499fe6af 100644 --- a/x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.test.tsx +++ b/x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.test.tsx @@ -8,15 +8,15 @@ import React from 'react'; import { shallowWithIntl } from '@kbn/test/jest'; import { FullTimeRangeSelector } from './index'; -import { Query } from 'src/plugins/data/public'; -import { IndexPattern } from '../../../../../../../src/plugins/data/public'; +import type { Query } from 'src/plugins/data/public'; +import type { DataView } from '../../../../../../../src/plugins/data_views/public'; // Create a mock for the setFullTimeRange function in the service. // The mock is hoisted to the top, so need to prefix the mock function // with 'mock' so it can be used lazily. -const mockSetFullTimeRange = jest.fn((indexPattern: IndexPattern, query: Query) => true); +const mockSetFullTimeRange = jest.fn((indexPattern: DataView, query: Query) => true); jest.mock('./full_time_range_selector_service', () => ({ - setFullTimeRange: (indexPattern: IndexPattern, query: Query) => + setFullTimeRange: (indexPattern: DataView, query: Query) => mockSetFullTimeRange(indexPattern, query), })); @@ -26,7 +26,7 @@ describe('FullTimeRangeSelector', () => { fields: [], title: 'test-index-pattern', timeFieldName: '@timestamp', - } as unknown as IndexPattern; + } as unknown as DataView; const query: Query = { language: 'kuery', diff --git a/x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.tsx b/x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.tsx index f087754bd275b..3c9689c8c108b 100644 --- a/x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.tsx +++ b/x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.tsx @@ -8,12 +8,13 @@ import React, { FC } from 'react'; import { FormattedMessage } from '@kbn/i18n/react'; -import { Query, IndexPattern } from 'src/plugins/data/public'; +import type { Query } from 'src/plugins/data/public'; import { EuiButton } from '@elastic/eui'; +import type { DataView } from '../../../../../../../src/plugins/data_views/public'; import { setFullTimeRange } from './full_time_range_selector_service'; interface Props { - indexPattern: IndexPattern; + indexPattern: DataView; query: Query; disabled: boolean; callback?: (a: any) => void; @@ -23,7 +24,7 @@ interface Props { // to the time range of data in the index(es) mapped to the supplied Kibana index pattern or query. export const FullTimeRangeSelector: FC = ({ indexPattern, query, disabled, callback }) => { // wrapper around setFullTimeRange to allow for the calling of the optional callBack prop - async function setRange(i: IndexPattern, q: Query) { + async function setRange(i: DataView, q: Query) { const fullTimeRange = await setFullTimeRange(i, q); if (typeof callback === 'function') { callback(fullTimeRange); diff --git a/x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector_service.ts b/x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector_service.ts index 1e9c1e2c1b74d..8f0d344a36f36 100644 --- a/x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector_service.ts +++ b/x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector_service.ts @@ -8,11 +8,11 @@ import moment from 'moment'; import { i18n } from '@kbn/i18n'; -import { Query } from 'src/plugins/data/public'; +import type { Query } from 'src/plugins/data/public'; import dateMath from '@elastic/datemath'; import { getTimefilter, getToastNotifications } from '../../util/dependency_cache'; import { ml, GetTimeFieldRangeResponse } from '../../services/ml_api_service'; -import { IndexPattern } from '../../../../../../../src/plugins/data/public'; +import type { DataView } from '../../../../../../../src/plugins/data_views/public'; import { isPopulatedObject } from '../../../../common/util/object_utils'; import { RuntimeMappings } from '../../../../common/types/fields'; @@ -22,7 +22,7 @@ export interface TimeRange { } export async function setFullTimeRange( - indexPattern: IndexPattern, + indexPattern: DataView, query: Query ): Promise { try { diff --git a/x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx b/x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx index b83965b52befc..d64a180bfa8b6 100644 --- a/x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx +++ b/x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx @@ -24,7 +24,7 @@ import { import { i18n } from '@kbn/i18n'; -import { IndexPattern } from '../../../../../../../src/plugins/data/public'; +import { DataView } from '../../../../../../../src/plugins/data_views/public'; import { extractErrorMessage } from '../../../../common'; import { isRuntimeMappings } from '../../../../common/util/runtime_field_utils'; import { stringHash } from '../../../../common/util/string_utils'; @@ -89,7 +89,7 @@ export interface ScatterplotMatrixProps { legendType?: LegendType; searchQuery?: ResultsSearchQuery; runtimeMappings?: RuntimeMappings; - indexPattern?: IndexPattern; + indexPattern?: DataView; } export const ScatterplotMatrix: FC = ({ diff --git a/x-pack/plugins/ml/public/application/components/scatterplot_matrix/use_scatterplot_field_options.ts b/x-pack/plugins/ml/public/application/components/scatterplot_matrix/use_scatterplot_field_options.ts index d8b5b23f68847..543ab0a0c0982 100644 --- a/x-pack/plugins/ml/public/application/components/scatterplot_matrix/use_scatterplot_field_options.ts +++ b/x-pack/plugins/ml/public/application/components/scatterplot_matrix/use_scatterplot_field_options.ts @@ -7,12 +7,12 @@ import { useMemo } from 'react'; -import type { IndexPattern } from '../../../../../../../src/plugins/data/public'; +import type { DataView } from '../../../../../../../src/plugins/data_views/public'; import { ML__INCREMENTAL_ID } from '../../data_frame_analytics/common/fields'; export const useScatterplotFieldOptions = ( - indexPattern?: IndexPattern, + indexPattern?: DataView, includes?: string[], excludes?: string[], resultsField = '' diff --git a/x-pack/plugins/ml/public/application/contexts/ml/__mocks__/index_pattern.ts b/x-pack/plugins/ml/public/application/contexts/ml/__mocks__/index_pattern.ts index 9d53efad86d38..93f92002c4bfd 100644 --- a/x-pack/plugins/ml/public/application/contexts/ml/__mocks__/index_pattern.ts +++ b/x-pack/plugins/ml/public/application/contexts/ml/__mocks__/index_pattern.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { IndexPattern } from '../../../../../../../../src/plugins/data/public'; +import type { DataView } from '../../../../../../../../src/plugins/data_views/public'; export const indexPatternMock = { id: 'the-index-pattern-id', title: 'the-index-pattern-title', fields: [], -} as unknown as IndexPattern; +} as unknown as DataView; diff --git a/x-pack/plugins/ml/public/application/contexts/ml/__mocks__/index_patterns.ts b/x-pack/plugins/ml/public/application/contexts/ml/__mocks__/index_patterns.ts index 7dfbcf1675692..571ce8ac3f423 100644 --- a/x-pack/plugins/ml/public/application/contexts/ml/__mocks__/index_patterns.ts +++ b/x-pack/plugins/ml/public/application/contexts/ml/__mocks__/index_patterns.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { IndexPatternsContract } from '../../../../../../../../src/plugins/data/public'; +import type { DataViewsContract } from '../../../../../../../../src/plugins/data_views/public'; export const indexPatternsMock = new (class { fieldFormats = []; @@ -19,4 +19,4 @@ export const indexPatternsMock = new (class { getIds = jest.fn(); getTitles = jest.fn(); make = jest.fn(); -})() as unknown as IndexPatternsContract; +})() as unknown as DataViewsContract; diff --git a/x-pack/plugins/ml/public/application/contexts/ml/ml_context.ts b/x-pack/plugins/ml/public/application/contexts/ml/ml_context.ts index 02c0945cf998f..cd7059b5302f2 100644 --- a/x-pack/plugins/ml/public/application/contexts/ml/ml_context.ts +++ b/x-pack/plugins/ml/public/application/contexts/ml/ml_context.ts @@ -6,15 +6,15 @@ */ import React from 'react'; -import { IndexPattern, IndexPatternsContract } from '../../../../../../../src/plugins/data/public'; +import { DataView, DataViewsContract } from '../../../../../../../src/plugins/data_views/public'; import { SavedSearchSavedObject } from '../../../../common/types/kibana'; import { MlServicesContext } from '../../app'; export interface MlContextValue { combinedQuery: any; - currentIndexPattern: IndexPattern; // TODO this should be IndexPattern or null + currentIndexPattern: DataView; // TODO this should be IndexPattern or null currentSavedSearch: SavedSearchSavedObject | null; - indexPatterns: IndexPatternsContract; + indexPatterns: DataViewsContract; kibanaConfig: any; // IUiSettingsClient; kibanaVersion: string; } diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/common/use_results_view_config.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/common/use_results_view_config.ts index e1f0db4e9291c..a235885a9a5b7 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/common/use_results_view_config.ts +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/common/use_results_view_config.ts @@ -9,7 +9,7 @@ import { useEffect, useState } from 'react'; import { i18n } from '@kbn/i18n'; -import { IndexPattern } from '../../../../../../../src/plugins/data/public'; +import type { DataView } from '../../../../../../../src/plugins/data_views/public'; import { extractErrorMessage } from '../../../../common/util/errors'; @@ -34,7 +34,7 @@ export const useResultsViewConfig = (jobId: string) => { const mlContext = useMlContext(); const trainedModelsApiService = useTrainedModelsApiService(); - const [indexPattern, setIndexPattern] = useState(undefined); + const [indexPattern, setIndexPattern] = useState(undefined); const [indexPatternErrorMessage, setIndexPatternErrorMessage] = useState( undefined ); @@ -99,7 +99,7 @@ export const useResultsViewConfig = (jobId: string) => { ? jobConfigUpdate.dest.index[0] : jobConfigUpdate.dest.index; const destIndexPatternId = getIndexPatternIdFromName(destIndex) || destIndex; - let indexP: IndexPattern | undefined; + let indexP: DataView | undefined; try { indexP = await mlContext.indexPatterns.get(destIndexPatternId); diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts index 60a5a548c8621..f3779e1968985 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts @@ -11,7 +11,7 @@ import { estypes } from '@elastic/elasticsearch'; import { EuiDataGridColumn } from '@elastic/eui'; import { CoreSetup } from 'src/core/public'; -import { IndexPattern } from '../../../../../../../../../src/plugins/data/public'; +import type { DataView } from '../../../../../../../../../src/plugins/data_views/public'; import { isRuntimeMappings } from '../../../../../../common/util/runtime_field_utils'; import { RuntimeMappings } from '../../../../../../common/types/fields'; import { DEFAULT_SAMPLER_SHARD_SIZE } from '../../../../../../common/constants/field_histograms'; @@ -52,13 +52,14 @@ function getRuntimeFieldColumns(runtimeMappings: RuntimeMappings) { }); } -function getIndexPatternColumns(indexPattern: IndexPattern, fieldsFilter: string[]) { +function getIndexPatternColumns(indexPattern: DataView, fieldsFilter: string[]) { const { fields } = newJobCapsServiceAnalytics; return fields .filter((field) => fieldsFilter.includes(field.name)) .map((field) => { const schema = + // @ts-expect-error field is not DataViewField getDataGridSchemaFromESFieldType(field.type) || getDataGridSchemaFromKibanaFieldType(field); return { @@ -71,7 +72,7 @@ function getIndexPatternColumns(indexPattern: IndexPattern, fieldsFilter: string } export const useIndexData = ( - indexPattern: IndexPattern, + indexPattern: DataView, query: Record | undefined, toastNotifications: CoreSetup['notifications']['toasts'], runtimeMappings?: RuntimeMappings diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/expandable_section/expandable_section_results.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/expandable_section/expandable_section_results.tsx index d67473d9d3220..2c2df0cd3d905 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/expandable_section/expandable_section_results.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/expandable_section/expandable_section_results.tsx @@ -12,7 +12,7 @@ import { FormattedMessage } from '@kbn/i18n/react'; import { EuiDataGridColumn, EuiSpacer, EuiText } from '@elastic/eui'; -import { IndexPattern } from '../../../../../../../../../../src/plugins/data/public'; +import type { DataView } from '../../../../../../../../../../src/plugins/data_views/public'; import { isClassificationAnalysis, @@ -104,7 +104,7 @@ const getResultsSectionHeaderItems = ( interface ExpandableSectionResultsProps { colorRange?: ReturnType; indexData: UseIndexDataReturnType; - indexPattern?: IndexPattern; + indexPattern?: DataView; jobConfig?: DataFrameAnalyticsConfig; needsDestIndexPattern: boolean; searchQuery: SavedSearchQuery; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_query_bar/exploration_query_bar.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_query_bar/exploration_query_bar.tsx index 1a5f1bad997e2..3639836c6be01 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_query_bar/exploration_query_bar.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_query_bar/exploration_query_bar.tsx @@ -13,7 +13,7 @@ import { debounce } from 'lodash'; import { fromKueryExpression, luceneStringToDsl, toElasticsearchQuery } from '@kbn/es-query'; import { estypes } from '@elastic/elasticsearch'; import { Dictionary } from '../../../../../../../common/types/common'; -import { IIndexPattern } from '../../../../../../../../../../src/plugins/data/common'; +import { DataView } from '../../../../../../../../../../src/plugins/data_views/common'; import { Query, QueryStringInput } from '../../../../../../../../../../src/plugins/data/public'; import { @@ -29,7 +29,7 @@ interface ErrorMessage { } export interface ExplorationQueryBarProps { - indexPattern: IIndexPattern; + indexPattern: DataView; setSearchQuery: (update: { queryString: string; query?: SavedSearchQuery; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/exploration_results_table.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/exploration_results_table.tsx index 416d2f8b29d3b..41c434c7160cf 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/exploration_results_table.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/exploration_results_table.tsx @@ -7,7 +7,7 @@ import React, { FC } from 'react'; -import { IndexPattern } from '../../../../../../../../../../src/plugins/data/public'; +import type { DataView } from '../../../../../../../../../../src/plugins/data_views/public'; import { getToastNotifications } from '../../../../../util/dependency_cache'; import { useMlKibana } from '../../../../../contexts/kibana'; @@ -22,7 +22,7 @@ import { ExpandableSectionResults } from '../expandable_section'; import { useExplorationResults } from './use_exploration_results'; interface Props { - indexPattern: IndexPattern; + indexPattern: DataView; jobConfig: DataFrameAnalyticsConfig; jobStatus?: DataFrameTaskStateType; needsDestIndexPattern: boolean; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/use_exploration_results.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/use_exploration_results.ts index 02e3f0abac4be..6e0d513a35b9a 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/use_exploration_results.ts +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/use_exploration_results.ts @@ -13,7 +13,7 @@ import { CoreSetup } from 'src/core/public'; import { i18n } from '@kbn/i18n'; import { MlApiServices } from '../../../../../services/ml_api_service'; -import { IndexPattern } from '../../../../../../../../../../src/plugins/data/public'; +import type { DataView } from '../../../../../../../../../../src/plugins/data_views/public'; import { DataLoader } from '../../../../../datavisualizer/index_based/data_loader'; @@ -41,7 +41,7 @@ import { FeatureImportanceBaseline } from '../../../../../../../common/types/fea import { useExplorationDataGrid } from './use_exploration_data_grid'; export const useExplorationResults = ( - indexPattern: IndexPattern | undefined, + indexPattern: DataView | undefined, jobConfig: DataFrameAnalyticsConfig | undefined, searchQuery: SavedSearchQuery, toastNotifications: CoreSetup['notifications']['toasts'], diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts index d630fedc72d3f..d0f048ac02606 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts @@ -9,7 +9,7 @@ import { useEffect, useMemo } from 'react'; import { EuiDataGridColumn } from '@elastic/eui'; -import { IndexPattern } from '../../../../../../../../../../src/plugins/data/public'; +import type { DataView } from '../../../../../../../../../../src/plugins/data_views/public'; import { DataLoader } from '../../../../../datavisualizer/index_based/data_loader'; @@ -41,7 +41,7 @@ import { getFeatureCount, getOutlierScoreFieldName } from './common'; import { useExplorationDataGrid } from '../exploration_results_table/use_exploration_data_grid'; export const useOutlierData = ( - indexPattern: IndexPattern | undefined, + indexPattern: DataView | undefined, jobConfig: DataFrameAnalyticsConfig | undefined, searchQuery: SavedSearchQuery ): UseIndexDataReturnType => { diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_clone/clone_action_name.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_clone/clone_action_name.tsx index a3f18801b88f9..8ef743d2eea9f 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_clone/clone_action_name.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_clone/clone_action_name.tsx @@ -9,7 +9,6 @@ import { EuiToolTip } from '@elastic/eui'; import React, { FC } from 'react'; import { cloneDeep, isEqual } from 'lodash'; import { i18n } from '@kbn/i18n'; -import { IIndexPattern } from 'src/plugins/data/common'; import { DeepReadonly } from '../../../../../../../common/types/common'; import { DataFrameAnalyticsConfig, isOutlierAnalysis } from '../../../../common'; import { isClassificationAnalysis, isRegressionAnalysis } from '../../../../common/analytics'; @@ -401,13 +400,11 @@ export const useNavigateToWizardWithClonedJob = () => { const { services: { notifications: { toasts }, - savedObjects, + data: { dataViews }, }, } = useMlKibana(); const navigateToPath = useNavigateToPath(); - const savedObjectsClient = savedObjects.client; - return async (item: Pick) => { const sourceIndex = Array.isArray(item.config.source.index) ? item.config.source.index.join(',') @@ -415,19 +412,9 @@ export const useNavigateToWizardWithClonedJob = () => { let sourceIndexId; try { - const response = await savedObjectsClient.find({ - type: 'index-pattern', - perPage: 10, - search: `"${sourceIndex}"`, - searchFields: ['title'], - fields: ['title'], - }); - - const ip = response.savedObjects.find( - (obj) => obj.attributes.title.toLowerCase() === sourceIndex.toLowerCase() - ); - if (ip !== undefined) { - sourceIndexId = ip.id; + const dv = (await dataViews.find(sourceIndex)).find(({ title }) => title === sourceIndex); + if (dv !== undefined) { + sourceIndexId = dv.id; } else { toasts.addDanger( i18n.translate('xpack.ml.dataframe.analyticsList.noSourceIndexPatternForClone', { diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_delete/delete_action_name.test.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_delete/delete_action_name.test.tsx index 6b26e3823d2ef..ad6a59bf01c0e 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_delete/delete_action_name.test.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_delete/delete_action_name.test.tsx @@ -30,7 +30,7 @@ jest.mock('../../../../../../application/util/dependency_cache', () => ({ jest.mock('../../../../../contexts/kibana', () => ({ useMlKibana: () => ({ - services: mockCoreServices.createStart(), + services: { ...mockCoreServices.createStart(), data: { data_view: { find: jest.fn() } } }, }), useNotifications: () => { return { diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_delete/use_delete_action.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_delete/use_delete_action.tsx index 91871015d2add..0d2025c0d049a 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_delete/use_delete_action.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_delete/use_delete_action.tsx @@ -8,9 +8,6 @@ import React, { useEffect, useMemo, useState } from 'react'; import { i18n } from '@kbn/i18n'; - -import { IIndexPattern } from 'src/plugins/data/common'; - import { extractErrorMessage } from '../../../../../../../common/util/errors'; import { useMlKibana } from '../../../../../contexts/kibana'; @@ -48,8 +45,9 @@ export const useDeleteAction = (canDeleteDataFrameAnalytics: boolean) => { const [indexPatternExists, setIndexPatternExists] = useState(false); const [isLoading, setIsLoading] = useState(false); - const { savedObjects } = useMlKibana().services; - const savedObjectsClient = savedObjects.client; + const { + data: { dataViews }, + } = useMlKibana().services; const indexName = item?.config.dest.index ?? ''; @@ -57,17 +55,8 @@ export const useDeleteAction = (canDeleteDataFrameAnalytics: boolean) => { const checkIndexPatternExists = async () => { try { - const response = await savedObjectsClient.find({ - type: 'index-pattern', - perPage: 10, - search: `"${indexName}"`, - searchFields: ['title'], - fields: ['title'], - }); - const ip = response.savedObjects.find( - (obj) => obj.attributes.title.toLowerCase() === indexName.toLowerCase() - ); - if (ip !== undefined) { + const dv = (await dataViews.find(indexName)).find(({ title }) => title === indexName); + if (dv !== undefined) { setIndexPatternExists(true); } else { setIndexPatternExists(false); diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/source_selection/source_selection.test.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/source_selection/source_selection.test.tsx index 7e90a4e3ed44a..6e663318d2dc6 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/source_selection/source_selection.test.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/source_selection/source_selection.test.tsx @@ -87,6 +87,7 @@ jest.mock('../../../../../util/index_utils', () => { async (id: string): Promise => { return { indexPattern: { + // @ts-expect-error fields should not be empty fields: [], title: id === 'the-remote-saved-search-id' diff --git a/x-pack/plugins/ml/public/application/datavisualizer/index_based/data_loader/data_loader.ts b/x-pack/plugins/ml/public/application/datavisualizer/index_based/data_loader/data_loader.ts index a5fabc12c83df..1dccd54f68a38 100644 --- a/x-pack/plugins/ml/public/application/datavisualizer/index_based/data_loader/data_loader.ts +++ b/x-pack/plugins/ml/public/application/datavisualizer/index_based/data_loader/data_loader.ts @@ -7,7 +7,7 @@ import { CoreSetup } from 'src/core/public'; -import { IndexPattern } from '../../../../../../../../src/plugins/data/public'; +import type { DataView } from '../../../../../../../../src/plugins/data_views/public'; import { SavedSearchQuery } from '../../../contexts/ml'; import { OMIT_FIELDS } from '../../../../../common/constants/field_types'; @@ -22,15 +22,12 @@ import { RuntimeMappings } from '../../../../../common/types/fields'; const MAX_EXAMPLES_DEFAULT: number = 10; export class DataLoader { - private _indexPattern: IndexPattern; + private _indexPattern: DataView; private _runtimeMappings: RuntimeMappings; private _indexPatternTitle: IndexPatternTitle = ''; private _maxExamples: number = MAX_EXAMPLES_DEFAULT; - constructor( - indexPattern: IndexPattern, - toastNotifications?: CoreSetup['notifications']['toasts'] - ) { + constructor(indexPattern: DataView, toastNotifications?: CoreSetup['notifications']['toasts']) { this._indexPattern = indexPattern; this._runtimeMappings = this._indexPattern.getComputedFields().runtimeFields as RuntimeMappings; this._indexPatternTitle = indexPattern.title; diff --git a/x-pack/plugins/ml/public/application/explorer/components/explorer_query_bar/explorer_query_bar.tsx b/x-pack/plugins/ml/public/application/explorer/components/explorer_query_bar/explorer_query_bar.tsx index 6e8b5f762558f..f57d2c1b01d98 100644 --- a/x-pack/plugins/ml/public/application/explorer/components/explorer_query_bar/explorer_query_bar.tsx +++ b/x-pack/plugins/ml/public/application/explorer/components/explorer_query_bar/explorer_query_bar.tsx @@ -10,7 +10,7 @@ import { EuiCode, EuiInputPopover } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { fromKueryExpression, luceneStringToDsl, toElasticsearchQuery } from '@kbn/es-query'; import { Query, QueryStringInput } from '../../../../../../../../src/plugins/data/public'; -import { IIndexPattern } from '../../../../../../../../src/plugins/data/common'; +import { DataView } from '../../../../../../../../src/plugins/data_views/common'; import { SEARCH_QUERY_LANGUAGE, ErrorMessage } from '../../../../../common/constants/search'; import { explorerService } from '../../explorer_dashboard_service'; import { InfluencersFilterQuery } from '../../../../../common/types/es_client'; @@ -24,7 +24,7 @@ export function getKqlQueryValues({ }: { inputString: string | { [key: string]: any }; queryLanguage: string; - indexPattern: IIndexPattern; + indexPattern: DataView; }): { clearSettings: boolean; settings: any } { let influencersFilterQuery: InfluencersFilterQuery = {}; const filteredFields: string[] = []; @@ -89,7 +89,7 @@ function getInitSearchInputState({ interface ExplorerQueryBarProps { filterActive: boolean; filterPlaceHolder: string; - indexPattern: IIndexPattern; + indexPattern: DataView; queryString?: string; updateLanguage: (language: string) => void; } diff --git a/x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/editor.test.tsx b/x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/editor.test.tsx index f6769abb610b8..11e4c14cd4ab2 100644 --- a/x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/editor.test.tsx +++ b/x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/editor.test.tsx @@ -16,7 +16,7 @@ import React from 'react'; import { CustomUrlEditor } from './editor'; import { TIME_RANGE_TYPE, URL_TYPE } from './constants'; import { CustomUrlSettings } from './utils'; -import { IIndexPattern } from '../../../../../../../../src/plugins/data/common'; +import { DataView } from '../../../../../../../../src/plugins/data_views/common'; function prepareTest(customUrl: CustomUrlSettings, setEditCustomUrlFn: (url: UrlConfig) => void) { const savedCustomUrls = [ @@ -50,7 +50,7 @@ function prepareTest(customUrl: CustomUrlSettings, setEditCustomUrlFn: (url: Url const indexPatterns = [ { id: 'pattern1', title: 'Index Pattern 1' }, { id: 'pattern2', title: 'Index Pattern 2' }, - ] as IIndexPattern[]; + ] as DataView[]; const queryEntityFieldNames = ['airline']; diff --git a/x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/editor.tsx b/x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/editor.tsx index e22eb1484df2e..7dd779ead7892 100644 --- a/x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/editor.tsx +++ b/x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/editor.tsx @@ -29,7 +29,7 @@ import { isValidLabel } from '../../../util/custom_url_utils'; import { TIME_RANGE_TYPE, URL_TYPE } from './constants'; import { UrlConfig } from '../../../../../common/types/custom_urls'; -import { IIndexPattern } from '../../../../../../../../src/plugins/data/common'; +import { DataView } from '../../../../../../../../src/plugins/data_views/common'; function getLinkToOptions() { return [ @@ -59,7 +59,7 @@ interface CustomUrlEditorProps { setEditCustomUrl: (url: any) => void; savedCustomUrls: UrlConfig[]; dashboards: any[]; - indexPatterns: IIndexPattern[]; + indexPatterns: DataView[]; queryEntityFieldNames: string[]; } diff --git a/x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/utils.d.ts b/x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/utils.d.ts index 87000cdabd913..1f815759c6242 100644 --- a/x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/utils.d.ts +++ b/x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/utils.d.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { IIndexPattern } from 'src/plugins/data/common'; +import { DataView } from '../../../../../../../../src/plugins/data_views/common'; import { UrlConfig } from '../../../../../common/types/custom_urls'; import { Job } from '../../../../../common/types/anomaly_detection_jobs'; import { TimeRangeType } from './constants'; @@ -34,7 +34,7 @@ export function isValidCustomUrlSettingsTimeRange(timeRangeSettings: any): boole export function getNewCustomUrlDefaults( job: Job, dashboards: any[], - indexPatterns: IIndexPattern[] + indexPatterns: DataView[] ): CustomUrlSettings; export function getQueryEntityFieldNames(job: Job): string[]; export function isValidCustomUrlSettings( diff --git a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/edit_utils.d.ts b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/edit_utils.d.ts index 3a14715bca4b9..32e99e3e433e0 100644 --- a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/edit_utils.d.ts +++ b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/edit_utils.d.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { IIndexPattern } from 'src/plugins/data/common'; +import type { DataView } from 'src/plugins/data_views/common'; export function loadSavedDashboards(maxNumber: number): Promise; -export function loadIndexPatterns(maxNumber: number): Promise; +export function loadIndexPatterns(maxNumber: number): Promise; diff --git a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/edit_utils.js b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/edit_utils.js index 8ce92ffa38479..ad192a738174e 100644 --- a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/edit_utils.js +++ b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/edit_utils.js @@ -8,7 +8,7 @@ import { difference } from 'lodash'; import { getNewJobLimits } from '../../../../services/ml_server_info'; import { processCreatedBy } from '../../../../../../common/util/job_utils'; -import { getSavedObjectsClient } from '../../../../util/dependency_cache'; +import { getSavedObjectsClient, getDataViews } from '../../../../util/dependency_cache'; import { ml } from '../../../../services/ml_api_service'; export function saveJob(job, newJobData, finish) { @@ -107,26 +107,12 @@ export function loadIndexPatterns(maxNumber) { // TODO - amend loadIndexPatterns in index_utils.js to do the request, // without needing an Angular Provider. return new Promise((resolve, reject) => { - const savedObjectsClient = getSavedObjectsClient(); - savedObjectsClient - .find({ - type: 'index-pattern', - fields: ['title'], - perPage: maxNumber, - }) - .then((resp) => { - const savedObjects = resp.savedObjects; - if (savedObjects !== undefined) { - const indexPatterns = savedObjects.map((savedObj) => { - return { id: savedObj.id, title: savedObj.attributes.title }; - }); - - indexPatterns.sort((dash1, dash2) => { - return dash1.title.localeCompare(dash2.title); - }); - - resolve(indexPatterns); - } + const dataViewsContract = getDataViews(); + dataViewsContract + .find('*', maxNumber) + .then((dataViews) => { + const sortedDataViews = dataViews.sort((a, b) => a.title.localeCompare(b.title)); + resolve(sortedDataViews); }) .catch((resp) => { reject(resp); diff --git a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/tabs/custom_urls.tsx b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/tabs/custom_urls.tsx index ce93080558016..46ac1dbd01b7f 100644 --- a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/tabs/custom_urls.tsx +++ b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/edit_job_flyout/tabs/custom_urls.tsx @@ -37,7 +37,7 @@ import { loadSavedDashboards, loadIndexPatterns } from '../edit_utils'; import { openCustomUrlWindow } from '../../../../../util/custom_url_utils'; import { Job } from '../../../../../../../common/types/anomaly_detection_jobs'; import { UrlConfig } from '../../../../../../../common/types/custom_urls'; -import { IIndexPattern } from '../../../../../../../../../../src/plugins/data/common'; +import { DataView } from '../../../../../../../../../../src/plugins/data_views/common'; import { MlKibanaReactContextValue } from '../../../../../contexts/kibana'; const MAX_NUMBER_DASHBOARDS = 1000; @@ -54,7 +54,7 @@ interface CustomUrlsProps { interface CustomUrlsState { customUrls: UrlConfig[]; dashboards: any[]; - indexPatterns: IIndexPattern[]; + indexPatterns: DataView[]; queryEntityFieldNames: string[]; editorOpen: boolean; editorSettings?: CustomUrlSettings; diff --git a/x-pack/plugins/ml/public/application/jobs/new_job/common/chart_loader/chart_loader.ts b/x-pack/plugins/ml/public/application/jobs/new_job/common/chart_loader/chart_loader.ts index 9c8f34260def0..5898a9dec1ad3 100644 --- a/x-pack/plugins/ml/public/application/jobs/new_job/common/chart_loader/chart_loader.ts +++ b/x-pack/plugins/ml/public/application/jobs/new_job/common/chart_loader/chart_loader.ts @@ -19,7 +19,7 @@ import { ml } from '../../../../services/ml_api_service'; import { mlResultsService } from '../../../../services/results_service'; import { getCategoryFields as getCategoryFieldsOrig } from './searches'; import { aggFieldPairsCanBeCharted } from '../job_creator/util/general'; -import { IndexPattern } from '../../../../../../../../../src/plugins/data/common'; +import type { DataView } from '../../../../../../../../../src/plugins/data_views/common'; type DetectorIndex = number; export interface LineChartPoint { @@ -41,7 +41,7 @@ export class ChartLoader { private _timeFieldName: string = ''; private _query: object = {}; - constructor(indexPattern: IndexPattern, query: object) { + constructor(indexPattern: DataView, query: object) { this._indexPatternTitle = indexPattern.title; this._query = query; diff --git a/x-pack/plugins/ml/public/application/jobs/new_job/common/index_pattern_context.ts b/x-pack/plugins/ml/public/application/jobs/new_job/common/index_pattern_context.ts index cb842937f1ede..9667465eb210d 100644 --- a/x-pack/plugins/ml/public/application/jobs/new_job/common/index_pattern_context.ts +++ b/x-pack/plugins/ml/public/application/jobs/new_job/common/index_pattern_context.ts @@ -7,7 +7,7 @@ import React from 'react'; -import { IIndexPattern } from 'src/plugins/data/public'; +import { DataView } from '../../../../../../../../src/plugins/data_views/common'; -export type IndexPatternContextValue = IIndexPattern | null; +export type IndexPatternContextValue = DataView | null; export const IndexPatternContext = React.createContext(null); diff --git a/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/advanced_job_creator.ts b/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/advanced_job_creator.ts index 35847839b02a0..3d8c34e0e5967 100644 --- a/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/advanced_job_creator.ts +++ b/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/advanced_job_creator.ts @@ -21,7 +21,7 @@ import { JOB_TYPE } from '../../../../../../common/constants/new_job'; import { getRichDetectors } from './util/general'; import { isValidJson } from '../../../../../../common/util/validation_utils'; import { ml } from '../../../../services/ml_api_service'; -import { IndexPattern } from '../../../../../../../../../src/plugins/data/public'; +import type { DataView } from '../../../../../../../../../src/plugins/data_views/public'; export interface RichDetector { agg: Aggregation | null; @@ -40,11 +40,7 @@ export class AdvancedJobCreator extends JobCreator { private _richDetectors: RichDetector[] = []; private _queryString: string; - constructor( - indexPattern: IndexPattern, - savedSearch: SavedSearchSavedObject | null, - query: object - ) { + constructor(indexPattern: DataView, savedSearch: SavedSearchSavedObject | null, query: object) { super(indexPattern, savedSearch, query); this._queryString = JSON.stringify(this._datafeed_config.query); diff --git a/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/categorization_job_creator.ts b/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/categorization_job_creator.ts index 128a541ff9f96..b46d3b539b44a 100644 --- a/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/categorization_job_creator.ts +++ b/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/categorization_job_creator.ts @@ -6,7 +6,7 @@ */ import { isEqual } from 'lodash'; -import { IndexPattern } from '../../../../../../../../../src/plugins/data/public'; +import type { DataView } from '../../../../../../../../../src/plugins/data_views/public'; import { SavedSearchSavedObject } from '../../../../../../common/types/kibana'; import { JobCreator } from './job_creator'; import { Field, Aggregation, mlCategory } from '../../../../../../common/types/fields'; @@ -47,11 +47,7 @@ export class CategorizationJobCreator extends JobCreator { private _partitionFieldName: string | null = null; private _ccsVersionFailure: boolean = false; - constructor( - indexPattern: IndexPattern, - savedSearch: SavedSearchSavedObject | null, - query: object - ) { + constructor(indexPattern: DataView, savedSearch: SavedSearchSavedObject | null, query: object) { super(indexPattern, savedSearch, query); this.createdBy = CREATED_BY_LABEL.CATEGORIZATION; this._examplesLoader = new CategorizationExamplesLoader(this, indexPattern, query); diff --git a/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts b/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts index e6cfe52933617..a44b4bdef60c4 100644 --- a/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts +++ b/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts @@ -40,13 +40,13 @@ import { filterRuntimeMappings } from './util/filter_runtime_mappings'; import { parseInterval } from '../../../../../../common/util/parse_interval'; import { Calendar } from '../../../../../../common/types/calendars'; import { mlCalendarService } from '../../../../services/calendar_service'; -import { IndexPattern } from '../../../../../../../../../src/plugins/data/public'; +import type { DataView } from '../../../../../../../../../src/plugins/data_views/public'; import { getDatafeedAggregations } from '../../../../../../common/util/datafeed_utils'; import { getFirstKeyInObject } from '../../../../../../common/util/object_utils'; export class JobCreator { protected _type: JOB_TYPE = JOB_TYPE.SINGLE_METRIC; - protected _indexPattern: IndexPattern; + protected _indexPattern: DataView; protected _savedSearch: SavedSearchSavedObject | null; protected _indexPatternTitle: IndexPatternTitle = ''; protected _job_config: Job; @@ -74,11 +74,7 @@ export class JobCreator { protected _wizardInitialized$ = new BehaviorSubject(false); public wizardInitialized$ = this._wizardInitialized$.asObservable(); - constructor( - indexPattern: IndexPattern, - savedSearch: SavedSearchSavedObject | null, - query: object - ) { + constructor(indexPattern: DataView, savedSearch: SavedSearchSavedObject | null, query: object) { this._indexPattern = indexPattern; this._savedSearch = savedSearch; this._indexPatternTitle = indexPattern.title; diff --git a/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator_factory.ts b/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator_factory.ts index 8c77ae5def102..6af3df888514c 100644 --- a/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator_factory.ts +++ b/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator_factory.ts @@ -10,7 +10,7 @@ import { SingleMetricJobCreator } from './single_metric_job_creator'; import { MultiMetricJobCreator } from './multi_metric_job_creator'; import { PopulationJobCreator } from './population_job_creator'; import { AdvancedJobCreator } from './advanced_job_creator'; -import { IndexPattern } from '../../../../../../../../../src/plugins/data/public'; +import type { DataView } from '../../../../../../../../../src/plugins/data_views/public'; import { CategorizationJobCreator } from './categorization_job_creator'; import { RareJobCreator } from './rare_job_creator'; @@ -18,7 +18,7 @@ import { JOB_TYPE } from '../../../../../../common/constants/new_job'; export const jobCreatorFactory = (jobType: JOB_TYPE) => - (indexPattern: IndexPattern, savedSearch: SavedSearchSavedObject | null, query: object) => { + (indexPattern: DataView, savedSearch: SavedSearchSavedObject | null, query: object) => { let jc; switch (jobType) { case JOB_TYPE.SINGLE_METRIC: diff --git a/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/multi_metric_job_creator.ts b/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/multi_metric_job_creator.ts index f63aa1b569a2c..12543f34003d5 100644 --- a/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/multi_metric_job_creator.ts +++ b/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/multi_metric_job_creator.ts @@ -17,7 +17,7 @@ import { Job, Datafeed, Detector } from '../../../../../../common/types/anomaly_ import { createBasicDetector } from './util/default_configs'; import { JOB_TYPE, CREATED_BY_LABEL } from '../../../../../../common/constants/new_job'; import { getRichDetectors } from './util/general'; -import { IndexPattern } from '../../../../../../../../../src/plugins/data/public'; +import type { DataView } from '../../../../../../../../../src/plugins/data_views/public'; import { isSparseDataJob } from './util/general'; export class MultiMetricJobCreator extends JobCreator { @@ -27,11 +27,7 @@ export class MultiMetricJobCreator extends JobCreator { protected _type: JOB_TYPE = JOB_TYPE.MULTI_METRIC; - constructor( - indexPattern: IndexPattern, - savedSearch: SavedSearchSavedObject | null, - query: object - ) { + constructor(indexPattern: DataView, savedSearch: SavedSearchSavedObject | null, query: object) { super(indexPattern, savedSearch, query); this.createdBy = CREATED_BY_LABEL.MULTI_METRIC; this._wizardInitialized$.next(true); diff --git a/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/population_job_creator.ts b/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/population_job_creator.ts index 24b3192231211..7f001ce334462 100644 --- a/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/population_job_creator.ts +++ b/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/population_job_creator.ts @@ -17,7 +17,7 @@ import { Job, Datafeed, Detector } from '../../../../../../common/types/anomaly_ import { createBasicDetector } from './util/default_configs'; import { JOB_TYPE, CREATED_BY_LABEL } from '../../../../../../common/constants/new_job'; import { getRichDetectors } from './util/general'; -import { IndexPattern } from '../../../../../../../../../src/plugins/data/public'; +import type { DataView } from '../../../../../../../../../src/plugins/data_views/public'; export class PopulationJobCreator extends JobCreator { // a population job has one overall over (split) field, which is the same for all detectors @@ -26,11 +26,7 @@ export class PopulationJobCreator extends JobCreator { private _byFields: SplitField[] = []; protected _type: JOB_TYPE = JOB_TYPE.POPULATION; - constructor( - indexPattern: IndexPattern, - savedSearch: SavedSearchSavedObject | null, - query: object - ) { + constructor(indexPattern: DataView, savedSearch: SavedSearchSavedObject | null, query: object) { super(indexPattern, savedSearch, query); this.createdBy = CREATED_BY_LABEL.POPULATION; this._wizardInitialized$.next(true); diff --git a/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/rare_job_creator.ts b/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/rare_job_creator.ts index 73050dc4b7834..8973aa655b83d 100644 --- a/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/rare_job_creator.ts +++ b/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/rare_job_creator.ts @@ -11,7 +11,7 @@ import { Field, SplitField, Aggregation } from '../../../../../../common/types/f import { Job, Datafeed, Detector } from '../../../../../../common/types/anomaly_detection_jobs'; import { JOB_TYPE, CREATED_BY_LABEL } from '../../../../../../common/constants/new_job'; import { getRichDetectors } from './util/general'; -import { IndexPattern } from '../../../../../../../../../src/plugins/data/public'; +import type { DataView } from '../../../../../../../../../src/plugins/data_views/public'; import { isSparseDataJob } from './util/general'; import { ML_JOB_AGGREGATION } from '../../../../../../common/constants/aggregation_types'; @@ -26,11 +26,7 @@ export class RareJobCreator extends JobCreator { private _rareAgg: Aggregation; private _freqRareAgg: Aggregation; - constructor( - indexPattern: IndexPattern, - savedSearch: SavedSearchSavedObject | null, - query: object - ) { + constructor(indexPattern: DataView, savedSearch: SavedSearchSavedObject | null, query: object) { super(indexPattern, savedSearch, query); this.createdBy = CREATED_BY_LABEL.RARE; this._wizardInitialized$.next(true); diff --git a/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/single_metric_job_creator.ts b/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/single_metric_job_creator.ts index 57ff76979ea14..9c4fd52888c82 100644 --- a/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/single_metric_job_creator.ts +++ b/x-pack/plugins/ml/public/application/jobs/new_job/common/job_creator/single_metric_job_creator.ts @@ -22,17 +22,13 @@ import { } from '../../../../../../common/constants/aggregation_types'; import { JOB_TYPE, CREATED_BY_LABEL } from '../../../../../../common/constants/new_job'; import { getRichDetectors } from './util/general'; -import { IndexPattern } from '../../../../../../../../../src/plugins/data/public'; +import type { DataView } from '../../../../../../../../../src/plugins/data_views/public'; import { isSparseDataJob } from './util/general'; export class SingleMetricJobCreator extends JobCreator { protected _type: JOB_TYPE = JOB_TYPE.SINGLE_METRIC; - constructor( - indexPattern: IndexPattern, - savedSearch: SavedSearchSavedObject | null, - query: object - ) { + constructor(indexPattern: DataView, savedSearch: SavedSearchSavedObject | null, query: object) { super(indexPattern, savedSearch, query); this.createdBy = CREATED_BY_LABEL.SINGLE_METRIC; this._wizardInitialized$.next(true); diff --git a/x-pack/plugins/ml/public/application/jobs/new_job/common/results_loader/categorization_examples_loader.ts b/x-pack/plugins/ml/public/application/jobs/new_job/common/results_loader/categorization_examples_loader.ts index 641eda3dbf3e8..6e65bde879379 100644 --- a/x-pack/plugins/ml/public/application/jobs/new_job/common/results_loader/categorization_examples_loader.ts +++ b/x-pack/plugins/ml/public/application/jobs/new_job/common/results_loader/categorization_examples_loader.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { IndexPattern } from '../../../../../../../../../src/plugins/data/public'; +import type { DataView } from '../../../../../../../../../src/plugins/data_views/public'; import { IndexPatternTitle } from '../../../../../../common/types/kibana'; import { CategorizationJobCreator } from '../job_creator'; import { ml } from '../../../../services/ml_api_service'; @@ -20,7 +20,7 @@ export class CategorizationExamplesLoader { private _timeFieldName: string = ''; private _query: object = {}; - constructor(jobCreator: CategorizationJobCreator, indexPattern: IndexPattern, query: object) { + constructor(jobCreator: CategorizationJobCreator, indexPattern: DataView, query: object) { this._jobCreator = jobCreator; this._indexPatternTitle = indexPattern.title; this._query = query; diff --git a/x-pack/plugins/ml/public/application/jobs/new_job/pages/index_or_search/preconfigured_job_redirect.ts b/x-pack/plugins/ml/public/application/jobs/new_job/pages/index_or_search/preconfigured_job_redirect.ts index ba750795e4f8f..03428bd47e490 100644 --- a/x-pack/plugins/ml/public/application/jobs/new_job/pages/index_or_search/preconfigured_job_redirect.ts +++ b/x-pack/plugins/ml/public/application/jobs/new_job/pages/index_or_search/preconfigured_job_redirect.ts @@ -5,15 +5,15 @@ * 2.0. */ -import { ApplicationStart } from 'kibana/public'; -import { IndexPatternsContract } from '../../../../../../../../../src/plugins/data/public'; +import type { ApplicationStart } from 'kibana/public'; +import type { DataViewsContract } from '../../../../../../../../../src/plugins/data_views/public'; import { mlJobService } from '../../../../services/job_service'; import { loadIndexPatterns, getIndexPatternIdFromName } from '../../../../util/index_utils'; import { Datafeed, Job } from '../../../../../../common/types/anomaly_detection_jobs'; import { CREATED_BY_LABEL, JOB_TYPE } from '../../../../../../common/constants/new_job'; export async function preConfiguredJobRedirect( - indexPatterns: IndexPatternsContract, + indexPatterns: DataViewsContract, basePath: string, navigateToUrl: ApplicationStart['navigateToUrl'] ) { diff --git a/x-pack/plugins/ml/public/application/jobs/new_job/utils/new_job_utils.test.ts b/x-pack/plugins/ml/public/application/jobs/new_job/utils/new_job_utils.test.ts index 3f19f3137934e..12beda414bbea 100644 --- a/x-pack/plugins/ml/public/application/jobs/new_job/utils/new_job_utils.test.ts +++ b/x-pack/plugins/ml/public/application/jobs/new_job/utils/new_job_utils.test.ts @@ -6,7 +6,7 @@ */ import { IUiSettingsClient } from 'kibana/public'; -import { IIndexPattern } from '../../../../../../../../src/plugins/data/common'; +import { DataView } from '../../../../../../../../src/plugins/data_views/common'; import { SavedSearchSavedObject } from '../../../../../common/types/kibana'; import { createSearchItems } from './new_job_utils'; @@ -14,7 +14,7 @@ describe('createSearchItems', () => { const kibanaConfig = {} as IUiSettingsClient; const indexPattern = { fields: [], - } as unknown as IIndexPattern; + } as unknown as DataView; let savedSearch = {} as unknown as SavedSearchSavedObject; beforeEach(() => { diff --git a/x-pack/plugins/ml/public/application/routing/resolvers.ts b/x-pack/plugins/ml/public/application/routing/resolvers.ts index f6364ecc6568f..3479005809efb 100644 --- a/x-pack/plugins/ml/public/application/routing/resolvers.ts +++ b/x-pack/plugins/ml/public/application/routing/resolvers.ts @@ -11,7 +11,7 @@ import { checkGetJobsCapabilitiesResolver } from '../capabilities/check_capabili import { getMlNodeCount } from '../ml_nodes_check/check_ml_nodes'; import { loadMlServerInfo } from '../services/ml_server_info'; -import { IndexPatternsContract } from '../../../../../../src/plugins/data/public'; +import type { DataViewsContract } from '../../../../../../src/plugins/data_views/public'; export interface Resolvers { [name: string]: () => Promise; @@ -21,7 +21,7 @@ export interface ResolverResults { } interface BasicResolverDependencies { - indexPatterns: IndexPatternsContract; + indexPatterns: DataViewsContract; redirectToMlAccessDeniedPage: () => Promise; } diff --git a/x-pack/plugins/ml/public/application/routing/router.tsx b/x-pack/plugins/ml/public/application/routing/router.tsx index c2129ef18df3a..847dcc1ae1107 100644 --- a/x-pack/plugins/ml/public/application/routing/router.tsx +++ b/x-pack/plugins/ml/public/application/routing/router.tsx @@ -9,9 +9,13 @@ import React, { useEffect, FC } from 'react'; import { useHistory, useLocation, Router, Route, RouteProps } from 'react-router-dom'; import { Location } from 'history'; -import { AppMountParameters, IUiSettingsClient, ChromeStart } from 'kibana/public'; -import { ChromeBreadcrumb } from 'kibana/public'; -import { IndexPatternsContract } from 'src/plugins/data/public'; +import type { + AppMountParameters, + IUiSettingsClient, + ChromeStart, + ChromeBreadcrumb, +} from 'kibana/public'; +import type { DataViewsContract } from 'src/plugins/data_views/public'; import { useMlKibana, useNavigateToPath } from '../contexts/kibana'; import { MlContext, MlContextValue } from '../contexts/ml'; @@ -39,7 +43,7 @@ export interface PageProps { interface PageDependencies { config: IUiSettingsClient; history: AppMountParameters['history']; - indexPatterns: IndexPatternsContract; + indexPatterns: DataViewsContract; setBreadcrumbs: ChromeStart['setBreadcrumbs']; redirectToMlAccessDeniedPage: () => Promise; } diff --git a/x-pack/plugins/ml/public/application/services/field_format_service.ts b/x-pack/plugins/ml/public/application/services/field_format_service.ts index 18b489682318e..fe6fc7751bb85 100644 --- a/x-pack/plugins/ml/public/application/services/field_format_service.ts +++ b/x-pack/plugins/ml/public/application/services/field_format_service.ts @@ -8,7 +8,7 @@ import { mlFunctionToESAggregation } from '../../../common/util/job_utils'; import { getIndexPatternById, getIndexPatternIdFromName } from '../util/index_utils'; import { mlJobService } from './job_service'; -import { IndexPattern } from '../../../../../../src/plugins/data/public'; +import type { DataView } from '../../../../../../src/plugins/data_views/public'; type FormatsByJobId = Record; type IndexPatternIdsByJob = Record; @@ -66,11 +66,7 @@ class FieldFormatService { // Utility for returning the FieldFormat from a full populated Kibana index pattern object // containing the list of fields by name with their formats. - getFieldFormatFromIndexPattern( - fullIndexPattern: IndexPattern, - fieldName: string, - esAggName: string - ) { + getFieldFormatFromIndexPattern(fullIndexPattern: DataView, fieldName: string, esAggName: string) { // Don't use the field formatter for distinct count detectors as // e.g. distinct_count(clientip) should be formatted as a count, not as an IP address. let fieldFormat; diff --git a/x-pack/plugins/ml/public/application/services/new_job_capabilities/load_new_job_capabilities.ts b/x-pack/plugins/ml/public/application/services/new_job_capabilities/load_new_job_capabilities.ts index d3b407c2bb65a..02b2e573f8c69 100644 --- a/x-pack/plugins/ml/public/application/services/new_job_capabilities/load_new_job_capabilities.ts +++ b/x-pack/plugins/ml/public/application/services/new_job_capabilities/load_new_job_capabilities.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { IIndexPattern, IndexPatternsContract } from '../../../../../../../src/plugins/data/public'; +import { DataView, DataViewsContract } from '../../../../../../../src/plugins/data_views/public'; import { getIndexPatternAndSavedSearch } from '../../util/index_utils'; import { JobType } from '../../../../common/types/saved_objects'; import { newJobCapsServiceAnalytics } from '../new_job_capabilities/new_job_capabilities_service_analytics'; @@ -19,7 +19,7 @@ export const DATA_FRAME_ANALYTICS = 'data-frame-analytics'; export function loadNewJobCapabilities( indexPatternId: string, savedSearchId: string, - indexPatterns: IndexPatternsContract, + indexPatterns: DataViewsContract, jobType: JobType ) { return new Promise(async (resolve, reject) => { @@ -29,7 +29,7 @@ export function loadNewJobCapabilities( if (indexPatternId !== undefined) { // index pattern is being used - const indexPattern: IIndexPattern = await indexPatterns.get(indexPatternId); + const indexPattern: DataView = await indexPatterns.get(indexPatternId); await serviceToUse.initializeFromIndexPattern(indexPattern); resolve(serviceToUse.newJobCaps); } else if (savedSearchId !== undefined) { diff --git a/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities._service.test.ts b/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities._service.test.ts index 8c515255927b4..49c8b08007d52 100644 --- a/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities._service.test.ts +++ b/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities._service.test.ts @@ -6,7 +6,7 @@ */ import { newJobCapsService } from './new_job_capabilities_service'; -import { IndexPattern } from '../../../../../../../src/plugins/data/public'; +import type { DataView } from '../../../../../../../src/plugins/data_views/public'; // there is magic happening here. starting the include name with `mock..` // ensures it can be lazily loaded by the jest.mock function below. @@ -23,7 +23,7 @@ jest.mock('../ml_api_service', () => ({ const indexPattern = { id: 'cloudwatch-*', title: 'cloudwatch-*', -} as unknown as IndexPattern; +} as unknown as DataView; describe('new_job_capabilities_service', () => { describe('cloudwatch newJobCaps()', () => { diff --git a/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts b/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts index c17f379355cea..45dc71ed6a6b9 100644 --- a/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts +++ b/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service.ts @@ -11,7 +11,8 @@ import { FieldId, EVENT_RATE_FIELD_ID, } from '../../../../common/types/fields'; -import { ES_FIELD_TYPES, IIndexPattern } from '../../../../../../../src/plugins/data/public'; +import { ES_FIELD_TYPES } from '../../../../../../../src/plugins/data/public'; +import { DataView } from '../../../../../../../src/plugins/data_views/public'; import { ml } from '../ml_api_service'; import { processTextAndKeywordFields, NewJobCapabilitiesServiceBase } from './new_job_capabilities'; @@ -36,7 +37,7 @@ class NewJobCapsService extends NewJobCapabilitiesServiceBase { } public async initializeFromIndexPattern( - indexPattern: IIndexPattern, + indexPattern: DataView, includeEventRateField = true, removeTextFields = true ) { diff --git a/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts b/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts index 3a362a88e40bb..f8f9ae6b2b0a3 100644 --- a/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts +++ b/x-pack/plugins/ml/public/application/services/new_job_capabilities/new_job_capabilities_service_analytics.ts @@ -6,7 +6,8 @@ */ import { Field, NewJobCapsResponse } from '../../../../common/types/fields'; -import { ES_FIELD_TYPES, IIndexPattern } from '../../../../../../../src/plugins/data/public'; +import { ES_FIELD_TYPES } from '../../../../../../../src/plugins/data/public'; +import { DataView } from '../../../../../../../src/plugins/data_views/public'; import { processTextAndKeywordFields, NewJobCapabilitiesServiceBase } from './new_job_capabilities'; import { ml } from '../ml_api_service'; @@ -42,7 +43,7 @@ export function removeNestedFieldChildren(resp: NewJobCapsResponse, indexPattern } class NewJobCapsServiceAnalytics extends NewJobCapabilitiesServiceBase { - public async initializeFromIndexPattern(indexPattern: IIndexPattern) { + public async initializeFromIndexPattern(indexPattern: DataView) { try { const resp: NewJobCapsResponse = await ml.dataFrameAnalytics.newJobCapsAnalytics( indexPattern.title, diff --git a/x-pack/plugins/ml/public/application/services/new_job_capabilities/remove_nested_field_children.test.ts b/x-pack/plugins/ml/public/application/services/new_job_capabilities/remove_nested_field_children.test.ts index eaf30d9894f60..ec2a2a1077a7f 100644 --- a/x-pack/plugins/ml/public/application/services/new_job_capabilities/remove_nested_field_children.test.ts +++ b/x-pack/plugins/ml/public/application/services/new_job_capabilities/remove_nested_field_children.test.ts @@ -6,7 +6,7 @@ */ import { removeNestedFieldChildren } from './new_job_capabilities_service_analytics'; -import { IndexPattern } from '../../../../../../../src/plugins/data/public'; +import type { DataView } from '../../../../../../../src/plugins/data_views/public'; // there is magic happening here. starting the include name with `mock..` // ensures it can be lazily loaded by the jest.mock function below. @@ -15,7 +15,7 @@ import nestedFieldIndexResponse from '../__mocks__/nested_field_index_response.j const indexPattern = { id: 'nested-field-index', title: 'nested-field-index', -} as unknown as IndexPattern; +} as unknown as DataView; describe('removeNestedFieldChildren', () => { describe('cloudwatch newJobCapsAnalytics()', () => { diff --git a/x-pack/plugins/ml/public/application/util/dependency_cache.ts b/x-pack/plugins/ml/public/application/util/dependency_cache.ts index 4a3194ed4113f..7b6b75677dddd 100644 --- a/x-pack/plugins/ml/public/application/util/dependency_cache.ts +++ b/x-pack/plugins/ml/public/application/util/dependency_cache.ts @@ -19,8 +19,9 @@ import type { ChromeRecentlyAccessed, IBasePath, } from 'kibana/public'; -import type { IndexPatternsContract, DataPublicPluginStart } from 'src/plugins/data/public'; +import type { DataPublicPluginStart } from 'src/plugins/data/public'; import type { SharePluginStart } from 'src/plugins/share/public'; +import type { DataViewsContract } from '../../../../../../src/plugins/data_views/public'; import type { SecurityPluginSetup } from '../../../../security/public'; import type { MapsStartApi } from '../../../../maps/public'; import type { DataVisualizerPluginStart } from '../../../../data_visualizer/public'; @@ -28,7 +29,7 @@ import type { DataVisualizerPluginStart } from '../../../../data_visualizer/publ export interface DependencyCache { timefilter: DataPublicPluginSetup['query']['timefilter'] | null; config: IUiSettingsClient | null; - indexPatterns: IndexPatternsContract | null; + indexPatterns: DataViewsContract | null; chrome: ChromeStart | null; docLinks: DocLinksStart | null; toastNotifications: ToastsStart | null; @@ -45,6 +46,7 @@ export interface DependencyCache { urlGenerators: SharePluginStart['urlGenerators'] | null; maps: MapsStartApi | null; dataVisualizer: DataVisualizerPluginStart | null; + dataViews: DataViewsContract | null; } const cache: DependencyCache = { @@ -67,6 +69,7 @@ const cache: DependencyCache = { urlGenerators: null, maps: null, dataVisualizer: null, + dataViews: null, }; export function setDependencyCache(deps: Partial) { @@ -88,6 +91,7 @@ export function setDependencyCache(deps: Partial) { cache.i18n = deps.i18n || null; cache.urlGenerators = deps.urlGenerators || null; cache.dataVisualizer = deps.dataVisualizer || null; + cache.dataViews = deps.dataViews || null; } export function getTimefilter() { @@ -208,6 +212,13 @@ export function getGetUrlGenerator() { return cache.urlGenerators.getUrlGenerator; } +export function getDataViews() { + if (cache.dataViews === null) { + throw new Error("dataViews hasn't been initialized"); + } + return cache.dataViews; +} + export function clearCache() { Object.keys(cache).forEach((k) => { cache[k as keyof DependencyCache] = null; diff --git a/x-pack/plugins/ml/public/application/util/field_types_utils.test.ts b/x-pack/plugins/ml/public/application/util/field_types_utils.test.ts index 440ac411e8ee7..0c50dc9efa343 100644 --- a/x-pack/plugins/ml/public/application/util/field_types_utils.test.ts +++ b/x-pack/plugins/ml/public/application/util/field_types_utils.test.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { IFieldType, KBN_FIELD_TYPES } from '../../../../../../src/plugins/data/public'; +import { KBN_FIELD_TYPES } from '../../../../../../src/plugins/data/public'; +import { DataViewField } from '../../../../../../src/plugins/data_views/common'; import { ML_JOB_FIELD_TYPES } from '../../../common/constants/field_types'; import { kbnTypeToMLJobType, @@ -16,28 +17,34 @@ import { describe('ML - field type utils', () => { describe('kbnTypeToMLJobType', () => { test('returns correct ML_JOB_FIELD_TYPES for KBN_FIELD_TYPES', () => { - const field: IFieldType = { + // @ts-ignore reassigning missing properties + const field: DataViewField = { type: KBN_FIELD_TYPES.NUMBER, name: KBN_FIELD_TYPES.NUMBER, aggregatable: true, }; expect(kbnTypeToMLJobType(field)).toBe(ML_JOB_FIELD_TYPES.NUMBER); + // @ts-ignore reassigning read-only type field.type = KBN_FIELD_TYPES.DATE; expect(kbnTypeToMLJobType(field)).toBe(ML_JOB_FIELD_TYPES.DATE); + // @ts-ignore reassigning read-only type field.type = KBN_FIELD_TYPES.IP; expect(kbnTypeToMLJobType(field)).toBe(ML_JOB_FIELD_TYPES.IP); + // @ts-ignore reassigning read-only type field.type = KBN_FIELD_TYPES.BOOLEAN; expect(kbnTypeToMLJobType(field)).toBe(ML_JOB_FIELD_TYPES.BOOLEAN); + // @ts-ignore reassigning read-only type field.type = KBN_FIELD_TYPES.GEO_POINT; expect(kbnTypeToMLJobType(field)).toBe(ML_JOB_FIELD_TYPES.GEO_POINT); }); test('returns ML_JOB_FIELD_TYPES.KEYWORD for aggregatable KBN_FIELD_TYPES.STRING', () => { - const field: IFieldType = { + // @ts-ignore reassigning missing properties + const field: DataViewField = { type: KBN_FIELD_TYPES.STRING, name: KBN_FIELD_TYPES.STRING, aggregatable: true, @@ -46,7 +53,8 @@ describe('ML - field type utils', () => { }); test('returns ML_JOB_FIELD_TYPES.TEXT for non-aggregatable KBN_FIELD_TYPES.STRING', () => { - const field: IFieldType = { + // @ts-ignore reassigning missing properties + const field: DataViewField = { type: KBN_FIELD_TYPES.STRING, name: KBN_FIELD_TYPES.STRING, aggregatable: false, @@ -55,7 +63,8 @@ describe('ML - field type utils', () => { }); test('returns undefined for non-aggregatable "foo"', () => { - const field: IFieldType = { + // @ts-ignore reassigning missing properties + const field: DataViewField = { type: 'foo', name: 'foo', aggregatable: false, diff --git a/x-pack/plugins/ml/public/application/util/field_types_utils.ts b/x-pack/plugins/ml/public/application/util/field_types_utils.ts index 0cb21fec1862f..c02a1cbec56ec 100644 --- a/x-pack/plugins/ml/public/application/util/field_types_utils.ts +++ b/x-pack/plugins/ml/public/application/util/field_types_utils.ts @@ -8,12 +8,13 @@ import { i18n } from '@kbn/i18n'; import { ML_JOB_FIELD_TYPES } from '../../../common/constants/field_types'; -import { IFieldType, KBN_FIELD_TYPES } from '../../../../../../src/plugins/data/public'; +import { KBN_FIELD_TYPES } from '../../../../../../src/plugins/data/public'; +import { DataViewField } from '../../../../../../src/plugins/data_views/common'; // convert kibana types to ML Job types // this is needed because kibana types only have string and not text and keyword. // and we can't use ES_FIELD_TYPES because it has no NUMBER type -export function kbnTypeToMLJobType(field: IFieldType) { +export function kbnTypeToMLJobType(field: DataViewField) { // Return undefined if not one of the supported data visualizer field types. let type; switch (field.type) { diff --git a/x-pack/plugins/ml/public/application/util/index_utils.ts b/x-pack/plugins/ml/public/application/util/index_utils.ts index 9d705c8cd725f..b4f46d4df0cbb 100644 --- a/x-pack/plugins/ml/public/application/util/index_utils.ts +++ b/x-pack/plugins/ml/public/application/util/index_utils.ts @@ -6,33 +6,20 @@ */ import { i18n } from '@kbn/i18n'; -import { - IndexPattern, - IIndexPattern, - IndexPatternsContract, - Query, - IndexPatternAttributes, -} from '../../../../../../src/plugins/data/public'; -import { getToastNotifications, getSavedObjectsClient } from './dependency_cache'; -import { IndexPatternSavedObject, SavedSearchSavedObject } from '../../../common/types/kibana'; - -let indexPatternCache: IndexPatternSavedObject[] = []; +import type { Query } from '../../../../../../src/plugins/data/public'; +import type { DataView, DataViewsContract } from '../../../../../../src/plugins/data_views/public'; +import type { SavedSearchSavedObject } from '../../../common/types/kibana'; +import { getToastNotifications, getSavedObjectsClient, getDataViews } from './dependency_cache'; + +let indexPatternCache: DataView[] = []; let savedSearchesCache: SavedSearchSavedObject[] = []; -let indexPatternsContract: IndexPatternsContract | null = null; +let indexPatternsContract: DataViewsContract | null = null; -export function loadIndexPatterns(indexPatterns: IndexPatternsContract) { +export async function loadIndexPatterns(indexPatterns: DataViewsContract) { indexPatternsContract = indexPatterns; - const savedObjectsClient = getSavedObjectsClient(); - return savedObjectsClient - .find({ - type: 'index-pattern', - fields: ['id', 'title', 'type', 'fields'], - perPage: 10000, - }) - .then((response) => { - indexPatternCache = response.savedObjects; - return indexPatternCache; - }); + const dataViewsContract = getDataViews(); + indexPatternCache = await dataViewsContract.find('*', 10000); + return indexPatternCache; } export function loadSavedSearches() { @@ -63,20 +50,15 @@ export function getIndexPatternsContract() { } export function getIndexPatternNames() { - return indexPatternCache.map((i) => i.attributes && i.attributes.title); + return indexPatternCache.map((i) => i.title); } export function getIndexPatternIdFromName(name: string) { - for (let j = 0; j < indexPatternCache.length; j++) { - if (indexPatternCache[j].get('title') === name) { - return indexPatternCache[j].id; - } - } - return null; + return indexPatternCache.find((i) => i.title === name)?.id ?? null; } export interface IndexPatternAndSavedSearch { savedSearch: SavedSearchSavedObject | null; - indexPattern: IIndexPattern | null; + indexPattern: DataView | null; } export async function getIndexPatternAndSavedSearch(savedSearchId: string) { const resp: IndexPatternAndSavedSearch = { @@ -106,7 +88,7 @@ export function getQueryFromSavedSearch(savedSearch: SavedSearchSavedObject) { }; } -export function getIndexPatternById(id: string): Promise { +export function getIndexPatternById(id: string): Promise { if (indexPatternsContract !== null) { if (id) { return indexPatternsContract.get(id); @@ -127,7 +109,7 @@ export function getSavedSearchById(id: string): SavedSearchSavedObject | undefin * an optional flag will trigger the display a notification at the top of the page * warning that the index is not time based */ -export function timeBasedIndexCheck(indexPattern: IndexPattern, showNotification = false) { +export function timeBasedIndexCheck(indexPattern: DataView, showNotification = false) { if (!indexPattern.isTimeBased()) { if (showNotification) { const toastNotifications = getToastNotifications(); diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx b/x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx index 65d26b844e960..47be6065aa99b 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx +++ b/x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx @@ -21,7 +21,7 @@ import { AnomalyChartsEmbeddableOutput, AnomalyChartsServices, } from '..'; -import type { IndexPattern } from '../../../../../../src/plugins/data/common'; +import type { DataView } from '../../../../../../src/plugins/data_views/common'; import { EmbeddableLoading } from '../common/components/embeddable_loading_fallback'; export const getDefaultExplorerChartsPanelTitle = (jobIds: JobId[]) => i18n.translate('xpack.ml.anomalyChartsEmbeddable.title', { @@ -66,7 +66,7 @@ export class AnomalyChartsEmbeddable extends Embeddable< const indices = new Set(jobs.map((j) => j.datafeed_config.indices).flat()); // Then find the index patterns assuming the index pattern title matches the index name - const indexPatterns: Record = {}; + const indexPatterns: Record = {}; for (const indexName of indices) { const response = await indexPatternsService.find(`"${indexName}"`); diff --git a/x-pack/plugins/ml/public/embeddables/types.ts b/x-pack/plugins/ml/public/embeddables/types.ts index 7c93fb31e9a6c..bf23f397fe08c 100644 --- a/x-pack/plugins/ml/public/embeddables/types.ts +++ b/x-pack/plugins/ml/public/embeddables/types.ts @@ -27,7 +27,7 @@ import { ANOMALY_SWIMLANE_EMBEDDABLE_TYPE, } from './constants'; import { MlResultsService } from '../application/services/results_service'; -import { IndexPattern } from '../../../../../src/plugins/data/common'; +import type { DataView } from '../../../../../src/plugins/data_views/common'; export interface AnomalySwimlaneEmbeddableCustomInput { jobIds: JobId[]; @@ -110,7 +110,7 @@ export type AnomalyChartsEmbeddableServices = [CoreStart, MlDependencies, Anomal export interface AnomalyChartsCustomOutput { entityFields?: EntityField[]; severity?: number; - indexPatterns?: IndexPattern[]; + indexPatterns?: DataView[]; } export type AnomalyChartsEmbeddableOutput = EmbeddableOutput & AnomalyChartsCustomOutput; export interface EditAnomalyChartsPanelContext { diff --git a/x-pack/plugins/ml/server/lib/data_views_utils.ts b/x-pack/plugins/ml/server/lib/data_views_utils.ts new file mode 100644 index 0000000000000..497404425eff8 --- /dev/null +++ b/x-pack/plugins/ml/server/lib/data_views_utils.ts @@ -0,0 +1,26 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { IScopedClusterClient, SavedObjectsClientContract } from 'kibana/server'; + +import type { DataViewsService } from '../../../../../src/plugins/data_views/common'; +import type { PluginStart as DataViewsPluginStart } from '../../../../../src/plugins/data_views/server'; + +export type GetDataViewsService = () => Promise; + +export function getDataViewsServiceFactory( + getDataViews: () => DataViewsPluginStart | null, + savedObjectClient: SavedObjectsClientContract, + scopedClient: IScopedClusterClient +): GetDataViewsService { + const dataViews = getDataViews(); + if (dataViews === null) { + throw Error('data views service has not been initialized'); + } + + return () => dataViews.dataViewsServiceFactory(savedObjectClient, scopedClient.asInternalUser); +} diff --git a/x-pack/plugins/ml/server/lib/route_guard.ts b/x-pack/plugins/ml/server/lib/route_guard.ts index 1a066660d4ee0..b7b0568c10a31 100644 --- a/x-pack/plugins/ml/server/lib/route_guard.ts +++ b/x-pack/plugins/ml/server/lib/route_guard.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { KibanaRequest, KibanaResponseFactory, RequestHandlerContext, @@ -13,14 +13,17 @@ import { RequestHandler, SavedObjectsClientContract, } from 'kibana/server'; -import { SpacesPluginSetup } from '../../../spaces/server'; +import type { SpacesPluginSetup } from '../../../spaces/server'; import type { SecurityPluginSetup } from '../../../security/server'; import { jobSavedObjectServiceFactory, JobSavedObjectService } from '../saved_objects'; -import { MlLicense } from '../../common/license'; +import type { MlLicense } from '../../common/license'; import { MlClient, getMlClient } from '../lib/ml_client'; import type { AlertingApiRequestHandlerContext } from '../../../alerting/server'; +import type { PluginStart as DataViewsPluginStart } from '../../../../../src/plugins/data_views/server'; +import type { DataViewsService } from '../../../../../src/plugins/data_views/common'; +import { getDataViewsServiceFactory } from './data_views_utils'; type MLRequestHandlerContext = RequestHandlerContext & { alerting?: AlertingApiRequestHandlerContext; @@ -33,10 +36,12 @@ type Handler

= (handlerParams: { context: MLRequestHandlerContext; jobSavedObjectService: JobSavedObjectService; mlClient: MlClient; + getDataViewsService(): Promise; }) => ReturnType>; type GetMlSavedObjectClient = (request: KibanaRequest) => SavedObjectsClientContract | null; type GetInternalSavedObjectClient = () => SavedObjectsClientContract | null; +type GetDataViews = () => DataViewsPluginStart | null; export class RouteGuard { private _mlLicense: MlLicense; @@ -45,6 +50,7 @@ export class RouteGuard { private _spacesPlugin: SpacesPluginSetup | undefined; private _authorization: SecurityPluginSetup['authz'] | undefined; private _isMlReady: () => Promise; + private _getDataViews: GetDataViews; constructor( mlLicense: MlLicense, @@ -52,7 +58,8 @@ export class RouteGuard { getInternalSavedObject: GetInternalSavedObjectClient, spacesPlugin: SpacesPluginSetup | undefined, authorization: SecurityPluginSetup['authz'] | undefined, - isMlReady: () => Promise + isMlReady: () => Promise, + getDataViews: GetDataViews ) { this._mlLicense = mlLicense; this._getMlSavedObjectClient = getSavedObject; @@ -60,6 +67,7 @@ export class RouteGuard { this._spacesPlugin = spacesPlugin; this._authorization = authorization; this._isMlReady = isMlReady; + this._getDataViews = getDataViews; } public fullLicenseAPIGuard(handler: Handler) { @@ -79,6 +87,7 @@ export class RouteGuard { return response.forbidden(); } + const client = context.core.elasticsearch.client; const mlSavedObjectClient = this._getMlSavedObjectClient(request); const internalSavedObjectsClient = this._getInternalSavedObjectClient(); if (mlSavedObjectClient === null || internalSavedObjectsClient === null) { @@ -94,7 +103,6 @@ export class RouteGuard { this._authorization, this._isMlReady ); - const client = context.core.elasticsearch.client; return handler({ client, @@ -103,6 +111,11 @@ export class RouteGuard { context, jobSavedObjectService, mlClient: getMlClient(client, jobSavedObjectService), + getDataViewsService: getDataViewsServiceFactory( + this._getDataViews, + context.core.savedObjects.client, + client + ), }); }; } diff --git a/x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts b/x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts index 15b4cfa5be8b1..568be4197baf8 100644 --- a/x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts +++ b/x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts @@ -5,29 +5,19 @@ * 2.0. */ -import { SavedObjectsClientContract } from 'kibana/server'; -import { IndexPatternAttributes } from 'src/plugins/data/server'; +import { DataViewsService } from '../../../../../../src/plugins/data_views/common'; export class IndexPatternHandler { - constructor(private savedObjectsClient: SavedObjectsClientContract) {} + constructor(private dataViewService: DataViewsService) {} // returns a id based on an index pattern name async getIndexPatternId(indexName: string) { - const response = await this.savedObjectsClient.find({ - type: 'index-pattern', - perPage: 10, - search: `"${indexName}"`, - searchFields: ['title'], - fields: ['title'], - }); - - const ip = response.saved_objects.find( - (obj) => obj.attributes.title.toLowerCase() === indexName.toLowerCase() + const dv = (await this.dataViewService.find(indexName)).find( + ({ title }) => title === indexName ); - - return ip?.id; + return dv?.id; } async deleteIndexPatternById(indexId: string) { - return await this.savedObjectsClient.delete('index-pattern', indexId); + return await this.dataViewService.delete(indexId); } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.test.ts b/x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.test.ts index 8ddb805af2033..e853d5de5899d 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.test.ts +++ b/x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.test.ts @@ -5,11 +5,16 @@ * 2.0. */ -import { SavedObjectsClientContract, KibanaRequest, IScopedClusterClient } from 'kibana/server'; -import { Module } from '../../../common/types/modules'; +import type { + SavedObjectsClientContract, + KibanaRequest, + IScopedClusterClient, +} from 'kibana/server'; +import type { DataViewsService } from '../../../../../../src/plugins/data_views/common'; +import type { Module } from '../../../common/types/modules'; import { DataRecognizer } from '../data_recognizer'; import type { MlClient } from '../../lib/ml_client'; -import { JobSavedObjectService } from '../../saved_objects'; +import type { JobSavedObjectService } from '../../saved_objects'; const callAs = () => Promise.resolve({ body: {} }); @@ -28,6 +33,7 @@ describe('ML - data recognizer', () => { find: jest.fn(), bulkCreate: jest.fn(), } as unknown as SavedObjectsClientContract, + { find: jest.fn() } as unknown as DataViewsService, {} as JobSavedObjectService, { headers: { authorization: '' } } as KibanaRequest ); diff --git a/x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts b/x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts index f9c609803217e..711ec0d458f27 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts +++ b/x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts @@ -8,17 +8,21 @@ import fs from 'fs'; import Boom from '@hapi/boom'; import numeral from '@elastic/numeral'; -import { KibanaRequest, IScopedClusterClient, SavedObjectsClientContract } from 'kibana/server'; +import type { + KibanaRequest, + IScopedClusterClient, + SavedObjectsClientContract, +} from 'kibana/server'; import moment from 'moment'; -import { IndexPatternAttributes } from 'src/plugins/data/server'; import { merge } from 'lodash'; -import { AnalysisLimits } from '../../../common/types/anomaly_detection_jobs'; +import type { DataViewsService } from '../../../../../../src/plugins/data_views/common'; +import type { AnalysisLimits } from '../../../common/types/anomaly_detection_jobs'; import { getAuthorizationHeader } from '../../lib/request_authorization'; -import { MlInfoResponse } from '../../../common/types/ml_server_info'; +import type { MlInfoResponse } from '../../../common/types/ml_server_info'; import type { MlClient } from '../../lib/ml_client'; import { ML_MODULE_SAVED_OBJECT_TYPE } from '../../../common/types/saved_objects'; -import { +import type { KibanaObjects, KibanaObjectConfig, ModuleDatafeed, @@ -35,8 +39,8 @@ import { DataRecognizerConfigResponse, GeneralDatafeedsOverride, JobSpecificOverride, - isGeneralJobOverride, } from '../../../common/types/modules'; +import { isGeneralJobOverride } from '../../../common/types/modules'; import { getLatestDataOrBucketTimestamp, prefixDatafeedId, @@ -47,10 +51,10 @@ import { calculateModelMemoryLimitProvider } from '../calculate_model_memory_lim import { fieldsServiceProvider } from '../fields_service'; import { jobServiceProvider } from '../job_service'; import { resultsServiceProvider } from '../results_service'; -import { JobExistResult, JobStat } from '../../../common/types/data_recognizer'; -import { MlJobsStatsResponse } from '../../../common/types/job_service'; -import { Datafeed } from '../../../common/types/anomaly_detection_jobs'; -import { JobSavedObjectService } from '../../saved_objects'; +import type { JobExistResult, JobStat } from '../../../common/types/data_recognizer'; +import type { MlJobsStatsResponse } from '../../../common/types/job_service'; +import type { Datafeed } from '../../../common/types/anomaly_detection_jobs'; +import type { JobSavedObjectService } from '../../saved_objects'; import { isDefined } from '../../../common/types/guards'; import { isPopulatedObject } from '../../../common/util/object_utils'; @@ -110,6 +114,7 @@ export class DataRecognizer { private _mlClient: MlClient; private _savedObjectsClient: SavedObjectsClientContract; private _jobSavedObjectService: JobSavedObjectService; + private _dataViewsService: DataViewsService; private _request: KibanaRequest; private _authorizationHeader: object; @@ -130,12 +135,14 @@ export class DataRecognizer { mlClusterClient: IScopedClusterClient, mlClient: MlClient, savedObjectsClient: SavedObjectsClientContract, + dataViewsService: DataViewsService, jobSavedObjectService: JobSavedObjectService, request: KibanaRequest ) { this._client = mlClusterClient; this._mlClient = mlClient; this._savedObjectsClient = savedObjectsClient; + this._dataViewsService = dataViewsService; this._jobSavedObjectService = jobSavedObjectService; this._request = request; this._authorizationHeader = getAuthorizationHeader(request); @@ -615,22 +622,11 @@ export class DataRecognizer { return results; } - private async _loadIndexPatterns() { - return await this._savedObjectsClient.find({ - type: 'index-pattern', - perPage: 1000, - }); - } - // returns a id based on an index pattern name - private async _getIndexPatternId(name: string) { + private async _getIndexPatternId(name: string): Promise { try { - const indexPatterns = await this._loadIndexPatterns(); - if (indexPatterns === undefined || indexPatterns.saved_objects === undefined) { - return; - } - const ip = indexPatterns.saved_objects.find((i) => i.attributes.title === name); - return ip !== undefined ? ip.id : undefined; + const dataViews = await this._dataViewsService.find(name); + return dataViews.find((d) => d.title === name)?.id; } catch (error) { mlLog.warn(`Error loading index patterns, ${error}`); return; @@ -1387,3 +1383,21 @@ export class DataRecognizer { } } } + +export function dataRecognizerFactory( + client: IScopedClusterClient, + mlClient: MlClient, + savedObjectsClient: SavedObjectsClientContract, + dataViewsService: DataViewsService, + jobSavedObjectService: JobSavedObjectService, + request: KibanaRequest +) { + return new DataRecognizer( + client, + mlClient, + savedObjectsClient, + dataViewsService, + jobSavedObjectService, + request + ); +} diff --git a/x-pack/plugins/ml/server/models/data_recognizer/index.ts b/x-pack/plugins/ml/server/models/data_recognizer/index.ts index 27c45726ae249..fbddf17a50ede 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/index.ts +++ b/x-pack/plugins/ml/server/models/data_recognizer/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export { DataRecognizer, RecognizeResult } from './data_recognizer'; +export { DataRecognizer, RecognizeResult, dataRecognizerFactory } from './data_recognizer'; diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/manifest.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/manifest.json index 123232935df05..f8feaef3be5f8 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/manifest.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/manifest.json @@ -1,29 +1,29 @@ { "id": "apm_transaction", "title": "APM", - "description": "Detect anomalies in transactions from your APM services for metric data.", + "description": "Detect anomalies in transactions from your APM services.", "type": "Transaction data", "logoFile": "logo.json", - "defaultIndexPattern": "apm-*-metric,metrics-apm*", + "defaultIndexPattern": "apm-*-transaction", "query": { "bool": { "filter": [ - { "term": { "processor.event": "metric" } }, - { "term": { "metricset.name": "transaction" } } + { "term": { "processor.event": "transaction" } }, + { "exists": { "field": "transaction.duration" } } ] } }, "jobs": [ { - "id": "apm_metrics", - "file": "apm_metrics.json" + "id": "high_mean_transaction_duration", + "file": "high_mean_transaction_duration.json" } ], "datafeeds": [ { - "id": "datafeed-apm_metrics", - "file": "datafeed_apm_metrics.json", - "job_id": "apm_metrics" + "id": "datafeed-high_mean_transaction_duration", + "file": "datafeed_high_mean_transaction_duration.json", + "job_id": "high_mean_transaction_duration" } ] } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/apm_metrics.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/apm_metrics.json deleted file mode 100644 index d5092f3ffc553..0000000000000 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/apm_metrics.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "job_type": "anomaly_detector", - "groups": [ - "apm" - ], - "description": "Detects anomalies in transaction duration, throughput and error percentage for metric data.", - "analysis_config": { - "bucket_span": "15m", - "summary_count_field_name" : "doc_count", - "detectors" : [ - { - "detector_description" : "high duration by transaction type for an APM service", - "function" : "high_mean", - "field_name" : "transaction_duration", - "by_field_name" : "transaction.type", - "partition_field_name" : "service.name" - }, - { - "detector_description" : "transactions per minute for an APM service", - "function" : "mean", - "field_name" : "transactions_per_min", - "by_field_name" : "transaction.type", - "partition_field_name" : "service.name" - }, - { - "detector_description" : "percent failed for an APM service", - "function" : "high_mean", - "field_name" : "transaction_failure_percentage", - "by_field_name" : "transaction.type", - "partition_field_name" : "service.name" - } - ], - "influencers" : [ - "transaction.type", - "service.name" - ] - }, - "analysis_limits": { - "model_memory_limit": "32mb" - }, - "data_description": { - "time_field" : "@timestamp", - "time_format" : "epoch_ms" - }, - "model_plot_config": { - "enabled" : true, - "annotations_enabled" : true - }, - "results_index_name" : "custom-apm", - "custom_settings": { - "created_by": "ml-module-apm-transaction" - } -} diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/datafeed_apm_metrics.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/datafeed_apm_metrics.json deleted file mode 100644 index ba45582252cd7..0000000000000 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/datafeed_apm_metrics.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "job_id": "JOB_ID", - "indices": [ - "INDEX_PATTERN_NAME" - ], - "chunking_config" : { - "mode" : "off" - }, - "query": { - "bool": { - "filter": [ - { "term": { "processor.event": "metric" } }, - { "term": { "metricset.name": "transaction" } } - ] - } - }, - "aggregations" : { - "buckets" : { - "composite" : { - "size" : 5000, - "sources" : [ - { - "date" : { - "date_histogram" : { - "field" : "@timestamp", - "fixed_interval" : "90s" - } - } - }, - { - "transaction.type" : { - "terms" : { - "field" : "transaction.type" - } - } - }, - { - "service.name" : { - "terms" : { - "field" : "service.name" - } - } - } - ] - }, - "aggs" : { - "@timestamp" : { - "max" : { - "field" : "@timestamp" - } - }, - "transactions_per_min" : { - "rate" : { - "unit" : "minute" - } - }, - "transaction_duration" : { - "avg" : { - "field" : "transaction.duration.histogram" - } - }, - "error_count" : { - "filter" : { - "term" : { - "event.outcome" : "failure" - } - }, - "aggs" : { - "actual_error_count" : { - "value_count" : { - "field" : "event.outcome" - } - } - } - }, - "success_count" : { - "filter" : { - "term" : { - "event.outcome" : "success" - } - } - }, - "transaction_failure_percentage" : { - "bucket_script" : { - "buckets_path" : { - "failure_count" : "error_count>_count", - "success_count" : "success_count>_count" - }, - "script" : "if ((params.failure_count + params.success_count)==0){return 0;}else{return params.failure_count/(params.failure_count + params.success_count);}" - } - } - } - } - } -} diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/datafeed_high_mean_transaction_duration.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/datafeed_high_mean_transaction_duration.json new file mode 100644 index 0000000000000..d312577902f51 --- /dev/null +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/datafeed_high_mean_transaction_duration.json @@ -0,0 +1,14 @@ +{ + "job_id": "JOB_ID", + "indices": [ + "INDEX_PATTERN_NAME" + ], + "query": { + "bool": { + "filter": [ + { "term": { "processor.event": "transaction" } }, + { "exists": { "field": "transaction.duration.us" } } + ] + } + } +} diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/high_mean_transaction_duration.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/high_mean_transaction_duration.json new file mode 100644 index 0000000000000..77284cb275cd8 --- /dev/null +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/high_mean_transaction_duration.json @@ -0,0 +1,35 @@ +{ + "job_type": "anomaly_detector", + "groups": [ + "apm" + ], + "description": "Detect transaction duration anomalies across transaction types for your APM services.", + "analysis_config": { + "bucket_span": "15m", + "detectors": [ + { + "detector_description": "high duration by transaction type for an APM service", + "function": "high_mean", + "field_name": "transaction.duration.us", + "by_field_name": "transaction.type", + "partition_field_name": "service.name" + } + ], + "influencers": [ + "transaction.type", + "service.name" + ] + }, + "analysis_limits": { + "model_memory_limit": "32mb" + }, + "data_description": { + "time_field": "@timestamp" + }, + "model_plot_config": { + "enabled": true + }, + "custom_settings": { + "created_by": "ml-module-apm-transaction" + } +} diff --git a/x-pack/plugins/ml/server/models/job_service/new_job_caps/__mocks__/responses/data_view_rollup_cloudwatch.json b/x-pack/plugins/ml/server/models/job_service/new_job_caps/__mocks__/responses/data_view_rollup_cloudwatch.json new file mode 100644 index 0000000000000..a6aeb81431532 --- /dev/null +++ b/x-pack/plugins/ml/server/models/job_service/new_job_caps/__mocks__/responses/data_view_rollup_cloudwatch.json @@ -0,0 +1,151 @@ +[ + { + "id": "d6ac99b0-2777-11ec-8e1c-aba6d0767aaa", + "title": "cloud_roll_index", + "fieldFormatMap": {}, + "typeMeta": { + "params": { + "rollup_index": "cloud_roll_index" + }, + "aggs": { + "date_histogram": { + "@timestamp": { + "agg": "date_histogram", + "fixed_interval": "5m", + "time_zone": "UTC" + } + } + } + }, + "fields": [ + { + "count": 0, + "name": "_source", + "type": "_source", + "esTypes": [ + "_source" + ], + "scripted": false, + "searchable": false, + "aggregatable": false, + "readFromDocValues": false + }, + { + "count": 0, + "name": "_id", + "type": "string", + "esTypes": [ + "_id" + ], + "scripted": false, + "searchable": true, + "aggregatable": false, + "readFromDocValues": false + }, + { + "count": 0, + "name": "_type", + "type": "string", + "scripted": false, + "searchable": false, + "aggregatable": false, + "readFromDocValues": false + }, + { + "count": 0, + "name": "_index", + "type": "string", + "esTypes": [ + "_index" + ], + "scripted": false, + "searchable": true, + "aggregatable": true, + "readFromDocValues": false + }, + { + "count": 0, + "name": "_score", + "type": "number", + "scripted": false, + "searchable": false, + "aggregatable": false, + "readFromDocValues": false + }, + { + "count": 0, + "name": "@timestamp", + "type": "date", + "esTypes": [ + "date" + ], + "scripted": false, + "searchable": true, + "aggregatable": true, + "readFromDocValues": true + } + ], + "timeFieldName": "@timestamp", + "type": "rollup", + "metaFields": [ + "_source", + "_id", + "_type", + "_index", + "_score" + ], + "version": "WzY5NjEsNF0=", + "originalSavedObjectBody": { + "fieldAttrs": "{}", + "title": "cloud_roll_index", + "timeFieldName": "@timestamp", + "fields": "[]", + "type": "rollup", + "typeMeta": "{\"params\":{\"rollup_index\":\"cloud_roll_index\"},\"aggs\":{\"date_histogram\":{\"@timestamp\":{\"agg\":\"date_histogram\",\"fixed_interval\":\"5m\",\"time_zone\":\"UTC\"}}}}", + "runtimeFieldMap": "{}" + }, + "shortDotsEnable": false, + "fieldFormats": { + "fieldFormats": {}, + "defaultMap": { + "ip": { + "id": "ip", + "params": {} + }, + "date": { + "id": "date", + "params": {} + }, + "date_nanos": { + "id": "date_nanos", + "params": {}, + "es": true + }, + "number": { + "id": "number", + "params": {} + }, + "boolean": { + "id": "boolean", + "params": {} + }, + "histogram": { + "id": "histogram", + "params": {} + }, + "_source": { + "id": "_source", + "params": {} + }, + "_default_": { + "id": "string", + "params": {} + } + }, + "metaParamsOptions": {} + }, + "fieldAttrs": {}, + "runtimeFieldMap": {}, + "allowNoIndex": false + } +] diff --git a/x-pack/plugins/ml/server/models/job_service/new_job_caps/__mocks__/responses/kibana_saved_objects.json b/x-pack/plugins/ml/server/models/job_service/new_job_caps/__mocks__/responses/kibana_saved_objects.json deleted file mode 100644 index 9e2af76264231..0000000000000 --- a/x-pack/plugins/ml/server/models/job_service/new_job_caps/__mocks__/responses/kibana_saved_objects.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "page": 1, - "per_page": 1000, - "total": 4, - "saved_objects": [ - { - "type": "index-pattern", - "id": "be0eebe0-65ac-11e9-aa86-0793be5f3670", - "attributes": { - "title": "farequote-*" - }, - "references": [], - "migrationVersion": { - "index-pattern": "6.5.0" - }, - "updated_at": "2019-04-23T09:47:02.203Z", - "version": "WzcsMV0=" - }, - { - "type": "index-pattern", - "id": "be14ceb0-66b1-11e9-91c9-ffa52374d341", - "attributes": { - "typeMeta": "{\"params\":{\"rollup_index\":\"cloud_roll_index\"},\"aggs\":{\"histogram\":{\"NetworkOut\":{\"agg\":\"histogram\",\"interval\":5},\"CPUUtilization\":{\"agg\":\"histogram\",\"interval\":5},\"NetworkIn\":{\"agg\":\"histogram\",\"interval\":5}},\"avg\":{\"NetworkOut\":{\"agg\":\"avg\"},\"CPUUtilization\":{\"agg\":\"avg\"},\"NetworkIn\":{\"agg\":\"avg\"},\"DiskReadBytes\":{\"agg\":\"avg\"}},\"min\":{\"NetworkOut\":{\"agg\":\"min\"},\"NetworkIn\":{\"agg\":\"min\"}},\"value_count\":{\"NetworkOut\":{\"agg\":\"value_count\"},\"DiskReadBytes\":{\"agg\":\"value_count\"},\"CPUUtilization\":{\"agg\":\"value_count\"},\"NetworkIn\":{\"agg\":\"value_count\"}},\"max\":{\"CPUUtilization\":{\"agg\":\"max\"},\"DiskReadBytes\":{\"agg\":\"max\"}},\"date_histogram\":{\"@timestamp\":{\"agg\":\"date_histogram\",\"delay\":\"1d\",\"fixed_interval\":\"5m\",\"time_zone\":\"UTC\"}},\"terms\":{\"instance\":{\"agg\":\"terms\"},\"sourcetype.keyword\":{\"agg\":\"terms\"},\"region\":{\"agg\":\"terms\"}},\"sum\":{\"DiskReadBytes\":{\"agg\":\"sum\"},\"NetworkOut\":{\"agg\":\"sum\"}}}}", - "title": "cloud_roll_index", - "type": "rollup" - }, - "references": [], - "migrationVersion": { - "index-pattern": "6.5.0" - }, - "updated_at": "2019-04-24T16:55:20.550Z", - "version": "Wzc0LDJd" - } - ] -} diff --git a/x-pack/plugins/ml/server/models/job_service/new_job_caps/field_service.ts b/x-pack/plugins/ml/server/models/job_service/new_job_caps/field_service.ts index b838165826da1..a25b3183362b3 100644 --- a/x-pack/plugins/ml/server/models/job_service/new_job_caps/field_service.ts +++ b/x-pack/plugins/ml/server/models/job_service/new_job_caps/field_service.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { estypes } from '@elastic/elasticsearch'; -import { IScopedClusterClient } from 'kibana/server'; import { cloneDeep } from 'lodash'; -import { SavedObjectsClientContract } from 'kibana/server'; -import { Field, FieldId, NewJobCaps, RollupFields } from '../../../../common/types/fields'; +import { estypes } from '@elastic/elasticsearch'; +import type { IScopedClusterClient } from 'kibana/server'; +import type { Field, FieldId, NewJobCaps, RollupFields } from '../../../../common/types/fields'; import { ES_FIELD_TYPES } from '../../../../../../../src/plugins/data/common'; +import type { DataViewsService } from '../../../../../../../src/plugins/data_views/common'; import { combineFieldsAndAggs } from '../../../../common/util/fields_utils'; import { rollupServiceProvider } from './rollup'; import { aggregations, mlOnlyAggregations } from '../../../../common/constants/aggregation_types'; @@ -38,27 +38,27 @@ export function fieldServiceProvider( indexPattern: string, isRollup: boolean, client: IScopedClusterClient, - savedObjectsClient: SavedObjectsClientContract + dataViewsService: DataViewsService ) { - return new FieldsService(indexPattern, isRollup, client, savedObjectsClient); + return new FieldsService(indexPattern, isRollup, client, dataViewsService); } class FieldsService { private _indexPattern: string; private _isRollup: boolean; private _mlClusterClient: IScopedClusterClient; - private _savedObjectsClient: SavedObjectsClientContract; + private _dataViewsService: DataViewsService; constructor( indexPattern: string, isRollup: boolean, client: IScopedClusterClient, - savedObjectsClient: SavedObjectsClientContract + dataViewsService: DataViewsService ) { this._indexPattern = indexPattern; this._isRollup = isRollup; this._mlClusterClient = client; - this._savedObjectsClient = savedObjectsClient; + this._dataViewsService = dataViewsService; } private async loadFieldCaps(): Promise { @@ -111,7 +111,7 @@ class FieldsService { const rollupService = await rollupServiceProvider( this._indexPattern, this._mlClusterClient, - this._savedObjectsClient + this._dataViewsService ); const rollupConfigs: estypes.RollupGetRollupCapabilitiesRollupCapabilitySummary[] | null = await rollupService.getRollupJobs(); diff --git a/x-pack/plugins/ml/server/models/job_service/new_job_caps/new_job_caps.test.ts b/x-pack/plugins/ml/server/models/job_service/new_job_caps/new_job_caps.test.ts index 3eb2ba5bbaced..c0f270f1df96c 100644 --- a/x-pack/plugins/ml/server/models/job_service/new_job_caps/new_job_caps.test.ts +++ b/x-pack/plugins/ml/server/models/job_service/new_job_caps/new_job_caps.test.ts @@ -10,7 +10,7 @@ import { newJobCapsProvider } from './index'; import farequoteFieldCaps from './__mocks__/responses/farequote_field_caps.json'; import cloudwatchFieldCaps from './__mocks__/responses/cloudwatch_field_caps.json'; import rollupCaps from './__mocks__/responses/rollup_caps.json'; -import kibanaSavedObjects from './__mocks__/responses/kibana_saved_objects.json'; +import dataView from './__mocks__/responses/data_view_rollup_cloudwatch.json'; import farequoteJobCaps from './__mocks__/results/farequote_job_caps.json'; import farequoteJobCapsEmpty from './__mocks__/results/farequote_job_caps_empty.json'; @@ -19,7 +19,7 @@ import cloudwatchJobCaps from './__mocks__/results/cloudwatch_rollup_job_caps.js describe('job_service - job_caps', () => { let mlClusterClientNonRollupMock: any; let mlClusterClientRollupMock: any; - let savedObjectsClientMock: any; + let dataViews: any; beforeEach(() => { const asNonRollupMock = { @@ -41,9 +41,9 @@ describe('job_service - job_caps', () => { asInternalUser: callAsRollupMock, }; - savedObjectsClientMock = { + dataViews = { async find() { - return Promise.resolve(kibanaSavedObjects); + return Promise.resolve(dataView); }, }; }); @@ -53,7 +53,7 @@ describe('job_service - job_caps', () => { const indexPattern = 'farequote-*'; const isRollup = false; const { newJobCaps } = newJobCapsProvider(mlClusterClientNonRollupMock); - const response = await newJobCaps(indexPattern, isRollup, savedObjectsClientMock); + const response = await newJobCaps(indexPattern, isRollup, dataViews); expect(response).toEqual(farequoteJobCaps); }); @@ -61,7 +61,7 @@ describe('job_service - job_caps', () => { const indexPattern = 'farequote-*'; const isRollup = true; const { newJobCaps } = newJobCapsProvider(mlClusterClientNonRollupMock); - const response = await newJobCaps(indexPattern, isRollup, savedObjectsClientMock); + const response = await newJobCaps(indexPattern, isRollup, dataViews); expect(response).toEqual(farequoteJobCapsEmpty); }); }); @@ -71,7 +71,7 @@ describe('job_service - job_caps', () => { const indexPattern = 'cloud_roll_index'; const isRollup = true; const { newJobCaps } = newJobCapsProvider(mlClusterClientRollupMock); - const response = await newJobCaps(indexPattern, isRollup, savedObjectsClientMock); + const response = await newJobCaps(indexPattern, isRollup, dataViews); expect(response).toEqual(cloudwatchJobCaps); }); @@ -79,7 +79,7 @@ describe('job_service - job_caps', () => { const indexPattern = 'cloud_roll_index'; const isRollup = false; const { newJobCaps } = newJobCapsProvider(mlClusterClientRollupMock); - const response = await newJobCaps(indexPattern, isRollup, savedObjectsClientMock); + const response = await newJobCaps(indexPattern, isRollup, dataViews); expect(response).not.toEqual(cloudwatchJobCaps); }); }); diff --git a/x-pack/plugins/ml/server/models/job_service/new_job_caps/new_job_caps.ts b/x-pack/plugins/ml/server/models/job_service/new_job_caps/new_job_caps.ts index 6444f9ae3f61a..bab4fb31aa1a9 100644 --- a/x-pack/plugins/ml/server/models/job_service/new_job_caps/new_job_caps.ts +++ b/x-pack/plugins/ml/server/models/job_service/new_job_caps/new_job_caps.ts @@ -5,18 +5,19 @@ * 2.0. */ -import { IScopedClusterClient, SavedObjectsClientContract } from 'kibana/server'; +import type { IScopedClusterClient } from 'kibana/server'; +import type { DataViewsService } from '../../../../../../../src/plugins/data_views/common'; +import type { Aggregation, Field, NewJobCapsResponse } from '../../../../common/types/fields'; import { _DOC_COUNT } from '../../../../common/constants/field_types'; -import { Aggregation, Field, NewJobCapsResponse } from '../../../../common/types/fields'; import { fieldServiceProvider } from './field_service'; export function newJobCapsProvider(client: IScopedClusterClient) { async function newJobCaps( indexPattern: string, isRollup: boolean = false, - savedObjectsClient: SavedObjectsClientContract + dataViewsService: DataViewsService ): Promise { - const fieldService = fieldServiceProvider(indexPattern, isRollup, client, savedObjectsClient); + const fieldService = fieldServiceProvider(indexPattern, isRollup, client, dataViewsService); const { aggs, fields } = await fieldService.getData(); convertForStringify(aggs, fields); diff --git a/x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts b/x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts index 72408b7f9c534..87504a1bc0e10 100644 --- a/x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts +++ b/x-pack/plugins/ml/server/models/job_service/new_job_caps/rollup.ts @@ -6,11 +6,12 @@ */ import { estypes } from '@elastic/elasticsearch'; -import { IScopedClusterClient } from 'kibana/server'; -import { SavedObject } from 'kibana/server'; -import { IndexPatternAttributes } from 'src/plugins/data/server'; -import { SavedObjectsClientContract } from 'kibana/server'; -import { RollupFields } from '../../../../common/types/fields'; +import type { IScopedClusterClient } from 'kibana/server'; +import type { + DataViewsService, + DataView, +} from '../../../../../../../src/plugins/data_views/common'; +import type { RollupFields } from '../../../../common/types/fields'; export interface RollupJob { job_id: string; @@ -22,17 +23,19 @@ export interface RollupJob { export async function rollupServiceProvider( indexPattern: string, { asCurrentUser }: IScopedClusterClient, - savedObjectsClient: SavedObjectsClientContract + dataViewsService: DataViewsService ) { - const rollupIndexPatternObject = await loadRollupIndexPattern(indexPattern, savedObjectsClient); + const rollupIndexPatternObject = await loadRollupIndexPattern(indexPattern, dataViewsService); let jobIndexPatterns: string[] = [indexPattern]; async function getRollupJobs(): Promise< estypes.RollupGetRollupCapabilitiesRollupCapabilitySummary[] | null > { - if (rollupIndexPatternObject !== null) { - const parsedTypeMetaData = JSON.parse(rollupIndexPatternObject.attributes.typeMeta!); - const rollUpIndex: string = parsedTypeMetaData.params.rollup_index; + if ( + rollupIndexPatternObject !== null && + rollupIndexPatternObject.typeMeta?.params !== undefined + ) { + const rollUpIndex: string = rollupIndexPatternObject.typeMeta.params.rollup_index; const { body: rollupCaps } = await asCurrentUser.rollup.getRollupIndexCaps({ index: rollUpIndex, }); @@ -60,21 +63,12 @@ export async function rollupServiceProvider( async function loadRollupIndexPattern( indexPattern: string, - savedObjectsClient: SavedObjectsClientContract -): Promise | null> { - const resp = await savedObjectsClient.find({ - type: 'index-pattern', - fields: ['title', 'type', 'typeMeta'], - perPage: 1000, - }); - - const obj = resp.saved_objects.find( - (r) => - r.attributes && - r.attributes.type === 'rollup' && - r.attributes.title === indexPattern && - r.attributes.typeMeta !== undefined + dataViewsService: DataViewsService +): Promise { + const resp = await dataViewsService.find('*', 10000); + const obj = resp.find( + (dv) => dv.type === 'rollup' && dv.title === indexPattern && dv.typeMeta !== undefined ); - return obj || null; + return obj ?? null; } diff --git a/x-pack/plugins/ml/server/plugin.ts b/x-pack/plugins/ml/server/plugin.ts index 3876193cfbe39..efa61593655ac 100644 --- a/x-pack/plugins/ml/server/plugin.ts +++ b/x-pack/plugins/ml/server/plugin.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { +import type { CoreSetup, CoreStart, Plugin, @@ -21,10 +21,11 @@ import { } from 'kibana/server'; import type { SecurityPluginSetup } from '../../security/server'; import { DEFAULT_APP_CATEGORIES } from '../../../../src/core/server'; -import { PluginsSetup, PluginsStart, RouteInitialization } from './types'; -import { SpacesPluginSetup } from '../../spaces/server'; +import type { PluginStart as DataViewsPluginStart } from '../../../../src/plugins/data_views/server'; +import type { PluginsSetup, PluginsStart, RouteInitialization } from './types'; +import type { SpacesPluginSetup } from '../../spaces/server'; import { PLUGIN_ID } from '../common/constants/app'; -import { MlCapabilities } from '../common/types/capabilities'; +import type { MlCapabilities } from '../common/types/capabilities'; import { initMlServerLog } from './lib/log'; import { initSampleDataSets } from './lib/sample_data_sets'; @@ -78,6 +79,7 @@ export class MlServerPlugin private savedObjectsStart: SavedObjectsServiceStart | null = null; private spacesPlugin: SpacesPluginSetup | undefined; private security: SecurityPluginSetup | undefined; + private dataViews: DataViewsPluginStart | null = null; private isMlReady: Promise; private setMlReady: () => void = () => {}; private readonly kibanaIndexConfig: SharedGlobalConfig; @@ -156,7 +158,8 @@ export class MlServerPlugin getInternalSavedObjectsClient, plugins.spaces, plugins.security?.authz, - () => this.isMlReady + () => this.isMlReady, + () => this.dataViews ), mlLicense: this.mlLicense, }; @@ -173,6 +176,13 @@ export class MlServerPlugin ? () => coreSetup.getStartServices().then(([, { spaces }]) => spaces!) : undefined; + const getDataViews = () => { + if (this.dataViews === null) { + throw Error('Data views plugin not initialized'); + } + return this.dataViews; + }; + annotationRoutes(routeInit, plugins.security); calendars(routeInit); dataFeedRoutes(routeInit); @@ -211,6 +221,7 @@ export class MlServerPlugin () => getInternalSavedObjectsClient(), () => this.uiSettings, () => this.fieldsFormat, + getDataViews, () => this.isMlReady ); @@ -236,6 +247,7 @@ export class MlServerPlugin this.capabilities = coreStart.capabilities; this.clusterClient = coreStart.elasticsearch.client; this.savedObjectsStart = coreStart.savedObjects; + this.dataViews = plugins.dataViews; // check whether the job saved objects exist // and create them if needed. diff --git a/x-pack/plugins/ml/server/routes/data_frame_analytics.ts b/x-pack/plugins/ml/server/routes/data_frame_analytics.ts index bedc70566a62f..bbfcc0fd5e500 100644 --- a/x-pack/plugins/ml/server/routes/data_frame_analytics.ts +++ b/x-pack/plugins/ml/server/routes/data_frame_analytics.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { RequestHandlerContext, IScopedClusterClient } from 'kibana/server'; +import type { IScopedClusterClient } from 'kibana/server'; import { wrapError } from '../client/error_wrapper'; import { analyticsAuditMessagesProvider } from '../models/data_frame_analytics/analytics_audit_messages'; -import { RouteInitialization } from '../types'; +import type { RouteInitialization } from '../types'; import { JOB_MAP_NODE_TYPES } from '../../common/constants/data_frame_analytics'; -import { Field, Aggregation } from '../../common/types/fields'; +import type { Field, Aggregation } from '../../common/types/fields'; import { dataAnalyticsJobConfigSchema, dataAnalyticsJobUpdateSchema, @@ -25,22 +25,26 @@ import { analyticsNewJobCapsParamsSchema, analyticsNewJobCapsQuerySchema, } from './schemas/data_analytics_schema'; -import { GetAnalyticsMapArgs, ExtendAnalyticsMapArgs } from '../models/data_frame_analytics/types'; +import type { + GetAnalyticsMapArgs, + ExtendAnalyticsMapArgs, +} from '../models/data_frame_analytics/types'; import { IndexPatternHandler } from '../models/data_frame_analytics/index_patterns'; import { AnalyticsManager } from '../models/data_frame_analytics/analytics_manager'; import { validateAnalyticsJob } from '../models/data_frame_analytics/validation'; import { fieldServiceProvider } from '../models/job_service/new_job_caps/field_service'; -import { DeleteDataFrameAnalyticsWithIndexStatus } from '../../common/types/data_frame_analytics'; +import type { DeleteDataFrameAnalyticsWithIndexStatus } from '../../common/types/data_frame_analytics'; import { getAuthorizationHeader } from '../lib/request_authorization'; import type { MlClient } from '../lib/ml_client'; +import type { DataViewsService } from '../../../../../src/plugins/data_views/common'; -function getIndexPatternId(context: RequestHandlerContext, patternName: string) { - const iph = new IndexPatternHandler(context.core.savedObjects.client); +function getIndexPatternId(dataViewsService: DataViewsService, patternName: string) { + const iph = new IndexPatternHandler(dataViewsService); return iph.getIndexPatternId(patternName); } -function deleteDestIndexPatternById(context: RequestHandlerContext, indexPatternId: string) { - const iph = new IndexPatternHandler(context.core.savedObjects.client); +function deleteDestIndexPatternById(dataViewsService: DataViewsService, indexPatternId: string) { + const iph = new IndexPatternHandler(dataViewsService); return iph.deleteIndexPatternById(indexPatternId); } @@ -374,86 +378,89 @@ export function dataFrameAnalyticsRoutes({ router, mlLicense, routeGuard }: Rout tags: ['access:ml:canDeleteDataFrameAnalytics'], }, }, - routeGuard.fullLicenseAPIGuard(async ({ mlClient, client, request, response, context }) => { - try { - const { analyticsId } = request.params; - const { deleteDestIndex, deleteDestIndexPattern } = request.query; - let destinationIndex: string | undefined; - const analyticsJobDeleted: DeleteDataFrameAnalyticsWithIndexStatus = { success: false }; - const destIndexDeleted: DeleteDataFrameAnalyticsWithIndexStatus = { success: false }; - const destIndexPatternDeleted: DeleteDataFrameAnalyticsWithIndexStatus = { - success: false, - }; - + routeGuard.fullLicenseAPIGuard( + async ({ mlClient, client, request, response, getDataViewsService }) => { try { - // Check if analyticsId is valid and get destination index - const { body } = await mlClient.getDataFrameAnalytics({ - id: analyticsId, - }); - if (Array.isArray(body.data_frame_analytics) && body.data_frame_analytics.length > 0) { - destinationIndex = body.data_frame_analytics[0].dest.index; + const { analyticsId } = request.params; + const { deleteDestIndex, deleteDestIndexPattern } = request.query; + let destinationIndex: string | undefined; + const analyticsJobDeleted: DeleteDataFrameAnalyticsWithIndexStatus = { success: false }; + const destIndexDeleted: DeleteDataFrameAnalyticsWithIndexStatus = { success: false }; + const destIndexPatternDeleted: DeleteDataFrameAnalyticsWithIndexStatus = { + success: false, + }; + + try { + // Check if analyticsId is valid and get destination index + const { body } = await mlClient.getDataFrameAnalytics({ + id: analyticsId, + }); + if (Array.isArray(body.data_frame_analytics) && body.data_frame_analytics.length > 0) { + destinationIndex = body.data_frame_analytics[0].dest.index; + } + } catch (e) { + // exist early if the job doesn't exist + return response.customError(wrapError(e)); } - } catch (e) { - // exist early if the job doesn't exist - return response.customError(wrapError(e)); - } - if (deleteDestIndex || deleteDestIndexPattern) { - // If user checks box to delete the destinationIndex associated with the job - if (destinationIndex && deleteDestIndex) { - // Verify if user has privilege to delete the destination index - const userCanDeleteDestIndex = await userCanDeleteIndex(client, destinationIndex); - // If user does have privilege to delete the index, then delete the index - if (userCanDeleteDestIndex) { - try { - await client.asCurrentUser.indices.delete({ - index: destinationIndex, - }); - destIndexDeleted.success = true; - } catch ({ body }) { - destIndexDeleted.error = body; + if (deleteDestIndex || deleteDestIndexPattern) { + // If user checks box to delete the destinationIndex associated with the job + if (destinationIndex && deleteDestIndex) { + // Verify if user has privilege to delete the destination index + const userCanDeleteDestIndex = await userCanDeleteIndex(client, destinationIndex); + // If user does have privilege to delete the index, then delete the index + if (userCanDeleteDestIndex) { + try { + await client.asCurrentUser.indices.delete({ + index: destinationIndex, + }); + destIndexDeleted.success = true; + } catch ({ body }) { + destIndexDeleted.error = body; + } + } else { + return response.forbidden(); } - } else { - return response.forbidden(); } - } - // Delete the index pattern if there's an index pattern that matches the name of dest index - if (destinationIndex && deleteDestIndexPattern) { - try { - const indexPatternId = await getIndexPatternId(context, destinationIndex); - if (indexPatternId) { - await deleteDestIndexPatternById(context, indexPatternId); + // Delete the index pattern if there's an index pattern that matches the name of dest index + if (destinationIndex && deleteDestIndexPattern) { + try { + const dataViewsService = await getDataViewsService(); + const indexPatternId = await getIndexPatternId(dataViewsService, destinationIndex); + if (indexPatternId) { + await deleteDestIndexPatternById(dataViewsService, indexPatternId); + } + destIndexPatternDeleted.success = true; + } catch (deleteDestIndexPatternError) { + destIndexPatternDeleted.error = deleteDestIndexPatternError; } - destIndexPatternDeleted.success = true; - } catch (deleteDestIndexPatternError) { - destIndexPatternDeleted.error = deleteDestIndexPatternError; } } - } - // Grab the target index from the data frame analytics job id - // Delete the data frame analytics + // Grab the target index from the data frame analytics job id + // Delete the data frame analytics - try { - await mlClient.deleteDataFrameAnalytics({ - id: analyticsId, + try { + await mlClient.deleteDataFrameAnalytics({ + id: analyticsId, + }); + analyticsJobDeleted.success = true; + } catch ({ body }) { + analyticsJobDeleted.error = body; + } + const results = { + analyticsJobDeleted, + destIndexDeleted, + destIndexPatternDeleted, + }; + return response.ok({ + body: results, }); - analyticsJobDeleted.success = true; - } catch ({ body }) { - analyticsJobDeleted.error = body; + } catch (e) { + return response.customError(wrapError(e)); } - const results = { - analyticsJobDeleted, - destIndexDeleted, - destIndexPatternDeleted, - }; - return response.ok({ - body: results, - }); - } catch (e) { - return response.customError(wrapError(e)); } - }) + ) ); /** @@ -716,17 +723,12 @@ export function dataFrameAnalyticsRoutes({ router, mlLicense, routeGuard }: Rout tags: ['access:ml:canGetJobs'], }, }, - routeGuard.fullLicenseAPIGuard(async ({ client, request, response, context }) => { + routeGuard.fullLicenseAPIGuard(async ({ client, request, response, getDataViewsService }) => { try { const { indexPattern } = request.params; const isRollup = request.query?.rollup === 'true'; - const savedObjectsClient = context.core.savedObjects.client; - const fieldService = fieldServiceProvider( - indexPattern, - isRollup, - client, - savedObjectsClient - ); + const dataViewsService = await getDataViewsService(); + const fieldService = fieldServiceProvider(indexPattern, isRollup, client, dataViewsService); const { fields, aggs } = await fieldService.getData(true); convertForStringify(aggs, fields); diff --git a/x-pack/plugins/ml/server/routes/job_service.ts b/x-pack/plugins/ml/server/routes/job_service.ts index da115a224d19e..15b0b4449590c 100644 --- a/x-pack/plugins/ml/server/routes/job_service.ts +++ b/x-pack/plugins/ml/server/routes/job_service.ts @@ -8,7 +8,7 @@ import { estypes } from '@elastic/elasticsearch'; import { schema } from '@kbn/config-schema'; import { wrapError } from '../client/error_wrapper'; -import { RouteInitialization } from '../types'; +import type { RouteInitialization } from '../types'; import { categorizationFieldExamplesSchema, basicChartSchema, @@ -32,7 +32,7 @@ import { jobIdSchema } from './schemas/anomaly_detectors_schema'; import { jobServiceProvider } from '../models/job_service'; import { categorizationExamplesProvider } from '../models/job_service/new_job'; import { getAuthorizationHeader } from '../lib/request_authorization'; -import { Datafeed, Job } from '../../common/types/anomaly_detection_jobs'; +import type { Datafeed, Job } from '../../common/types/anomaly_detection_jobs'; /** * Routes for job service @@ -535,21 +535,24 @@ export function jobServiceRoutes({ router, routeGuard }: RouteInitialization) { tags: ['access:ml:canGetJobs'], }, }, - routeGuard.fullLicenseAPIGuard(async ({ client, mlClient, request, response, context }) => { - try { - const { indexPattern } = request.params; - const isRollup = request.query?.rollup === 'true'; - const savedObjectsClient = context.core.savedObjects.client; - const { newJobCaps } = jobServiceProvider(client, mlClient); - const resp = await newJobCaps(indexPattern, isRollup, savedObjectsClient); - - return response.ok({ - body: resp, - }); - } catch (e) { - return response.customError(wrapError(e)); + routeGuard.fullLicenseAPIGuard( + async ({ client, mlClient, request, response, getDataViewsService }) => { + try { + const { indexPattern } = request.params; + const isRollup = request.query?.rollup === 'true'; + const { newJobCaps } = jobServiceProvider(client, mlClient); + + const dataViewsService = await getDataViewsService(); + const resp = await newJobCaps(indexPattern, isRollup, dataViewsService); + + return response.ok({ + body: resp, + }); + } catch (e) { + return response.customError(wrapError(e)); + } } - }) + ) ); /** diff --git a/x-pack/plugins/ml/server/routes/modules.ts b/x-pack/plugins/ml/server/routes/modules.ts index 097f3f8d67652..d814e91f70ca0 100644 --- a/x-pack/plugins/ml/server/routes/modules.ts +++ b/x-pack/plugins/ml/server/routes/modules.ts @@ -5,19 +5,24 @@ * 2.0. */ -import { TypeOf } from '@kbn/config-schema'; +import type { TypeOf } from '@kbn/config-schema'; -import { IScopedClusterClient, KibanaRequest, SavedObjectsClientContract } from 'kibana/server'; -import { DatafeedOverride, JobOverride } from '../../common/types/modules'; +import type { + IScopedClusterClient, + KibanaRequest, + SavedObjectsClientContract, +} from 'kibana/server'; +import type { DataViewsService } from '../../../../../src/plugins/data_views/common'; +import type { DatafeedOverride, JobOverride } from '../../common/types/modules'; import { wrapError } from '../client/error_wrapper'; -import { DataRecognizer } from '../models/data_recognizer'; +import { dataRecognizerFactory } from '../models/data_recognizer'; import { moduleIdParamSchema, optionalModuleIdParamSchema, modulesIndexPatternTitleSchema, setupModuleBodySchema, } from './schemas/modules'; -import { RouteInitialization } from '../types'; +import type { RouteInitialization } from '../types'; import type { MlClient } from '../lib/ml_client'; import type { JobSavedObjectService } from '../saved_objects'; @@ -25,14 +30,16 @@ function recognize( client: IScopedClusterClient, mlClient: MlClient, savedObjectsClient: SavedObjectsClientContract, + dataViewsService: DataViewsService, jobSavedObjectService: JobSavedObjectService, request: KibanaRequest, indexPatternTitle: string ) { - const dr = new DataRecognizer( + const dr = dataRecognizerFactory( client, mlClient, savedObjectsClient, + dataViewsService, jobSavedObjectService, request ); @@ -43,14 +50,16 @@ function getModule( client: IScopedClusterClient, mlClient: MlClient, savedObjectsClient: SavedObjectsClientContract, + dataViewsService: DataViewsService, jobSavedObjectService: JobSavedObjectService, request: KibanaRequest, moduleId?: string ) { - const dr = new DataRecognizer( + const dr = dataRecognizerFactory( client, mlClient, savedObjectsClient, + dataViewsService, jobSavedObjectService, request ); @@ -65,6 +74,7 @@ function setup( client: IScopedClusterClient, mlClient: MlClient, savedObjectsClient: SavedObjectsClientContract, + dataViewsService: DataViewsService, jobSavedObjectService: JobSavedObjectService, request: KibanaRequest, moduleId: string, @@ -81,10 +91,11 @@ function setup( estimateModelMemory?: boolean, applyToAllSpaces?: boolean ) { - const dr = new DataRecognizer( + const dr = dataRecognizerFactory( client, mlClient, savedObjectsClient, + dataViewsService, jobSavedObjectService, request ); @@ -109,14 +120,16 @@ function dataRecognizerJobsExist( client: IScopedClusterClient, mlClient: MlClient, savedObjectsClient: SavedObjectsClientContract, + dataViewsService: DataViewsService, jobSavedObjectService: JobSavedObjectService, request: KibanaRequest, moduleId: string ) { - const dr = new DataRecognizer( + const dr = dataRecognizerFactory( client, mlClient, savedObjectsClient, + dataViewsService, jobSavedObjectService, request ); @@ -166,13 +179,23 @@ export function dataRecognizer({ router, routeGuard }: RouteInitialization) { }, }, routeGuard.fullLicenseAPIGuard( - async ({ client, mlClient, request, response, context, jobSavedObjectService }) => { + async ({ + client, + mlClient, + request, + response, + context, + jobSavedObjectService, + getDataViewsService, + }) => { try { const { indexPatternTitle } = request.params; + const dataViewService = await getDataViewsService(); const results = await recognize( client, mlClient, context.core.savedObjects.client, + dataViewService, jobSavedObjectService, request, indexPatternTitle @@ -305,7 +328,15 @@ export function dataRecognizer({ router, routeGuard }: RouteInitialization) { }, }, routeGuard.fullLicenseAPIGuard( - async ({ client, mlClient, request, response, context, jobSavedObjectService }) => { + async ({ + client, + mlClient, + request, + response, + context, + jobSavedObjectService, + getDataViewsService, + }) => { try { let { moduleId } = request.params; if (moduleId === '') { @@ -313,10 +344,12 @@ export function dataRecognizer({ router, routeGuard }: RouteInitialization) { // the moduleId will be an empty string. moduleId = undefined; } + const dataViewService = await getDataViewsService(); const results = await getModule( client, mlClient, context.core.savedObjects.client, + dataViewService, jobSavedObjectService, request, moduleId @@ -482,7 +515,15 @@ export function dataRecognizer({ router, routeGuard }: RouteInitialization) { }, }, routeGuard.fullLicenseAPIGuard( - async ({ client, mlClient, request, response, context, jobSavedObjectService }) => { + async ({ + client, + mlClient, + request, + response, + context, + jobSavedObjectService, + getDataViewsService, + }) => { try { const { moduleId } = request.params; @@ -501,10 +542,13 @@ export function dataRecognizer({ router, routeGuard }: RouteInitialization) { applyToAllSpaces, } = request.body as TypeOf; + const dataViewService = await getDataViewsService(); + const result = await setup( client, mlClient, context.core.savedObjects.client, + dataViewService, jobSavedObjectService, request, moduleId, @@ -593,13 +637,23 @@ export function dataRecognizer({ router, routeGuard }: RouteInitialization) { }, }, routeGuard.fullLicenseAPIGuard( - async ({ client, mlClient, request, response, context, jobSavedObjectService }) => { + async ({ + client, + mlClient, + request, + response, + context, + jobSavedObjectService, + getDataViewsService, + }) => { try { const { moduleId } = request.params; + const dataViewService = await getDataViewsService(); const result = await dataRecognizerJobsExist( client, mlClient, context.core.savedObjects.client, + dataViewService, jobSavedObjectService, request, moduleId diff --git a/x-pack/plugins/ml/server/shared_services/providers/modules.ts b/x-pack/plugins/ml/server/shared_services/providers/modules.ts index c86a40e4224ce..f6a6c58fadb4e 100644 --- a/x-pack/plugins/ml/server/shared_services/providers/modules.ts +++ b/x-pack/plugins/ml/server/shared_services/providers/modules.ts @@ -5,13 +5,12 @@ * 2.0. */ -import { IScopedClusterClient, KibanaRequest, SavedObjectsClientContract } from 'kibana/server'; -import { TypeOf } from '@kbn/config-schema'; -import { DataRecognizer } from '../../models/data_recognizer'; -import { GetGuards } from '../shared_services'; +import type { KibanaRequest, SavedObjectsClientContract } from 'kibana/server'; +import type { TypeOf } from '@kbn/config-schema'; +import type { PluginStart as DataViewsPluginStart } from '../../../../../../src/plugins/data_views/server'; +import type { GetGuards } from '../shared_services'; +import { DataRecognizer, dataRecognizerFactory } from '../../models/data_recognizer'; import { moduleIdParamSchema, setupModuleBodySchema } from '../../routes/schemas/modules'; -import { MlClient } from '../../lib/ml_client'; -import { JobSavedObjectService } from '../../saved_objects'; export type ModuleSetupPayload = TypeOf & TypeOf; @@ -28,7 +27,10 @@ export interface ModulesProvider { }; } -export function getModulesProvider(getGuards: GetGuards): ModulesProvider { +export function getModulesProvider( + getGuards: GetGuards, + getDataViews: () => DataViewsPluginStart +): ModulesProvider { return { modulesProvider(request: KibanaRequest, savedObjectsClient: SavedObjectsClientContract) { return { @@ -36,11 +38,13 @@ export function getModulesProvider(getGuards: GetGuards): ModulesProvider { return await getGuards(request, savedObjectsClient) .isFullLicense() .hasMlCapabilities(['canGetJobs']) - .ok(async ({ scopedClient, mlClient, jobSavedObjectService }) => { + .ok(async ({ scopedClient, mlClient, jobSavedObjectService, getDataViewsService }) => { + const dataViewsService = await getDataViewsService(); const dr = dataRecognizerFactory( scopedClient, mlClient, savedObjectsClient, + dataViewsService, jobSavedObjectService, request ); @@ -51,11 +55,13 @@ export function getModulesProvider(getGuards: GetGuards): ModulesProvider { return await getGuards(request, savedObjectsClient) .isFullLicense() .hasMlCapabilities(['canGetJobs']) - .ok(async ({ scopedClient, mlClient, jobSavedObjectService }) => { + .ok(async ({ scopedClient, mlClient, jobSavedObjectService, getDataViewsService }) => { + const dataViewsService = await getDataViewsService(); const dr = dataRecognizerFactory( scopedClient, mlClient, savedObjectsClient, + dataViewsService, jobSavedObjectService, request ); @@ -66,11 +72,13 @@ export function getModulesProvider(getGuards: GetGuards): ModulesProvider { return await getGuards(request, savedObjectsClient) .isFullLicense() .hasMlCapabilities(['canGetJobs']) - .ok(async ({ scopedClient, mlClient, jobSavedObjectService }) => { + .ok(async ({ scopedClient, mlClient, jobSavedObjectService, getDataViewsService }) => { + const dataViewsService = await getDataViewsService(); const dr = dataRecognizerFactory( scopedClient, mlClient, savedObjectsClient, + dataViewsService, jobSavedObjectService, request ); @@ -81,11 +89,13 @@ export function getModulesProvider(getGuards: GetGuards): ModulesProvider { return await getGuards(request, savedObjectsClient) .isFullLicense() .hasMlCapabilities(['canCreateJob']) - .ok(async ({ scopedClient, mlClient, jobSavedObjectService }) => { + .ok(async ({ scopedClient, mlClient, jobSavedObjectService, getDataViewsService }) => { + const dataViewsService = await getDataViewsService(); const dr = dataRecognizerFactory( scopedClient, mlClient, savedObjectsClient, + dataViewsService, jobSavedObjectService, request ); @@ -109,13 +119,3 @@ export function getModulesProvider(getGuards: GetGuards): ModulesProvider { }, }; } - -function dataRecognizerFactory( - client: IScopedClusterClient, - mlClient: MlClient, - savedObjectsClient: SavedObjectsClientContract, - jobSavedObjectService: JobSavedObjectService, - request: KibanaRequest -) { - return new DataRecognizer(client, mlClient, savedObjectsClient, jobSavedObjectService, request); -} diff --git a/x-pack/plugins/ml/server/shared_services/shared_services.ts b/x-pack/plugins/ml/server/shared_services/shared_services.ts index 5c8bbffe10aed..9c8ab1e069258 100644 --- a/x-pack/plugins/ml/server/shared_services/shared_services.ts +++ b/x-pack/plugins/ml/server/shared_services/shared_services.ts @@ -5,17 +5,18 @@ * 2.0. */ -import { +import type { IClusterClient, IScopedClusterClient, SavedObjectsClientContract, UiSettingsServiceStart, } from 'kibana/server'; -import { SpacesPluginStart } from '../../../spaces/server'; +import type { SpacesPluginStart } from '../../../spaces/server'; import { KibanaRequest } from '../../.././../../src/core/server'; import { MlLicense } from '../../common/license'; import type { CloudSetup } from '../../../cloud/server'; +import type { PluginStart as DataViewsPluginStart } from '../../../../../src/plugins/data_views/server'; import type { SecurityPluginSetup } from '../../../security/server'; import { licenseChecks } from './license_checks'; import { MlSystemProvider, getMlSystemProvider } from './providers/system'; @@ -26,7 +27,7 @@ import { AnomalyDetectorsProvider, getAnomalyDetectorsProvider, } from './providers/anomaly_detectors'; -import { ResolveMlCapabilities, MlCapabilitiesKey } from '../../common/types/capabilities'; +import type { ResolveMlCapabilities, MlCapabilitiesKey } from '../../common/types/capabilities'; import { hasMlCapabilitiesProvider, HasMlCapabilities } from '../lib/capabilities'; import { MLClusterClientUninitialized, @@ -45,6 +46,7 @@ import { } from '../lib/alerts/jobs_health_service'; import type { FieldFormatsStart } from '../../../../../src/plugins/field_formats/server'; import type { FieldFormatsRegistryProvider } from '../../common/types/kibana'; +import { getDataViewsServiceFactory, GetDataViewsService } from '../lib/data_views_utils'; export type SharedServices = JobServiceProvider & AnomalyDetectorsProvider & @@ -76,6 +78,7 @@ interface OkParams { mlClient: MlClient; jobSavedObjectService: JobSavedObjectService; getFieldsFormatRegistry: FieldFormatsRegistryProvider; + getDataViewsService: GetDataViewsService; } type OkCallback = (okParams: OkParams) => any; @@ -90,6 +93,7 @@ export function createSharedServices( getInternalSavedObjectsClient: () => SavedObjectsClientContract | null, getUiSettings: () => UiSettingsServiceStart | null, getFieldsFormat: () => FieldFormatsStart | null, + getDataViews: () => DataViewsPluginStart, isMlReady: () => Promise ): { sharedServicesProviders: SharedServices; @@ -101,6 +105,7 @@ export function createSharedServices( savedObjectsClient: SavedObjectsClientContract ): Guards { const internalSavedObjectsClient = getInternalSavedObjectsClient(); + if (internalSavedObjectsClient === null) { throw new Error('Internal saved object client not initialized'); } @@ -113,7 +118,8 @@ export function createSharedServices( getSpaces !== undefined, isMlReady, getUiSettings, - getFieldsFormat + getFieldsFormat, + getDataViews ); const { @@ -122,6 +128,7 @@ export function createSharedServices( mlClient, jobSavedObjectService, getFieldsFormatRegistry, + getDataViewsService, } = getRequestItems(request); const asyncGuards: Array> = []; @@ -140,7 +147,13 @@ export function createSharedServices( }, async ok(callback: OkCallback) { await Promise.all(asyncGuards); - return callback({ scopedClient, mlClient, jobSavedObjectService, getFieldsFormatRegistry }); + return callback({ + scopedClient, + mlClient, + jobSavedObjectService, + getFieldsFormatRegistry, + getDataViewsService, + }); }, }; return guards; @@ -153,7 +166,7 @@ export function createSharedServices( sharedServicesProviders: { ...getJobServiceProvider(getGuards), ...getAnomalyDetectorsProvider(getGuards), - ...getModulesProvider(getGuards), + ...getModulesProvider(getGuards, getDataViews), ...getResultsServiceProvider(getGuards), ...getMlSystemProvider(getGuards, mlLicense, getSpaces, cloud, resolveMlCapabilities), ...getAlertingServiceProvider(getGuards), @@ -176,7 +189,8 @@ function getRequestItemsProvider( spaceEnabled: boolean, isMlReady: () => Promise, getUiSettings: () => UiSettingsServiceStart | null, - getFieldsFormat: () => FieldFormatsStart | null + getFieldsFormat: () => FieldFormatsStart | null, + getDataViews: () => DataViewsPluginStart ) { return (request: KibanaRequest) => { const getHasMlCapabilities = hasMlCapabilitiesProvider(resolveMlCapabilities); @@ -234,12 +248,20 @@ function getRequestItemsProvider( }; mlClient = getMlClient(scopedClient, jobSavedObjectService); } + + const getDataViewsService = getDataViewsServiceFactory( + getDataViews, + savedObjectsClient, + scopedClient + ); + return { hasMlCapabilities, scopedClient, mlClient, jobSavedObjectService, getFieldsFormatRegistry, + getDataViewsService, }; }; } diff --git a/x-pack/plugins/ml/server/types.ts b/x-pack/plugins/ml/server/types.ts index da83b03766af4..d5c67bf99a7a0 100644 --- a/x-pack/plugins/ml/server/types.ts +++ b/x-pack/plugins/ml/server/types.ts @@ -23,6 +23,7 @@ import type { PluginSetup as DataPluginSetup, PluginStart as DataPluginStart, } from '../../../../src/plugins/data/server'; +import type { PluginStart as DataViewsPluginStart } from '../../../../src/plugins/data_views/server'; import type { FieldFormatsSetup, FieldFormatsStart, @@ -64,6 +65,7 @@ export interface PluginsSetup { export interface PluginsStart { data: DataPluginStart; + dataViews: DataViewsPluginStart; fieldFormats: FieldFormatsStart; spaces?: SpacesPluginStart; } diff --git a/x-pack/plugins/ml/tsconfig.json b/x-pack/plugins/ml/tsconfig.json index db8fc463b0550..0c108f8b3b8a5 100644 --- a/x-pack/plugins/ml/tsconfig.json +++ b/x-pack/plugins/ml/tsconfig.json @@ -21,6 +21,7 @@ { "path": "../../../src/core/tsconfig.json" }, { "path": "../../../src/plugins/embeddable/tsconfig.json" }, { "path": "../../../src/plugins/index_pattern_management/tsconfig.json" }, + { "path": "../../../src/plugins/data_views/tsconfig.json" }, { "path": "../cloud/tsconfig.json" }, { "path": "../features/tsconfig.json" }, { "path": "../data_visualizer/tsconfig.json"}, diff --git a/x-pack/plugins/monitoring/common/types/alerts.ts b/x-pack/plugins/monitoring/common/types/alerts.ts index bbd217169469d..9abca4cbdc948 100644 --- a/x-pack/plugins/monitoring/common/types/alerts.ts +++ b/x-pack/plugins/monitoring/common/types/alerts.ts @@ -208,9 +208,11 @@ export interface CCRReadExceptionsUIMeta extends CCRReadExceptionsStats { itemLabel: string; } -export interface IndexShardSizeStats extends AlertNodeStats { +export interface IndexShardSizeStats { shardIndex: string; shardSize: number; + clusterUuid: string; + ccs?: string; } export interface IndexShardSizeUIMeta extends IndexShardSizeStats { diff --git a/x-pack/plugins/monitoring/public/application/hooks/use_request_error_handler.tsx b/x-pack/plugins/monitoring/public/application/hooks/use_request_error_handler.tsx index 3a64531844451..6c7c86a330135 100644 --- a/x-pack/plugins/monitoring/public/application/hooks/use_request_error_handler.tsx +++ b/x-pack/plugins/monitoring/public/application/hooks/use_request_error_handler.tsx @@ -5,6 +5,7 @@ * 2.0. */ import React, { useCallback } from 'react'; +import { useHistory } from 'react-router-dom'; import { includes } from 'lodash'; import { IHttpFetchError } from 'kibana/public'; import { FormattedMessage } from '@kbn/i18n/react'; @@ -34,11 +35,12 @@ export function formatMonitoringError(err: IHttpFetchError) { export const useRequestErrorHandler = () => { const { services } = useKibana(); + const history = useHistory(); return useCallback( (err: IHttpFetchError) => { if (err.response?.status === 403) { // redirect to error message view - history.replaceState(null, '', '#/access-denied'); + history.push('/access-denied'); } else if (err.response?.status === 404 && !includes(window.location.hash, 'no-data')) { // pass through if this is a 404 and we're already on the no-data page const formattedError = formatMonitoringError(err); @@ -74,6 +76,6 @@ export const useRequestErrorHandler = () => { }); } }, - [services.notifications] + [history, services.notifications?.toasts] ); }; diff --git a/x-pack/plugins/monitoring/public/application/index.tsx b/x-pack/plugins/monitoring/public/application/index.tsx index 67b9d8873573e..f18201110eddc 100644 --- a/x-pack/plugins/monitoring/public/application/index.tsx +++ b/x-pack/plugins/monitoring/public/application/index.tsx @@ -33,6 +33,7 @@ import { BeatsInstancePage } from './pages/beats/instance'; import { ApmOverviewPage, ApmInstancesPage, ApmInstancePage } from './pages/apm'; import { KibanaOverviewPage } from './pages/kibana/overview'; import { KibanaInstancesPage } from './pages/kibana/instances'; +import { KibanaInstancePage } from './pages/kibana/instance'; import { ElasticsearchNodesPage } from './pages/elasticsearch/nodes_page'; import { ElasticsearchIndicesPage } from './pages/elasticsearch/indices_page'; import { ElasticsearchIndexPage } from './pages/elasticsearch/index_page'; @@ -54,13 +55,20 @@ import { LogStashNodeAdvancedPage } from './pages/logstash/advanced'; // import { LogStashNodePipelinesPage } from './pages/logstash/node_pipelines'; import { LogStashNodePage } from './pages/logstash/node'; import { LogStashNodePipelinesPage } from './pages/logstash/node_pipelines'; +import { AccessDeniedPage } from './pages/access_denied'; export const renderApp = ( core: CoreStart, plugins: MonitoringStartPluginDependencies, - { element, setHeaderActionMenu }: AppMountParameters, + { element, history, setHeaderActionMenu }: AppMountParameters, externalConfig: ExternalConfig ) => { + // dispatch synthetic hash change event to update hash history objects + // this is necessary because hash updates triggered by using popState won't trigger this event naturally. + const unlistenParentHistory = history.listen(() => { + window.dispatchEvent(new HashChangeEvent('hashchange')); + }); + ReactDOM.render( { ReactDOM.unmountComponentAtNode(element); + unlistenParentHistory(); }; }; @@ -93,6 +102,7 @@ const MonitoringApp: React.FC<{ + {/* Kibana Views */} + + = () => { + const { services } = useKibana(); + const [hasAccess, setHasAccess] = useState(false); + + useInterval(() => { + async function tryPrivilege() { + if (services.http?.fetch) { + try { + const response = await services.http?.fetch<{ has_access: boolean }>( + '../api/monitoring/v1/check_access' + ); + setHasAccess(response.has_access); + } catch (e) { + setHasAccess(false); + } + } + } + tryPrivilege(); + }, 5000); + + const title = i18n.translate('xpack.monitoring.accessDeniedTitle', { + defaultMessage: 'Access Denied', + }); + + if (hasAccess) { + return ; + } + return ( + + +

+ +

+

+ +

+

+ + + +

+ + + ); +}; diff --git a/x-pack/plugins/monitoring/public/application/pages/apm/instances.tsx b/x-pack/plugins/monitoring/public/application/pages/apm/instances.tsx index 66748e3d1b0bc..fedb07fa65a40 100644 --- a/x-pack/plugins/monitoring/public/application/pages/apm/instances.tsx +++ b/x-pack/plugins/monitoring/public/application/pages/apm/instances.tsx @@ -18,6 +18,7 @@ import { ApmServerInstances } from '../../../components/apm/instances'; import { SetupModeRenderer } from '../../setup_mode/setup_mode_renderer'; import { SetupModeContext } from '../../../components/setup_mode/setup_mode_context'; import { BreadcrumbContainer } from '../../hooks/use_breadcrumbs'; +import { APM_SYSTEM_ID } from '../../../../common/constants'; interface SetupModeProps { setupMode: any; @@ -90,7 +91,7 @@ export const ApmInstancesPage: React.FC = ({ clusters }) => { data-test-subj="apmInstancesPage" > ( {flyoutComponent} diff --git a/x-pack/plugins/monitoring/public/application/pages/beats/beats_template.tsx b/x-pack/plugins/monitoring/public/application/pages/beats/beats_template.tsx index 3bab01af8ceb7..7a070c735bbea 100644 --- a/x-pack/plugins/monitoring/public/application/pages/beats/beats_template.tsx +++ b/x-pack/plugins/monitoring/public/application/pages/beats/beats_template.tsx @@ -23,6 +23,7 @@ export const BeatsTemplate: React.FC = ({ instance, ...props defaultMessage: 'Overview', }), route: '/beats', + testSubj: 'beatsOverviewPage', }); tabs.push({ id: 'instances', @@ -30,6 +31,7 @@ export const BeatsTemplate: React.FC = ({ instance, ...props defaultMessage: 'Instances', }), route: '/beats/beats', + testSubj: 'beatsListingPage', }); } else { tabs.push({ diff --git a/x-pack/plugins/monitoring/public/application/pages/beats/instances.tsx b/x-pack/plugins/monitoring/public/application/pages/beats/instances.tsx index 4b747c079df80..4611f17159621 100644 --- a/x-pack/plugins/monitoring/public/application/pages/beats/instances.tsx +++ b/x-pack/plugins/monitoring/public/application/pages/beats/instances.tsx @@ -18,6 +18,7 @@ import { Listing } from '../../../components/beats/listing'; import { SetupModeRenderer, SetupModeProps } from '../../setup_mode/setup_mode_renderer'; import { SetupModeContext } from '../../../components/setup_mode/setup_mode_context'; import { BreadcrumbContainer } from '../../hooks/use_breadcrumbs'; +import { BEATS_SYSTEM_ID } from '../../../../common/constants'; export const BeatsInstancesPage: React.FC = ({ clusters }) => { const globalState = useContext(GlobalStateContext); @@ -70,15 +71,10 @@ export const BeatsInstancesPage: React.FC = ({ clusters }) => { ]); return ( - +
( {flyoutComponent} diff --git a/x-pack/plugins/monitoring/public/application/pages/beats/overview.tsx b/x-pack/plugins/monitoring/public/application/pages/beats/overview.tsx index 1fa37a2c7b3e6..aec89c92055c4 100644 --- a/x-pack/plugins/monitoring/public/application/pages/beats/overview.tsx +++ b/x-pack/plugins/monitoring/public/application/pages/beats/overview.tsx @@ -72,13 +72,8 @@ export const BeatsOverviewPage: React.FC = ({ clusters }) => { }; return ( - -
{renderOverview(data)}
+ +
{renderOverview(data)}
); }; diff --git a/x-pack/plugins/monitoring/public/application/pages/cluster/overview_page.tsx b/x-pack/plugins/monitoring/public/application/pages/cluster/overview_page.tsx index b78df27cd12c4..04074762c8d22 100644 --- a/x-pack/plugins/monitoring/public/application/pages/cluster/overview_page.tsx +++ b/x-pack/plugins/monitoring/public/application/pages/cluster/overview_page.tsx @@ -50,7 +50,7 @@ export const ClusterOverview: React.FC<{}> = () => { { id: 'clusterName', label: clusters[0].cluster_name, - testSubj: 'clusterName', + testSubj: 'overviewTabsclusterName', route: '/overview', }, ]; diff --git a/x-pack/plugins/monitoring/public/application/pages/elasticsearch/ccr_page.tsx b/x-pack/plugins/monitoring/public/application/pages/elasticsearch/ccr_page.tsx index 76d924f919c04..d8e4e45b31aa8 100644 --- a/x-pack/plugins/monitoring/public/application/pages/elasticsearch/ccr_page.tsx +++ b/x-pack/plugins/monitoring/public/application/pages/elasticsearch/ccr_page.tsx @@ -13,17 +13,12 @@ import { GlobalStateContext } from '../../contexts/global_state_context'; // @ts-ignore import { Ccr } from '../../../components/elasticsearch/ccr'; import { ComponentProps } from '../../route_init'; -import { SetupModeRenderer } from '../../setup_mode/setup_mode_renderer'; +import { SetupModeRenderer, SetupModeProps } from '../../setup_mode/setup_mode_renderer'; import { SetupModeContext } from '../../../components/setup_mode/setup_mode_context'; import { AlertsByName } from '../../../alerts/types'; import { fetchAlerts } from '../../../lib/fetch_alerts'; -import { RULE_CCR_READ_EXCEPTIONS } from '../../../../common/constants'; +import { RULE_CCR_READ_EXCEPTIONS, ELASTICSEARCH_SYSTEM_ID } from '../../../../common/constants'; import { BreadcrumbContainer } from '../../hooks/use_breadcrumbs'; -interface SetupModeProps { - setupMode: any; - flyoutComponent: any; - bottomBarComponent: any; -} export const ElasticsearchCcrPage: React.FC = ({ clusters }) => { const globalState = useContext(GlobalStateContext); @@ -93,6 +88,7 @@ export const ElasticsearchCcrPage: React.FC = ({ clusters }) => cluster={cluster} > ( {flyoutComponent} diff --git a/x-pack/plugins/monitoring/public/application/pages/elasticsearch/ccr_shard_page.tsx b/x-pack/plugins/monitoring/public/application/pages/elasticsearch/ccr_shard_page.tsx index 1ef5451209c65..e88b378b14efd 100644 --- a/x-pack/plugins/monitoring/public/application/pages/elasticsearch/ccr_shard_page.tsx +++ b/x-pack/plugins/monitoring/public/application/pages/elasticsearch/ccr_shard_page.tsx @@ -15,19 +15,13 @@ import { GlobalStateContext } from '../../contexts/global_state_context'; // @ts-ignore import { CcrShardReact } from '../../../components/elasticsearch/ccr_shard'; import { ComponentProps } from '../../route_init'; -import { SetupModeRenderer } from '../../setup_mode/setup_mode_renderer'; +import { SetupModeRenderer, SetupModeProps } from '../../setup_mode/setup_mode_renderer'; import { SetupModeContext } from '../../../components/setup_mode/setup_mode_context'; import { AlertsByName } from '../../../alerts/types'; import { fetchAlerts } from '../../../lib/fetch_alerts'; -import { RULE_CCR_READ_EXCEPTIONS } from '../../../../common/constants'; +import { RULE_CCR_READ_EXCEPTIONS, ELASTICSEARCH_SYSTEM_ID } from '../../../../common/constants'; import { BreadcrumbContainer } from '../../hooks/use_breadcrumbs'; -interface SetupModeProps { - setupMode: any; - flyoutComponent: any; - bottomBarComponent: any; -} - export const ElasticsearchCcrShardPage: React.FC = ({ clusters }) => { const globalState = useContext(GlobalStateContext); const { services } = useKibana<{ data: any }>(); @@ -114,6 +108,7 @@ export const ElasticsearchCcrShardPage: React.FC = ({ clusters } data-test-subj="elasticsearchCcrShardPage" > ( diff --git a/x-pack/plugins/monitoring/public/application/pages/elasticsearch/index_advanced_page.tsx b/x-pack/plugins/monitoring/public/application/pages/elasticsearch/index_advanced_page.tsx index da9a1c858dfed..6d36e9c66ac5a 100644 --- a/x-pack/plugins/monitoring/public/application/pages/elasticsearch/index_advanced_page.tsx +++ b/x-pack/plugins/monitoring/public/application/pages/elasticsearch/index_advanced_page.tsx @@ -19,7 +19,7 @@ import { ItemTemplate } from './item_template'; import { AdvancedIndex } from '../../../components/elasticsearch/index/advanced'; import { AlertsByName } from '../../../alerts/types'; import { fetchAlerts } from '../../../lib/fetch_alerts'; -import { RULE_LARGE_SHARD_SIZE } from '../../../../common/constants'; +import { RULE_LARGE_SHARD_SIZE, ELASTICSEARCH_SYSTEM_ID } from '../../../../common/constants'; import { BreadcrumbContainer } from '../../hooks/use_breadcrumbs'; export const ElasticsearchIndexAdvancedPage: React.FC = ({ clusters }) => { @@ -89,6 +89,7 @@ export const ElasticsearchIndexAdvancedPage: React.FC = ({ clust return ( ( {flyoutComponent} diff --git a/x-pack/plugins/monitoring/public/application/pages/elasticsearch/index_page.tsx b/x-pack/plugins/monitoring/public/application/pages/elasticsearch/index_page.tsx index e067d66cfe69e..f54e688fdebb8 100644 --- a/x-pack/plugins/monitoring/public/application/pages/elasticsearch/index_page.tsx +++ b/x-pack/plugins/monitoring/public/application/pages/elasticsearch/index_page.tsx @@ -23,7 +23,7 @@ import { indicesByNodes } from '../../../components/elasticsearch/shard_allocati import { labels } from '../../../components/elasticsearch/shard_allocation/lib/labels'; import { AlertsByName } from '../../../alerts/types'; import { fetchAlerts } from '../../../lib/fetch_alerts'; -import { RULE_LARGE_SHARD_SIZE } from '../../../../common/constants'; +import { RULE_LARGE_SHARD_SIZE, ELASTICSEARCH_SYSTEM_ID } from '../../../../common/constants'; import { BreadcrumbContainer } from '../../hooks/use_breadcrumbs'; export const ElasticsearchIndexPage: React.FC = ({ clusters }) => { @@ -114,6 +114,7 @@ export const ElasticsearchIndexPage: React.FC = ({ clusters }) = pageType="indices" > ( {flyoutComponent} diff --git a/x-pack/plugins/monitoring/public/application/pages/elasticsearch/indices_page.tsx b/x-pack/plugins/monitoring/public/application/pages/elasticsearch/indices_page.tsx index 5470c6c23b769..09bbdf16edffd 100644 --- a/x-pack/plugins/monitoring/public/application/pages/elasticsearch/indices_page.tsx +++ b/x-pack/plugins/monitoring/public/application/pages/elasticsearch/indices_page.tsx @@ -18,7 +18,7 @@ import { useTable } from '../../hooks/use_table'; import { useLocalStorage } from '../../hooks/use_local_storage'; import { AlertsByName } from '../../../alerts/types'; import { fetchAlerts } from '../../../lib/fetch_alerts'; -import { RULE_LARGE_SHARD_SIZE } from '../../../../common/constants'; +import { RULE_LARGE_SHARD_SIZE, ELASTICSEARCH_SYSTEM_ID } from '../../../../common/constants'; import { BreadcrumbContainer } from '../../hooks/use_breadcrumbs'; export const ElasticsearchIndicesPage: React.FC = ({ clusters }) => { @@ -106,6 +106,7 @@ export const ElasticsearchIndicesPage: React.FC = ({ clusters }) >
( {flyoutComponent} diff --git a/x-pack/plugins/monitoring/public/application/pages/elasticsearch/ml_jobs_page.tsx b/x-pack/plugins/monitoring/public/application/pages/elasticsearch/ml_jobs_page.tsx index cde2e7a2b93f2..b97007f1c1462 100644 --- a/x-pack/plugins/monitoring/public/application/pages/elasticsearch/ml_jobs_page.tsx +++ b/x-pack/plugins/monitoring/public/application/pages/elasticsearch/ml_jobs_page.tsx @@ -17,6 +17,7 @@ import { SetupModeContext } from '../../../components/setup_mode/setup_mode_cont import { useTable } from '../../hooks/use_table'; import type { MLJobs } from '../../../types'; import { BreadcrumbContainer } from '../../hooks/use_breadcrumbs'; +import { ELASTICSEARCH_SYSTEM_ID } from '../../../../common/constants'; interface SetupModeProps { setupMode: any; @@ -90,6 +91,7 @@ export const ElasticsearchMLJobsPage: React.FC = ({ clusters }) >
( {flyoutComponent} diff --git a/x-pack/plugins/monitoring/public/application/pages/elasticsearch/node_page.tsx b/x-pack/plugins/monitoring/public/application/pages/elasticsearch/node_page.tsx index 4ef51beb1f169..bad837e4ed60b 100644 --- a/x-pack/plugins/monitoring/public/application/pages/elasticsearch/node_page.tsx +++ b/x-pack/plugins/monitoring/public/application/pages/elasticsearch/node_page.tsx @@ -29,6 +29,7 @@ import { RULE_MISSING_MONITORING_DATA, RULE_DISK_USAGE, RULE_MEMORY_USAGE, + ELASTICSEARCH_SYSTEM_ID, } from '../../../../common/constants'; import { BreadcrumbContainer } from '../../hooks/use_breadcrumbs'; @@ -138,6 +139,7 @@ export const ElasticsearchNodePage: React.FC = ({ clusters }) => pageType="nodes" > ( {flyoutComponent} diff --git a/x-pack/plugins/monitoring/public/application/pages/elasticsearch/nodes_page.tsx b/x-pack/plugins/monitoring/public/application/pages/elasticsearch/nodes_page.tsx index 06c4cf20b8820..51792086855cb 100644 --- a/x-pack/plugins/monitoring/public/application/pages/elasticsearch/nodes_page.tsx +++ b/x-pack/plugins/monitoring/public/application/pages/elasticsearch/nodes_page.tsx @@ -26,6 +26,7 @@ import { RULE_THREAD_POOL_WRITE_REJECTIONS, RULE_MEMORY_USAGE, RULE_MISSING_MONITORING_DATA, + ELASTICSEARCH_SYSTEM_ID, } from '../../../../common/constants'; export const ElasticsearchNodesPage: React.FC = ({ clusters }) => { @@ -117,6 +118,7 @@ export const ElasticsearchNodesPage: React.FC = ({ clusters }) = >
( {flyoutComponent} diff --git a/x-pack/plugins/monitoring/public/application/pages/kibana/instance.tsx b/x-pack/plugins/monitoring/public/application/pages/kibana/instance.tsx index 444794d118b0f..2d2fe99758ff7 100644 --- a/x-pack/plugins/monitoring/public/application/pages/kibana/instance.tsx +++ b/x-pack/plugins/monitoring/public/application/pages/kibana/instance.tsx @@ -164,13 +164,8 @@ export const KibanaInstancePage: React.FC = ({ clusters }) => { }, [ccs, clusterUuid, instance, services.data?.query.timefilter.timefilter, services.http]); return ( - -
+ +
diff --git a/x-pack/plugins/monitoring/public/application/pages/kibana/instances.tsx b/x-pack/plugins/monitoring/public/application/pages/kibana/instances.tsx index ae0237ea40472..076e9413216fb 100644 --- a/x-pack/plugins/monitoring/public/application/pages/kibana/instances.tsx +++ b/x-pack/plugins/monitoring/public/application/pages/kibana/instances.tsx @@ -87,12 +87,7 @@ export const KibanaInstancesPage: React.FC = ({ clusters }) => { ]); return ( - +
= ({ ...props }) => { defaultMessage: 'Overview', }), route: '/kibana', + testSubj: 'kibanaOverviewPage', }, { id: 'instances', @@ -23,6 +24,7 @@ export const KibanaTemplate: React.FC = ({ ...props }) => { defaultMessage: 'Instances', }), route: '/kibana/instances', + testSubj: 'kibanaInstancesPage', }, ]; diff --git a/x-pack/plugins/monitoring/public/application/pages/kibana/overview.tsx b/x-pack/plugins/monitoring/public/application/pages/kibana/overview.tsx index a47da048e1936..4c480bf1fbb33 100644 --- a/x-pack/plugins/monitoring/public/application/pages/kibana/overview.tsx +++ b/x-pack/plugins/monitoring/public/application/pages/kibana/overview.tsx @@ -107,12 +107,7 @@ export const KibanaOverviewPage: React.FC = ({ clusters }) => { }, [ccs, clusterUuid, services.data?.query.timefilter.timefilter, services.http]); return ( - + ); diff --git a/x-pack/plugins/monitoring/public/application/pages/logstash/node_pipelines.tsx b/x-pack/plugins/monitoring/public/application/pages/logstash/node_pipelines.tsx index e09850eaad5c9..740202da57d24 100644 --- a/x-pack/plugins/monitoring/public/application/pages/logstash/node_pipelines.tsx +++ b/x-pack/plugins/monitoring/public/application/pages/logstash/node_pipelines.tsx @@ -58,7 +58,6 @@ export const LogStashNodePipelinesPage: React.FC = ({ clusters } const getPageData = useCallback(async () => { const bounds = services.data?.query.timefilter.timefilter.getBounds(); - const options: any = getPaginationRouteOptions(); const url = `../api/monitoring/v1/clusters/${clusterUuid}/logstash/node/${match.params.uuid}/pipelines`; const response = await services.http?.fetch(url, { method: 'POST', @@ -68,8 +67,7 @@ export const LogStashNodePipelinesPage: React.FC = ({ clusters } min: bounds.min.toISOString(), max: bounds.max.toISOString(), }, - pagination: options.pagination, - queryText: options.queryText, + ...getPaginationRouteOptions(), }), }); diff --git a/x-pack/plugins/monitoring/public/application/pages/logstash/nodes.tsx b/x-pack/plugins/monitoring/public/application/pages/logstash/nodes.tsx index 11f806174584e..69963b49e1f77 100644 --- a/x-pack/plugins/monitoring/public/application/pages/logstash/nodes.tsx +++ b/x-pack/plugins/monitoring/public/application/pages/logstash/nodes.tsx @@ -13,19 +13,13 @@ import { ComponentProps } from '../../route_init'; // @ts-ignore import { Listing } from '../../../components/logstash/listing'; import { LogstashTemplate } from './logstash_template'; -import { SetupModeRenderer } from '../../setup_mode/setup_mode_renderer'; +import { SetupModeRenderer, SetupModeProps } from '../../setup_mode/setup_mode_renderer'; import { SetupModeContext } from '../../../components/setup_mode/setup_mode_context'; import { useTable } from '../../hooks/use_table'; -import { RULE_LOGSTASH_VERSION_MISMATCH } from '../../../../common/constants'; +import { RULE_LOGSTASH_VERSION_MISMATCH, LOGSTASH_SYSTEM_ID } from '../../../../common/constants'; import { AlertsByName } from '../../../alerts/types'; import { fetchAlerts } from '../../../lib/fetch_alerts'; -interface SetupModeProps { - setupMode: any; - flyoutComponent: any; - bottomBarComponent: any; -} - export const LogStashNodesPage: React.FC = ({ clusters }) => { const globalState = useContext(GlobalStateContext); const { services } = useKibana<{ data: any }>(); @@ -84,7 +78,7 @@ export const LogStashNodesPage: React.FC = ({ clusters }) => { >
( {flyoutComponent} diff --git a/x-pack/plugins/monitoring/public/application/pages/logstash/pipelines.tsx b/x-pack/plugins/monitoring/public/application/pages/logstash/pipelines.tsx index ac750ff81ddaa..c2dfe1c0dae7d 100644 --- a/x-pack/plugins/monitoring/public/application/pages/logstash/pipelines.tsx +++ b/x-pack/plugins/monitoring/public/application/pages/logstash/pipelines.tsx @@ -46,7 +46,6 @@ export const LogStashPipelinesPage: React.FC = ({ clusters }) => const bounds = services.data?.query.timefilter.timefilter.getBounds(); const url = `../api/monitoring/v1/clusters/${clusterUuid}/logstash/pipelines`; - const options: any = getPaginationRouteOptions(); const response = await services.http?.fetch(url, { method: 'POST', body: JSON.stringify({ @@ -55,8 +54,7 @@ export const LogStashPipelinesPage: React.FC = ({ clusters }) => min: bounds.min.toISOString(), max: bounds.max.toISOString(), }, - pagination: options.pagination, - queryText: options.queryText, + ...getPaginationRouteOptions(), }), }); @@ -96,10 +94,10 @@ export const LogStashPipelinesPage: React.FC = ({ clusters }) => title={title} pageTitle={pageTitle} getPageData={getPageData} - data-test-subj="elasticsearchOverviewPage" + data-test-subj="logstashPipelinesListing" cluster={cluster} > -
{renderOverview(data)}
+
{renderOverview(data)}
); }; diff --git a/x-pack/plugins/monitoring/public/application/pages/no_data/no_data_page.tsx b/x-pack/plugins/monitoring/public/application/pages/no_data/no_data_page.tsx index 26072f53f4752..e798e7d74ad38 100644 --- a/x-pack/plugins/monitoring/public/application/pages/no_data/no_data_page.tsx +++ b/x-pack/plugins/monitoring/public/application/pages/no_data/no_data_page.tsx @@ -220,12 +220,10 @@ async function executeCheck(checker: SettingsChecker, http: { fetch: any }): Pro return { found, reason }; } catch (err: any) { - const { data } = err; - return { error: true, found: false, - errorReason: data, + errorReason: err.body, }; } } diff --git a/x-pack/plugins/monitoring/public/application/pages/page_template.tsx b/x-pack/plugins/monitoring/public/application/pages/page_template.tsx index 5c030814d9cdf..23eeb2c034a80 100644 --- a/x-pack/plugins/monitoring/public/application/pages/page_template.tsx +++ b/x-pack/plugins/monitoring/public/application/pages/page_template.tsx @@ -92,7 +92,7 @@ export const PageTemplate: React.FC = ({ }; return ( -
+
diff --git a/x-pack/plugins/monitoring/public/application/route_init.tsx b/x-pack/plugins/monitoring/public/application/route_init.tsx index c620229eb059a..52780aa280707 100644 --- a/x-pack/plugins/monitoring/public/application/route_init.tsx +++ b/x-pack/plugins/monitoring/public/application/route_init.tsx @@ -57,7 +57,7 @@ export const RouteInit: React.FC = ({ // check if we need to redirect because of attempt at unsupported multi-cluster monitoring const clusterSupported = cluster.isSupported || clusters.length === 1; - if (location.pathname !== 'home' && !clusterSupported) { + if (location.pathname !== '/home' && !clusterSupported) { return ; } } 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 b6d117fb3269c..8852d104fe00a 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 @@ -3,7 +3,13 @@ exports[`NoData should show a default message if reason is unknown 1`] = `
+

+ No monitoring data found. +

+

+ No monitoring data found. +

{ + return {children}; + }; + if (isCloudEnabled) { return ( - +

- + ); } if (useInternalCollection) { return ( - + + +

+ +

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

+ +

+
-
+ ); } diff --git a/x-pack/plugins/monitoring/public/components/no_data/reasons/__snapshots__/we_tried.test.js.snap b/x-pack/plugins/monitoring/public/components/no_data/reasons/__snapshots__/we_tried.test.js.snap index 482e6e97115b7..4e1209a5fd2aa 100644 --- a/x-pack/plugins/monitoring/public/components/no_data/reasons/__snapshots__/we_tried.test.js.snap +++ b/x-pack/plugins/monitoring/public/components/no_data/reasons/__snapshots__/we_tried.test.js.snap @@ -1,15 +1,17 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`WeTried should render "we tried" message 1`] = ` -Array [ +

We couldn't activate monitoring -

, +


, + />
@@ -19,6 +21,6 @@ Array [

If data is in your cluster, your monitoring dashboards will show up here.

-
, -] +
+
`; diff --git a/x-pack/plugins/monitoring/public/components/no_data/reasons/we_tried.js b/x-pack/plugins/monitoring/public/components/no_data/reasons/we_tried.js index 17e171451e3a3..37504f5842a74 100644 --- a/x-pack/plugins/monitoring/public/components/no_data/reasons/we_tried.js +++ b/x-pack/plugins/monitoring/public/components/no_data/reasons/we_tried.js @@ -5,13 +5,13 @@ * 2.0. */ -import React, { Fragment } from 'react'; +import React from 'react'; import { EuiText, EuiHorizontalRule, EuiTitle } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; export function WeTried() { return ( - +

- +

); } diff --git a/x-pack/plugins/monitoring/public/directives/main/index.html b/x-pack/plugins/monitoring/public/directives/main/index.html index 558ed5e874cd6..fd14120e1db2f 100644 --- a/x-pack/plugins/monitoring/public/directives/main/index.html +++ b/x-pack/plugins/monitoring/public/directives/main/index.html @@ -1,4 +1,4 @@ -
+
@@ -299,7 +299,7 @@

{{pageTitle || monitoringMain.instance}}

= ({ hideSubtitle = false, }) => (
- + - + -

+

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

+
{!hideSubtitle && ( diff --git a/x-pack/plugins/security_solution/public/common/components/hover_actions/actions/show_top_n.tsx b/x-pack/plugins/security_solution/public/common/components/hover_actions/actions/show_top_n.tsx index e1546c5220e22..738103f02dcdf 100644 --- a/x-pack/plugins/security_solution/public/common/components/hover_actions/actions/show_top_n.tsx +++ b/x-pack/plugins/security_solution/public/common/components/hover_actions/actions/show_top_n.tsx @@ -30,33 +30,49 @@ const SHOW_TOP = (fieldName: string) => }); interface Props { + className?: string; /** When `Component` is used with `EuiDataGrid`; the grid keeps a reference to `Component` for show / hide functionality. * When `Component` is used with `EuiContextMenu`, we pass EuiContextMenuItem to render the right style. */ Component?: typeof EuiButtonEmpty | typeof EuiButtonIcon | typeof EuiContextMenuItem; enablePopOver?: boolean; field: string; + flush?: 'left' | 'right' | 'both'; globalFilters?: Filter[]; + iconSide?: 'left' | 'right'; + iconType?: string; + isExpandable?: boolean; onClick: () => void; onFilterAdded?: () => void; ownFocus: boolean; + paddingSize?: 's' | 'm' | 'l' | 'none'; showTooltip?: boolean; showTopN: boolean; + showLegend?: boolean; timelineId?: string | null; + title?: string; value?: string[] | string | null; } export const ShowTopNButton: React.FC = React.memo( ({ + className, Component, enablePopOver, field, + flush, + iconSide, + iconType, + isExpandable, onClick, onFilterAdded, ownFocus, + paddingSize, + showLegend, showTooltip = true, showTopN, timelineId, + title, value, globalFilters, }) => { @@ -70,31 +86,36 @@ export const ShowTopNButton: React.FC = React.memo( ? SourcererScopeName.detections : SourcererScopeName.default; const { browserFields, indexPattern } = useSourcererScope(activeScope); - + const icon = iconType ?? 'visBarVertical'; + const side = iconSide ?? 'left'; + const buttonTitle = title ?? SHOW_TOP(field); const basicButton = useMemo( () => Component ? ( - {SHOW_TOP(field)} + {buttonTitle} ) : ( ), - [Component, field, onClick] + [Component, buttonTitle, className, flush, icon, onClick, side] ); const button = useMemo( @@ -107,7 +128,7 @@ export const ShowTopNButton: React.FC = React.memo( field, value, })} - content={SHOW_TOP(field)} + content={buttonTitle} shortcut={SHOW_TOP_N_KEYBOARD_SHORTCUT} showShortcut={ownFocus} /> @@ -118,7 +139,7 @@ export const ShowTopNButton: React.FC = React.memo( ) : ( basicButton ), - [basicButton, field, ownFocus, showTooltip, showTopN, value] + [basicButton, buttonTitle, field, ownFocus, showTooltip, showTopN, value] ); const topNPannel = useMemo( @@ -128,15 +149,37 @@ export const ShowTopNButton: React.FC = React.memo( field={field} indexPattern={indexPattern} onFilterAdded={onFilterAdded} + paddingSize={paddingSize} + showLegend={showLegend} timelineId={timelineId ?? undefined} toggleTopN={onClick} value={value} globalFilters={globalFilters} /> ), - [browserFields, field, indexPattern, onClick, onFilterAdded, timelineId, value, globalFilters] + [ + browserFields, + field, + indexPattern, + onFilterAdded, + paddingSize, + showLegend, + timelineId, + onClick, + value, + globalFilters, + ] ); + if (isExpandable) { + return ( + <> + {basicButton} + {showTopN && topNPannel} + + ); + } + return showTopN ? ( enablePopOver ? ( | PropsForAnchor> = + ({ children, ...props }) => {children}; + +export const LinkAnchor: React.FC = ({ children, ...props }) => ( + {children} +); + +export const Comma = styled('span')` + margin-right: 5px; + margin-left: 5px; + &::after { + content: ' ,'; + } +`; + +Comma.displayName = 'Comma'; + +const GenericLinkButtonComponent: React.FC<{ + children?: React.ReactNode; + /** `Component` is only used with `EuiDataGrid`; the grid keeps a reference to `Component` for show / hide functionality */ + Component?: typeof EuiButtonEmpty | typeof EuiButtonIcon; + dataTestSubj?: string; + href: string; + onClick?: (e: SyntheticEvent) => void; + title?: string; + iconType?: string; +}> = ({ children, Component, dataTestSubj, href, onClick, title, iconType = 'expand' }) => { + return Component ? ( + + {title ?? children} + + ) : ( + + {title ?? children} + + ); +}; + +export const GenericLinkButton = React.memo(GenericLinkButtonComponent); + +export const PortContainer = styled.div` + & svg { + position: relative; + top: -1px; + } +`; diff --git a/x-pack/plugins/security_solution/public/common/components/links/index.tsx b/x-pack/plugins/security_solution/public/common/components/links/index.tsx index 7db6b0204b649..c74791b8b3aa7 100644 --- a/x-pack/plugins/security_solution/public/common/components/links/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/links/index.tsx @@ -6,19 +6,15 @@ */ import { - EuiButton, - EuiButtonProps, - EuiLink, - EuiLinkProps, - EuiToolTip, + EuiButtonEmpty, + EuiButtonIcon, EuiFlexGroup, EuiFlexItem, - PropsForAnchor, - PropsForButton, + EuiLink, + EuiToolTip, } from '@elastic/eui'; import React, { useMemo, useCallback, SyntheticEvent } from 'react'; import { isNil } from 'lodash/fp'; -import styled from 'styled-components'; import { IP_REPUTATION_LINKS_SETTING, APP_ID } from '../../../../common/constants'; import { @@ -43,22 +39,11 @@ import { isUrlInvalid } from '../../utils/validators'; import * as i18n from './translations'; import { SecurityPageName } from '../../../app/types'; import { getUebaDetailsUrl } from '../link_to/redirect_to_ueba'; +import { LinkButton, LinkAnchor, GenericLinkButton, PortContainer, Comma } from './helpers'; -export const DEFAULT_NUMBER_OF_LINK = 5; - -export const LinkButton: React.FC | PropsForAnchor> = - ({ children, ...props }) => {children}; +export { LinkButton, LinkAnchor } from './helpers'; -export const LinkAnchor: React.FC = ({ children, ...props }) => ( - {children} -); - -export const PortContainer = styled.div` - & svg { - position: relative; - top: -1px; - } -`; +export const DEFAULT_NUMBER_OF_LINK = 5; // Internal Links const UebaDetailsLinkComponent: React.FC<{ @@ -102,10 +87,13 @@ export const UebaDetailsLink = React.memo(UebaDetailsLinkComponent); const HostDetailsLinkComponent: React.FC<{ children?: React.ReactNode; + /** `Component` is only used with `EuiDataGrid`; the grid keeps a reference to `Component` for show / hide functionality */ + Component?: typeof EuiButtonEmpty | typeof EuiButtonIcon; hostName: string; isButton?: boolean; onClick?: (e: SyntheticEvent) => void; -}> = ({ children, hostName, isButton, onClick }) => { + title?: string; +}> = ({ children, Component, hostName, isButton, onClick, title }) => { const { formatUrl, search } = useFormatUrl(SecurityPageName.hosts); const { navigateToApp } = useKibana().services.application; const goToHostDetails = useCallback( @@ -118,19 +106,25 @@ const HostDetailsLinkComponent: React.FC<{ }, [hostName, navigateToApp, search] ); - + const href = useMemo( + () => formatUrl(getHostDetailsUrl(encodeURIComponent(hostName))), + [formatUrl, hostName] + ); return isButton ? ( - - {children ? children : hostName} - + {children} + ) : ( {children ? children : hostName} @@ -176,11 +170,14 @@ ExternalLink.displayName = 'ExternalLink'; const NetworkDetailsLinkComponent: React.FC<{ children?: React.ReactNode; + /** `Component` is only used with `EuiDataGrid`; the grid keeps a reference to `Component` for show / hide functionality */ + Component?: typeof EuiButtonEmpty | typeof EuiButtonIcon; ip: string; flowTarget?: FlowTarget | FlowTargetSourceDest; isButton?: boolean; onClick?: (e: SyntheticEvent) => void | undefined; -}> = ({ children, ip, flowTarget = FlowTarget.source, isButton, onClick }) => { + title?: string; +}> = ({ Component, children, ip, flowTarget = FlowTarget.source, isButton, onClick, title }) => { const { formatUrl, search } = useFormatUrl(SecurityPageName.network); const { navigateToApp } = useKibana().services.application; const goToNetworkDetails = useCallback( @@ -193,19 +190,25 @@ const NetworkDetailsLinkComponent: React.FC<{ }, [flowTarget, ip, navigateToApp, search] ); + const href = useMemo( + () => formatUrl(getNetworkDetailsUrl(encodeURIComponent(encodeIpv6(ip)))), + [formatUrl, ip] + ); return isButton ? ( - - {children ? children : ip} - + {children} + ) : ( {children ? children : ip} @@ -272,63 +275,84 @@ CreateCaseLink.displayName = 'CreateCaseLink'; // External Links export const GoogleLink = React.memo<{ children?: React.ReactNode; link: string }>( - ({ children, link }) => ( - - {children ? children : link} - - ) + ({ children, link }) => { + const url = useMemo( + () => `https://www.google.com/search?q=${encodeURIComponent(link)}`, + [link] + ); + return {children ? children : link}; + } ); GoogleLink.displayName = 'GoogleLink'; export const PortOrServiceNameLink = React.memo<{ children?: React.ReactNode; + /** `Component` is only used with `EuiDataGrid`; the grid keeps a reference to `Component` for show / hide functionality */ + Component?: typeof EuiButtonEmpty | typeof EuiButtonIcon; portOrServiceName: number | string; -}>(({ children, portOrServiceName }) => ( - - void | undefined; + title?: string; +}>(({ Component, title, children, portOrServiceName }) => { + const href = useMemo( + () => + `https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=${encodeURIComponent( String(portOrServiceName) - )}`} - target="_blank" + )}`, + [portOrServiceName] + ); + return Component ? ( + - {children ? children : portOrServiceName} - - -)); + {title ?? children ?? portOrServiceName} + + ) : ( + + + {children ? children : portOrServiceName} + + + ); +}); PortOrServiceNameLink.displayName = 'PortOrServiceNameLink'; export const Ja3FingerprintLink = React.memo<{ children?: React.ReactNode; ja3Fingerprint: string; -}>(({ children, ja3Fingerprint }) => ( - - {children ? children : ja3Fingerprint} - -)); +}>(({ children, ja3Fingerprint }) => { + const href = useMemo( + () => `https://sslbl.abuse.ch/ja3-fingerprints/${encodeURIComponent(ja3Fingerprint)}`, + [ja3Fingerprint] + ); + return ( + + {children ? children : ja3Fingerprint} + + ); +}); Ja3FingerprintLink.displayName = 'Ja3FingerprintLink'; export const CertificateFingerprintLink = React.memo<{ children?: React.ReactNode; certificateFingerprint: string; -}>(({ children, certificateFingerprint }) => ( - - {children ? children : certificateFingerprint} - -)); +}>(({ children, certificateFingerprint }) => { + const href = useMemo( + () => + `https://sslbl.abuse.ch/ssl-certificates/sha1/${encodeURIComponent(certificateFingerprint)}`, + [certificateFingerprint] + ); + return ( + + {children ? children : certificateFingerprint} + + ); +}); CertificateFingerprintLink.displayName = 'CertificateFingerprintLink'; @@ -354,16 +378,6 @@ const isReputationLink = ( (rowItem as ReputationLinkSetting).url_template !== undefined && (rowItem as ReputationLinkSetting).name !== undefined; -export const Comma = styled('span')` - margin-right: 5px; - margin-left: 5px; - &::after { - content: ' ,'; - } -`; - -Comma.displayName = 'Comma'; - const defaultNameMapping: Record = { [DefaultReputationLink['virustotal.com']]: i18n.VIEW_VIRUS_TOTAL, [DefaultReputationLink['talosIntelligence.com']]: i18n.VIEW_TALOS_INTELLIGENCE, @@ -463,11 +477,13 @@ ReputationLinkComponent.displayName = 'ReputationLinkComponent'; export const ReputationLink = React.memo(ReputationLinkComponent); export const WhoIsLink = React.memo<{ children?: React.ReactNode; domain: string }>( - ({ children, domain }) => ( - - {children ? children : domain} - - ) + ({ children, domain }) => { + const url = useMemo( + () => `https://www.iana.org/whois?q=${encodeURIComponent(domain)}`, + [domain] + ); + return {children ? children : domain}; + } ); WhoIsLink.displayName = 'WhoIsLink'; diff --git a/x-pack/plugins/security_solution/public/common/components/matrix_histogram/index.tsx b/x-pack/plugins/security_solution/public/common/components/matrix_histogram/index.tsx index f25e8311ff8fe..7eac477741a5c 100644 --- a/x-pack/plugins/security_solution/public/common/components/matrix_histogram/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/matrix_histogram/index.tsx @@ -79,6 +79,7 @@ export const MatrixHistogramComponent: React.FC = legendPosition, mapping, onError, + paddingSize = 'm', panelHeight = DEFAULT_PANEL_HEIGHT, setAbsoluteRangeDatePickerTarget = 'global', setQuery, @@ -200,7 +201,11 @@ export const MatrixHistogramComponent: React.FC = return ( <> - + {loading && !isInitialLoading && ( { dispatch(timelineActions.showTimeline({ id: TimelineId.active, show: false })); + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion navigateToUrl(breadcrumb.href!); }, } diff --git a/x-pack/plugins/security_solution/public/common/components/page/index.tsx b/x-pack/plugins/security_solution/public/common/components/page/index.tsx index fca49bd4539ec..9666a0837b046 100644 --- a/x-pack/plugins/security_solution/public/common/components/page/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/page/index.tsx @@ -31,13 +31,58 @@ export const AppGlobalStyle = createGlobalStyle<{ theme: { eui: { euiColorPrimar z-index: 9950 !important; } + .euiDataGridRowCell__expandButton .euiDataGridRowCell__actionButtonIcon { + display: none; + + &:first-child, + &:nth-child(2), + &:nth-child(3) { + display: inline-flex; + } + + } + /* overrides the default styling of EuiDataGrid expand popover footer to make it a column of actions instead of the default actions row */ - .euiDataGridRowCell__popover .euiPopoverFooter .euiFlexGroup { - flex-direction: column; - align-items: flex-start; + + .euiDataGridRowCell__popover { + + max-width: 815px !important; + max-height: none !important; + overflow: hidden; + + + .expandable-top-value-button { + &.euiButtonEmpty--primary:enabled:focus, + .euiButtonEmpty--primary:focus { + background-color: transparent; + } + } + + + &.euiPopover__panel.euiPopover__panel-isOpen { + padding: 8px 0; + min-width: 65px; + } + + + .euiPopoverFooter { + border: 0; + .euiFlexGroup { + flex-direction: column; + + .euiButtonEmpty .euiButtonContent { + justify-content: left; + } + + .euiFlexItem:first-child, + .euiFlexItem:nth-child(2) { + display: none; + } + } + } } /* @@ -54,10 +99,14 @@ export const AppGlobalStyle = createGlobalStyle<{ theme: { eui: { euiColorPrimar } /* hide open draggable popovers when a modal is being displayed to prevent them from covering the modal */ - body.euiBody-hasOverlayMask .withHoverActions__popover.euiPopover__panel-isOpen{ - visibility: hidden !important; + body.euiBody-hasOverlayMask { + .euiDataGridRowCell__popover.euiPopover__panel-isOpen, + .withHoverActions__popover.euiPopover__panel-isOpen { + visibility: hidden !important; + } } + /* ensure elastic charts tooltips appear above open euiPopovers */ .echTooltip { z-index: 9950; diff --git a/x-pack/plugins/security_solution/public/common/components/top_n/index.tsx b/x-pack/plugins/security_solution/public/common/components/top_n/index.tsx index 1556f2d0f3d13..1eef44d587ed0 100644 --- a/x-pack/plugins/security_solution/public/common/components/top_n/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/top_n/index.tsx @@ -81,6 +81,8 @@ export interface OwnProps { timelineId?: string; toggleTopN: () => void; onFilterAdded?: () => void; + paddingSize?: 's' | 'm' | 'l' | 'none'; + showLegend?: boolean; value?: string[] | string | null; globalFilters?: Filter[]; } @@ -101,6 +103,8 @@ const StatefulTopNComponent: React.FC = ({ globalQuery = EMPTY_QUERY, kqlMode, onFilterAdded, + paddingSize, + showLegend, timelineId, toggleTopN, value, @@ -160,7 +164,9 @@ const StatefulTopNComponent: React.FC = ({ from={timelineId === TimelineId.active ? activeTimelineFrom : from} indexPattern={indexPattern} options={options} + paddingSize={paddingSize} query={timelineId === TimelineId.active ? EMPTY_QUERY : globalQuery} + showLegend={showLegend} setAbsoluteRangeDatePickerTarget={timelineId === TimelineId.active ? 'timeline' : 'global'} setQuery={setQuery} timelineId={timelineId} diff --git a/x-pack/plugins/security_solution/public/common/components/top_n/top_n.tsx b/x-pack/plugins/security_solution/public/common/components/top_n/top_n.tsx index 7335d6203697f..f40ee8670171c 100644 --- a/x-pack/plugins/security_solution/public/common/components/top_n/top_n.tsx +++ b/x-pack/plugins/security_solution/public/common/components/top_n/top_n.tsx @@ -55,8 +55,10 @@ export interface Props extends Pick void; onFilterAdded?: () => void; @@ -72,7 +74,9 @@ const TopNComponent: React.FC = ({ from, indexPattern, options, + paddingSize, query, + showLegend, setAbsoluteRangeDatePickerTarget, setQuery, timelineId, @@ -127,7 +131,9 @@ const TopNComponent: React.FC = ({ indexPattern={indexPattern} indexNames={view === 'raw' ? rawIndices : allIndices} onlyField={field} + paddingSize={paddingSize} query={query} + showLegend={showLegend} setAbsoluteRangeDatePickerTarget={setAbsoluteRangeDatePickerTarget} setQuery={setQuery} showSpacer={false} @@ -141,7 +147,9 @@ const TopNComponent: React.FC = ({ filters={filters} headerChildren={headerChildren} onlyField={field} + paddingSize={paddingSize} query={query} + showLegend={showLegend} setAbsoluteRangeDatePickerTarget={setAbsoluteRangeDatePickerTarget} timelineId={timelineId} /> diff --git a/x-pack/plugins/security_solution/public/common/components/user_privileges/__mocks__/use_endpoint_privileges.ts b/x-pack/plugins/security_solution/public/common/components/user_privileges/__mocks__/use_endpoint_privileges.ts index 80cf11fecd847..80ca534534187 100644 --- a/x-pack/plugins/security_solution/public/common/components/user_privileges/__mocks__/use_endpoint_privileges.ts +++ b/x-pack/plugins/security_solution/public/common/components/user_privileges/__mocks__/use_endpoint_privileges.ts @@ -12,6 +12,7 @@ export const useEndpointPrivileges = jest.fn(() => { loading: false, canAccessFleet: true, canAccessEndpointManagement: true, + isPlatinumPlus: true, }; return endpointPrivilegesMock; }); diff --git a/x-pack/plugins/security_solution/public/common/components/user_privileges/index.tsx b/x-pack/plugins/security_solution/public/common/components/user_privileges/index.tsx index 028473f5c2001..437d27278102b 100644 --- a/x-pack/plugins/security_solution/public/common/components/user_privileges/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/user_privileges/index.tsx @@ -24,7 +24,12 @@ export interface UserPrivilegesState { export const initialUserPrivilegesState = (): UserPrivilegesState => ({ listPrivileges: { loading: false, error: undefined, result: undefined }, detectionEnginePrivileges: { loading: false, error: undefined, result: undefined }, - endpointPrivileges: { loading: true, canAccessEndpointManagement: false, canAccessFleet: false }, + endpointPrivileges: { + loading: true, + canAccessEndpointManagement: false, + canAccessFleet: false, + isPlatinumPlus: false, + }, kibanaSecuritySolutionsPrivileges: { crud: false, read: false }, }); diff --git a/x-pack/plugins/security_solution/public/common/components/user_privileges/use_endpoint_privileges.test.ts b/x-pack/plugins/security_solution/public/common/components/user_privileges/use_endpoint_privileges.test.ts index a05d1ac8d3588..82443e913499b 100644 --- a/x-pack/plugins/security_solution/public/common/components/user_privileges/use_endpoint_privileges.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/user_privileges/use_endpoint_privileges.test.ts @@ -5,15 +5,27 @@ * 2.0. */ -import { renderHook, RenderHookResult, RenderResult } from '@testing-library/react-hooks'; +import { act, renderHook, RenderHookResult, RenderResult } from '@testing-library/react-hooks'; import { useHttp, useCurrentUser } from '../../lib/kibana'; import { EndpointPrivileges, useEndpointPrivileges } from './use_endpoint_privileges'; import { securityMock } from '../../../../../security/public/mocks'; import { appRoutesService } from '../../../../../fleet/common'; import { AuthenticatedUser } from '../../../../../security/common'; +import { licenseService } from '../../hooks/use_license'; import { fleetGetCheckPermissionsHttpMock } from '../../../management/pages/mocks'; jest.mock('../../lib/kibana'); +jest.mock('../../hooks/use_license', () => { + const licenseServiceInstance = { + isPlatinumPlus: jest.fn(), + }; + return { + licenseService: licenseServiceInstance, + useLicense: () => { + return licenseServiceInstance; + }, + }; +}); describe('When using useEndpointPrivileges hook', () => { let authenticatedUser: AuthenticatedUser; @@ -33,6 +45,7 @@ describe('When using useEndpointPrivileges hook', () => { fleetApiMock = fleetGetCheckPermissionsHttpMock( useHttp() as Parameters[0] ); + (licenseService.isPlatinumPlus as jest.Mock).mockReturnValue(true); render = () => { const hookRenderResponse = renderHook(() => useEndpointPrivileges()); @@ -60,6 +73,7 @@ describe('When using useEndpointPrivileges hook', () => { canAccessEndpointManagement: false, canAccessFleet: false, loading: true, + isPlatinumPlus: true, }); // Make user service available @@ -69,15 +83,19 @@ describe('When using useEndpointPrivileges hook', () => { canAccessEndpointManagement: false, canAccessFleet: false, loading: true, + isPlatinumPlus: true, }); // Release the API response - releaseApiResponse!(); - await fleetApiMock.waitForApi(); + await act(async () => { + fleetApiMock.waitForApi(); + releaseApiResponse!(); + }); expect(result.current).toEqual({ canAccessEndpointManagement: true, canAccessFleet: true, loading: false, + isPlatinumPlus: true, }); }); @@ -99,6 +117,7 @@ describe('When using useEndpointPrivileges hook', () => { canAccessEndpointManagement: false, canAccessFleet: true, // this is only true here because I did not adjust the API mock loading: false, + isPlatinumPlus: true, }); }); @@ -115,6 +134,7 @@ describe('When using useEndpointPrivileges hook', () => { canAccessEndpointManagement: false, canAccessFleet: false, loading: false, + isPlatinumPlus: true, }); }); }); diff --git a/x-pack/plugins/security_solution/public/common/components/user_privileges/use_endpoint_privileges.ts b/x-pack/plugins/security_solution/public/common/components/user_privileges/use_endpoint_privileges.ts index b8db0c5c0fbc9..315935104d107 100644 --- a/x-pack/plugins/security_solution/public/common/components/user_privileges/use_endpoint_privileges.ts +++ b/x-pack/plugins/security_solution/public/common/components/user_privileges/use_endpoint_privileges.ts @@ -8,6 +8,7 @@ import { useEffect, useMemo, useRef, useState } from 'react'; import { useCurrentUser, useHttp } from '../../lib/kibana'; import { appRoutesService, CheckPermissionsResponse } from '../../../../../fleet/common'; +import { useLicense } from '../../hooks/use_license'; export interface EndpointPrivileges { loading: boolean; @@ -15,6 +16,7 @@ export interface EndpointPrivileges { canAccessFleet: boolean; /** If user has permissions to access Endpoint management (includes check to ensure they also have access to fleet) */ canAccessEndpointManagement: boolean; + isPlatinumPlus: boolean; } /** @@ -27,6 +29,7 @@ export const useEndpointPrivileges = (): EndpointPrivileges => { const http = useHttp(); const user = useCurrentUser(); const isMounted = useRef(true); + const license = useLicense(); const [canAccessFleet, setCanAccessFleet] = useState(false); const [fleetCheckDone, setFleetCheckDone] = useState(false); @@ -62,8 +65,9 @@ export const useEndpointPrivileges = (): EndpointPrivileges => { loading: !fleetCheckDone || !user, canAccessFleet, canAccessEndpointManagement: canAccessFleet && isSuperUser, + isPlatinumPlus: license.isPlatinumPlus(), }; - }, [canAccessFleet, fleetCheckDone, isSuperUser, user]); + }, [canAccessFleet, fleetCheckDone, isSuperUser, user, license]); // Capture if component is unmounted useEffect( diff --git a/x-pack/plugins/security_solution/public/common/components/utils.ts b/x-pack/plugins/security_solution/public/common/components/utils.ts index fc27578487ca7..da92c94d3c1cd 100644 --- a/x-pack/plugins/security_solution/public/common/components/utils.ts +++ b/x-pack/plugins/security_solution/public/common/components/utils.ts @@ -22,6 +22,7 @@ export const getDaysDiff = (minDate: moment.Moment, maxDate: moment.Moment) => { }; export const histogramDateTimeFormatter = (domain: [string, string] | null, fixedDiff?: number) => { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const diff = fixedDiff ?? getDaysDiff(moment(domain![0]), moment(domain![1])); const format = niceTimeFormatByDay(diff); return timeFormatter(format); diff --git a/x-pack/plugins/security_solution/public/common/lib/cell_actions/default_cell_actions.test.tsx b/x-pack/plugins/security_solution/public/common/lib/cell_actions/default_cell_actions.test.tsx new file mode 100644 index 0000000000000..a4e6f0a66dfc9 --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/lib/cell_actions/default_cell_actions.test.tsx @@ -0,0 +1,92 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { EuiDataGridColumn } from '@elastic/eui'; +import type { + BrowserFields, + TimelineNonEcsData, +} from '../../../../../timelines/common/search_strategy'; +import { TGridCellAction } from '../../../../../timelines/common/types'; +import { Ecs } from '../../../../common/ecs'; +import { ColumnHeaderType } from '../../../timelines/store/timeline/model'; + +import { defaultCellActions, EmptyComponent } from './default_cell_actions'; +import { COLUMNS_WITH_LINKS } from './helpers'; + +describe('default cell actions', () => { + const browserFields: BrowserFields = {}; + const data: TimelineNonEcsData[][] = [[]]; + const ecsData: Ecs[] = []; + const timelineId = 'mockTimelineId'; + const pageSize = 10; + + test('columns without any link action (e.g.: signal.status) should return an empty component (not null or data grid would crash)', () => { + const columnHeaders = [ + { + category: 'signal', + columnHeaderType: 'no-filtered' as ColumnHeaderType, + id: 'signal.status', + type: 'string', + aggregatable: true, + initialWidth: 105, + }, + ]; + + const columnsWithCellActions: EuiDataGridColumn[] = columnHeaders.map((header) => { + const buildAction = (tGridCellAction: TGridCellAction) => + tGridCellAction({ + browserFields, + data, + ecsData, + header: columnHeaders.find((h) => h.id === header.id), + pageSize, + timelineId, + }); + + return { + ...header, + cellActions: defaultCellActions?.map(buildAction), + }; + }); + + expect(columnsWithCellActions[0]?.cellActions?.length).toEqual(5); + expect(columnsWithCellActions[0]?.cellActions![4]).toEqual(EmptyComponent); + }); + + const columnHeadersToTest = COLUMNS_WITH_LINKS.map((c) => [ + { + category: 'signal', + columnHeaderType: 'no-filtered' as ColumnHeaderType, + id: c.columnId, + type: c.fieldType, + aggregatable: true, + initialWidth: 105, + }, + ]); + describe.each(columnHeadersToTest)('columns with a link action', (columnHeaders) => { + test(`${columnHeaders.id ?? columnHeaders.type}`, () => { + const columnsWithCellActions: EuiDataGridColumn[] = [columnHeaders].map((header) => { + const buildAction = (tGridCellAction: TGridCellAction) => + tGridCellAction({ + browserFields, + data, + ecsData, + header: [columnHeaders].find((h) => h.id === header.id), + pageSize, + timelineId, + }); + + return { + ...header, + cellActions: defaultCellActions?.map(buildAction), + }; + }); + + expect(columnsWithCellActions[0]?.cellActions?.length).toEqual(5); + expect(columnsWithCellActions[0]?.cellActions![4]).not.toEqual(EmptyComponent); + }); + }); +}); diff --git a/x-pack/plugins/security_solution/public/common/lib/cell_actions/default_cell_actions.tsx b/x-pack/plugins/security_solution/public/common/lib/cell_actions/default_cell_actions.tsx index 149a0c62b8b6a..012b84e06ed82 100644 --- a/x-pack/plugins/security_solution/public/common/lib/cell_actions/default_cell_actions.tsx +++ b/x-pack/plugins/security_solution/public/common/lib/cell_actions/default_cell_actions.tsx @@ -5,21 +5,28 @@ * 2.0. */ -import React, { useCallback, useState, useMemo } from 'react'; -import { Filter } from '../../../../../../../src/plugins/data/public'; +import { EuiDataGridColumnCellActionProps } from '@elastic/eui'; +import { head, getOr, get, isEmpty } from 'lodash/fp'; +import React, { useMemo } from 'react'; import type { BrowserFields, TimelineNonEcsData, } from '../../../../../timelines/common/search_strategy'; -import { DataProvider, TGridCellAction } from '../../../../../timelines/common/types'; +import { + ColumnHeaderOptions, + DataProvider, + TGridCellAction, +} from '../../../../../timelines/common/types'; import { getPageRowIndex } from '../../../../../timelines/public'; +import { Ecs } from '../../../../common/ecs'; import { getMappedNonEcsValue } from '../../../timelines/components/timeline/body/data_driven_columns'; +import { FormattedFieldValue } from '../../../timelines/components/timeline/body/renderers/formatted_field'; +import { parseValue } from '../../../timelines/components/timeline/body/renderers/parse_value'; import { IS_OPERATOR } from '../../../timelines/components/timeline/data_providers/data_provider'; -import { allowTopN, escapeDataProviderId } from '../../components/drag_and_drop/helpers'; -import { ShowTopNButton } from '../../components/hover_actions/actions/show_top_n'; -import { getAllFieldsByName } from '../../containers/source'; +import { escapeDataProviderId } from '../../components/drag_and_drop/helpers'; import { useKibana } from '../kibana'; +import { getLink } from './helpers'; /** a noop required by the filter in / out buttons */ const onFilterAdded = () => {}; @@ -36,15 +43,77 @@ const useKibanaServices = () => { return { timelines, filterManager }; }; -/** the default actions shown in `EuiDataGrid` cells */ -export const defaultCellActions: TGridCellAction[] = [ +export const EmptyComponent = () => <>; + +const cellActionLink = [ + ({ + browserFields, + data, + ecsData, + header, + timelineId, + pageSize, + }: { + browserFields: BrowserFields; + data: TimelineNonEcsData[][]; + ecsData: Ecs[]; + header?: ColumnHeaderOptions; + timelineId: string; + pageSize: number; + }) => + getLink(header?.id, header?.type, header?.linkField) + ? ({ rowIndex, columnId, Component, closePopover }: EuiDataGridColumnCellActionProps) => { + const pageRowIndex = getPageRowIndex(rowIndex, pageSize); + const ecs = pageRowIndex < ecsData.length ? ecsData[pageRowIndex] : null; + const linkValues = header && getOr([], header.linkField ?? '', ecs); + const eventId = header && get('_id' ?? '', ecs); + + if (pageRowIndex >= data.length) { + // data grid expects each cell action always return an element, it crashes if returns null + return <>; + } + + const values = getMappedNonEcsValue({ + data: data[pageRowIndex], + fieldName: columnId, + }); + + const link = getLink(columnId, header?.type, header?.linkField); + const value = parseValue(head(values)); + + return link && eventId && values && !isEmpty(value) ? ( + 1 ? `${link?.label}: ${value}` : link?.label} + linkValue={head(linkValues)} + onClick={closePopover} + /> + ) : ( + // data grid expects each cell action always return an element, it crashes if returns null + <> + ); + } + : EmptyComponent, +]; + +export const cellActions: TGridCellAction[] = [ ({ data, pageSize }: { data: TimelineNonEcsData[][]; pageSize: number }) => - ({ rowIndex, columnId, Component }) => { + ({ rowIndex, columnId, Component }: EuiDataGridColumnCellActionProps) => { const { timelines, filterManager } = useKibanaServices(); const pageRowIndex = getPageRowIndex(rowIndex, pageSize); if (pageRowIndex >= data.length) { - return null; + // data grid expects each cell action always return an element, it crashes if returns null + return <>; } const value = getMappedNonEcsValue({ @@ -72,7 +141,8 @@ export const defaultCellActions: TGridCellAction[] = [ const pageRowIndex = getPageRowIndex(rowIndex, pageSize); if (pageRowIndex >= data.length) { - return null; + // data grid expects each cell action always return an element, it crashes if returns null + return <>; } const value = getMappedNonEcsValue({ @@ -100,34 +170,8 @@ export const defaultCellActions: TGridCellAction[] = [ const pageRowIndex = getPageRowIndex(rowIndex, pageSize); if (pageRowIndex >= data.length) { - return null; - } - - const value = getMappedNonEcsValue({ - data: data[pageRowIndex], - fieldName: columnId, - }); - - return ( - <> - {timelines.getHoverActions().getCopyButton({ - Component, - field: columnId, - isHoverAction: false, - ownFocus: false, - showTooltip: false, - value, - })} - - ); - }, - ({ data, pageSize }: { data: TimelineNonEcsData[][]; pageSize: number }) => - ({ rowIndex, columnId, Component }) => { - const { timelines } = useKibanaServices(); - - const pageRowIndex = getPageRowIndex(rowIndex, pageSize); - if (pageRowIndex >= data.length) { - return null; + // data grid expects each cell action always return an element, it crashes if returns null + return <>; } const value = getMappedNonEcsValue({ @@ -165,26 +209,14 @@ export const defaultCellActions: TGridCellAction[] = [ ); }, - ({ - browserFields, - data, - globalFilters, - timelineId, - pageSize, - }: { - browserFields: BrowserFields; - data: TimelineNonEcsData[][]; - globalFilters?: Filter[]; - timelineId: string; - pageSize: number; - }) => + ({ data, pageSize }: { data: TimelineNonEcsData[][]; pageSize: number }) => ({ rowIndex, columnId, Component }) => { - const [showTopN, setShowTopN] = useState(false); - const onClick = useCallback(() => setShowTopN(!showTopN), [showTopN]); + const { timelines } = useKibanaServices(); const pageRowIndex = getPageRowIndex(rowIndex, pageSize); if (pageRowIndex >= data.length) { - return null; + // data grid expects each cell action always return an element, it crashes if returns null + return <>; } const value = getMappedNonEcsValue({ @@ -192,31 +224,20 @@ export const defaultCellActions: TGridCellAction[] = [ fieldName: columnId, }); - const showButton = useMemo( - () => - allowTopN({ - browserField: getAllFieldsByName(browserFields)[columnId], - fieldName: columnId, - hideTopN: false, - }), - [columnId] + return ( + <> + {timelines.getHoverActions().getCopyButton({ + Component, + field: columnId, + isHoverAction: false, + ownFocus: false, + showTooltip: false, + value, + })} + ); - - return showButton ? ( - - ) : null; }, ]; + +/** the default actions shown in `EuiDataGrid` cells */ +export const defaultCellActions = [...cellActions, ...cellActionLink]; diff --git a/x-pack/plugins/security_solution/public/common/lib/cell_actions/expanded_cell_value_actions.test.tsx b/x-pack/plugins/security_solution/public/common/lib/cell_actions/expanded_cell_value_actions.test.tsx new file mode 100644 index 0000000000000..c818b16ac1f4f --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/lib/cell_actions/expanded_cell_value_actions.test.tsx @@ -0,0 +1,49 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { shallow } from 'enzyme'; +import React from 'react'; +import { ExpandedCellValueActions } from './expanded_cell_value_actions'; + +jest.mock('../kibana'); + +describe('ExpandedCellValueActions', () => { + const props = { + browserFields: { + host: { + fields: { + 'host.name': { + aggregatable: true, + category: 'host', + description: + 'Name of the host. It can contain what `hostname` returns on Unix systems, the fully qualified domain name, or a name specified by the user. The sender decides which value to use.', + type: 'string', + name: 'host.name', + }, + }, + }, + }, + field: 'host.name', + globalFilters: [], + onFilterAdded: () => {}, + timelineId: 'mockTimelineId', + value: ['mock value'], + }; + const wrapper = shallow(); + + test('renders show topN button', () => { + expect(wrapper.find('[data-test-subj="data-grid-expanded-show-top-n"]').exists()).toBeTruthy(); + }); + + test('renders filter in button', () => { + expect(wrapper.find('EuiFlexItem').first().html()).toContain('Filter button'); + }); + + test('renders filter out button', () => { + expect(wrapper.find('EuiFlexItem').last().html()).toContain('Filter out button'); + }); +}); diff --git a/x-pack/plugins/security_solution/public/common/lib/cell_actions/expanded_cell_value_actions.tsx b/x-pack/plugins/security_solution/public/common/lib/cell_actions/expanded_cell_value_actions.tsx new file mode 100644 index 0000000000000..4b50fff48fe06 --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/lib/cell_actions/expanded_cell_value_actions.tsx @@ -0,0 +1,125 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiButtonEmpty, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import { noop } from 'lodash/fp'; +import React, { useMemo, useState, useCallback } from 'react'; +import styled from 'styled-components'; +import { Filter } from '../../../../../../../src/plugins/data/public'; +import { BrowserFields } from '../../../../../timelines/common/search_strategy'; +import { allowTopN } from '../../components/drag_and_drop/helpers'; +import { ShowTopNButton } from '../../components/hover_actions/actions/show_top_n'; +import { getAllFieldsByName } from '../../containers/source'; +import { useKibana } from '../kibana'; +import { SHOW_TOP_VALUES, HIDE_TOP_VALUES } from './translations'; + +interface Props { + browserFields: BrowserFields; + field: string; + globalFilters?: Filter[]; + timelineId: string; + value: string[] | undefined; + onFilterAdded?: () => void; +} + +const StyledFlexGroup = styled(EuiFlexGroup)` + border-top: 1px solid #d3dae6; + border-bottom: 1px solid #d3dae6; + margin-top: 2px; +`; + +export const StyledContent = styled.div<{ $isDetails: boolean }>` + padding: ${({ $isDetails }) => ($isDetails ? '0 8px' : undefined)}; +`; + +const ExpandedCellValueActionsComponent: React.FC = ({ + browserFields, + field, + globalFilters, + onFilterAdded, + timelineId, + value, +}) => { + const { + timelines, + data: { + query: { filterManager }, + }, + } = useKibana().services; + const showButton = useMemo( + () => + allowTopN({ + browserField: getAllFieldsByName(browserFields)[field], + fieldName: field, + hideTopN: false, + }), + [browserFields, field] + ); + + const [showTopN, setShowTopN] = useState(false); + const onClick = useCallback(() => setShowTopN(!showTopN), [showTopN]); + + return ( + <> + + {showButton ? ( + + ) : null} + + + + {timelines.getHoverActions().getFilterForValueButton({ + Component: EuiButtonEmpty, + field, + filterManager, + onFilterAdded, + ownFocus: false, + size: 's', + showTooltip: false, + value, + })} + + + {timelines.getHoverActions().getFilterOutValueButton({ + Component: EuiButtonEmpty, + field, + filterManager, + onFilterAdded, + ownFocus: false, + size: 's', + showTooltip: false, + value, + })} + + + + ); +}; + +ExpandedCellValueActionsComponent.displayName = 'ExpandedCellValueActionsComponent'; + +export const ExpandedCellValueActions = React.memo(ExpandedCellValueActionsComponent); diff --git a/x-pack/plugins/security_solution/public/common/lib/cell_actions/helpers.ts b/x-pack/plugins/security_solution/public/common/lib/cell_actions/helpers.ts new file mode 100644 index 0000000000000..1c40d8df48bfe --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/lib/cell_actions/helpers.ts @@ -0,0 +1,65 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import * as i18n from './translations'; +import { + EVENT_URL_FIELD_NAME, + HOST_NAME_FIELD_NAME, + REFERENCE_URL_FIELD_NAME, + RULE_REFERENCE_FIELD_NAME, + SIGNAL_RULE_NAME_FIELD_NAME, +} from '../../../timelines/components/timeline/body/renderers/constants'; +import { INDICATOR_REFERENCE } from '../../../../common/cti/constants'; +import { IP_FIELD_TYPE } from '../../../network/components/ip'; +import { PORT_NAMES } from '../../../network/components/port/helpers'; + +export const COLUMNS_WITH_LINKS = [ + { + columnId: HOST_NAME_FIELD_NAME, + label: i18n.VIEW_HOST_SUMMARY, + }, + { + columnId: 'source.ip', + fieldType: IP_FIELD_TYPE, + label: i18n.EXPAND_IP_DETAILS, + }, + { + columnId: 'destination.ip', + fieldType: IP_FIELD_TYPE, + label: i18n.EXPAND_IP_DETAILS, + }, + { + columnId: SIGNAL_RULE_NAME_FIELD_NAME, + label: i18n.VIEW_RULE_DETAILS, + }, + ...PORT_NAMES.map((p) => ({ + columnId: p, + label: i18n.VIEW_PORT_DETAILS, + })), + { + columnId: RULE_REFERENCE_FIELD_NAME, + label: i18n.VIEW_RULE_REFERENCE, + }, + { + columnId: REFERENCE_URL_FIELD_NAME, + label: i18n.VIEW_RULE_REFERENCE, + }, + { + columnId: EVENT_URL_FIELD_NAME, + label: i18n.VIEW_EVENT_REFERENCE, + }, + { + columnId: INDICATOR_REFERENCE, + label: i18n.VIEW_INDICATOR_REFERENCE, + }, +]; + +export const getLink = (cId?: string, fieldType?: string, linkField?: string) => + cId && + COLUMNS_WITH_LINKS.find( + (c) => c.columnId === cId || (c.fieldType && fieldType === c.fieldType && linkField != null) + ); diff --git a/x-pack/plugins/security_solution/public/common/lib/cell_actions/translations.ts b/x-pack/plugins/security_solution/public/common/lib/cell_actions/translations.ts new file mode 100644 index 0000000000000..527cc14c323b2 --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/lib/cell_actions/translations.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 { i18n } from '@kbn/i18n'; + +export const SHOW_TOP_VALUES = i18n.translate( + 'xpack.securitySolution.expandedValue.showTopN.showTopValues', + { + defaultMessage: 'Show top values', + } +); + +export const HIDE_TOP_VALUES = i18n.translate( + 'xpack.securitySolution.expandedValue.hideTopValues.HideTopValues', + { + defaultMessage: 'Hide top values', + } +); + +export const VIEW_HOST_SUMMARY = i18n.translate( + 'xpack.securitySolution.expandedValue.links.viewHostSummary', + { + defaultMessage: 'View host summary', + } +); + +export const EXPAND_IP_DETAILS = i18n.translate( + 'xpack.securitySolution.expandedValue.links.expandIpDetails', + { + defaultMessage: 'Expand ip details', + } +); + +export const VIEW_RULE_DETAILS = i18n.translate( + 'xpack.securitySolution.expandedValue.links.viewRuleDetails', + { + defaultMessage: 'View rule details', + } +); + +export const VIEW_PORT_DETAILS = i18n.translate( + 'xpack.securitySolution.expandedValue.links.viewPortDetails', + { + defaultMessage: 'View port details', + } +); + +export const VIEW_RULE_REFERENCE = i18n.translate( + 'xpack.securitySolution.expandedValue.links.viewRuleReference', + { + defaultMessage: 'View rule reference', + } +); + +export const VIEW_EVENT_REFERENCE = i18n.translate( + 'xpack.securitySolution.expandedValue.links.viewEventReference', + { + defaultMessage: 'View event reference', + } +); + +export const VIEW_INDICATOR_REFERENCE = i18n.translate( + 'xpack.securitySolution.expandedValue.links.viewIndicatorReference', + { + defaultMessage: 'View indicator reference', + } +); diff --git a/x-pack/plugins/security_solution/public/common/mock/endpoint/app_context_render.tsx b/x-pack/plugins/security_solution/public/common/mock/endpoint/app_context_render.tsx index 20d411a0437c2..ed2a2252bd0d2 100644 --- a/x-pack/plugins/security_solution/public/common/mock/endpoint/app_context_render.tsx +++ b/x-pack/plugins/security_solution/public/common/mock/endpoint/app_context_render.tsx @@ -78,7 +78,7 @@ const experimentalFeaturesReducer: Reducer ({ @@ -16,30 +17,28 @@ jest.mock('../lib/kibana', () => ({ describe('createInitialState', () => { describe('sourcerer -> default -> indicesExist', () => { + const mockPluginState = {} as Omit< + SecuritySubPlugins['store']['initialState'], + 'app' | 'dragAndDrop' | 'inputs' | 'sourcerer' + >; test('indicesExist should be TRUE if configIndexPatterns is NOT empty', () => { - const initState = createInitialState( - {}, - { - kibanaIndexPatterns: [{ id: '1234567890987654321', title: 'mock-kibana' }], - configIndexPatterns: ['auditbeat-*', 'filebeat'], - signalIndexName: 'siem-signals-default', - enableExperimental: parseExperimentalConfigValue([]), - } - ); + const initState = createInitialState(mockPluginState, { + kibanaIndexPatterns: [{ id: '1234567890987654321', title: 'mock-kibana' }], + configIndexPatterns: ['auditbeat-*', 'filebeat'], + signalIndexName: 'siem-signals-default', + enableExperimental: parseExperimentalConfigValue([]), + }); expect(initState.sourcerer?.sourcererScopes.default.indicesExist).toEqual(true); }); test('indicesExist should be FALSE if configIndexPatterns is empty', () => { - const initState = createInitialState( - {}, - { - kibanaIndexPatterns: [{ id: '1234567890987654321', title: 'mock-kibana' }], - configIndexPatterns: [], - signalIndexName: 'siem-signals-default', - enableExperimental: parseExperimentalConfigValue([]), - } - ); + const initState = createInitialState(mockPluginState, { + kibanaIndexPatterns: [{ id: '1234567890987654321', title: 'mock-kibana' }], + configIndexPatterns: [], + signalIndexName: 'siem-signals-default', + enableExperimental: parseExperimentalConfigValue([]), + }); expect(initState.sourcerer?.sourcererScopes.default.indicesExist).toEqual(false); }); diff --git a/x-pack/plugins/security_solution/public/common/store/reducer.ts b/x-pack/plugins/security_solution/public/common/store/reducer.ts index d5633ee84d6d4..4a6009b2e41a8 100644 --- a/x-pack/plugins/security_solution/public/common/store/reducer.ts +++ b/x-pack/plugins/security_solution/public/common/store/reducer.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { combineReducers, PreloadedState, AnyAction, Reducer } from 'redux'; +import { combineReducers, AnyAction, Reducer } from 'redux'; import { appReducer, initialAppState } from './app'; import { dragAndDropReducer, initialDragAndDropState } from './drag_and_drop'; @@ -34,7 +34,10 @@ export type SubPluginsInitReducer = HostsPluginReducer & * Factory for the 'initialState' that is used to preload state into the Security App's redux store. */ export const createInitialState = ( - pluginsInitState: SecuritySubPlugins['store']['initialState'], + pluginsInitState: Omit< + SecuritySubPlugins['store']['initialState'], + 'app' | 'dragAndDrop' | 'inputs' | 'sourcerer' + >, { kibanaIndexPatterns, configIndexPatterns, @@ -46,11 +49,11 @@ export const createInitialState = ( signalIndexName: string | null; enableExperimental: ExperimentalFeatures; } -): PreloadedState => { - const preloadedState: PreloadedState = { +): State => { + const preloadedState: State = { + ...pluginsInitState, app: { ...initialAppState, enableExperimental }, dragAndDrop: initialDragAndDropState, - ...pluginsInitState, inputs: createInitialInputsState(), sourcerer: { ...sourcererModel.initialSourcererState, @@ -66,6 +69,7 @@ export const createInitialState = ( signalIndexName, }, }; + return preloadedState; }; diff --git a/x-pack/plugins/security_solution/public/common/store/sourcerer/model.ts b/x-pack/plugins/security_solution/public/common/store/sourcerer/model.ts index 26497c7f6ee3b..8f7fbd99f932d 100644 --- a/x-pack/plugins/security_solution/public/common/store/sourcerer/model.ts +++ b/x-pack/plugins/security_solution/public/common/store/sourcerer/model.ts @@ -27,7 +27,7 @@ export interface ManageScope { docValueFields: DocValueFields[]; errorMessage: string | null; id: SourcererScopeName; - indexPattern: IIndexPattern; + indexPattern: Omit; indicesExist: boolean | undefined | null; loading: boolean; selectedPatterns: string[]; @@ -37,9 +37,7 @@ export interface ManageScopeInit extends Partial { id: SourcererScopeName; } -export type SourcererScopeById = { - [id in SourcererScopeName]: ManageScope; -}; +export type SourcererScopeById = Record; export type KibanaIndexPatterns = Array<{ id: string; title: string }>; @@ -51,7 +49,16 @@ export interface SourcererModel { sourcererScopes: SourcererScopeById; } -export const initSourcererScope = { +export const initSourcererScope: Pick< + ManageScope, + | 'browserFields' + | 'docValueFields' + | 'errorMessage' + | 'indexPattern' + | 'indicesExist' + | 'loading' + | 'selectedPatterns' +> = { browserFields: EMPTY_BROWSER_FIELDS, docValueFields: EMPTY_DOCVALUE_FIELD, errorMessage: null, diff --git a/x-pack/plugins/security_solution/public/common/store/store.ts b/x-pack/plugins/security_solution/public/common/store/store.ts index e253ae1bbaf98..a289eaf5cf853 100644 --- a/x-pack/plugins/security_solution/public/common/store/store.ts +++ b/x-pack/plugins/security_solution/public/common/store/store.ts @@ -49,7 +49,7 @@ let store: Store | null = null; * Factory for Security App's redux store. */ export const createStore = ( - state: PreloadedState, + state: State, pluginsReducer: SubPluginsInitReducer, kibana: Observable, storage: Storage, @@ -74,7 +74,7 @@ export const createStore = ( store = createReduxStore( createReducer(pluginsReducer), - state, + state as PreloadedState, composeEnhancers( applyMiddleware(epicMiddleware, telemetryMiddleware, ...(additionalMiddleware ?? [])) ) diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/alerts_histogram.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/alerts_histogram.tsx index 09d8d52271674..d09d33ce5aded 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/alerts_histogram.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/alerts_histogram.tsx @@ -31,6 +31,7 @@ interface AlertsHistogramProps { legendItems: LegendItem[]; legendPosition?: Position; loading: boolean; + showLegend?: boolean; to: string; data: HistogramData[]; updateDateRange: UpdateDateRange; @@ -43,6 +44,7 @@ export const AlertsHistogram = React.memo( legendItems, legendPosition = 'right', loading, + showLegend, to, updateDateRange, }) => { @@ -73,8 +75,9 @@ export const AlertsHistogram = React.memo( diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/index.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/index.tsx index 280b7f2926276..0613c619d89b9 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/index.tsx @@ -63,10 +63,12 @@ interface AlertsHistogramPanelProps { headerChildren?: React.ReactNode; /** Override all defaults, and only display this field */ onlyField?: AlertsStackByField; + paddingSize?: 's' | 'm' | 'l' | 'none'; titleSize?: EuiTitleSize; query?: Query; legendPosition?: Position; signalIndexName: string | null; + showLegend?: boolean; showLinkToAlerts?: boolean; showTotalAlertsCount?: boolean; showStackBy?: boolean; @@ -85,9 +87,11 @@ export const AlertsHistogramPanel = memo( filters, headerChildren, onlyField, + paddingSize = 'm', query, legendPosition = 'right', signalIndexName, + showLegend = true, showLinkToAlerts = false, showTotalAlertsCount = false, showStackBy = true, @@ -154,7 +158,7 @@ export const AlertsHistogramPanel = memo( const legendItems: LegendItem[] = useMemo( () => - alertsData?.aggregations?.alertsByGrouping?.buckets != null + showLegend && alertsData?.aggregations?.alertsByGrouping?.buckets != null ? alertsData.aggregations.alertsByGrouping.buckets.map((bucket, i) => ({ color: i < defaultLegendColors.length ? defaultLegendColors[i] : undefined, dataProviderId: escapeDataProviderId( @@ -165,7 +169,12 @@ export const AlertsHistogramPanel = memo( value: bucket.key, })) : NO_LEGEND_DATA, - [alertsData, selectedStackByOption, timelineId] + [ + alertsData?.aggregations?.alertsByGrouping.buckets, + selectedStackByOption, + showLegend, + timelineId, + ] ); useEffect(() => { @@ -254,7 +263,7 @@ export const AlertsHistogramPanel = memo( return ( - + ( legendPosition={legendPosition} loading={isLoadingAlerts} to={to} + showLegend={showLegend} updateDateRange={updateDateRange} /> )} diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.test.tsx index 261ac8cfee1a6..835784031e065 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.test.tsx @@ -290,7 +290,7 @@ describe('alert actions', () => { ...mockEcsDataWithAlert, signal: { rule: { - ...mockEcsDataWithAlert.signal?.rule!, + ...mockEcsDataWithAlert.signal?.rule, // @ts-expect-error timeline_id: null, }, @@ -317,7 +317,7 @@ describe('alert actions', () => { ...mockEcsDataWithAlert, signal: { rule: { - ...mockEcsDataWithAlert.signal?.rule!, + ...mockEcsDataWithAlert.signal?.rule, timeline_id: [''], }, }, @@ -343,7 +343,7 @@ describe('alert actions', () => { ...mockEcsDataWithAlert, signal: { rule: { - ...mockEcsDataWithAlert.signal?.rule!, + ...mockEcsDataWithAlert.signal?.rule, type: ['eql'], timeline_id: [''], }, @@ -387,7 +387,7 @@ describe('alert actions', () => { ...mockEcsDataWithAlert, signal: { rule: { - ...mockEcsDataWithAlert.signal?.rule!, + ...mockEcsDataWithAlert.signal?.rule, type: ['eql'], timeline_id: [''], }, diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.tsx index d48bc95f5d480..fb958c775e68c 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.tsx @@ -192,8 +192,10 @@ export const getThresholdAggregationData = ( }; } + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const originalTime = moment(thresholdData.signal?.original_time![0]); const now = moment(); + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const ruleFrom = dateMath.parse(thresholdData.signal?.rule?.from![0]!); const ruleInterval = moment.duration(now.diff(ruleFrom)); const fromOriginalTime = originalTime.clone().subtract(ruleInterval); // This is the default... can overshoot 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 89d0fd2e4dbd0..4bd516d0b1338 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 @@ -142,14 +142,14 @@ export const AlertsTableComponent: React.FC = ({ const setEventsLoadingCallback = useCallback( ({ eventIds, isLoading }: SetEventsLoadingProps) => { - setEventsLoading!({ id: timelineId, eventIds, isLoading }); + setEventsLoading({ id: timelineId, eventIds, isLoading }); }, [setEventsLoading, timelineId] ); const setEventsDeletedCallback = useCallback( ({ eventIds, isDeleted }: SetEventsDeletedProps) => { - setEventsDeleted!({ id: timelineId, eventIds, isDeleted }); + setEventsDeleted({ id: timelineId, eventIds, isDeleted }); }, [setEventsDeleted, timelineId] ); @@ -216,7 +216,7 @@ export const AlertsTableComponent: React.FC = ({ // Callback for clearing entire selection from utility bar const clearSelectionCallback = useCallback(() => { - clearSelected!({ id: timelineId }); + clearSelected({ id: timelineId }); dispatch( timelineActions.setTGridSelectAll({ id: timelineId, @@ -375,21 +375,21 @@ export const AlertsTableComponent: React.FC = ({ return ( ); }; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_job_select/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/ml_job_select/index.tsx index 6d7b5d4acc5b8..f785ec43a8b31 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/ml_job_select/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/ml_job_select/index.tsx @@ -59,6 +59,7 @@ interface MlJobSelectProps { } const renderJobOption = (option: MlJobOption) => ( + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion ); @@ -69,6 +70,7 @@ export const MlJobSelect: React.FC = ({ describedByIds = [], f const mlUrl = useKibana().services.application.getUrlForApp('ml'); const handleJobSelect = useCallback( (selectedJobOptions: MlJobOption[]): void => { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const selectedJobIds = selectedJobOptions.map((option) => option.value!.id); field.setValue(selectedJobIds); }, diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_switch/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/rule_switch/index.tsx index dc20dd1aa9ca4..dd836a04f8263 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_switch/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_switch/index.tsx @@ -61,9 +61,9 @@ export const RuleSwitchComponent = ({ async (event: EuiSwitchEvent) => { setMyIsLoading(true); if (dispatch != null) { - await enableRulesAction([id], event.target.checked!, dispatch, dispatchToaster); + await enableRulesAction([id], event.target.checked, dispatch, dispatchToaster); } else { - const enabling = event.target.checked!; + const enabling = event.target.checked; const title = enabling ? i18n.BATCH_ACTION_ACTIVATE_SELECTED_ERROR(1) : i18n.BATCH_ACTION_DEACTIVATE_SELECTED_ERROR(1); diff --git a/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.tsx b/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.tsx index d9cdc4e0d0912..54cd26e9cdc54 100644 --- a/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.tsx +++ b/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.tsx @@ -18,37 +18,41 @@ import { DefaultCellRenderer } from '../../../timelines/components/timeline/cell */ export const RenderCellValue: React.FC = ({ + browserFields, columnId, data, + ecsData, eventId, - isDraggable, + globalFilters, header, isDetails, + isDraggable, isExpandable, isExpanded, linkValues, rowIndex, + rowRenderers, setCellProps, timelineId, - ecsData, - rowRenderers, - browserFields, + truncate, }) => ( ); diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_alerts_privileges.test.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_alerts_privileges.test.tsx index cbab24835c1ac..40894c1d01929 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_alerts_privileges.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_alerts_privileges.test.tsx @@ -86,7 +86,12 @@ const userPrivilegesInitial: ReturnType = { result: undefined, error: undefined, }, - endpointPrivileges: { loading: true, canAccessEndpointManagement: false, canAccessFleet: false }, + endpointPrivileges: { + loading: true, + canAccessEndpointManagement: false, + canAccessFleet: false, + isPlatinumPlus: true, + }, kibanaSecuritySolutionsPrivileges: { crud: true, read: true }, }; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/detection_engine.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/detection_engine.tsx index 848bdd7f8ef71..ebda4f2b4232f 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/detection_engine.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/detection_engine.tsx @@ -176,8 +176,8 @@ const DetectionEnginePageComponent: React.FC = ({ const onFilterGroupChangedCallback = useCallback( (newFilterGroup: Status) => { const timelineId = TimelineId.detectionsPage; - clearEventsLoading!({ id: timelineId }); - clearEventsDeleted!({ id: timelineId }); + clearEventsLoading({ id: timelineId }); + clearEventsDeleted({ id: timelineId }); setFilterGroup(newFilterGroup); }, [clearEventsLoading, clearEventsDeleted, setFilterGroup] diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx index 492b8e461fb60..7167b07c7da5d 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx @@ -302,6 +302,7 @@ const RuleDetailsPageComponent: React.FC = ({ const getLegacyUrlConflictCallout = useMemo(() => { const outcome = rule?.outcome; if (rule != null && spacesApi && outcome === 'conflict') { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const aliasTargetId = rule?.alias_target_id!; // This is always defined if outcome === 'conflict' // We have resolved to one rule, but there is another one with a legacy URL associated with this page. Display a // callout with a warning for the user, and provide a way for them to navigate to the other rule. @@ -401,9 +402,9 @@ const RuleDetailsPageComponent: React.FC = ({ const onFilterGroupChangedCallback = useCallback( (newFilterGroup: Status) => { const timelineId = TimelineId.detectionsRulesDetailsPage; - clearEventsLoading!({ id: timelineId }); - clearEventsDeleted!({ id: timelineId }); - clearSelected!({ id: timelineId }); + clearEventsLoading({ id: timelineId }); + clearEventsDeleted({ id: timelineId }); + clearSelected({ id: timelineId }); setFilterGroup(newFilterGroup); }, [clearEventsLoading, clearEventsDeleted, clearSelected, setFilterGroup] diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/helpers.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/helpers.tsx index 0f109214c6bf3..18b5d74516199 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/helpers.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/helpers.tsx @@ -174,6 +174,7 @@ export const getAboutStepsData = (rule: Rule, detailsView: boolean): AboutStepRu timestampOverride: timestampOverride ?? '', name, description, + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion note: note!, references, severity: { diff --git a/x-pack/plugins/security_solution/public/hosts/components/authentications_table/index.tsx b/x-pack/plugins/security_solution/public/hosts/components/authentications_table/index.tsx index b83853eec69a1..23e5da28a3559 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/authentications_table/index.tsx +++ b/x-pack/plugins/security_solution/public/hosts/components/authentications_table/index.tsx @@ -229,8 +229,8 @@ const getAuthenticationColumns = (): AuthTableColumns => [ truncateText: false, hideForMobile: false, render: ({ node }) => - has('lastSuccess.timestamp', node) && node.lastSuccess!.timestamp != null ? ( - + has('lastSuccess.timestamp', node) && node.lastSuccess?.timestamp != null ? ( + ) : ( getEmptyTagValue() ), @@ -264,8 +264,8 @@ const getAuthenticationColumns = (): AuthTableColumns => [ truncateText: false, hideForMobile: false, render: ({ node }) => - has('lastFailure.timestamp', node) && node.lastFailure!.timestamp != null ? ( - + has('lastFailure.timestamp', node) && node.lastFailure?.timestamp != null ? ( + ) : ( getEmptyTagValue() ), diff --git a/x-pack/plugins/security_solution/public/hosts/pages/navigation/events_query_tab_body.tsx b/x-pack/plugins/security_solution/public/hosts/pages/navigation/events_query_tab_body.tsx index fb3e22260bd84..3a27f8c2f3ba6 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/navigation/events_query_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/hosts/pages/navigation/events_query_tab_body.tsx @@ -115,11 +115,11 @@ const EventsQueryTabBodyComponent: React.FC = ({ end={endDate} entityType="events" id={TimelineId.hostsPageEvents} + pageFilters={pageFilters} renderCellValue={DefaultCellRenderer} rowRenderers={defaultRowRenderers} scopeId={SourcererScopeName.default} start={startDate} - pageFilters={pageFilters} unit={unit} /> diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_card_grid/artifact_card_grid.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_card_grid/artifact_card_grid.tsx index 9e9082ccc54e7..0218b83288d84 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_card_grid/artifact_card_grid.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_card_grid/artifact_card_grid.tsx @@ -119,6 +119,7 @@ export const ArtifactCardGrid = memo( const handleItemComponentProps = useCallback( (item: AnyArtifact): ArtifactEntryCollapsibleCardProps => { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion return fullCardProps.get(item)!; }, [fullCardProps] diff --git a/x-pack/plugins/security_solution/public/management/components/back_to_external_app_button/back_to_external_app_button.tsx b/x-pack/plugins/security_solution/public/management/components/back_to_external_app_button/back_to_external_app_button.tsx index c71eea2aaf9db..47242ed7d1edc 100644 --- a/x-pack/plugins/security_solution/public/management/components/back_to_external_app_button/back_to_external_app_button.tsx +++ b/x-pack/plugins/security_solution/public/management/components/back_to_external_app_button/back_to_external_app_button.tsx @@ -31,7 +31,7 @@ const EuiButtonEmptyStyled = styled(EuiButtonEmpty)` export type BackToExternalAppButtonProps = CommonProps & ListPageRouteState; export const BackToExternalAppButton = memo( ({ backButtonLabel, backButtonUrl, onBackButtonNavigateTo, ...commonProps }) => { - const handleBackOnClick = useNavigateToAppEventHandler(...onBackButtonNavigateTo!); + const handleBackOnClick = useNavigateToAppEventHandler(...onBackButtonNavigateTo); return ( ( flush="left" size="xs" iconType="arrowLeft" - href={backButtonUrl!} + href={backButtonUrl} onClick={handleBackOnClick} textProps={{ className: 'text' }} > diff --git a/x-pack/plugins/security_solution/public/management/components/context_menu_with_router_support/context_menu_with_router_support.tsx b/x-pack/plugins/security_solution/public/management/components/context_menu_with_router_support/context_menu_with_router_support.tsx index 41abb0309a7d1..6e33ad9218bb6 100644 --- a/x-pack/plugins/security_solution/public/management/components/context_menu_with_router_support/context_menu_with_router_support.tsx +++ b/x-pack/plugins/security_solution/public/management/components/context_menu_with_router_support/context_menu_with_router_support.tsx @@ -75,6 +75,7 @@ export const ContextMenuWithRouterSupport = memo { + let appTestContext: AppContextTestRender; + let renderResult: ReturnType; + let render: ( + props?: Partial + ) => ReturnType; + + const loadedUserEndpointPrivilegesState = ( + endpointOverrides: Partial = {} + ): EndpointPrivileges => ({ + loading: false, + canAccessFleet: true, + canAccessEndpointManagement: true, + isPlatinumPlus: false, + ...endpointOverrides, + }); + beforeEach(() => { onSearchMock = jest.fn(); + appTestContext = createAppRootMockRenderer(); + + render = (overrideProps = {}) => { + const props: SearchExceptionsProps = { + placeholder: 'search test', + onSearch: onSearchMock, + ...overrideProps, + }; + + renderResult = appTestContext.render(); + return renderResult; + }; + + mockUseEndpointPrivileges.mockReturnValue(loadedUserEndpointPrivilegesState()); }); - const getElement = (defaultValue: string = '') => ( - - ); + afterAll(() => { + mockUseEndpointPrivileges.mockReset(); + }); it('should have a default value', () => { const expectedDefaultValue = 'this is a default value'; - const element = mount(getElement(expectedDefaultValue)); - const defaultValue = element - .find('[data-test-subj="searchField"]') - .first() - .props().defaultValue; - expect(defaultValue).toBe(expectedDefaultValue); + const element = render({ defaultValue: expectedDefaultValue }); + + expect(element.getByDisplayValue(expectedDefaultValue)).not.toBeNull(); }); it('should dispatch search action when submit search field', () => { const expectedDefaultValue = 'this is a default value'; - const element = mount(getElement()); + const element = render(); expect(onSearchMock).toHaveBeenCalledTimes(0); - const searchFieldProps = element - .find('[data-test-subj="searchField"]') - .first() - .props() as EuiFieldSearchPropsFake; - searchFieldProps.onSearch(expectedDefaultValue); + act(() => { + fireEvent.change(element.getByTestId('searchField'), { + target: { value: expectedDefaultValue }, + }); + }); expect(onSearchMock).toHaveBeenCalledTimes(1); expect(onSearchMock).toHaveBeenCalledWith(expectedDefaultValue, '', ''); @@ -56,11 +83,42 @@ describe('Search exceptions', () => { it('should dispatch search action when click on button', () => { const expectedDefaultValue = 'this is a default value'; - const element = mount(getElement(expectedDefaultValue)); + const element = render({ defaultValue: expectedDefaultValue }); expect(onSearchMock).toHaveBeenCalledTimes(0); - element.find('[data-test-subj="searchButton"]').first().simulate('click'); + act(() => { + fireEvent.click(element.getByTestId('searchButton')); + }); + expect(onSearchMock).toHaveBeenCalledTimes(1); expect(onSearchMock).toHaveBeenCalledWith(expectedDefaultValue, '', ''); }); + + it('should hide refresh button', () => { + const element = render({ hideRefreshButton: true }); + + expect(element.queryByTestId('searchButton')).toBeNull(); + }); + + it('should hide policies selector when no license', () => { + const generator = new EndpointDocGenerator('policy-list'); + const policy = generator.generatePolicyPackagePolicy(); + mockUseEndpointPrivileges.mockReturnValue( + loadedUserEndpointPrivilegesState({ isPlatinumPlus: false }) + ); + const element = render({ policyList: [policy], hasPolicyFilter: true }); + + expect(element.queryByTestId('policiesSelectorButton')).toBeNull(); + }); + + it('should display policies selector when right license', () => { + const generator = new EndpointDocGenerator('policy-list'); + const policy = generator.generatePolicyPackagePolicy(); + mockUseEndpointPrivileges.mockReturnValue( + loadedUserEndpointPrivilegesState({ isPlatinumPlus: true }) + ); + const element = render({ policyList: [policy], hasPolicyFilter: true }); + + expect(element.queryByTestId('policiesSelectorButton')).not.toBeNull(); + }); }); diff --git a/x-pack/plugins/security_solution/public/management/components/search_exceptions/search_exceptions.tsx b/x-pack/plugins/security_solution/public/management/components/search_exceptions/search_exceptions.tsx index a77a2a41038d7..1f3eab5db2947 100644 --- a/x-pack/plugins/security_solution/public/management/components/search_exceptions/search_exceptions.tsx +++ b/x-pack/plugins/security_solution/public/management/components/search_exceptions/search_exceptions.tsx @@ -10,6 +10,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiFieldSearch, EuiButton } from '@elastic/e import { i18n } from '@kbn/i18n'; import { PolicySelectionItem, PoliciesSelector } from '../policies_selector'; import { ImmutableArray, PolicyData } from '../../../../common/endpoint/types'; +import { useEndpointPrivileges } from '../../../common/components/user_privileges/use_endpoint_privileges'; export interface SearchExceptionsProps { defaultValue?: string; @@ -18,6 +19,7 @@ export interface SearchExceptionsProps { policyList?: ImmutableArray; defaultExcludedPolicies?: string; defaultIncludedPolicies?: string; + hideRefreshButton?: boolean; onSearch(query: string, includedPolicies?: string, excludedPolicies?: string): void; } @@ -30,7 +32,9 @@ export const SearchExceptions = memo( policyList, defaultIncludedPolicies, defaultExcludedPolicies, + hideRefreshButton = false, }) => { + const { isPlatinumPlus } = useEndpointPrivileges(); const [query, setQuery] = useState(defaultValue); const [includedPolicies, setIncludedPolicies] = useState(defaultIncludedPolicies || ''); const [excludedPolicies, setExcludedPolicies] = useState(defaultExcludedPolicies || ''); @@ -88,7 +92,7 @@ export const SearchExceptions = memo( data-test-subj="searchField" />
- {hasPolicyFilter && policyList ? ( + {isPlatinumPlus && hasPolicyFilter && policyList ? ( ( ) : null} - - - {i18n.translate('xpack.securitySolution.management.search.button', { - defaultMessage: 'Refresh', - })} - - + {!hideRefreshButton ? ( + + + {i18n.translate('xpack.securitySolution.management.search.button', { + defaultMessage: 'Refresh', + })} + + + ) : null}
); } diff --git a/x-pack/plugins/security_solution/public/management/index.ts b/x-pack/plugins/security_solution/public/management/index.ts index 326f8471aa621..3e2c8b0ca2ec8 100644 --- a/x-pack/plugins/security_solution/public/management/index.ts +++ b/x-pack/plugins/security_solution/public/management/index.ts @@ -42,7 +42,12 @@ export class Management { routes, store: { initialState: { - management: undefined, + /** + * Cast the state to ManagementState for compatibility with + * the subplugin architecture (which expects initialize state.) + * but you do not need it because this plugin is doing it through its middleware + */ + management: {} as ManagementState, }, /** * Cast the ImmutableReducer to a regular reducer for compatibility with diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/reducer.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/reducer.ts index b16caf00b4e28..d9407e310639e 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/reducer.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/reducer.ts @@ -50,9 +50,9 @@ const handleEndpointDetailsActivityLogChanged: CaseReducer = (state, action) => { return { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion ...state!, isolationRequestState: action.payload, }; diff --git a/x-pack/plugins/security_solution/public/management/pages/event_filters/store/middleware.ts b/x-pack/plugins/security_solution/public/management/pages/event_filters/store/middleware.ts index 0c90e21b49530..c77494aad2de2 100644 --- a/x-pack/plugins/security_solution/public/management/pages/event_filters/store/middleware.ts +++ b/x-pack/plugins/security_solution/public/management/pages/event_filters/store/middleware.ts @@ -231,8 +231,8 @@ const refreshListDataIfNeeded: MiddlewareActionHandler = async (store, eventFilt dispatch({ type: 'eventFiltersListPageDataChanged', payload: { - type: 'LoadingResourceState', // @ts-expect-error-next-line will be fixed with when AsyncResourceState is refactored (#830) + type: 'LoadingResourceState', previousState: getCurrentListPageDataState(state), }, }); diff --git a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/event_filter_delete_modal.test.tsx b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/event_filter_delete_modal.test.tsx index ed18c084c2a05..108e3d06affa6 100644 --- a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/event_filter_delete_modal.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/event_filter_delete_modal.test.tsx @@ -30,12 +30,12 @@ describe('When event filters delete modal is shown', () => { const getConfirmButton = () => renderResult.baseElement.querySelector( '[data-test-subj="eventFilterDeleteModalConfirmButton"]' - )! as HTMLButtonElement; + ) as HTMLButtonElement; const getCancelButton = () => renderResult.baseElement.querySelector( '[data-test-subj="eventFilterDeleteModalCancelButton"]' - )! as HTMLButtonElement; + ) as HTMLButtonElement; const getCurrentState = () => store.getState().management.eventFilters; diff --git a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/flyout/index.test.tsx b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/flyout/index.test.tsx index d5a1c6624923b..83b4f005135ba 100644 --- a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/flyout/index.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/flyout/index.test.tsx @@ -80,7 +80,7 @@ describe('Event filter flyout', () => { }); expect(getFormEntryState(getState())).not.toBeUndefined(); - expect(getFormEntryState(getState())!.entries[0].field).toBe(''); + expect(getFormEntryState(getState())?.entries[0].field).toBe(''); }); it('should confirm form when button is disabled', () => { @@ -98,7 +98,7 @@ describe('Event filter flyout', () => { type: 'eventFiltersChangeForm', payload: { entry: { - ...(getState().form!.entry as CreateExceptionListItemSchema), + ...(getState().form?.entry as CreateExceptionListItemSchema), name: 'test', os_types: ['windows'], }, @@ -125,7 +125,7 @@ describe('Event filter flyout', () => { type: 'eventFiltersFormStateChanged', payload: { type: 'LoadedResourceState', - data: getState().form!.entry as ExceptionListItemSchema, + data: getState().form?.entry as ExceptionListItemSchema, }, }); }); @@ -193,6 +193,6 @@ describe('Event filter flyout', () => { }); expect(getFormEntryState(getState())).not.toBeUndefined(); - expect(getFormEntryState(getState())!.item_id).toBe(createdEventFilterEntryMock().item_id); + expect(getFormEntryState(getState())?.item_id).toBe(createdEventFilterEntryMock().item_id); }); }); diff --git a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form/index.test.tsx b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form/index.test.tsx index 3934e3a389c36..f8dd9ac632cd0 100644 --- a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form/index.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form/index.test.tsx @@ -99,7 +99,7 @@ describe('Event filter form', () => { }); }); - expect(getState().form.entry!.name).toBe('Exception name'); + expect(getState().form.entry?.name).toBe('Exception name'); expect(getState().form.hasNameError).toBeFalsy(); }); @@ -116,7 +116,7 @@ describe('Event filter form', () => { }); }); - expect(getState().form.entry!.name).toBe(''); + expect(getState().form.entry?.name).toBe(''); expect(getState().form.hasNameError).toBeTruthy(); }); diff --git a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/modal/index.test.tsx b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/modal/index.test.tsx index c77188694f507..8ea50ecd460e4 100644 --- a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/modal/index.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/modal/index.test.tsx @@ -81,7 +81,7 @@ describe('Event filter modal', () => { await waitForAction('eventFiltersInitForm'); }); - expect(getState().form!.entry).not.toBeUndefined(); + expect(getState().form?.entry).not.toBeUndefined(); }); it('should set OS with the enriched data', async () => { @@ -90,7 +90,7 @@ describe('Event filter modal', () => { await waitForAction('eventFiltersInitForm'); }); - expect(getState().form!.entry?.os_types).toContain('linux'); + expect(getState().form?.entry?.os_types).toContain('linux'); }); it('should confirm form when button is disabled', async () => { @@ -103,7 +103,7 @@ describe('Event filter modal', () => { act(() => { fireEvent.click(confirmButton); }); - expect(getState().form!.submissionResourceState.type).toBe('UninitialisedResourceState'); + expect(getState().form?.submissionResourceState.type).toBe('UninitialisedResourceState'); }); it('should confirm form when button is enabled', async () => { @@ -116,7 +116,7 @@ describe('Event filter modal', () => { type: 'eventFiltersChangeForm', payload: { entry: { - ...(getState().form!.entry as CreateExceptionListItemSchema), + ...(getState().form?.entry as CreateExceptionListItemSchema), name: 'test', }, hasNameError: false, @@ -126,7 +126,7 @@ describe('Event filter modal', () => { act(() => { fireEvent.click(confirmButton); }); - expect(getState().form!.submissionResourceState.type).toBe('LoadingResourceState'); + expect(getState().form?.submissionResourceState.type).toBe('LoadingResourceState'); expect(confirmButton.hasAttribute('disabled')).toBeTruthy(); }); @@ -143,7 +143,7 @@ describe('Event filter modal', () => { type: 'eventFiltersFormStateChanged', payload: { type: 'LoadedResourceState', - data: getState().form!.entry as ExceptionListItemSchema, + data: getState().form?.entry as ExceptionListItemSchema, }, }); }); diff --git a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/event_filters_list_page.test.tsx b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/event_filters_list_page.test.tsx index d86b24b417988..0729f95bb44a9 100644 --- a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/event_filters_list_page.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/event_filters_list_page.test.tsx @@ -14,6 +14,7 @@ import { isFailedResourceState, isLoadedResourceState } from '../../../state'; // Needed to mock the data services used by the ExceptionItem component jest.mock('../../../../common/lib/kibana'); +jest.mock('../../../../common/components/user_privileges/use_endpoint_privileges'); describe('When on the Event Filters List Page', () => { let render: () => ReturnType; diff --git a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/use_event_filters_notification.test.tsx b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/use_event_filters_notification.test.tsx index 039aeb9f8e596..82fe231505ad5 100644 --- a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/use_event_filters_notification.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/use_event_filters_notification.test.tsx @@ -79,14 +79,14 @@ describe('EventFiltersNotification', () => { type: 'eventFiltersFormStateChanged', payload: { type: 'LoadedResourceState', - data: store.getState()!.management!.eventFilters!.form!.entry as ExceptionListItemSchema, + data: store.getState().management.eventFilters.form.entry as ExceptionListItemSchema, }, }); }); expect(notifications.toasts.addSuccess).toBeCalledWith( getCreationSuccessMessage( - store.getState()!.management!.eventFilters!.form!.entry as CreateExceptionListItemSchema + store.getState().management.eventFilters.form.entry as CreateExceptionListItemSchema ) ); expect(notifications.toasts.addDanger).not.toBeCalled(); @@ -110,14 +110,14 @@ describe('EventFiltersNotification', () => { type: 'eventFiltersFormStateChanged', payload: { type: 'LoadedResourceState', - data: store.getState()!.management!.eventFilters!.form!.entry as ExceptionListItemSchema, + data: store.getState().management.eventFilters.form.entry as ExceptionListItemSchema, }, }); }); expect(notifications.toasts.addSuccess).toBeCalledWith( getUpdateSuccessMessage( - store.getState()!.management!.eventFilters!.form!.entry as CreateExceptionListItemSchema + store.getState().management.eventFilters.form.entry as CreateExceptionListItemSchema ) ); expect(notifications.toasts.addDanger).not.toBeCalled(); @@ -144,7 +144,7 @@ describe('EventFiltersNotification', () => { type: 'FailedResourceState', error: { message: 'error message', statusCode: 500, error: 'error' }, lastLoadedState: getLastLoadedResourceState( - store.getState()!.management!.eventFilters!.form!.submissionResourceState + store.getState().management.eventFilters.form.submissionResourceState ), }, }); @@ -154,7 +154,7 @@ describe('EventFiltersNotification', () => { expect(notifications.toasts.addDanger).toBeCalledWith( getCreationErrorMessage( ( - store.getState()!.management!.eventFilters!.form! + store.getState().management.eventFilters.form .submissionResourceState as FailedResourceState ).error ) @@ -181,7 +181,7 @@ describe('EventFiltersNotification', () => { type: 'FailedResourceState', error: { message: 'error message', statusCode: 500, error: 'error' }, lastLoadedState: getLastLoadedResourceState( - store.getState()!.management!.eventFilters!.form!.submissionResourceState + store.getState().management.eventFilters.form.submissionResourceState ), }, }); @@ -191,7 +191,7 @@ describe('EventFiltersNotification', () => { expect(notifications.toasts.addDanger).toBeCalledWith( getUpdateErrorMessage( ( - store.getState()!.management!.eventFilters!.form! + store.getState().management.eventFilters.form .submissionResourceState as FailedResourceState ).error ) @@ -211,7 +211,7 @@ describe('EventFiltersNotification', () => { type: 'FailedResourceState', error: { message: 'error message', statusCode: 500, error: 'error' }, lastLoadedState: getLastLoadedResourceState( - store.getState()!.management!.eventFilters!.form!.submissionResourceState + store.getState().management.eventFilters.form.submissionResourceState ), }, }); @@ -221,7 +221,7 @@ describe('EventFiltersNotification', () => { expect(notifications.toasts.addWarning).toBeCalledWith( getGetErrorMessage( ( - store.getState()!.management!.eventFilters!.form! + store.getState().management.eventFilters.form .submissionResourceState as FailedResourceState ).error ) diff --git a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/service.ts b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/service.ts index 8af353a3c9531..b58c2d901c2cc 100644 --- a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/service.ts +++ b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/service.ts @@ -9,6 +9,7 @@ import { CreateExceptionListItemSchema, ExceptionListItemSchema, FoundExceptionListItemSchema, + UpdateExceptionListItemSchema, } from '@kbn/securitysolution-io-ts-list-types'; import { ENDPOINT_HOST_ISOLATION_EXCEPTIONS_LIST_ID } from '@kbn/securitysolution-list-constants'; import { HttpStart } from 'kibana/public'; @@ -88,3 +89,26 @@ export async function deleteHostIsolationExceptionItems(http: HttpStart, id: str }, }); } + +export async function getOneHostIsolationExceptionItem( + http: HttpStart, + id: string +): Promise { + await ensureHostIsolationExceptionsListExists(http); + return http.get(EXCEPTION_LIST_ITEM_URL, { + query: { + id, + namespace_type: 'agnostic', + }, + }); +} + +export async function updateOneHostIsolationExceptionItem( + http: HttpStart, + exception: UpdateExceptionListItemSchema +): Promise { + await ensureHostIsolationExceptionsListExists(http); + return http.put(EXCEPTION_LIST_ITEM_URL, { + body: JSON.stringify(exception), + }); +} diff --git a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/store/action.ts b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/store/action.ts index a5fae36486f98..237868ad18c50 100644 --- a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/store/action.ts +++ b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/store/action.ts @@ -5,7 +5,10 @@ * 2.0. */ -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import { + ExceptionListItemSchema, + UpdateExceptionListItemSchema, +} from '@kbn/securitysolution-io-ts-list-types'; import { Action } from 'redux'; import { HostIsolationExceptionsPageState } from '../types'; @@ -38,10 +41,24 @@ export type HostIsolationExceptionsDeleteStatusChanged = Action<'hostIsolationExceptionsDeleteStatusChanged'> & { payload: HostIsolationExceptionsPageState['deletion']['status']; }; + +export type HostIsolationExceptionsMarkToEdit = Action<'hostIsolationExceptionsMarkToEdit'> & { + payload: { + id: string; + }; +}; + +export type HostIsolationExceptionsSubmitEdit = Action<'hostIsolationExceptionsSubmitEdit'> & { + payload: UpdateExceptionListItemSchema; +}; + export type HostIsolationExceptionsPageAction = | HostIsolationExceptionsPageDataChanged | HostIsolationExceptionsCreateEntry | HostIsolationExceptionsFormStateChanged | HostIsolationExceptionsDeleteItem | HostIsolationExceptionsSubmitDelete - | HostIsolationExceptionsDeleteStatusChanged; + | HostIsolationExceptionsDeleteStatusChanged + | HostIsolationExceptionsFormEntryChanged + | HostIsolationExceptionsMarkToEdit + | HostIsolationExceptionsSubmitEdit; diff --git a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/store/middleware.test.ts b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/store/middleware.test.ts index 266853fdab5e2..878c17a1a2757 100644 --- a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/store/middleware.test.ts +++ b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/store/middleware.test.ts @@ -5,7 +5,10 @@ * 2.0. */ -import { CreateExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import { + CreateExceptionListItemSchema, + UpdateEndpointListItemSchema, +} from '@kbn/securitysolution-io-ts-list-types'; import { applyMiddleware, createStore, Store } from 'redux'; import { coreMock } from '../../../../../../../../src/core/public/mocks'; import { getFoundExceptionListItemSchemaMock } from '../../../../../../lists/common/schemas/response/found_exception_list_item_schema.mock'; @@ -24,6 +27,8 @@ import { createHostIsolationExceptionItem, deleteHostIsolationExceptionItems, getHostIsolationExceptionItems, + getOneHostIsolationExceptionItem, + updateOneHostIsolationExceptionItem, } from '../service'; import { HostIsolationExceptionsPageState } from '../types'; import { createEmptyHostIsolationException } from '../utils'; @@ -36,6 +41,8 @@ jest.mock('../service'); const getHostIsolationExceptionItemsMock = getHostIsolationExceptionItems as jest.Mock; const deleteHostIsolationExceptionItemsMock = deleteHostIsolationExceptionItems as jest.Mock; const createHostIsolationExceptionItemMock = createHostIsolationExceptionItem as jest.Mock; +const getOneHostIsolationExceptionItemMock = getOneHostIsolationExceptionItem as jest.Mock; +const updateOneHostIsolationExceptionItemMock = updateOneHostIsolationExceptionItem as jest.Mock; const fakeCoreStart = coreMock.createStart({ basePath: '/mock' }); @@ -170,6 +177,7 @@ describe('Host isolation exceptions middleware', () => { ], }; }); + it('should dispatch a form loading state when an entry is submited', async () => { const waiter = spyMiddleware.waitForAction('hostIsolationExceptionsFormStateChanged', { validate({ payload }) { @@ -182,6 +190,7 @@ describe('Host isolation exceptions middleware', () => { }); await waiter; }); + it('should dispatch a form success state when an entry is confirmed by the API', async () => { const waiter = spyMiddleware.waitForAction('hostIsolationExceptionsFormStateChanged', { validate({ payload }) { @@ -198,6 +207,7 @@ describe('Host isolation exceptions middleware', () => { exception: entry, }); }); + it('should dispatch a form failure state when an entry is rejected by the API', async () => { createHostIsolationExceptionItemMock.mockRejectedValue({ body: { message: 'error message', statusCode: 500, error: 'Not today' }, @@ -215,6 +225,101 @@ describe('Host isolation exceptions middleware', () => { }); }); + describe('When updating an item from host isolation exceptions', () => { + const fakeId = 'dc5d1d00-2766-11ec-981f-7f84cfc8764f'; + let fakeException: UpdateEndpointListItemSchema; + beforeEach(() => { + fakeException = { + ...createEmptyHostIsolationException(), + name: 'name edit me', + description: 'initial description', + id: fakeId, + item_id: fakeId, + entries: [ + { + field: 'destination.ip', + operator: 'included', + type: 'match', + value: '10.0.0.5', + }, + ], + }; + getOneHostIsolationExceptionItemMock.mockReset(); + getOneHostIsolationExceptionItemMock.mockImplementation(async () => { + return fakeException; + }); + }); + + it('should load data from an entry when an exception is marked to edit', async () => { + const waiter = spyMiddleware.waitForAction('hostIsolationExceptionsFormEntryChanged'); + store.dispatch({ + type: 'hostIsolationExceptionsMarkToEdit', + payload: { + id: fakeId, + }, + }); + await waiter; + expect(getOneHostIsolationExceptionItemMock).toHaveBeenCalledWith(fakeCoreStart.http, fakeId); + }); + + it('should call the update API when an item edit is submitted', async () => { + const waiter = Promise.all([ + // loading status + spyMiddleware.waitForAction('hostIsolationExceptionsFormStateChanged', { + validate: ({ payload }) => { + return isLoadingResourceState(payload); + }, + }), + // loaded status + spyMiddleware.waitForAction('hostIsolationExceptionsFormStateChanged', { + validate({ payload }) { + return isLoadedResourceState(payload); + }, + }), + ]); + store.dispatch({ + type: 'hostIsolationExceptionsSubmitEdit', + payload: fakeException, + }); + expect(updateOneHostIsolationExceptionItemMock).toHaveBeenCalledWith(fakeCoreStart.http, { + name: 'name edit me', + description: 'initial description', + id: fakeId, + item_id: fakeId, + entries: [ + { + field: 'destination.ip', + operator: 'included', + type: 'match', + value: '10.0.0.5', + }, + ], + namespace_type: 'agnostic', + os_types: ['windows', 'linux', 'macos'], + tags: ['policy:all'], + type: 'simple', + comments: [], + }); + await waiter; + }); + + it('should dispatch a form failure state when an entry is rejected by the API', async () => { + updateOneHostIsolationExceptionItemMock.mockRejectedValue({ + body: { message: 'error message', statusCode: 500, error: 'Not today' }, + }); + const waiter = spyMiddleware.waitForAction('hostIsolationExceptionsFormStateChanged', { + validate({ payload }) { + return isFailedResourceState(payload); + }, + }); + store.dispatch({ + type: 'hostIsolationExceptionsSubmitEdit', + payload: fakeException, + }); + await waiter; + }); + }); + describe('When deleting an item from host isolation exceptions', () => { beforeEach(() => { deleteHostIsolationExceptionItemsMock.mockReset(); diff --git a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/store/middleware.ts b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/store/middleware.ts index bbc754e8155b0..2587fff5bfafd 100644 --- a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/store/middleware.ts +++ b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/store/middleware.ts @@ -9,11 +9,12 @@ import { CreateExceptionListItemSchema, ExceptionListItemSchema, FoundExceptionListItemSchema, + UpdateExceptionListItemSchema, } from '@kbn/securitysolution-io-ts-list-types'; import { CoreStart, HttpSetup, HttpStart } from 'kibana/public'; import { matchPath } from 'react-router-dom'; -import { transformNewItemOutput } from '@kbn/securitysolution-list-hooks'; -import { AppLocation, Immutable } from '../../../../../common/endpoint/types'; +import { transformNewItemOutput, transformOutput } from '@kbn/securitysolution-list-hooks'; +import { AppLocation, Immutable, ImmutableObject } from '../../../../../common/endpoint/types'; import { ImmutableMiddleware, ImmutableMiddlewareAPI } from '../../../../common/store'; import { AppAction } from '../../../../common/store/actions'; import { MANAGEMENT_ROUTING_HOST_ISOLATION_EXCEPTIONS_PATH } from '../../../common/constants'; @@ -21,11 +22,14 @@ import { parseQueryFilterToKQL } from '../../../common/utils'; import { createFailedResourceState, createLoadedResourceState, + createLoadingResourceState, } from '../../../state/async_resource_builders'; import { deleteHostIsolationExceptionItems, getHostIsolationExceptionItems, createHostIsolationExceptionItem, + getOneHostIsolationExceptionItem, + updateOneHostIsolationExceptionItem, } from '../service'; import { HostIsolationExceptionsPageState } from '../types'; import { getCurrentListPageDataState, getCurrentLocation, getItemToDelete } from './selector'; @@ -53,6 +57,14 @@ export const createHostIsolationExceptionsPageMiddleware = ( if (action.type === 'hostIsolationExceptionsSubmitDelete') { deleteHostIsolationExceptionsItem(store, coreStart.http); } + + if (action.type === 'hostIsolationExceptionsMarkToEdit') { + loadHostIsolationExceptionsItem(store, coreStart.http, action.payload.id); + } + + if (action.type === 'hostIsolationExceptionsSubmitEdit') { + updateHostIsolationExceptionsItem(store, coreStart.http, action.payload); + } }; }; @@ -67,8 +79,8 @@ async function createHostIsolationException( dispatch({ type: 'hostIsolationExceptionsFormStateChanged', payload: { - type: 'LoadingResourceState', // @ts-expect-error-next-line will be fixed with when AsyncResourceState is refactored (#830) + type: 'LoadingResourceState', previousState: entry, }, }); @@ -110,8 +122,8 @@ async function loadHostIsolationExceptionsList( dispatch({ type: 'hostIsolationExceptionsPageDataChanged', payload: { - type: 'LoadingResourceState', // @ts-expect-error-next-line will be fixed with when AsyncResourceState is refactored (#830) + type: 'LoadingResourceState', previousState: getCurrentListPageDataState(store.getState()), }, }); @@ -152,8 +164,8 @@ async function deleteHostIsolationExceptionsItem( dispatch({ type: 'hostIsolationExceptionsDeleteStatusChanged', payload: { - type: 'LoadingResourceState', // @ts-expect-error-next-line will be fixed with when AsyncResourceState is refactored (#830) + type: 'LoadingResourceState', previousState: store.getState().deletion.status, }, }); @@ -172,3 +184,69 @@ async function deleteHostIsolationExceptionsItem( }); } } + +async function loadHostIsolationExceptionsItem( + store: ImmutableMiddlewareAPI, + http: HttpSetup, + id: string +) { + const { dispatch } = store; + try { + const exception: UpdateExceptionListItemSchema = await getOneHostIsolationExceptionItem( + http, + id + ); + dispatch({ + type: 'hostIsolationExceptionsFormEntryChanged', + payload: exception, + }); + } catch (error) { + dispatch({ + type: 'hostIsolationExceptionsFormStateChanged', + payload: createFailedResourceState(error.body ?? error), + }); + } +} +async function updateHostIsolationExceptionsItem( + store: ImmutableMiddlewareAPI, + http: HttpSetup, + exception: ImmutableObject +) { + const { dispatch } = store; + dispatch({ + type: 'hostIsolationExceptionsFormStateChanged', + payload: createLoadingResourceState(createLoadedResourceState(exception)), + }); + + try { + const entry = transformOutput(exception as UpdateExceptionListItemSchema); + // Clean unnecessary fields for update action + const fieldsToRemove: Array = [ + 'created_at', + 'created_by', + 'created_at', + 'created_by', + 'list_id', + 'tie_breaker_id', + 'updated_at', + 'updated_by', + ]; + + fieldsToRemove.forEach((field) => { + delete entry[field as keyof UpdateExceptionListItemSchema]; + }); + const response: ExceptionListItemSchema = await updateOneHostIsolationExceptionItem( + http, + entry + ); + dispatch({ + type: 'hostIsolationExceptionsFormStateChanged', + payload: createLoadedResourceState(response), + }); + } catch (error) { + dispatch({ + type: 'hostIsolationExceptionsFormStateChanged', + payload: createFailedResourceState(error.body ?? error), + }); + } +} diff --git a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/store/reducer.ts b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/store/reducer.ts index d97295598f445..77a1c248d0cf0 100644 --- a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/store/reducer.ts +++ b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/store/reducer.ts @@ -56,6 +56,15 @@ export const hostIsolationExceptionsPageReducer: StateReducer = ( }, }; } + case 'hostIsolationExceptionsFormEntryChanged': { + return { + ...state, + form: { + ...state.form, + entry: action.payload, + }, + }; + } case 'hostIsolationExceptionsPageDataChanged': { return { ...state, diff --git a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/store/selector.ts b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/store/selector.ts index 4462864e90702..3eca524d830d5 100644 --- a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/store/selector.ts +++ b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/store/selector.ts @@ -9,6 +9,7 @@ import { Pagination } from '@elastic/eui'; import { ExceptionListItemSchema, FoundExceptionListItemSchema, + UpdateExceptionListItemSchema, } from '@kbn/securitysolution-io-ts-list-types'; import { createSelector } from 'reselect'; import { Immutable } from '../../../../../common/endpoint/types'; @@ -108,3 +109,18 @@ export const getDeleteError: HostIsolationExceptionsSelector = (state) => { + return state.form; +}; + +export const getFormStatusFailure: HostIsolationExceptionsSelector = + createSelector(getFormState, (form) => { + if (isFailedResourceState(form.status)) { + return form.status.error; + } + }); + +export const getExceptionToEdit: HostIsolationExceptionsSelector< + UpdateExceptionListItemSchema | undefined +> = (state) => (state.form.entry ? (state.form.entry as UpdateExceptionListItemSchema) : undefined); diff --git a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/types.ts b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/types.ts index 1a74042fb652e..2e61a39eb7542 100644 --- a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/types.ts +++ b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/types.ts @@ -9,6 +9,7 @@ import type { CreateExceptionListItemSchema, ExceptionListItemSchema, FoundExceptionListItemSchema, + UpdateExceptionListItemSchema, } from '@kbn/securitysolution-io-ts-list-types'; import { AsyncResourceState } from '../../state/async_resource_state'; @@ -29,7 +30,7 @@ export interface HostIsolationExceptionsPageState { status: AsyncResourceState; }; form: { - entry?: CreateExceptionListItemSchema; - status: AsyncResourceState; + entry?: CreateExceptionListItemSchema | UpdateExceptionListItemSchema; + status: AsyncResourceState; }; } diff --git a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/delete_modal.test.tsx b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/delete_modal.test.tsx index 0b09b4bfa14c4..2118a8de9b9ed 100644 --- a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/delete_modal.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/delete_modal.test.tsx @@ -53,11 +53,11 @@ describe('When on the host isolation exceptions delete modal', () => { const submitButton = renderResult.baseElement.querySelector( '[data-test-subj="hostIsolationExceptionsDeleteModalConfirmButton"]' - )! as HTMLButtonElement; + ) as HTMLButtonElement; const cancelButton = renderResult.baseElement.querySelector( '[data-test-subj="hostIsolationExceptionsDeleteModalConfirmButton"]' - )! as HTMLButtonElement; + ) as HTMLButtonElement; act(() => { fireEvent.click(submitButton); @@ -72,7 +72,7 @@ describe('When on the host isolation exceptions delete modal', () => { render(); const cancelButton = renderResult.baseElement.querySelector( '[data-test-subj="hostIsolationExceptionsDeleteModalConfirmButton"]' - )! as HTMLButtonElement; + ) as HTMLButtonElement; const waiter = waitForAction('hostIsolationExceptionsMarkToDelete', { validate: ({ payload }) => { @@ -83,7 +83,7 @@ describe('When on the host isolation exceptions delete modal', () => { act(() => { fireEvent.click(cancelButton); }); - await waiter; + expect(await waiter).toBeTruthy(); }); it('should show success toast after the delete is completed', async () => { @@ -96,7 +96,7 @@ describe('When on the host isolation exceptions delete modal', () => { const submitButton = renderResult.baseElement.querySelector( '[data-test-subj="hostIsolationExceptionsDeleteModalConfirmButton"]' - )! as HTMLButtonElement; + ) as HTMLButtonElement; await act(async () => { fireEvent.click(submitButton); @@ -121,7 +121,7 @@ describe('When on the host isolation exceptions delete modal', () => { const submitButton = renderResult.baseElement.querySelector( '[data-test-subj="hostIsolationExceptionsDeleteModalConfirmButton"]' - )! as HTMLButtonElement; + ) as HTMLButtonElement; await act(async () => { fireEvent.click(submitButton); diff --git a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/form.test.tsx b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/form.test.tsx index b06449de69d8c..826f7bf6c4d8a 100644 --- a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/form.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/form.test.tsx @@ -12,12 +12,16 @@ import { AppContextTestRender, createAppRootMockRenderer, } from '../../../../../common/mock/endpoint'; -import { CreateExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import { + CreateExceptionListItemSchema, + UpdateExceptionListItemSchema, +} from '@kbn/securitysolution-io-ts-list-types'; import userEvent from '@testing-library/user-event'; +import uuid from 'uuid'; describe('When on the host isolation exceptions add entry form', () => { let render: ( - exception: CreateExceptionListItemSchema + exception: CreateExceptionListItemSchema | UpdateExceptionListItemSchema ) => ReturnType; let renderResult: ReturnType; const onChange = jest.fn(); @@ -27,7 +31,7 @@ describe('When on the host isolation exceptions add entry form', () => { onChange.mockReset(); onError.mockReset(); const mockedContext = createAppRootMockRenderer(); - render = (exception: CreateExceptionListItemSchema) => { + render = (exception) => { return mockedContext.render( ); @@ -72,4 +76,47 @@ describe('When on the host isolation exceptions add entry form', () => { }); }); }); + describe('When editing an existing exception', () => { + let existingException: UpdateExceptionListItemSchema; + beforeEach(() => { + existingException = { + ...createEmptyHostIsolationException(), + name: 'name edit me', + description: 'initial description', + id: uuid.v4(), + item_id: uuid.v4(), + entries: [ + { + field: 'destination.ip', + operator: 'included', + type: 'match', + value: '10.0.0.1', + }, + ], + }; + renderResult = render(existingException); + }); + it('should render the form with pre-filled inputs', () => { + expect(renderResult.getByTestId('hostIsolationExceptions-form-name-input')).toHaveValue( + 'name edit me' + ); + expect(renderResult.getByTestId('hostIsolationExceptions-form-ip-input')).toHaveValue( + '10.0.0.1' + ); + expect( + renderResult.getByTestId('hostIsolationExceptions-form-description-input') + ).toHaveValue('initial description'); + }); + it('should call onChange when a value is introduced in a field', () => { + const ipInput = renderResult.getByTestId('hostIsolationExceptions-form-ip-input'); + userEvent.clear(ipInput); + userEvent.type(ipInput, '10.0.100.1'); + expect(onChange).toHaveBeenCalledWith({ + ...existingException, + entries: [ + { field: 'destination.ip', operator: 'included', type: 'match', value: '10.0.100.1' }, + ], + }); + }); + }); }); diff --git a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/form.tsx b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/form.tsx index 84263f9d07c81..7b13df16da483 100644 --- a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/form.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/form.tsx @@ -16,7 +16,10 @@ import { EuiTitle, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; -import { CreateExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import { + CreateExceptionListItemSchema, + UpdateExceptionListItemSchema, +} from '@kbn/securitysolution-io-ts-list-types'; import React, { memo, useCallback, useEffect, useMemo, useState } from 'react'; import { isValidIPv4OrCIDR } from '../../utils'; import { @@ -34,18 +37,19 @@ interface ExceptionIpEntry { field: 'destination.ip'; operator: 'included'; type: 'match'; - value: ''; + value: string; } export const HostIsolationExceptionsForm: React.FC<{ - exception: CreateExceptionListItemSchema; + exception: CreateExceptionListItemSchema | UpdateExceptionListItemSchema; onError: (error: boolean) => void; - onChange: (exception: CreateExceptionListItemSchema) => void; + onChange: (exception: CreateExceptionListItemSchema | UpdateExceptionListItemSchema) => void; }> = memo(({ exception, onError, onChange }) => { + const ipEntry = exception.entries[0] as ExceptionIpEntry; const [hasBeenInputNameVisited, setHasBeenInputNameVisited] = useState(false); const [hasBeenInputIpVisited, setHasBeenInputIpVisited] = useState(false); - const [hasNameError, setHasNameError] = useState(true); - const [hasIpError, setHasIpError] = useState(true); + const [hasNameError, setHasNameError] = useState(!exception.name); + const [hasIpError, setHasIpError] = useState(!ipEntry.value); useEffect(() => { onError(hasNameError || hasIpError); diff --git a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/form_flyout.test.tsx b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/form_flyout.test.tsx index 6cfc9f56beadf..4ab4ed785e491 100644 --- a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/form_flyout.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/form_flyout.test.tsx @@ -14,6 +14,8 @@ import userEvent from '@testing-library/user-event'; import { HostIsolationExceptionsFormFlyout } from './form_flyout'; import { act } from 'react-dom/test-utils'; import { HOST_ISOLATION_EXCEPTIONS_PATH } from '../../../../../../common/constants'; +import uuid from 'uuid'; +import { createEmptyHostIsolationException } from '../../utils'; jest.mock('../../service.ts'); @@ -23,8 +25,6 @@ describe('When on the host isolation exceptions flyout form', () => { let renderResult: ReturnType; let waitForAction: AppContextTestRender['middlewareSpy']['waitForAction']; - // const createHostIsolationExceptionItemMock = createHostIsolationExceptionItem as jest.mock; - beforeEach(() => { mockedContext = createAppRootMockRenderer(); render = () => { @@ -34,7 +34,11 @@ describe('When on the host isolation exceptions flyout form', () => { }); describe('When creating a new exception', () => { - describe('with invalid data', () => { + beforeEach(() => { + mockedContext.history.push(`${HOST_ISOLATION_EXCEPTIONS_PATH}?show=create`); + }); + + describe('with invalida data', () => { it('should show disabled buttons when the form first load', () => { renderResult = render(); expect(renderResult.getByTestId('add-exception-cancel-button')).not.toHaveAttribute( @@ -45,6 +49,7 @@ describe('When on the host isolation exceptions flyout form', () => { ); }); }); + describe('with valid data', () => { beforeEach(() => { renderResult = render(); @@ -53,6 +58,7 @@ describe('When on the host isolation exceptions flyout form', () => { userEvent.type(nameInput, 'test name'); userEvent.type(ipInput, '10.0.0.1'); }); + it('should show enable buttons when the form is valid', () => { expect(renderResult.getByTestId('add-exception-cancel-button')).not.toHaveAttribute( 'disabled' @@ -61,13 +67,15 @@ describe('When on the host isolation exceptions flyout form', () => { 'disabled' ); }); + it('should submit the entry data when submit is pressed with valid data', async () => { const confirmButton = renderResult.getByTestId('add-exception-confirm-button'); expect(confirmButton).not.toHaveAttribute('disabled'); const waiter = waitForAction('hostIsolationExceptionsCreateEntry'); userEvent.click(confirmButton); - await waiter; + expect(await waiter).toBeTruthy(); }); + it('should disable the submit button when an operation is in progress', () => { act(() => { mockedContext.store.dispatch({ @@ -81,6 +89,7 @@ describe('When on the host isolation exceptions flyout form', () => { const confirmButton = renderResult.getByTestId('add-exception-confirm-button'); expect(confirmButton).toHaveAttribute('disabled'); }); + it('should show a toast and close the flyout when the operation is finished', () => { mockedContext.history.push(`${HOST_ISOLATION_EXCEPTIONS_PATH}?show=create`); act(() => { @@ -95,13 +104,14 @@ describe('When on the host isolation exceptions flyout form', () => { expect(mockedContext.coreStart.notifications.toasts.addSuccess).toHaveBeenCalled(); expect(mockedContext.history.location.search).toBe(''); }); - it('should show an error toast operation fails and enable the submit button', () => { + + it('should show an error toast if operation fails and enable the submit button', async () => { act(() => { mockedContext.store.dispatch({ type: 'hostIsolationExceptionsFormStateChanged', payload: { type: 'FailedResourceState', - previousState: { type: 'UninitialisedResourceState' }, + error: new Error('mocked error'), }, }); }); @@ -111,4 +121,99 @@ describe('When on the host isolation exceptions flyout form', () => { }); }); }); + describe('When editing an existing exception', () => { + const fakeId = 'dc5d1d00-2766-11ec-981f-7f84cfc8764f'; + beforeEach(() => { + mockedContext.history.push(`${HOST_ISOLATION_EXCEPTIONS_PATH}?show=edit&id=${fakeId}`); + }); + + describe('without loaded data', () => { + it('should show a loading status while the item is loaded', () => { + renderResult = render(); + expect(renderResult.getByTestId('loading-spinner')).toBeTruthy(); + }); + + it('should request to load data about the editing exception', async () => { + const waiter = waitForAction('hostIsolationExceptionsMarkToEdit', { + validate: ({ payload }) => { + return payload.id === fakeId; + }, + }); + renderResult = render(); + expect(await waiter).toBeTruthy(); + }); + + it('should show a warning toast if the item fails to load', () => { + renderResult = render(); + act(() => { + mockedContext.store.dispatch({ + type: 'hostIsolationExceptionsFormEntryChanged', + payload: undefined, + }); + + mockedContext.store.dispatch({ + type: 'hostIsolationExceptionsFormStateChanged', + payload: { + type: 'FailedResourceState', + error: new Error('mocked error'), + }, + }); + }); + expect(mockedContext.coreStart.notifications.toasts.addWarning).toHaveBeenCalled(); + }); + }); + + describe('with loaded data', () => { + beforeEach(async () => { + mockedContext.store.dispatch({ + type: 'hostIsolationExceptionsFormEntryChanged', + payload: { + ...createEmptyHostIsolationException(), + name: 'name edit me', + description: 'initial description', + id: fakeId, + item_id: uuid.v4(), + entries: [ + { + field: 'destination.ip', + operator: 'included', + type: 'match', + value: '10.0.0.5', + }, + ], + }, + }); + renderResult = render(); + }); + + it('should request data again if the url id is changed', async () => { + const otherId = 'd75fbd74-2a92-11ec-8d3d-0242ac130003'; + act(() => { + mockedContext.history.push(`${HOST_ISOLATION_EXCEPTIONS_PATH}?show=edit&id=${otherId}`); + }); + await waitForAction('hostIsolationExceptionsMarkToEdit', { + validate: ({ payload }) => { + return payload.id === otherId; + }, + }); + }); + + it('should enable the buttons from the start', () => { + expect(renderResult.getByTestId('add-exception-cancel-button')).not.toHaveAttribute( + 'disabled' + ); + expect(renderResult.getByTestId('add-exception-confirm-button')).not.toHaveAttribute( + 'disabled' + ); + }); + + it('should submit the entry data when submit is pressed with valid data', async () => { + const confirmButton = renderResult.getByTestId('add-exception-confirm-button'); + expect(confirmButton).not.toHaveAttribute('disabled'); + const waiter = waitForAction('hostIsolationExceptionsSubmitEdit'); + userEvent.click(confirmButton); + expect(await waiter).toBeTruthy(); + }); + }); + }); }); diff --git a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/form_flyout.tsx b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/form_flyout.tsx index 5502a1b8ea2b1..799e327a3fb4c 100644 --- a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/form_flyout.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/form_flyout.tsx @@ -16,20 +16,32 @@ import { EuiFlyoutHeader, EuiTitle, } from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; -import { CreateExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import { + CreateExceptionListItemSchema, + UpdateExceptionListItemSchema, +} from '@kbn/securitysolution-io-ts-list-types'; +import { omit } from 'lodash'; import React, { memo, useCallback, useEffect, useMemo, useState } from 'react'; import { useDispatch } from 'react-redux'; +import { useHistory } from 'react-router-dom'; import { Dispatch } from 'redux'; import { Loader } from '../../../../../common/components/loader'; import { useToasts } from '../../../../../common/lib/kibana'; +import { getHostIsolationExceptionsListPath } from '../../../../common/routing'; import { - isFailedResourceState, isLoadedResourceState, isLoadingResourceState, } from '../../../../state/async_resource_state'; +import { + getCreateErrorMessage, + getCreationSuccessMessage, + getLoadErrorMessage, + getUpdateErrorMessage, + getUpdateSuccessMessage, +} from './translations'; import { HostIsolationExceptionsPageAction } from '../../store/action'; +import { getCurrentLocation, getExceptionToEdit, getFormStatusFailure } from '../../store/selector'; import { createEmptyHostIsolationException } from '../../utils'; import { useHostIsolationExceptionsNavigateCallback, @@ -41,20 +53,26 @@ export const HostIsolationExceptionsFormFlyout: React.FC<{}> = memo(() => { const dispatch = useDispatch>(); const toasts = useToasts(); + const location = useHostIsolationExceptionsSelector(getCurrentLocation); + const creationInProgress = useHostIsolationExceptionsSelector((state) => isLoadingResourceState(state.form.status) ); const creationSuccessful = useHostIsolationExceptionsSelector((state) => isLoadedResourceState(state.form.status) ); - const creationFailure = useHostIsolationExceptionsSelector((state) => - isFailedResourceState(state.form.status) - ); + const creationFailure = useHostIsolationExceptionsSelector(getFormStatusFailure); + + const exceptionToEdit = useHostIsolationExceptionsSelector(getExceptionToEdit); const navigateCallback = useHostIsolationExceptionsNavigateCallback(); + const history = useHistory(); + const [formHasError, setFormHasError] = useState(true); - const [exception, setException] = useState(undefined); + const [exception, setException] = useState< + CreateExceptionListItemSchema | UpdateExceptionListItemSchema | undefined + >(undefined); const onCancel = useCallback( () => @@ -65,12 +83,31 @@ export const HostIsolationExceptionsFormFlyout: React.FC<{}> = memo(() => { [navigateCallback] ); + // load data to edit or create useEffect(() => { - setException(createEmptyHostIsolationException()); - }, []); + if (location.show === 'create' && exception === undefined) { + setException(createEmptyHostIsolationException()); + } else if (location.show === 'edit') { + // prevent flyout to show edit without an id + if (!location.id) { + onCancel(); + return; + } + // load the exception to edit + if (!exceptionToEdit || location.id !== exceptionToEdit.id) { + dispatch({ + type: 'hostIsolationExceptionsMarkToEdit', + payload: { id: location.id }, + }); + } else { + setException(exceptionToEdit); + } + } + }, [dispatch, exception, exceptionToEdit, location.id, location.show, onCancel]); + // handle creation and edit success useEffect(() => { - if (creationSuccessful) { + if (creationSuccessful && exception?.name) { onCancel(); dispatch({ type: 'hostIsolationExceptionsFormStateChanged', @@ -78,30 +115,45 @@ export const HostIsolationExceptionsFormFlyout: React.FC<{}> = memo(() => { type: 'UninitialisedResourceState', }, }); - toasts.addSuccess( - i18n.translate( - 'xpack.securitySolution.hostIsolationExceptions.form.creationSuccessToastTitle', - { - defaultMessage: '"{name}" has been added to the host isolation exceptions list.', - values: { name: exception?.name }, - } - ) - ); + if (exception?.item_id) { + toasts.addSuccess(getUpdateSuccessMessage(exception.name)); + } else { + toasts.addSuccess(getCreationSuccessMessage(exception.name)); + } + } + }, [creationSuccessful, dispatch, exception?.item_id, exception?.name, onCancel, toasts]); + + // handle load item to edit error + useEffect(() => { + if (creationFailure && location.show === 'edit' && !exception?.item_id) { + toasts.addWarning(getLoadErrorMessage(creationFailure)); + history.replace(getHostIsolationExceptionsListPath(omit(location, ['show', 'id']))); + dispatch({ + type: 'hostIsolationExceptionsFormStateChanged', + payload: { + type: 'UninitialisedResourceState', + }, + }); } - }, [creationSuccessful, onCancel, dispatch, toasts, exception?.name]); + }, [creationFailure, dispatch, exception?.item_id, history, location, toasts]); + // handle edit or creation error useEffect(() => { if (creationFailure) { - toasts.addDanger( - i18n.translate( - 'xpack.securitySolution.hostIsolationExceptions.form.creationFailureToastTitle', - { - defaultMessage: 'There was an error creating the exception', - } - ) - ); + // failed to load the entry + if (exception?.item_id) { + toasts.addDanger(getUpdateErrorMessage(creationFailure)); + } else { + toasts.addDanger(getCreateErrorMessage(creationFailure)); + } + dispatch({ + type: 'hostIsolationExceptionsFormStateChanged', + payload: { + type: 'UninitialisedResourceState', + }, + }); } - }, [dispatch, toasts, creationFailure]); + }, [creationFailure, dispatch, exception?.item_id, toasts]); const handleOnCancel = useCallback(() => { if (creationInProgress) return; @@ -109,10 +161,17 @@ export const HostIsolationExceptionsFormFlyout: React.FC<{}> = memo(() => { }, [creationInProgress, onCancel]); const handleOnSubmit = useCallback(() => { - dispatch({ - type: 'hostIsolationExceptionsCreateEntry', - payload: exception, - }); + if (exception?.item_id) { + dispatch({ + type: 'hostIsolationExceptionsSubmitEdit', + payload: exception, + }); + } else { + dispatch({ + type: 'hostIsolationExceptionsCreateEntry', + payload: exception, + }); + } }, [dispatch, exception]); const confirmButtonMemo = useMemo( @@ -124,13 +183,20 @@ export const HostIsolationExceptionsFormFlyout: React.FC<{}> = memo(() => { onClick={handleOnSubmit} isLoading={creationInProgress} > - + {exception?.item_id ? ( + + ) : ( + + )} ), - [formHasError, creationInProgress, handleOnSubmit] + [formHasError, creationInProgress, handleOnSubmit, exception?.item_id] ); return exception ? ( @@ -141,12 +207,21 @@ export const HostIsolationExceptionsFormFlyout: React.FC<{}> = memo(() => { > -

- -

+ {exception?.item_id ? ( +

+ +

+ ) : ( +

+ +

+ )}
diff --git a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/translations.ts b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/translations.ts index df179c7a2221c..207e094453d90 100644 --- a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/translations.ts +++ b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/translations.ts @@ -6,6 +6,7 @@ */ import { i18n } from '@kbn/i18n'; +import { ServerApiError } from '../../../../../common/types'; export const NAME_PLACEHOLDER = i18n.translate( 'xpack.securitySolution.hostIsolationExceptions.form.name.placeholder', @@ -62,3 +63,67 @@ export const IP_ERROR = i18n.translate( defaultMessage: 'The ip is invalid. Only IPv4 with optional CIDR is supported', } ); + +export const DELETE_HOST_ISOLATION_EXCEPTION_LABEL = i18n.translate( + 'xpack.securitySolution.hostIsolationExceptions.list.action.delete', + { + defaultMessage: 'Delete Exception', + } +); + +export const EDIT_HOST_ISOLATION_EXCEPTION_LABEL = i18n.translate( + 'xpack.securitySolution.hostIsolationExceptions.list.action.edit', + { + defaultMessage: 'Edit Exception', + } +); + +export const getCreateErrorMessage = (creationError: ServerApiError) => { + return i18n.translate( + 'xpack.securitySolution.hostIsolationExceptions.form.failedToastTitle.create', + { + defaultMessage: 'There was an error creating the exception: "{error}"', + values: { error: creationError.message }, + } + ); +}; + +export const getUpdateErrorMessage = (updateError: ServerApiError) => { + return i18n.translate( + 'xpack.securitySolution.hostIsolationExceptions.form.failedToastTitle.update', + { + defaultMessage: 'There was an error updating the exception: "{error}"', + values: { error: updateError.message }, + } + ); +}; + +export const getLoadErrorMessage = (getError: ServerApiError) => { + return i18n.translate( + 'xpack.securitySolution.hostIsolationExceptions.form.failedToastTitle.get', + { + defaultMessage: 'Unable to edit exception: "{error}"', + values: { error: getError.message }, + } + ); +}; + +export const getUpdateSuccessMessage = (name: string) => { + return i18n.translate( + 'xpack.securitySolution.hostIsolationExceptions.form.editingSuccessToastTitle', + { + defaultMessage: '"{name}" has been updated.', + values: { name }, + } + ); +}; + +export const getCreationSuccessMessage = (name: string) => { + return i18n.translate( + 'xpack.securitySolution.hostIsolationExceptions.form.creationSuccessToastTitle', + { + defaultMessage: '"{name}" has been added to the host isolation exceptions list.', + values: { name }, + } + ); +}; diff --git a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/host_isolation_exceptions_list.test.tsx b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/host_isolation_exceptions_list.test.tsx index ac472fdae4d7b..9de3d83ed8bab 100644 --- a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/host_isolation_exceptions_list.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/host_isolation_exceptions_list.test.tsx @@ -15,6 +15,7 @@ import { isFailedResourceState, isLoadedResourceState } from '../../../state'; import { getHostIsolationExceptionItems } from '../service'; import { HostIsolationExceptionsList } from './host_isolation_exceptions_list'; +jest.mock('../../../../common/components/user_privileges/use_endpoint_privileges'); jest.mock('../service'); const getHostIsolationExceptionItemsMock = getHostIsolationExceptionItems as jest.Mock; diff --git a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/host_isolation_exceptions_list.tsx b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/host_isolation_exceptions_list.tsx index cfb0121396e24..3c634a917c0ce 100644 --- a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/host_isolation_exceptions_list.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/host_isolation_exceptions_list.tsx @@ -33,19 +33,16 @@ import { HostIsolationExceptionsEmptyState } from './components/empty'; import { HostIsolationExceptionsPageAction } from '../store/action'; import { HostIsolationExceptionDeleteModal } from './components/delete_modal'; import { HostIsolationExceptionsFormFlyout } from './components/form_flyout'; +import { + DELETE_HOST_ISOLATION_EXCEPTION_LABEL, + EDIT_HOST_ISOLATION_EXCEPTION_LABEL, +} from './components/translations'; type HostIsolationExceptionPaginatedContent = PaginatedContentProps< Immutable, typeof ExceptionItem >; -const DELETE_HOST_ISOLATION_EXCEPTION_LABEL = i18n.translate( - 'xpack.securitySolution.hostIsolationExceptions.list.actions.delete', - { - defaultMessage: 'Delete Exception', - } -); - export const HostIsolationExceptionsList = () => { const listItems = useHostIsolationExceptionsSelector(getListItems); const pagination = useHostIsolationExceptionsSelector(getListPagination); @@ -70,6 +67,17 @@ export const HostIsolationExceptionsList = () => { item: element, 'data-test-subj': `hostIsolationExceptionsCard`, actions: [ + { + icon: 'trash', + onClick: () => { + navigateCallback({ + show: 'edit', + id: element.id, + }); + }, + 'data-test-subj': 'editHostIsolationException', + children: EDIT_HOST_ISOLATION_EXCEPTION_LABEL, + }, { icon: 'trash', onClick: () => { diff --git a/x-pack/plugins/security_solution/public/management/pages/mocks/fleet_mocks.ts b/x-pack/plugins/security_solution/public/management/pages/mocks/fleet_mocks.ts index c9a972ce29e4c..8f1530c3632dc 100644 --- a/x-pack/plugins/security_solution/public/management/pages/mocks/fleet_mocks.ts +++ b/x-pack/plugins/security_solution/public/management/pages/mocks/fleet_mocks.ts @@ -52,9 +52,10 @@ export const fleetGetEndpointPackagePolicyHttpMock = path: PACKAGE_POLICY_API_ROUTES.INFO_PATTERN, method: 'get', handler: () => { - return { - items: new EndpointDocGenerator('seed').generatePolicyPackagePolicy(), + const response: GetPolicyResponse = { + item: new EndpointDocGenerator('seed').generatePolicyPackagePolicy(), }; + return response; }, }, ]); diff --git a/x-pack/plugins/security_solution/public/management/pages/mocks/index.ts b/x-pack/plugins/security_solution/public/management/pages/mocks/index.ts index c7388cad5696f..e1f793f6087dc 100644 --- a/x-pack/plugins/security_solution/public/management/pages/mocks/index.ts +++ b/x-pack/plugins/security_solution/public/management/pages/mocks/index.ts @@ -6,3 +6,4 @@ */ export * from './fleet_mocks'; +export * from './trusted_apps_http_mocks'; diff --git a/x-pack/plugins/security_solution/public/management/pages/mocks/trusted_apps_http_mocks.ts b/x-pack/plugins/security_solution/public/management/pages/mocks/trusted_apps_http_mocks.ts new file mode 100644 index 0000000000000..0a440afcb2c30 --- /dev/null +++ b/x-pack/plugins/security_solution/public/management/pages/mocks/trusted_apps_http_mocks.ts @@ -0,0 +1,91 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { HttpFetchOptionsWithPath } from 'kibana/public'; +import { + httpHandlerMockFactory, + ResponseProvidersInterface, +} from '../../../common/mock/endpoint/http_handler_mock_factory'; +import { + GetTrustedAppsListRequest, + GetTrustedAppsListResponse, + PutTrustedAppUpdateRequest, + PutTrustedAppUpdateResponse, +} from '../../../../common/endpoint/types'; +import { + TRUSTED_APPS_LIST_API, + TRUSTED_APPS_UPDATE_API, +} from '../../../../common/endpoint/constants'; +import { TrustedAppGenerator } from '../../../../common/endpoint/data_generators/trusted_app_generator'; + +export type PolicyDetailsGetTrustedAppsListHttpMocksInterface = ResponseProvidersInterface<{ + trustedAppsList: (options: HttpFetchOptionsWithPath) => GetTrustedAppsListResponse; +}>; +/** + * HTTP mock for retrieving list of Trusted Apps + */ +export const trustedAppsGetListHttpMocks = + httpHandlerMockFactory([ + { + id: 'trustedAppsList', + path: TRUSTED_APPS_LIST_API, + method: 'get', + handler: ({ query }): GetTrustedAppsListResponse => { + const apiQueryParams = query as GetTrustedAppsListRequest; + const generator = new TrustedAppGenerator('seed'); + const perPage = apiQueryParams.per_page ?? 10; + const data = Array.from({ length: Math.min(perPage, 50) }, () => generator.generate()); + + // Change the 3rd entry (index 2) to be policy specific + data[2].effectScope = { + type: 'policy', + policies: [ + // IDs below are those generated by the `fleetGetEndpointPackagePolicyListHttpMock()` mock + 'ddf6570b-9175-4a6d-b288-61a09771c647', + 'b8e616ae-44fc-4be7-846c-ce8fa5c082dd', + ], + }; + + return { + page: apiQueryParams.page ?? 1, + per_page: perPage, + total: 20, + data, + }; + }, + }, + ]); + +export type TrustedAppPutHttpMocksInterface = ResponseProvidersInterface<{ + trustedAppUpdate: (options: HttpFetchOptionsWithPath) => PutTrustedAppUpdateResponse; +}>; +/** + * HTTP mocks that support updating a single Trusted Apps + */ +export const trustedAppPutHttpMocks = httpHandlerMockFactory([ + { + id: 'trustedAppUpdate', + path: TRUSTED_APPS_UPDATE_API, + method: 'put', + handler: ({ body, path }): PutTrustedAppUpdateResponse => { + const response: PutTrustedAppUpdateResponse = { + data: { + ...(body as unknown as PutTrustedAppUpdateRequest), + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + id: path.split('/').pop()!, + created_at: '2021-10-12T16:02:55.856Z', + created_by: 'elastic', + updated_at: '2021-10-13T16:02:55.856Z', + updated_by: 'elastic', + version: 'abc', + }, + }; + + return response; + }, + }, +]); diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/action/policy_trusted_apps_action.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/action/policy_trusted_apps_action.ts index 479452968df7a..b3bdfe32ef091 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/action/policy_trusted_apps_action.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/action/policy_trusted_apps_action.ts @@ -8,8 +8,10 @@ import { Action } from 'redux'; import { AsyncResourceState } from '../../../../../state'; import { - PostTrustedAppCreateResponse, + PutTrustedAppUpdateResponse, GetTrustedAppsListResponse, + TrustedApp, + MaybeImmutable, } from '../../../../../../../common/endpoint/types'; import { PolicyArtifactsState } from '../../../types'; @@ -21,13 +23,14 @@ export interface PolicyArtifactsAssignableListPageDataChanged { export interface PolicyArtifactsUpdateTrustedApps { type: 'policyArtifactsUpdateTrustedApps'; payload: { - trustedAppIds: string[]; + action: 'assign' | 'remove'; + artifacts: MaybeImmutable; }; } export interface PolicyArtifactsUpdateTrustedAppsChanged { type: 'policyArtifactsUpdateTrustedAppsChanged'; - payload: AsyncResourceState; + payload: AsyncResourceState; } export interface PolicyArtifactsAssignableListExistDataChanged { @@ -58,6 +61,13 @@ export interface PolicyDetailsListOfAllPoliciesStateChanged export type PolicyDetailsTrustedAppsForceListDataRefresh = Action<'policyDetailsTrustedAppsForceListDataRefresh'>; +export type PolicyDetailsArtifactsResetRemove = Action<'policyDetailsArtifactsResetRemove'>; + +export interface PolicyDetailsTrustedAppsRemoveListStateChanged + extends Action<'policyDetailsTrustedAppsRemoveListStateChanged'> { + payload: PolicyArtifactsState['removeList']; +} + /** * All of the possible actions for Trusted Apps under the Policy Details store */ @@ -70,4 +80,6 @@ export type PolicyTrustedAppsAction = | PolicyArtifactsDeosAnyTrustedAppExists | AssignedTrustedAppsListStateChanged | PolicyDetailsListOfAllPoliciesStateChanged - | PolicyDetailsTrustedAppsForceListDataRefresh; + | PolicyDetailsTrustedAppsForceListDataRefresh + | PolicyDetailsTrustedAppsRemoveListStateChanged + | PolicyDetailsArtifactsResetRemove; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/index.test.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/index.test.ts index 479da6b873480..e0c4ee2600588 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/index.test.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/index.test.ts @@ -106,7 +106,7 @@ describe('policy details: ', () => { it('windows process events is enabled', () => { const config = policyConfig(getState()); - expect(config!.windows.events.process).toEqual(true); + expect(config.windows.events.process).toEqual(true); }); }); @@ -128,7 +128,7 @@ describe('policy details: ', () => { it('mac file events is enabled', () => { const config = policyConfig(getState()); - expect(config!.mac.events.file).toEqual(true); + expect(config.mac.events.file).toEqual(true); }); }); @@ -150,7 +150,7 @@ describe('policy details: ', () => { it('linux file events is enabled', () => { const config = policyConfig(getState()); - expect(config!.linux.events.file).toEqual(true); + expect(config.linux.events.file).toEqual(true); }); }); diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/middleware/policy_trusted_apps_middleware.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/middleware/policy_trusted_apps_middleware.ts index 360fe9fb99b8d..f50eb342acba1 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/middleware/policy_trusted_apps_middleware.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/middleware/policy_trusted_apps_middleware.ts @@ -5,43 +5,44 @@ * 2.0. */ -import pMap from 'p-map'; -import { find, isEmpty } from 'lodash/fp'; +import { isEmpty } from 'lodash/fp'; import { - PolicyDetailsState, - MiddlewareRunner, GetPolicyListResponse, + MiddlewareRunner, MiddlewareRunnerContext, PolicyAssignedTrustedApps, + PolicyDetailsState, PolicyDetailsStore, + PolicyRemoveTrustedApps, } from '../../../types'; import { - policyIdFromParams, - getAssignableArtifactsList, doesPolicyTrustedAppsListNeedUpdate, + getCurrentArtifactsLocation, getCurrentPolicyAssignedTrustedAppsState, + getCurrentTrustedAppsRemoveListState, + getCurrentUrlLocationPaginationParams, getLatestLoadedPolicyAssignedTrustedAppsState, + getTrustedAppsIsRemoving, getTrustedAppsPolicyListState, - isPolicyTrustedAppListLoading, - getCurrentArtifactsLocation, isOnPolicyTrustedAppsView, - getCurrentUrlLocationPaginationParams, + isPolicyTrustedAppListLoading, + licensedPolicy, + policyIdFromParams, getDoesAnyTrustedAppExistsIsLoading, } from '../selectors'; import { - ImmutableArray, - ImmutableObject, - PostTrustedAppCreateRequest, - TrustedApp, Immutable, + MaybeImmutable, + PutTrustedAppUpdateResponse, + TrustedApp, } from '../../../../../../../common/endpoint/types'; import { ImmutableMiddlewareAPI } from '../../../../../../common/store'; import { TrustedAppsService } from '../../../../trusted_apps/service'; import { + createFailedResourceState, createLoadedResourceState, createLoadingResourceState, createUninitialisedResourceState, - createFailedResourceState, isLoadingResourceState, isUninitialisedResourceState, } from '../../../../../state'; @@ -83,8 +84,13 @@ export const policyTrustedAppsMiddlewareRunner: MiddlewareRunner = async ( break; case 'policyArtifactsUpdateTrustedApps': - if (getCurrentArtifactsLocation(state).show === 'list') { - await updateTrustedApps(store, trustedAppsService, action.payload.trustedAppIds); + if ( + getCurrentArtifactsLocation(state).show === 'list' && + action.payload.action === 'assign' + ) { + await updateTrustedApps(store, trustedAppsService, action.payload.artifacts); + } else if (action.payload.action === 'remove') { + removeTrustedAppsFromPolicy(context, store, action.payload.artifacts); } break; @@ -213,58 +219,26 @@ const searchTrustedApps = async ( } }; -interface UpdateTrustedAppWrapperProps { - entry: ImmutableObject; - policies: ImmutableArray; -} - const updateTrustedApps = async ( store: ImmutableMiddlewareAPI, trustedAppsService: TrustedAppsService, - trustedAppsIds: ImmutableArray + trustedApps: MaybeImmutable ) => { const state = store.getState(); const policyId = policyIdFromParams(state); - const availavleArtifacts = getAssignableArtifactsList(state); - - if (!availavleArtifacts || !availavleArtifacts.data.length) { - return; - } store.dispatch({ type: 'policyArtifactsUpdateTrustedAppsChanged', // Ignore will be fixed with when AsyncResourceState is refactored (#830) - // @ts-ignore + // @ts-expect-error payload: createLoadingResourceState({ previousState: createUninitialisedResourceState() }), }); try { - const trustedAppsUpdateActions = []; - - const updateTrustedApp = async ({ entry, policies }: UpdateTrustedAppWrapperProps) => - trustedAppsService.updateTrustedApp({ id: entry.id }, { - effectScope: { type: 'policy', policies: [...policies, policyId] }, - name: entry.name, - entries: entry.entries, - os: entry.os, - description: entry.description, - version: entry.version, - } as PostTrustedAppCreateRequest); - - for (const entryId of trustedAppsIds) { - const entry = find({ id: entryId }, availavleArtifacts.data) as ImmutableObject; - if (entry) { - const policies = entry.effectScope.type === 'policy' ? entry.effectScope.policies : []; - trustedAppsUpdateActions.push({ entry, policies }); - } - } - - const updatedTrustedApps = await pMap(trustedAppsUpdateActions, updateTrustedApp, { - concurrency: 5, - /** When set to false, instead of stopping when a promise rejects, it will wait for all the promises to settle - * and then reject with an aggregated error containing all the errors from the rejected promises. */ - stopOnError: false, - }); + const updatedTrustedApps = await trustedAppsService.assignPolicyToTrustedApps( + policyId, + trustedApps + ); store.dispatch({ type: 'policyArtifactsUpdateTrustedAppsChanged', @@ -275,9 +249,7 @@ const updateTrustedApps = async ( } catch (err) { store.dispatch({ type: 'policyArtifactsUpdateTrustedAppsChanged', - // Ignore will be fixed with when AsyncResourceState is refactored (#830) - // @ts-ignore - payload: createFailedResourceState(err.body ?? err), + payload: createFailedResourceState(err.body ?? err), }); } }; @@ -371,3 +343,48 @@ const fetchAllPoliciesIfNeeded = async ( }); } }; + +const removeTrustedAppsFromPolicy = async ( + { trustedAppsService }: MiddlewareRunnerContext, + { getState, dispatch }: PolicyDetailsStore, + trustedApps: MaybeImmutable +): Promise => { + const state = getState(); + + if (getTrustedAppsIsRemoving(state)) { + return; + } + + dispatch({ + type: 'policyDetailsTrustedAppsRemoveListStateChanged', + // @ts-expect-error will be fixed when AsyncResourceState is refactored (#830) + payload: createLoadingResourceState(getCurrentTrustedAppsRemoveListState(state)), + }); + + try { + const currentPolicyId = licensedPolicy(state)?.id; + + if (!currentPolicyId) { + throw new Error('current policy id not found'); + } + + const response = await trustedAppsService.removePolicyFromTrustedApps( + currentPolicyId, + trustedApps + ); + + dispatch({ + type: 'policyDetailsTrustedAppsRemoveListStateChanged', + payload: createLoadedResourceState({ artifacts: trustedApps, response }), + }); + + dispatch({ + type: 'policyDetailsTrustedAppsForceListDataRefresh', + }); + } catch (error) { + dispatch({ + type: 'policyDetailsTrustedAppsRemoveListStateChanged', + payload: createFailedResourceState(error.body || error), + }); + } +}; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/reducer/initial_policy_details_state.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/reducer/initial_policy_details_state.ts index 2ad7ac9c06dac..008bcd262ceff 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/reducer/initial_policy_details_state.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/reducer/initial_policy_details_state.ts @@ -40,5 +40,6 @@ export const initialPolicyDetailsState: () => Immutable = () doesAnyTrustedAppExists: createUninitialisedResourceState(), assignedList: createUninitialisedResourceState(), policies: createUninitialisedResourceState(), + removeList: createUninitialisedResourceState(), }, }); diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/reducer/trusted_apps_reducer.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/reducer/trusted_apps_reducer.ts index fbf498797e804..f9d090647b1b5 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/reducer/trusted_apps_reducer.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/reducer/trusted_apps_reducer.ts @@ -90,5 +90,25 @@ export const policyTrustedAppsReducer: ImmutableReducer = (state) => state.artifacts.removeList; + +export const getTrustedAppsIsRemoving: PolicyDetailsSelector = createSelector( + getCurrentTrustedAppsRemoveListState, + (removeListState) => isLoadingResourceState(removeListState) +); + +export const getTrustedAppsRemovalError: PolicyDetailsSelector = + createSelector(getCurrentTrustedAppsRemoveListState, (removeListState) => { + if (isFailedResourceState(removeListState)) { + return removeListState.error; + } + }); + +export const getTrustedAppsWasRemoveSuccessful: PolicyDetailsSelector = createSelector( + getCurrentTrustedAppsRemoveListState, + (removeListState) => isLoadedResourceState(removeListState) +); diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/test_utils/mocks.ts b/x-pack/plugins/security_solution/public/management/pages/policy/test_utils/mocks.ts index be38e591dd9da..707f75913c7ed 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/test_utils/mocks.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/test_utils/mocks.ts @@ -5,19 +5,12 @@ * 2.0. */ +import { composeHttpHandlerMocks } from '../../../../common/mock/endpoint/http_handler_mock_factory'; import { - composeHttpHandlerMocks, - httpHandlerMockFactory, - ResponseProvidersInterface, -} from '../../../../common/mock/endpoint/http_handler_mock_factory'; -import { - GetTrustedAppsListRequest, GetTrustedAppsListResponse, PostTrustedAppCreateResponse, } from '../../../../../common/endpoint/types'; -import { TRUSTED_APPS_LIST_API } from '../../../../../common/endpoint/constants'; -import { TrustedAppGenerator } from '../../../../../common/endpoint/data_generators/trusted_app_generator'; -import { createSampleTrustedApps, createSampleTrustedApp } from '../../trusted_apps/test_utils'; +import { createSampleTrustedApp, createSampleTrustedApps } from '../../trusted_apps/test_utils'; import { PolicyDetailsArtifactsPageListLocationParams, PolicyDetailsArtifactsPageLocation, @@ -29,6 +22,10 @@ import { FleetGetEndpointPackagePolicyHttpMockInterface, fleetGetEndpointPackagePolicyListHttpMock, FleetGetEndpointPackagePolicyListHttpMockInterface, + trustedAppsGetListHttpMocks, + PolicyDetailsGetTrustedAppsListHttpMocksInterface, + trustedAppPutHttpMocks, + TrustedAppPutHttpMocksInterface, } from '../../mocks'; export const getMockListResponse: () => GetTrustedAppsListResponse = () => ({ @@ -70,54 +67,17 @@ export const getAPIError = () => ({ message: 'Something is not right', }); -type PolicyDetailsTrustedAppsHttpMocksInterface = ResponseProvidersInterface<{ - policyTrustedAppsList: () => GetTrustedAppsListResponse; -}>; - -/** - * HTTP mocks that support the Trusted Apps tab of the Policy Details page - */ -export const policyDetailsTrustedAppsHttpMocks = - httpHandlerMockFactory([ - { - id: 'policyTrustedAppsList', - path: TRUSTED_APPS_LIST_API, - method: 'get', - handler: ({ query }): GetTrustedAppsListResponse => { - const apiQueryParams = query as GetTrustedAppsListRequest; - const generator = new TrustedAppGenerator('seed'); - const perPage = apiQueryParams.per_page ?? 10; - const data = Array.from({ length: Math.min(perPage, 50) }, () => generator.generate()); - - // Change the 3rd entry (index 2) to be policy specific - data[2].effectScope = { - type: 'policy', - policies: [ - // IDs below are those generated by the `fleetGetEndpointPackagePolicyListHttpMock()` mock - 'ddf6570b-9175-4a6d-b288-61a09771c647', - 'b8e616ae-44fc-4be7-846c-ce8fa5c082dd', - ], - }; - - return { - page: apiQueryParams.page ?? 1, - per_page: perPage, - total: 20, - data, - }; - }, - }, - ]); - export type PolicyDetailsPageAllApiHttpMocksInterface = FleetGetEndpointPackagePolicyHttpMockInterface & FleetGetAgentStatusHttpMockInterface & FleetGetEndpointPackagePolicyListHttpMockInterface & - PolicyDetailsTrustedAppsHttpMocksInterface; + PolicyDetailsGetTrustedAppsListHttpMocksInterface & + TrustedAppPutHttpMocksInterface; export const policyDetailsPageAllApiHttpMocks = composeHttpHandlerMocks([ fleetGetEndpointPackagePolicyHttpMock, fleetGetAgentStatusHttpMock, fleetGetEndpointPackagePolicyListHttpMock, - policyDetailsTrustedAppsHttpMocks, + trustedAppsGetListHttpMocks, + trustedAppPutHttpMocks, ]); diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/types.ts b/x-pack/plugins/security_solution/public/management/pages/policy/types.ts index 7f8bf9c3872ea..283c3afb573b6 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/types.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/types.ts @@ -16,6 +16,8 @@ import { PostTrustedAppCreateResponse, MaybeImmutable, GetTrustedAppsListResponse, + TrustedApp, + PutTrustedAppUpdateResponse, } from '../../../../common/endpoint/types'; import { ServerApiError } from '../../../common/types'; import { @@ -78,6 +80,11 @@ export interface PolicyAssignedTrustedApps { artifacts: GetTrustedAppsListResponse; } +export interface PolicyRemoveTrustedApps { + artifacts: TrustedApp[]; + response: PutTrustedAppUpdateResponse[]; +} + /** * Policy artifacts store state */ @@ -96,6 +103,8 @@ export interface PolicyArtifactsState { assignedList: AsyncResourceState; /** A list of all available polices */ policies: AsyncResourceState; + /** list of artifacts to remove. Holds the ids that were removed and the API response */ + removeList: AsyncResourceState; } export enum OS { diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/exception_items_summary.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/exception_items_summary.test.tsx index 1d9edbe66fc78..b348a99d223b8 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/exception_items_summary.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/exception_items_summary.test.tsx @@ -20,7 +20,7 @@ const mockTheme = getMockTheme({ }); const getStatValue = (el: reactTestingLibrary.RenderResult, stat: string) => { - return el.getByText(stat)!.nextSibling?.lastChild?.textContent; + return el.getByText(stat).nextSibling?.lastChild?.textContent; }; describe('Fleet event filters card', () => { diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/components/policy_form_layout.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/components/policy_form_layout.tsx index a4a2ee65c84e7..4573b15b8fabc 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/components/policy_form_layout.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/components/policy_form_layout.tsx @@ -101,6 +101,7 @@ export const PolicyFormLayout = React.memo(() => { title: i18n.translate('xpack.securitySolution.endpoint.policy.details.updateErrorTitle', { defaultMessage: 'Failed!', }), + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion text: policyUpdateStatus.error!.message, }); } diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_hooks.ts b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_hooks.ts index 82296730af686..9e53eb9cfc40f 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_hooks.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_hooks.ts @@ -71,6 +71,8 @@ export const usePolicyTrustedAppsNotification = () => { if (updateSuccessfull && updatedArtifacts && !wasAlreadyHandled.has(updatedArtifacts)) { wasAlreadyHandled.add(updatedArtifacts); + const updateCount = updatedArtifacts.length; + toasts.addSuccess({ title: i18n.translate( 'xpack.securitySolution.endpoint.policy.trustedApps.layout.flyout.toastSuccess.title', @@ -78,13 +80,22 @@ export const usePolicyTrustedAppsNotification = () => { defaultMessage: 'Success', } ), - text: i18n.translate( - 'xpack.securitySolution.endpoint.policy.trustedApps.layout.flyout.toastSuccess.text', - { - defaultMessage: '"{names}" has been added to your trusted applications list.', - values: { names: updatedArtifacts.map((artifact) => artifact.data.name).join(', ') }, - } - ), + text: + updateCount > 1 + ? i18n.translate( + 'xpack.securitySolution.endpoint.policy.trustedApps.layout.flyout.toastSuccess.textMultiples', + { + defaultMessage: '{count} trusted applications have been added to your list.', + values: { count: updateCount }, + } + ) + : i18n.translate( + 'xpack.securitySolution.endpoint.policy.trustedApps.layout.flyout.toastSuccess.textSingle', + { + defaultMessage: '"{name}" has been added to your trusted applications list.', + values: { name: updatedArtifacts[0].data.name }, + } + ), }); } else if (updateFailed) { toasts.addDanger( diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/trusted_apps/flyout/policy_trusted_apps_flyout.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/trusted_apps/flyout/policy_trusted_apps_flyout.test.tsx index a586c3c9d1b29..c1d00f7a3f99b 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/trusted_apps/flyout/policy_trusted_apps_flyout.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/trusted_apps/flyout/policy_trusted_apps_flyout.test.tsx @@ -21,6 +21,7 @@ import { createLoadedResourceState, isLoadedResourceState } from '../../../../.. import { getPolicyDetailsArtifactsListPath } from '../../../../../common/routing'; jest.mock('../../../../trusted_apps/service'); +jest.mock('../../../../../../common/components/user_privileges/use_endpoint_privileges'); let mockedContext: AppContextTestRender; let waitForAction: MiddlewareActionSpyHelper['waitForAction']; @@ -37,6 +38,11 @@ describe('Policy trusted apps flyout', () => { updateTrustedApp: () => ({ data: getMockCreateResponse(), }), + assignPolicyToTrustedApps: () => [ + { + data: getMockCreateResponse(), + }, + ], }; }); mockedContext = createAppRootMockRenderer(); diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/trusted_apps/flyout/policy_trusted_apps_flyout.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/trusted_apps/flyout/policy_trusted_apps_flyout.tsx index cd291ed9f6eb0..bbf2f3b208754 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/trusted_apps/flyout/policy_trusted_apps_flyout.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/trusted_apps/flyout/policy_trusted_apps_flyout.tsx @@ -25,6 +25,7 @@ import { EuiCallOut, EuiEmptyPrompt, } from '@elastic/eui'; +import { Dispatch } from 'redux'; import { policyDetails, getCurrentArtifactsLocation, @@ -42,10 +43,12 @@ import { } from '../../policy_hooks'; import { PolicyArtifactsAssignableList } from '../../artifacts/assignable'; import { SearchExceptions } from '../../../../../components/search_exceptions'; +import { AppAction } from '../../../../../../common/store/actions'; +import { MaybeImmutable, TrustedApp } from '../../../../../../../common/endpoint/types'; export const PolicyTrustedAppsFlyout = React.memo(() => { usePolicyTrustedAppsNotification(); - const dispatch = useDispatch(); + const dispatch = useDispatch>(); const [selectedArtifactIds, setSelectedArtifactIds] = useState([]); const location = usePolicyDetailsSelector(getCurrentArtifactsLocation); const policyItem = usePolicyDetailsSelector(policyDetails); @@ -85,9 +88,15 @@ export const PolicyTrustedAppsFlyout = React.memo(() => { const handleOnConfirmAction = useCallback(() => { dispatch({ type: 'policyArtifactsUpdateTrustedApps', - payload: { trustedAppIds: selectedArtifactIds }, + payload: { + action: 'assign', + artifacts: selectedArtifactIds.map>((selectedId) => { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + return assignableArtifactsList?.data?.find((trustedApp) => trustedApp.id === selectedId)!; + }), + }, }); - }, [dispatch, selectedArtifactIds]); + }, [assignableArtifactsList?.data, dispatch, selectedArtifactIds]); const handleOnSearch = useCallback( (filter) => { @@ -174,6 +183,7 @@ export const PolicyTrustedAppsFlyout = React.memo(() => { defaultMessage: 'Search trusted applications', } )} + hideRefreshButton /> @@ -241,7 +251,7 @@ export const PolicyTrustedAppsFlyout = React.memo(() => { > { + // The index (zero based) of the card created by the generator that is policy specific + const POLICY_SPECIFIC_CARD_INDEX = 2; + let appTestContext: AppContextTestRender; let renderResult: ReturnType; let render: (waitForLoadedState?: boolean) => Promise>; @@ -84,8 +92,19 @@ describe('when rendering the PolicyTrustedAppsList', () => { }; }); - // FIXME: implement this test once PR #113802 is merged - it.todo('should show loading spinner if checking to see if trusted apps exist'); + it('should show loading spinner if checking to see if trusted apps exist', async () => { + await render(); + act(() => { + appTestContext.store.dispatch({ + type: 'policyArtifactsDeosAnyTrustedAppExists', + // Ignore will be fixed with when AsyncResourceState is refactored (#830) + // @ts-ignore + payload: createLoadingResourceState({ previousState: createUninitialisedResourceState() }), + }); + }); + + expect(renderResult.getByTestId('policyTrustedAppsGrid-loading')).not.toBeNull(); + }); it('should show total number of of items being displayed', async () => { await render(); @@ -163,40 +182,68 @@ describe('when rendering the PolicyTrustedAppsList', () => { ); }); - it('should display policy names on assignment context menu', async () => { - const retrieveAllPolicies = waitForAction('policyDetailsListOfAllPoliciesStateChanged', { - validate({ payload }) { - return isLoadedResourceState(payload); - }, - }); + it('should show dialog when remove action is clicked', async () => { await render(); - await retrieveAllPolicies; + await toggleCardActionMenu(POLICY_SPECIFIC_CARD_INDEX); act(() => { - fireEvent.click( - within(getCardByIndexPosition(2)).getByTestId( - 'policyTrustedAppsGrid-card-header-effectScope-popupMenu-button' + fireEvent.click(renderResult.getByTestId('policyTrustedAppsGrid-removeAction')); + }); + + await waitFor(() => expect(renderResult.getByTestId('confirmModalBodyText'))); + }); + + describe('and artifact is policy specific', () => { + const renderAndClickOnEffectScopePopupButton = async () => { + const retrieveAllPolicies = waitForAction('policyDetailsListOfAllPoliciesStateChanged', { + validate({ payload }) { + return isLoadedResourceState(payload); + }, + }); + await render(); + await retrieveAllPolicies; + act(() => { + fireEvent.click( + within(getCardByIndexPosition(POLICY_SPECIFIC_CARD_INDEX)).getByTestId( + 'policyTrustedAppsGrid-card-header-effectScope-popupMenu-button' + ) + ); + }); + await waitFor(() => + expect( + renderResult.getByTestId( + 'policyTrustedAppsGrid-card-header-effectScope-popupMenu-popoverPanel' + ) ) ); - }); - await waitFor(() => + }; + + it('should display policy names on assignment context menu', async () => { + await renderAndClickOnEffectScopePopupButton(); + expect( - renderResult.getByTestId( - 'policyTrustedAppsGrid-card-header-effectScope-popupMenu-popoverPanel' - ) - ) - ); + renderResult.getByTestId('policyTrustedAppsGrid-card-header-effectScope-popupMenu-item-0') + .textContent + ).toEqual('Endpoint Policy 0'); + expect( + renderResult.getByTestId('policyTrustedAppsGrid-card-header-effectScope-popupMenu-item-1') + .textContent + ).toEqual('Endpoint Policy 1'); + }); - expect( - renderResult.getByTestId('policyTrustedAppsGrid-card-header-effectScope-popupMenu-item-0') - .textContent - ).toEqual('Endpoint Policy 0'); - expect( - renderResult.getByTestId('policyTrustedAppsGrid-card-header-effectScope-popupMenu-item-1') - .textContent - ).toEqual('Endpoint Policy 1'); - }); + it('should navigate to policy details when clicking policy on assignment context menu', async () => { + await renderAndClickOnEffectScopePopupButton(); + + act(() => { + fireEvent.click( + renderResult.getByTestId('policyTrustedAppsGrid-card-header-effectScope-popupMenu-item-0') + ); + }); - it.todo('should navigate to policy details when clicking policy on assignment context menu'); + expect(appTestContext.history.location.pathname).toEqual( + '/administration/policy/ddf6570b-9175-4a6d-b288-61a09771c647/settings' + ); + }); + }); it('should handle pagination changes', async () => { await render(); @@ -235,7 +282,7 @@ describe('when rendering the PolicyTrustedAppsList', () => { it('should show toast message if trusted app list api call fails', async () => { const error = new Error('oh no'); // @ts-expect-error - mockedApis.responseProvider.policyTrustedAppsList.mockRejectedValue(error); + mockedApis.responseProvider.trustedAppsList.mockRejectedValue(error); await render(false); await act(async () => { await waitForAction('assignedTrustedAppsListStateChanged', { diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/trusted_apps/list/policy_trusted_apps_list.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/trusted_apps/list/policy_trusted_apps_list.tsx index 6793bee9c3c01..5d6c9731c7070 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/trusted_apps/list/policy_trusted_apps_list.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/trusted_apps/list/policy_trusted_apps_list.tsx @@ -37,6 +37,7 @@ import { APP_ID } from '../../../../../../../common/constants'; import { ContextMenuItemNavByRouterProps } from '../../../../../components/context_menu_with_router_support/context_menu_item_nav_by_router'; import { ArtifactEntryCollapsibleCardProps } from '../../../../../components/artifact_entry_card'; import { useTestIdGenerator } from '../../../../../components/hooks/use_test_id_generator'; +import { RemoveTrustedAppFromPolicyModal } from './remove_trusted_app_from_policy_modal'; const DATA_TEST_SUBJ = 'policyTrustedAppsGrid'; @@ -56,6 +57,8 @@ export const PolicyTrustedAppsList = memo(() => { const trustedAppsApiError = usePolicyDetailsSelector(getPolicyTrustedAppListError); const [isCardExpanded, setCardExpanded] = useState>({}); + const [trustedAppsForRemoval, setTrustedAppsForRemoval] = useState([]); + const [showRemovalModal, setShowRemovalModal] = useState(false); const handlePageChange = useCallback( ({ pageIndex, pageSize }) => { @@ -100,6 +103,7 @@ export const PolicyTrustedAppsList = memo(() => { const newCardProps = new Map(); for (const trustedApp of trustedAppItems) { + const isGlobal = trustedApp.effectScope.type === 'global'; const viewUrlPath = getTrustedAppsListPath({ id: trustedApp.id, show: 'edit' }); const assignedPoliciesMenuItems: ArtifactEntryCollapsibleCardProps['policies'] = trustedApp.effectScope.type === 'global' @@ -142,6 +146,29 @@ export const PolicyTrustedAppsList = memo(() => { navigateOptions: { path: viewUrlPath }, 'data-test-subj': getTestId('viewFullDetailsAction'), }, + { + icon: 'trash', + children: i18n.translate( + 'xpack.securitySolution.endpoint.policy.trustedApps.list.removeAction', + { defaultMessage: 'Remove from policy' } + ), + onClick: () => { + setTrustedAppsForRemoval([trustedApp]); + setShowRemovalModal(true); + }, + disabled: isGlobal, + toolTipContent: isGlobal + ? i18n.translate( + 'xpack.securitySolution.endpoint.policy.trustedApps.list.removeActionNotAllowed', + { + defaultMessage: + 'Globally applied trusted applications cannot be removed from policy.', + } + ) + : undefined, + toolTipPosition: 'top', + 'data-test-subj': getTestId('removeAction'), + }, ], policies: assignedPoliciesMenuItems, }; @@ -154,11 +181,21 @@ export const PolicyTrustedAppsList = memo(() => { const provideCardProps = useCallback['cardComponentProps']>( (item) => { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion return cardProps.get(item as Immutable)!; }, [cardProps] ); + const handleRemoveModalClose = useCallback(() => { + setShowRemovalModal(false); + }, []); + + // Anytime a new set of data (trusted apps) is retrieved, reset the card expand state + useEffect(() => { + setCardExpanded({}); + }, [trustedAppItems]); + // if an error occurred while loading the data, show toast useEffect(() => { if (trustedAppsApiError) { @@ -170,18 +207,13 @@ export const PolicyTrustedAppsList = memo(() => { } }, [toasts, trustedAppsApiError]); - // Anytime a new set of data (trusted apps) is retrieved, reset the card expand state - useEffect(() => { - setCardExpanded({}); - }, [trustedAppItems]); - if (hasTrustedApps.loading || isTrustedAppExistsCheckLoading) { return ( ); @@ -205,6 +237,13 @@ export const PolicyTrustedAppsList = memo(() => { pagination={pagination as Pagination} data-test-subj={DATA_TEST_SUBJ} /> + + {showRemovalModal && ( + + )} ); }); diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/trusted_apps/list/remove_trusted_app_from_policy_modal.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/trusted_apps/list/remove_trusted_app_from_policy_modal.test.tsx new file mode 100644 index 0000000000000..917ffe49c6090 --- /dev/null +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/trusted_apps/list/remove_trusted_app_from_policy_modal.test.tsx @@ -0,0 +1,256 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { + AppContextTestRender, + createAppRootMockRenderer, +} from '../../../../../../common/mock/endpoint'; +import { getPolicyDetailsArtifactsListPath } from '../../../../../common/routing'; +import { isFailedResourceState, isLoadedResourceState } from '../../../../../state'; +import React from 'react'; +import { fireEvent, act } from '@testing-library/react'; +import { policyDetailsPageAllApiHttpMocks } from '../../../test_utils'; +import { + RemoveTrustedAppFromPolicyModal, + RemoveTrustedAppFromPolicyModalProps, +} from './remove_trusted_app_from_policy_modal'; +import { + PolicyArtifactsUpdateTrustedApps, + PolicyDetailsTrustedAppsRemoveListStateChanged, +} from '../../../store/policy_details/action/policy_trusted_apps_action'; +import { Immutable } from '../../../../../../../common/endpoint/types'; +import { HttpFetchOptionsWithPath } from 'kibana/public'; + +// FLAKY https://github.com/elastic/kibana/issues/115100 +describe.skip('When using the RemoveTrustedAppFromPolicyModal component', () => { + let appTestContext: AppContextTestRender; + let renderResult: ReturnType; + let render: (waitForLoadedState?: boolean) => Promise>; + let waitForAction: AppContextTestRender['middlewareSpy']['waitForAction']; + let mockedApis: ReturnType; + let onCloseHandler: jest.MockedFunction; + let trustedApps: RemoveTrustedAppFromPolicyModalProps['trustedApps']; + + beforeEach(() => { + appTestContext = createAppRootMockRenderer(); + waitForAction = appTestContext.middlewareSpy.waitForAction; + onCloseHandler = jest.fn(); + mockedApis = policyDetailsPageAllApiHttpMocks(appTestContext.coreStart.http); + trustedApps = [ + // The 3rd trusted app generated by the HTTP mock is a Policy Specific one + mockedApis.responseProvider.trustedAppsList({ query: {} } as HttpFetchOptionsWithPath) + .data[2], + ]; + + // Delay the Update Trusted App API response so that we can test UI states while the update is underway. + mockedApis.responseProvider.trustedAppUpdate.mockDelay.mockImplementation( + () => + new Promise((resolve) => { + setTimeout(resolve, 20); + }) + ); + + render = async (waitForLoadedState: boolean = true) => { + const pendingDataLoadState = waitForLoadedState + ? Promise.all([ + waitForAction('serverReturnedPolicyDetailsData'), + waitForAction('assignedTrustedAppsListStateChanged', { + validate({ payload }) { + return isLoadedResourceState(payload); + }, + }), + ]) + : Promise.resolve(); + + appTestContext.history.push( + getPolicyDetailsArtifactsListPath('ddf6570b-9175-4a6d-b288-61a09771c647') + ); + renderResult = appTestContext.render( + + ); + + await pendingDataLoadState; + + return renderResult; + }; + }); + + const getConfirmButton = (): HTMLButtonElement => + renderResult.getByTestId('confirmModalConfirmButton') as HTMLButtonElement; + + const clickConfirmButton = async ( + /* wait for the UI action to the store middleware to initialize the remove */ + waitForUpdateRequestActionDispatch: boolean = false, + /* wait for the removal to succeed */ + waitForRemoveSuccessActionDispatch: boolean = false + ): Promise< + Immutable< + Array + > + > => { + const pendingConfirmStoreAction = waitForAction('policyArtifactsUpdateTrustedApps'); + const pendingRemoveSuccessAction = waitForAction( + 'policyDetailsTrustedAppsRemoveListStateChanged', + { + validate({ payload }) { + return isLoadedResourceState(payload); + }, + } + ); + + act(() => { + fireEvent.click(getConfirmButton()); + }); + + let response: Array< + PolicyArtifactsUpdateTrustedApps | PolicyDetailsTrustedAppsRemoveListStateChanged + > = []; + + if (waitForUpdateRequestActionDispatch || waitForRemoveSuccessActionDispatch) { + const pendingActions: Array< + Promise + > = []; + + if (waitForUpdateRequestActionDispatch) { + pendingActions.push(pendingConfirmStoreAction); + } + + if (waitForRemoveSuccessActionDispatch) { + pendingActions.push(pendingRemoveSuccessAction); + } + + await act(async () => { + response = await Promise.all(pendingActions); + }); + } + + return response; + }; + + const clickCancelButton = () => { + act(() => { + fireEvent.click(renderResult.getByTestId('confirmModalCancelButton')); + }); + }; + + const clickCloseButton = () => { + act(() => { + fireEvent.click(renderResult.baseElement.querySelector('button.euiModal__closeIcon')!); + }); + }; + + it.each([ + ['cancel', clickCancelButton], + ['close', clickCloseButton], + ])('should call `onClose` callback when %s button is clicked', async (__, clickButton) => { + await render(); + clickButton(); + + expect(onCloseHandler).toHaveBeenCalled(); + }); + + it('should dispatch action when confirmed', async () => { + await render(); + const confirmedAction = (await clickConfirmButton(true))[0]; + + expect(confirmedAction!.payload).toEqual({ + action: 'remove', + artifacts: trustedApps, + }); + }); + + it('should disable and show loading state on confirm button while update is underway', async () => { + await render(); + await clickConfirmButton(true); + const confirmButton = getConfirmButton(); + + expect(confirmButton.disabled).toBe(true); + expect(confirmButton.querySelector('.euiLoadingSpinner')).not.toBeNull(); + }); + + it.each([ + ['cancel', clickCancelButton], + ['close', clickCloseButton], + ])( + 'should prevent dialog dismissal if %s button is clicked while update is underway', + async (__, clickButton) => { + await render(); + await clickConfirmButton(true); + clickButton(); + + expect(onCloseHandler).not.toHaveBeenCalled(); + } + ); + + it('should show error toast if removal failed', async () => { + const error = new Error('oh oh'); + mockedApis.responseProvider.trustedAppUpdate.mockImplementation(() => { + throw error; + }); + await render(); + await clickConfirmButton(true); + await act(async () => { + await waitForAction('policyDetailsTrustedAppsRemoveListStateChanged', { + validate({ payload }) { + return isFailedResourceState(payload); + }, + }); + }); + + expect(appTestContext.coreStart.notifications.toasts.addError).toHaveBeenCalledWith( + expect.objectContaining({ message: expect.stringContaining('oh oh') }), + expect.objectContaining({ title: expect.any(String) }) + ); + }); + + it('should show success toast and close modal when removed is successful', async () => { + await render(); + await clickConfirmButton(true, true); + + expect(appTestContext.coreStart.notifications.toasts.addSuccess).toHaveBeenCalledWith({ + text: '"Avast Business Antivirus" has been removed from Endpoint Policy policy', + title: 'Successfully removed', + }); + }); + + it('should show multiples removal success message', async () => { + trustedApps = [ + ...trustedApps, + { + ...trustedApps[0], + id: '123', + name: 'trusted app 2', + }, + ]; + + await render(); + await clickConfirmButton(true, true); + + expect(appTestContext.coreStart.notifications.toasts.addSuccess).toHaveBeenCalledWith({ + text: '2 trusted applications have been removed from Endpoint Policy policy', + title: 'Successfully removed', + }); + }); + + it('should trigger a refresh of trusted apps list data on successful removal', async () => { + await render(); + const pendingActions = Promise.all([ + // request list refresh + waitForAction('policyDetailsTrustedAppsForceListDataRefresh'), + + // list data refresh received + waitForAction('assignedTrustedAppsListStateChanged', { + validate({ payload }) { + return isLoadedResourceState(payload); + }, + }), + ]); + await clickConfirmButton(true, true); + + await expect(pendingActions).resolves.toHaveLength(2); + }); +}); diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/trusted_apps/list/remove_trusted_app_from_policy_modal.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/trusted_apps/list/remove_trusted_app_from_policy_modal.tsx new file mode 100644 index 0000000000000..fec9ae4d7a09b --- /dev/null +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/trusted_apps/list/remove_trusted_app_from_policy_modal.tsx @@ -0,0 +1,156 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { memo, useCallback, useEffect, useMemo } from 'react'; +import { EuiCallOut, EuiConfirmModal, EuiSpacer, EuiText } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n/react'; +import { useDispatch } from 'react-redux'; +import { Dispatch } from 'redux'; +import { Immutable, TrustedApp } from '../../../../../../../common/endpoint/types'; +import { AppAction } from '../../../../../../common/store/actions'; +import { usePolicyDetailsSelector } from '../../policy_hooks'; +import { + getTrustedAppsIsRemoving, + getTrustedAppsRemovalError, + getTrustedAppsWasRemoveSuccessful, + policyDetails, +} from '../../../store/policy_details/selectors'; +import { useToasts } from '../../../../../../common/lib/kibana'; + +export interface RemoveTrustedAppFromPolicyModalProps { + trustedApps: Immutable; + onClose: () => void; +} + +export const RemoveTrustedAppFromPolicyModal = memo( + ({ trustedApps, onClose }) => { + const toasts = useToasts(); + const dispatch = useDispatch>(); + + const policyName = usePolicyDetailsSelector(policyDetails)?.name; + const isRemoving = usePolicyDetailsSelector(getTrustedAppsIsRemoving); + const removeError = usePolicyDetailsSelector(getTrustedAppsRemovalError); + const wasSuccessful = usePolicyDetailsSelector(getTrustedAppsWasRemoveSuccessful); + + const removedToastMessage: string = useMemo(() => { + const count = trustedApps.length; + + if (count === 0) { + return ''; + } + + if (count > 1) { + return i18n.translate( + 'xpack.securitySolution.endpoint.policy.trustedApps.list.removeDialog.successMultiplesToastText', + { + defaultMessage: + '{count} trusted applications have been removed from {policyName} policy', + values: { count, policyName }, + } + ); + } + + return i18n.translate( + 'xpack.securitySolution.endpoint.policy.trustedApps.list.removeDialog.successToastText', + { + defaultMessage: '"{trustedAppName}" has been removed from {policyName} policy', + values: { trustedAppName: trustedApps[0].name, policyName }, + } + ); + }, [policyName, trustedApps]); + + const handleModalClose = useCallback(() => { + if (!isRemoving) { + onClose(); + } + }, [isRemoving, onClose]); + + const handleModalConfirm = useCallback(() => { + dispatch({ + type: 'policyArtifactsUpdateTrustedApps', + payload: { action: 'remove', artifacts: trustedApps }, + }); + }, [dispatch, trustedApps]); + + useEffect(() => { + // When component is un-mounted, reset the state for remove in the store + return () => { + dispatch({ type: 'policyDetailsArtifactsResetRemove' }); + }; + }, [dispatch]); + + useEffect(() => { + if (removeError) { + toasts.addError(removeError as unknown as Error, { + title: i18n.translate( + 'xpack.securitySolution.endpoint.policy.trustedApps.list.removeDialog.errorToastTitle', + { + defaultMessage: 'Error while attempt to remove trusted application', + } + ), + }); + } + }, [removeError, toasts]); + + useEffect(() => { + if (wasSuccessful) { + toasts.addSuccess({ + title: i18n.translate( + 'xpack.securitySolution.endpoint.policy.trustedApps.list.removeDialog.successToastTitle', + { defaultMessage: 'Successfully removed' } + ), + text: removedToastMessage, + }); + handleModalClose(); + } + }, [handleModalClose, policyName, removedToastMessage, toasts, trustedApps, wasSuccessful]); + + return ( + + +

+ +

+
+ + + + +

+ +

+
+
+ ); + } +); +RemoveTrustedAppFromPolicyModal.displayName = 'RemoveTrustedAppFromPolicyModal'; diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/service/index.ts b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/service/index.ts index 09aa80ffae495..b59fb6cfdd2f7 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/service/index.ts +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/service/index.ts @@ -7,6 +7,7 @@ import { HttpStart } from 'kibana/public'; +import pMap from 'p-map'; import { TRUSTED_APPS_CREATE_API, TRUSTED_APPS_DELETE_API, @@ -29,10 +30,14 @@ import { GetOneTrustedAppRequestParams, GetOneTrustedAppResponse, GetTrustedAppsSummaryRequest, -} from '../../../../../common/endpoint/types/trusted_apps'; + TrustedApp, + MaybeImmutable, +} from '../../../../../common/endpoint/types'; import { resolvePathVariables } from '../../../../common/utils/resolve_path_variables'; import { sendGetEndpointSpecificPackagePolicies } from '../../policy/store/services/ingest'; +import { toUpdateTrustedApp } from '../../../../../common/endpoint/service/trusted_apps/to_update_trusted_app'; +import { isGlobalEffectScope } from '../state/type_guards'; export interface TrustedAppsService { getTrustedApp(params: GetOneTrustedAppRequestParams): Promise; @@ -46,8 +51,23 @@ export interface TrustedAppsService { getPolicyList( options?: Parameters[1] ): ReturnType; + assignPolicyToTrustedApps( + policyId: string, + trustedApps: MaybeImmutable + ): Promise; + removePolicyFromTrustedApps( + policyId: string, + trustedApps: MaybeImmutable + ): Promise; } +const P_MAP_OPTIONS = Object.freeze({ + concurrency: 5, + /** When set to false, instead of stopping when a promise rejects, it will wait for all the promises to settle + * and then reject with an aggregated error containing all the errors from the rejected promises. */ + stopOnError: false, +}); + export class TrustedAppsHttpService implements TrustedAppsService { constructor(private http: HttpStart) {} @@ -92,4 +112,79 @@ export class TrustedAppsHttpService implements TrustedAppsService { getPolicyList(options?: Parameters[1]) { return sendGetEndpointSpecificPackagePolicies(this.http, options); } + + /** + * Assign a policy to trusted apps. Note that Trusted Apps MUST NOT be global + * + * @param policyId + * @param trustedApps[] + */ + assignPolicyToTrustedApps( + policyId: string, + trustedApps: MaybeImmutable + ): Promise { + return this._handleAssignOrRemovePolicyId('assign', policyId, trustedApps); + } + + /** + * Remove a policy from trusted apps. Note that Trusted Apps MUST NOT be global + * + * @param policyId + * @param trustedApps[] + */ + removePolicyFromTrustedApps( + policyId: string, + trustedApps: MaybeImmutable + ): Promise { + return this._handleAssignOrRemovePolicyId('remove', policyId, trustedApps); + } + + private _handleAssignOrRemovePolicyId( + action: 'assign' | 'remove', + policyId: string, + trustedApps: MaybeImmutable + ): Promise { + if (policyId.trim() === '') { + throw new Error('policy ID is required'); + } + + if (trustedApps.length === 0) { + throw new Error('at least one trusted app is required'); + } + + return pMap( + trustedApps, + async (trustedApp) => { + if (isGlobalEffectScope(trustedApp.effectScope)) { + throw new Error( + `Unable to update trusted app [${trustedApp.id}] policy assignment. It's effectScope is 'global'` + ); + } + + const policies: string[] = !isGlobalEffectScope(trustedApp.effectScope) + ? [...trustedApp.effectScope.policies] + : []; + + const indexOfPolicyId = policies.indexOf(policyId); + + if (action === 'assign' && indexOfPolicyId === -1) { + policies.push(policyId); + } else if (action === 'remove' && indexOfPolicyId !== -1) { + policies.splice(indexOfPolicyId, 1); + } + + return this.updateTrustedApp( + { id: trustedApp.id }, + { + ...toUpdateTrustedApp(trustedApp), + effectScope: { + type: 'policy', + policies, + }, + } + ); + }, + P_MAP_OPTIONS + ); + } } diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/store/middleware.test.ts b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/store/middleware.test.ts index f64003ec6ad91..4455baddb047c 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/store/middleware.test.ts +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/store/middleware.test.ts @@ -54,6 +54,8 @@ const createTrustedAppsServiceMock = (): jest.Mocked => ({ getPolicyList: jest.fn(), updateTrustedApp: jest.fn(), getTrustedApp: jest.fn(), + assignPolicyToTrustedApps: jest.fn(), + removePolicyFromTrustedApps: jest.fn(), }); const createStoreSetup = (trustedAppsService: TrustedAppsService) => { diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/store/middleware.ts b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/store/middleware.ts index f772986bff146..0de5761ccf074 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/store/middleware.ts +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/store/middleware.ts @@ -191,6 +191,7 @@ const submitCreationIfNeeded = async ( if (editMode) { responseTrustedApp = ( await trustedAppsService.updateTrustedApp( + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion { id: editItemId(currentState)! }, // TODO: try to remove the cast entry as PostTrustedAppCreateRequest @@ -412,8 +413,9 @@ const fetchEditTrustedAppIfNeeded = async ( dispatch({ type: 'trustedAppCreationEditItemStateChanged', payload: { - type: 'LoadingResourceState', // @ts-expect-error-next-line will be fixed with when AsyncResourceState is refactored (#830) + type: 'LoadingResourceState', + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion previousState: editItemState(currentState)!, }, }); diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/create_trusted_app_flyout.tsx b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/create_trusted_app_flyout.tsx index 7abf5d77dd5e9..f72d54aa9e3c9 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/create_trusted_app_flyout.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/create_trusted_app_flyout.tsx @@ -8,22 +8,25 @@ import { EuiButton, EuiButtonEmpty, + EuiCallOut, EuiFlexGroup, EuiFlexItem, EuiFlyout, EuiFlyoutBody, EuiFlyoutFooter, EuiFlyoutHeader, + EuiLink, EuiSpacer, EuiText, EuiTitle, } from '@elastic/eui'; -import React, { memo, useCallback, useEffect, useMemo } from 'react'; +import React, { memo, useCallback, useEffect, useState, useMemo } from 'react'; import { EuiFlyoutProps } from '@elastic/eui/src/components/flyout/flyout'; import { FormattedMessage } from '@kbn/i18n/react'; import { useDispatch } from 'react-redux'; import { useHistory } from 'react-router-dom'; import { i18n } from '@kbn/i18n'; +import _ from 'lodash'; import { CreateTrustedAppForm, CreateTrustedAppFormProps } from './create_trusted_app_form'; import { editTrustedAppFetchError, @@ -43,10 +46,14 @@ import { useTrustedAppsSelector } from '../hooks'; import { ABOUT_TRUSTED_APPS, CREATE_TRUSTED_APP_ERROR } from '../translations'; import { defaultNewTrustedApp } from '../../store/builders'; import { getTrustedAppsListPath } from '../../../../common/routing'; -import { useToasts } from '../../../../../common/lib/kibana'; +import { useKibana, useToasts } from '../../../../../common/lib/kibana'; import { useTestIdGenerator } from '../../../../components/hooks/use_test_id_generator'; +import { useLicense } from '../../../../../common/hooks/use_license'; +import { isGlobalEffectScope } from '../../state/type_guards'; +import { NewTrustedApp } from '../../../../../../common/endpoint/types'; +import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; -type CreateTrustedAppFlyoutProps = Omit; +export type CreateTrustedAppFlyoutProps = Omit; export const CreateTrustedAppFlyout = memo( ({ onClose, ...flyoutProps }) => { const dispatch = useDispatch<(action: AppAction) => void>(); @@ -63,6 +70,9 @@ export const CreateTrustedAppFlyout = memo( const trustedAppFetchError = useTrustedAppsSelector(editTrustedAppFetchError); const formValues = useTrustedAppsSelector(getCreationDialogFormEntry) || defaultNewTrustedApp(); const location = useTrustedAppsSelector(getCurrentLocation); + const isPlatinumPlus = useLicense().isPlatinumPlus(); + const docLinks = useKibana().services.docLinks; + const [isFormDirty, setIsFormDirty] = useState(false); const dataTestSubj = flyoutProps['data-test-subj']; @@ -124,10 +134,28 @@ export const CreateTrustedAppFlyout = memo( type: 'trustedAppCreationDialogFormStateUpdated', payload: { entry: newFormState.item, isValid: newFormState.isValid }, }); + if (_.isEqual(formValues, newFormState.item) === false) { + setIsFormDirty(true); + } }, - [dispatch] + + [dispatch, formValues] + ); + + const isTrustedAppsByPolicyEnabled = useIsExperimentalFeatureEnabled( + 'trustedAppsByPolicyEnabled' ); + const isGlobal = useMemo(() => { + return isGlobalEffectScope((formValues as NewTrustedApp).effectScope); + }, [formValues]); + + const showExpiredLicenseBanner = useMemo(() => { + return ( + isTrustedAppsByPolicyEnabled && !isPlatinumPlus && isEditMode && (!isGlobal || isFormDirty) + ); + }, [isTrustedAppsByPolicyEnabled, isPlatinumPlus, isEditMode, isGlobal, isFormDirty]); + // If there was a failure trying to retrieve the Trusted App for edit item, // then redirect back to the list ++ show toast message. useEffect(() => { @@ -181,7 +209,28 @@ export const CreateTrustedAppFlyout = memo( - + {showExpiredLicenseBanner && ( + + + + + + + )}

@@ -203,6 +252,8 @@ export const CreateTrustedAppFlyout = memo( fullWidth onChange={handleFormOnChange} isInvalid={!!creationErrors} + isEditMode={isEditMode} + isDirty={isFormDirty} error={creationErrorsMessage} policies={policies} trustedApp={formValues} diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/create_trusted_app_form.test.tsx b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/create_trusted_app_form.test.tsx index 45eaa2c890a78..d3b4a541bd18d 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/create_trusted_app_form.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/create_trusted_app_form.test.tsx @@ -24,10 +24,23 @@ import { defaultNewTrustedApp } from '../../store/builders'; import { forceHTMLElementOffsetWidth } from './effected_policy_select/test_utils'; import { EndpointDocGenerator } from '../../../../../../common/endpoint/generate_data'; import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; +import { licenseService } from '../../../../../common/hooks/use_license'; jest.mock('../../../../../common/hooks/use_experimental_features'); const useIsExperimentalFeatureEnabledMock = useIsExperimentalFeatureEnabled as jest.Mock; +jest.mock('../../../../../common/hooks/use_license', () => { + const licenseServiceInstance = { + isPlatinumPlus: jest.fn(), + }; + return { + licenseService: licenseServiceInstance, + useLicense: () => { + return licenseServiceInstance; + }, + }; +}); + describe('When using the Trusted App Form', () => { const dataTestSubjForForm = 'createForm'; const generator = new EndpointDocGenerator('effected-policy-select'); @@ -112,6 +125,7 @@ describe('When using the Trusted App Form', () => { beforeEach(() => { resetHTMLElementOffsetWidth = forceHTMLElementOffsetWidth(); useIsExperimentalFeatureEnabledMock.mockReturnValue(true); + (licenseService.isPlatinumPlus as jest.Mock).mockReturnValue(true); mockedContext = createAppRootMockRenderer(); @@ -120,6 +134,8 @@ describe('When using the Trusted App Form', () => { formProps = { 'data-test-subj': dataTestSubjForForm, trustedApp: latestUpdatedTrustedApp, + isEditMode: false, + isDirty: false, onChange: jest.fn((updates) => { latestUpdatedTrustedApp = updates.item; }), @@ -303,6 +319,58 @@ describe('When using the Trusted App Form', () => { }); }); + describe('the Policy Selection area when the license downgrades to gold or below', () => { + beforeEach(() => { + // select per policy for trusted app + const policy = generator.generatePolicyPackagePolicy(); + policy.name = 'test policy A'; + policy.id = '123'; + + formProps.policies.options = [policy]; + + (formProps.trustedApp as NewTrustedApp).effectScope = { + type: 'policy', + policies: ['123'], + }; + + formProps.isEditMode = true; + + // downgrade license + (licenseService.isPlatinumPlus as jest.Mock).mockReturnValue(false); + }); + + it('maintains policy configuration but does not allow the user to edit add/remove individual policies in edit mode', () => { + render(); + const perPolicyButton = renderResult.getByTestId( + `${dataTestSubjForForm}-effectedPolicies-perPolicy` + ) as HTMLButtonElement; + + expect(perPolicyButton.classList.contains('euiButtonGroupButton-isSelected')).toEqual(true); + expect(renderResult.getByTestId('policy-123').getAttribute('aria-disabled')).toEqual('true'); + expect(renderResult.getByTestId('policy-123-checkbox')).toBeChecked(); + }); + it("allows the user to set the trusted app entry to 'Global' in the edit option", () => { + render(); + const globalButtonInput = renderResult.getByTestId('globalPolicy') as HTMLButtonElement; + + reactTestingLibrary.act(() => { + fireEvent.click(globalButtonInput); + }); + + expect(formProps.onChange.mock.calls[0][0].item.effectScope.type).toBe('global'); + }); + it('hides the policy assignment section if the TA is set to global', () => { + (formProps.trustedApp as NewTrustedApp).effectScope = { + type: 'global', + }; + expect(renderResult.queryByTestId(`${dataTestSubjForForm}-effectedPolicies`)).toBeNull(); + }); + it('hides the policy assignment section if the user is adding a new TA', () => { + formProps.isEditMode = false; + expect(renderResult.queryByTestId(`${dataTestSubjForForm}-effectedPolicies`)).toBeNull(); + }); + }); + describe('and the user visits required fields but does not fill them out', () => { beforeEach(() => { render(); diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/create_trusted_app_form.tsx b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/create_trusted_app_form.tsx index 5db9a8557fa10..d4f456ab8e039 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/create_trusted_app_form.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/create_trusted_app_form.tsx @@ -48,6 +48,7 @@ import { EffectedPolicySelectProps, } from './effected_policy_select'; import { useTestIdGenerator } from '../../../../components/hooks/use_test_id_generator'; +import { useLicense } from '../../../../../common/hooks/use_license'; const OPERATING_SYSTEMS: readonly OperatingSystem[] = [ OperatingSystem.MAC, @@ -85,7 +86,9 @@ const addResultToValidation = ( }; } const errorMarkup: React.ReactNode = type === 'warnings' ?
{resultValue}
: resultValue; + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion validation.result[field]![type].push(errorMarkup); + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion validation.result[field]!.isInvalid = true; }; @@ -189,6 +192,8 @@ export type CreateTrustedAppFormProps = Pick< > & { /** The trusted app values that will be passed to the form */ trustedApp: MaybeImmutable; + isEditMode: boolean; + isDirty: boolean; onChange: (state: TrustedAppFormState) => void; /** Setting passed on to the EffectedPolicySelect component */ policies: Pick; @@ -196,7 +201,15 @@ export type CreateTrustedAppFormProps = Pick< fullWidth?: boolean; }; export const CreateTrustedAppForm = memo( - ({ fullWidth, onChange, trustedApp: _trustedApp, policies = { options: [] }, ...formProps }) => { + ({ + fullWidth, + isEditMode, + isDirty, + onChange, + trustedApp: _trustedApp, + policies = { options: [] }, + ...formProps + }) => { const trustedApp = _trustedApp as NewTrustedApp; const dataTestSubj = formProps['data-test-subj']; @@ -205,6 +218,16 @@ export const CreateTrustedAppForm = memo( 'trustedAppsByPolicyEnabled' ); + const isPlatinumPlus = useLicense().isPlatinumPlus(); + + const isGlobal = useMemo(() => { + return isGlobalEffectScope(trustedApp.effectScope); + }, [trustedApp]); + + const hideAssignmentSection = useMemo(() => { + return !isPlatinumPlus && (!isEditMode || (isGlobal && !isDirty)); + }, [isEditMode, isGlobal, isDirty, isPlatinumPlus]); + const osOptions: Array> = useMemo( () => OPERATING_SYSTEMS.map((os) => ({ value: os, inputDisplay: OS_TITLES[os] })), [] @@ -213,7 +236,7 @@ export const CreateTrustedAppForm = memo( // We create local state for the list of policies because we want the selected policies to // persist while the user is on the form and possibly toggling between global/non-global const [selectedPolicies, setSelectedPolicies] = useState({ - isGlobal: isGlobalEffectScope(trustedApp.effectScope), + isGlobal, selected: [], }); @@ -406,7 +429,7 @@ export const CreateTrustedAppForm = memo( }, [notifyOfChange, trustedApp]); // Anytime the TrustedApp has an effective scope of `policies`, then ensure that - // those polices are selected in the UI while at teh same time preserving prior + // those polices are selected in the UI while at the same time preserving prior // selections (UX requirement) useEffect(() => { setSelectedPolicies((currentSelection) => { @@ -530,12 +553,13 @@ export const CreateTrustedAppForm = memo( data-test-subj={getTestId('conditionsBuilder')} /> - {isTrustedAppsByPolicyEnabled ? ( + {isTrustedAppsByPolicyEnabled && !hideAssignmentSection ? ( <> { componentProps = { options: [], isGlobal: true, + isPlatinumPlus: true, onChange: handleOnChange, 'data-test-subj': 'test', }; diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/effected_policy_select/effected_policy_select.tsx b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/effected_policy_select/effected_policy_select.tsx index bb620ee5e7c01..07de303c155aa 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/effected_policy_select/effected_policy_select.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/effected_policy_select/effected_policy_select.tsx @@ -56,12 +56,14 @@ export type EffectedPolicySelectProps = Omit< > & { options: PolicyData[]; isGlobal: boolean; + isPlatinumPlus: boolean; onChange: (selection: EffectedPolicySelection) => void; selected?: PolicyData[]; }; export const EffectedPolicySelect = memo( ({ isGlobal, + isPlatinumPlus, onChange, listProps, options, @@ -107,7 +109,8 @@ export const EffectedPolicySelect = memo( id={htmlIdGenerator()()} onChange={NOOP} checked={isPolicySelected.has(policy.id)} - disabled={isGlobal} + disabled={isGlobal || !isPlatinumPlus} + data-test-subj={`policy-${policy.id}-checkbox`} /> ), append: ( @@ -124,11 +127,11 @@ export const EffectedPolicySelect = memo( ), policy, checked: isPolicySelected.has(policy.id) ? 'on' : undefined, - disabled: isGlobal, + disabled: isGlobal || !isPlatinumPlus, 'data-test-subj': `policy-${policy.id}`, })) .sort(({ label: labelA }, { label: labelB }) => labelA.localeCompare(labelB)); - }, [getAppUrl, isGlobal, options, selected]); + }, [getAppUrl, isGlobal, isPlatinumPlus, options, selected]); const handleOnPolicySelectChange = useCallback< Required>['onChange'] @@ -140,7 +143,7 @@ export const EffectedPolicySelect = memo( }); }, [isGlobal, onChange] - )!; + ); const handleGlobalButtonChange = useCallback( (selectedId) => { @@ -178,7 +181,7 @@ export const EffectedPolicySelect = memo(

{i18n.translate('xpack.securitySolution.trustedApps.assignmentSectionDescription', { defaultMessage: - 'You can assign this trusted application globally across all policies or assign it to specific policies.', + 'Assign this trusted application globally across all policies, or assign it to specific policies.', })}

diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/trusted_apps_grid/index.tsx b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/trusted_apps_grid/index.tsx index 948b454f9cc00..6967c07db20b1 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/trusted_apps_grid/index.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/trusted_apps_grid/index.tsx @@ -54,7 +54,7 @@ const RootWrapper = styled.div` const BACK_TO_TRUSTED_APPS_LABEL = i18n.translate( 'xpack.securitySolution.trustedapps.grid.policyDetailsLinkBackLabel', - { defaultMessage: 'Back to trusted Applications' } + { defaultMessage: 'Back to trusted applications' } ); const EDIT_TRUSTED_APP_ACTION_LABEL = i18n.translate( @@ -120,6 +120,12 @@ export const TrustedAppsGrid = memo(() => { ], href: getAppUrl({ path: currentPagePath }), }, + onCancelNavigateTo: [ + APP_ID, + { + path: currentPagePath, + }, + ], }; policyToNavOptionsMap[policyId] = { diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/trusted_app_deletion_dialog.tsx b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/trusted_app_deletion_dialog.tsx index 9e76cfd001c97..87c7439c236cc 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/trusted_app_deletion_dialog.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/trusted_app_deletion_dialog.tsx @@ -24,13 +24,7 @@ import { EuiText, } from '@elastic/eui'; -import { - Immutable, - ImmutableObject, - PolicyEffectScope, - GlobalEffectScope, - TrustedApp, -} from '../../../../../common/endpoint/types'; +import { Immutable, TrustedApp } from '../../../../../common/endpoint/types'; import { AppAction } from '../../../../common/store/actions'; import { useTrustedAppsSelector } from './hooks'; import { @@ -38,14 +32,10 @@ import { isDeletionDialogOpen, isDeletionInProgress, } from '../store/selectors'; +import { isPolicyEffectScope } from '../state/type_guards'; const CANCEL_SUBJ = 'trustedAppDeletionCancel'; const CONFIRM_SUBJ = 'trustedAppDeletionConfirm'; -const isTrustedAppByPolicy = ( - trustedApp: ImmutableObject -): trustedApp is ImmutableObject => { - return (trustedApp as ImmutableObject).policies !== undefined; -}; const getTranslations = (entry: Immutable | undefined) => ({ title: ( @@ -67,7 +57,7 @@ const getTranslations = (entry: Immutable | undefined) => ({ defaultMessage="Deleting this entry will remove it from {count} associated {count, plural, one {policy} other {policies}}." values={{ count: - entry && isTrustedAppByPolicy(entry.effectScope) + entry && isPolicyEffectScope(entry.effectScope) ? entry.effectScope.policies.length : 'all', }} diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/trusted_apps_page.test.tsx b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/trusted_apps_page.test.tsx index 69377e1d84833..f39fd47c78771 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/trusted_apps_page.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/trusted_apps_page.test.tsx @@ -34,11 +34,26 @@ import { forceHTMLElementOffsetWidth } from './components/effected_policy_select import { toUpdateTrustedApp } from '../../../../../common/endpoint/service/trusted_apps/to_update_trusted_app'; import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; import { resolvePathVariables } from '../../../../common/utils/resolve_path_variables'; +import { licenseService } from '../../../../common/hooks/use_license'; // TODO: remove this mock when feature flag is removed jest.mock('../../../../common/hooks/use_experimental_features'); const useIsExperimentalFeatureEnabledMock = useIsExperimentalFeatureEnabled as jest.Mock; +jest.mock('../../../../common/hooks/use_license', () => { + const licenseServiceInstance = { + isPlatinumPlus: jest.fn(), + }; + return { + licenseService: licenseServiceInstance, + useLicense: () => { + return licenseServiceInstance; + }, + }; +}); + +jest.mock('../../../../common/components/user_privileges/use_endpoint_privileges'); + describe('When on the Trusted Apps Page', () => { const expectedAboutInfo = 'Add a trusted application to improve performance or alleviate conflicts with other ' + @@ -54,26 +69,7 @@ describe('When on the Trusted Apps Page', () => { const originalScrollTo = window.scrollTo; const act = reactTestingLibrary.act; - const getFakeTrustedApp = (): TrustedApp => ({ - id: '1111-2222-3333-4444', - version: 'abc123', - name: 'one app', - os: OperatingSystem.WINDOWS, - created_at: '2021-01-04T13:55:00.561Z', - created_by: 'me', - updated_at: '2021-01-04T13:55:00.561Z', - updated_by: 'me', - description: 'a good one', - effectScope: { type: 'global' }, - entries: [ - { - field: ConditionEntryField.PATH, - value: 'one/two', - operator: 'included', - type: 'match', - }, - ], - }); + const getFakeTrustedApp = jest.fn(); const createListApiResponse = ( page: number = 1, @@ -133,9 +129,32 @@ describe('When on the Trusted Apps Page', () => { beforeEach(() => { mockedContext = createAppRootMockRenderer(); + getFakeTrustedApp.mockImplementation( + (): TrustedApp => ({ + id: '1111-2222-3333-4444', + version: 'abc123', + name: 'one app', + os: OperatingSystem.WINDOWS, + created_at: '2021-01-04T13:55:00.561Z', + created_by: 'me', + updated_at: '2021-01-04T13:55:00.561Z', + updated_by: 'me', + description: 'a good one', + effectScope: { type: 'global' }, + entries: [ + { + field: ConditionEntryField.PATH, + value: 'one/two', + operator: 'included', + type: 'match', + }, + ], + }) + ); history = mockedContext.history; coreStart = mockedContext.coreStart; + (licenseService.isPlatinumPlus as jest.Mock).mockReturnValue(true); waitForAction = mockedContext.middlewareSpy.waitForAction; render = () => mockedContext.render(); reactTestingLibrary.act(() => { @@ -174,19 +193,94 @@ describe('When on the Trusted Apps Page', () => { }); describe('and the Grid view is being displayed', () => { - describe('and the edit trusted app button is clicked', () => { - let renderResult: ReturnType; + let renderResult: ReturnType; + + const renderWithListDataAndClickOnEditCard = async () => { + renderResult = await renderWithListData(); + + await act(async () => { + (await renderResult.findAllByTestId('trustedAppCard-header-actions-button'))[0].click(); + }); + + act(() => { + fireEvent.click(renderResult.getByTestId('editTrustedAppAction')); + }); + }; + + const renderWithListDataAndClickAddButton = async (): Promise< + ReturnType + > => { + renderResult = await renderWithListData(); + + act(() => { + const addButton = renderResult.getByTestId('trustedAppsListAddButton'); + fireEvent.click(addButton, { button: 1 }); + }); + + // Wait for the policies to be loaded + await act(async () => { + await waitForAction('trustedAppsPoliciesStateChanged', { + validate: (action) => { + return isLoadedResourceState(action.payload); + }, + }); + }); + + return renderResult; + }; + describe('the license is downgraded to gold or below and the user is editing a per policy TA', () => { beforeEach(async () => { - renderResult = await renderWithListData(); + (licenseService.isPlatinumPlus as jest.Mock).mockReturnValue(false); + useIsExperimentalFeatureEnabledMock.mockReturnValue(true); - await act(async () => { - (await renderResult.findAllByTestId('trustedAppCard-header-actions-button'))[0].click(); + const originalFakeTrustedAppProvider = getFakeTrustedApp.getMockImplementation(); + getFakeTrustedApp.mockImplementation(() => { + return { + ...originalFakeTrustedAppProvider!(), + effectScope: { + type: 'policy', + policies: ['abc123'], + }, + }; }); + await renderWithListDataAndClickOnEditCard(); + }); + + it('shows a message at the top of the flyout to inform the user their license is expired', () => { + expect( + renderResult.queryByTestId('addTrustedAppFlyout-expired-license-callout') + ).toBeTruthy(); + }); + }); + + describe('the license is downgraded to gold or below and the user is adding a new TA', () => { + beforeEach(async () => { + (licenseService.isPlatinumPlus as jest.Mock).mockReturnValue(false); + useIsExperimentalFeatureEnabledMock.mockReturnValue(true); - act(() => { - fireEvent.click(renderResult.getByTestId('editTrustedAppAction')); + const originalFakeTrustedAppProvider = getFakeTrustedApp.getMockImplementation(); + getFakeTrustedApp.mockImplementation(() => { + return { + ...originalFakeTrustedAppProvider!(), + effectScope: { + type: 'policy', + policies: ['abc123'], + }, + }; }); + await renderWithListDataAndClickAddButton(); + }); + it('does not show the expired license message at the top of the flyout', async () => { + expect( + renderResult.queryByTestId('addTrustedAppFlyout-expired-license-callout') + ).toBeNull(); + }); + }); + + describe('and the edit trusted app button is clicked', () => { + beforeEach(async () => { + await renderWithListDataAndClickOnEditCard(); }); it('should persist edit params to url', () => { @@ -277,7 +371,7 @@ describe('When on the Trusted Apps Page', () => { } ); - const renderResult = await renderWithListData(); + renderResult = await renderWithListData(); await reactTestingLibrary.act(async () => { await apiResponseForEditTrustedApp; @@ -310,7 +404,7 @@ describe('When on the Trusted Apps Page', () => { }); it('should retrieve trusted app via API using url `id`', async () => { - const renderResult = await renderAndWaitForGetApi(); + renderResult = await renderAndWaitForGetApi(); expect(coreStart.http.get).toHaveBeenCalledWith(TRUSTED_APP_GET_URI); diff --git a/x-pack/plugins/security_solution/public/network/components/details/index.tsx b/x-pack/plugins/security_solution/public/network/components/details/index.tsx index 7658a6a76230c..0b53a4bfb3fe2 100644 --- a/x-pack/plugins/security_solution/public/network/components/details/index.tsx +++ b/x-pack/plugins/security_solution/public/network/components/details/index.tsx @@ -71,7 +71,7 @@ export const IpOverview = React.memo( const capabilities = useMlCapabilities(); const userPermissions = hasMlUserPermissions(capabilities); const [darkMode] = useUiSetting$(DEFAULT_DARK_MODE); - const typeData = data[flowTarget]!; + const typeData = data[flowTarget]; const column: DescriptionList[] = [ { title: i18n.LOCATION, diff --git a/x-pack/plugins/security_solution/public/network/components/network_dns_table/index.test.tsx b/x-pack/plugins/security_solution/public/network/components/network_dns_table/index.test.tsx index a811f5c92c37a..fc28067866146 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_dns_table/index.test.tsx +++ b/x-pack/plugins/security_solution/public/network/components/network_dns_table/index.test.tsx @@ -78,7 +78,7 @@ describe('NetworkTopNFlow Table Component', () => { ); - expect(store.getState().network.page.queries!.dns.sort).toEqual({ + expect(store.getState().network.page.queries?.dns.sort).toEqual({ direction: 'desc', field: 'queryCount', }); @@ -87,7 +87,7 @@ describe('NetworkTopNFlow Table Component', () => { wrapper.update(); - expect(store.getState().network.page.queries!.dns.sort).toEqual({ + expect(store.getState().network.page.queries?.dns.sort).toEqual({ direction: 'asc', field: 'dnsName', }); diff --git a/x-pack/plugins/security_solution/public/network/components/network_http_table/index.test.tsx b/x-pack/plugins/security_solution/public/network/components/network_http_table/index.test.tsx index f05372c76b36f..2a85b31791f5a 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_http_table/index.test.tsx +++ b/x-pack/plugins/security_solution/public/network/components/network_http_table/index.test.tsx @@ -80,7 +80,7 @@ describe('NetworkHttp Table Component', () => { ); - expect(store.getState().network.page.queries!.http.sort).toEqual({ + expect(store.getState().network.page.queries?.http.sort).toEqual({ direction: 'desc', }); @@ -88,7 +88,7 @@ describe('NetworkHttp Table Component', () => { wrapper.update(); - expect(store.getState().network.page.queries!.http.sort).toEqual({ + expect(store.getState().network.page.queries?.http.sort).toEqual({ direction: 'asc', }); expect(wrapper.find('.euiTable thead tr th button').first().find('svg')).toBeTruthy(); diff --git a/x-pack/plugins/security_solution/public/network/components/port/helpers.ts b/x-pack/plugins/security_solution/public/network/components/port/helpers.ts new file mode 100644 index 0000000000000..e162fb3f90968 --- /dev/null +++ b/x-pack/plugins/security_solution/public/network/components/port/helpers.ts @@ -0,0 +1,19 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +export const CLIENT_PORT_FIELD_NAME = 'client.port'; +export const DESTINATION_PORT_FIELD_NAME = 'destination.port'; +export const SERVER_PORT_FIELD_NAME = 'server.port'; +export const SOURCE_PORT_FIELD_NAME = 'source.port'; +export const URL_PORT_FIELD_NAME = 'url.port'; + +export const PORT_NAMES = [ + CLIENT_PORT_FIELD_NAME, + DESTINATION_PORT_FIELD_NAME, + SERVER_PORT_FIELD_NAME, + SOURCE_PORT_FIELD_NAME, + URL_PORT_FIELD_NAME, +]; diff --git a/x-pack/plugins/security_solution/public/network/components/port/index.tsx b/x-pack/plugins/security_solution/public/network/components/port/index.tsx index 4afd9bc7b892a..769aa7300d138 100644 --- a/x-pack/plugins/security_solution/public/network/components/port/index.tsx +++ b/x-pack/plugins/security_solution/public/network/components/port/index.tsx @@ -5,33 +5,22 @@ * 2.0. */ +import { EuiButtonEmpty, EuiButtonIcon } from '@elastic/eui'; import React from 'react'; import { DefaultDraggable } from '../../../common/components/draggables'; import { getEmptyValue } from '../../../common/components/empty_value'; import { PortOrServiceNameLink } from '../../../common/components/links'; -export const CLIENT_PORT_FIELD_NAME = 'client.port'; -export const DESTINATION_PORT_FIELD_NAME = 'destination.port'; -export const SERVER_PORT_FIELD_NAME = 'server.port'; -export const SOURCE_PORT_FIELD_NAME = 'source.port'; -export const URL_PORT_FIELD_NAME = 'url.port'; - -export const PORT_NAMES = [ - CLIENT_PORT_FIELD_NAME, - DESTINATION_PORT_FIELD_NAME, - SERVER_PORT_FIELD_NAME, - SOURCE_PORT_FIELD_NAME, - URL_PORT_FIELD_NAME, -]; - export const Port = React.memo<{ contextId: string; + Component?: typeof EuiButtonEmpty | typeof EuiButtonIcon; eventId: string; fieldName: string; isDraggable?: boolean; + title?: string; value: string | undefined | null; -}>(({ contextId, eventId, fieldName, isDraggable, value }) => +}>(({ Component, contextId, eventId, fieldName, isDraggable, title, value }) => isDraggable ? ( - + ) : ( - + ) ); diff --git a/x-pack/plugins/security_solution/public/network/components/source_destination/index.test.tsx b/x-pack/plugins/security_solution/public/network/components/source_destination/index.test.tsx index 3da5ec6d4b218..3332111d14f8b 100644 --- a/x-pack/plugins/security_solution/public/network/components/source_destination/index.test.tsx +++ b/x-pack/plugins/security_solution/public/network/components/source_destination/index.test.tsx @@ -18,7 +18,7 @@ import { TestProviders } from '../../../common/mock/test_providers'; import { ID_FIELD_NAME } from '../../../common/components/event_details/event_id'; import { useMountAppended } from '../../../common/utils/use_mount_appended'; import { DESTINATION_IP_FIELD_NAME, SOURCE_IP_FIELD_NAME } from '../ip'; -import { DESTINATION_PORT_FIELD_NAME, SOURCE_PORT_FIELD_NAME } from '../port'; +import { DESTINATION_PORT_FIELD_NAME, SOURCE_PORT_FIELD_NAME } from '../port/helpers'; import { DESTINATION_BYTES_FIELD_NAME, DESTINATION_PACKETS_FIELD_NAME, diff --git a/x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_ip.test.tsx b/x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_ip.test.tsx index 824b9fd11f242..f16cd7dbb109f 100644 --- a/x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_ip.test.tsx +++ b/x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_ip.test.tsx @@ -15,7 +15,7 @@ import '../../../common/mock/match_media'; import { TestProviders } from '../../../common/mock/test_providers'; import { ID_FIELD_NAME } from '../../../common/components/event_details/event_id'; import { DESTINATION_IP_FIELD_NAME, SOURCE_IP_FIELD_NAME } from '../ip'; -import { DESTINATION_PORT_FIELD_NAME, SOURCE_PORT_FIELD_NAME } from '../port'; +import { DESTINATION_PORT_FIELD_NAME, SOURCE_PORT_FIELD_NAME } from '../port/helpers'; import * as i18n from '../../../timelines/components/timeline/body/renderers/translations'; import { useMountAppended } from '../../../common/utils/use_mount_appended'; diff --git a/x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_ip.tsx b/x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_ip.tsx index 31bae6880fcbe..2be1c5f50406f 100644 --- a/x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_ip.tsx +++ b/x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_ip.tsx @@ -11,7 +11,8 @@ import React from 'react'; import deepEqual from 'fast-deep-equal'; import { DESTINATION_IP_FIELD_NAME, SOURCE_IP_FIELD_NAME } from '../ip'; -import { DESTINATION_PORT_FIELD_NAME, SOURCE_PORT_FIELD_NAME, Port } from '../port'; +import { Port } from '../port'; +import { DESTINATION_PORT_FIELD_NAME, SOURCE_PORT_FIELD_NAME } from '../port/helpers'; import * as i18n from '../../../timelines/components/timeline/body/renderers/translations'; import { GeoFields } from './geo_fields'; diff --git a/x-pack/plugins/security_solution/public/network/components/tls_table/index.test.tsx b/x-pack/plugins/security_solution/public/network/components/tls_table/index.test.tsx index 8f2c7a098a045..3a1a5efef6b89 100644 --- a/x-pack/plugins/security_solution/public/network/components/tls_table/index.test.tsx +++ b/x-pack/plugins/security_solution/public/network/components/tls_table/index.test.tsx @@ -77,7 +77,7 @@ describe('Tls Table Component', () => { /> ); - expect(store.getState().network.details.queries!.tls.sort).toEqual({ + expect(store.getState().network.details.queries?.tls.sort).toEqual({ direction: 'desc', field: '_id', }); @@ -86,7 +86,7 @@ describe('Tls Table Component', () => { wrapper.update(); - expect(store.getState().network.details.queries!.tls.sort).toEqual({ + expect(store.getState().network.details.queries?.tls.sort).toEqual({ direction: 'asc', field: '_id', }); diff --git a/x-pack/plugins/security_solution/public/network/components/users_table/index.test.tsx b/x-pack/plugins/security_solution/public/network/components/users_table/index.test.tsx index 69027ad9bd9f8..3861433b4dcb0 100644 --- a/x-pack/plugins/security_solution/public/network/components/users_table/index.test.tsx +++ b/x-pack/plugins/security_solution/public/network/components/users_table/index.test.tsx @@ -81,7 +81,7 @@ describe('Users Table Component', () => { /> ); - expect(store.getState().network.details.queries!.users.sort).toEqual({ + expect(store.getState().network.details.queries?.users.sort).toEqual({ direction: 'asc', field: 'name', }); @@ -90,7 +90,7 @@ describe('Users Table Component', () => { wrapper.update(); - expect(store.getState().network.details.queries!.users.sort).toEqual({ + expect(store.getState().network.details.queries?.users.sort).toEqual({ direction: 'desc', field: 'name', }); diff --git a/x-pack/plugins/security_solution/public/overview/components/events_by_dataset/index.tsx b/x-pack/plugins/security_solution/public/overview/components/events_by_dataset/index.tsx index 5cea3fa98eeb7..7de1d9d9f40c1 100644 --- a/x-pack/plugins/security_solution/public/overview/components/events_by_dataset/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/events_by_dataset/index.tsx @@ -49,8 +49,10 @@ interface Props extends Pick void; @@ -70,9 +72,11 @@ const EventsByDatasetComponent: React.FC = ({ indexPattern, indexNames, onlyField, + paddingSize, query, setAbsoluteRangeDatePickerTarget, setQuery, + showLegend, showSpacer = true, timelineId, to, @@ -177,9 +181,11 @@ const EventsByDatasetComponent: React.FC = ({ id={uniqueQueryId} indexNames={indexNames} onError={toggleTopN} + paddingSize={paddingSize} setAbsoluteRangeDatePickerTarget={setAbsoluteRangeDatePickerTarget} setQuery={setQuery} showSpacer={showSpacer} + showLegend={showLegend} skip={filterQuery === undefined} startDate={from} timelineId={timelineId} diff --git a/x-pack/plugins/security_solution/public/overview/components/signals_by_category/index.tsx b/x-pack/plugins/security_solution/public/overview/components/signals_by_category/index.tsx index 76116f2261118..321e6d00b5301 100644 --- a/x-pack/plugins/security_solution/public/overview/components/signals_by_category/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/signals_by_category/index.tsx @@ -23,8 +23,10 @@ interface Props { headerChildren?: React.ReactNode; /** Override all defaults, and only display this field */ onlyField?: AlertsStackByField; + paddingSize?: 's' | 'm' | 'l' | 'none'; query?: Query; setAbsoluteRangeDatePickerTarget?: InputsModelId; + showLegend?: boolean; timelineId?: string; } @@ -33,7 +35,9 @@ const SignalsByCategoryComponent: React.FC = ({ filters, headerChildren, onlyField, + paddingSize, query, + showLegend, setAbsoluteRangeDatePickerTarget = 'global', timelineId, }) => { @@ -61,16 +65,18 @@ const SignalsByCategoryComponent: React.FC = ({ combinedQueries={combinedQueries} filters={filters} headerChildren={headerChildren} + legendPosition={'right'} onlyField={onlyField} - titleSize={onlyField == null ? 'm' : 's'} + paddingSize={paddingSize} query={query} - signalIndexName={signalIndexName} - showTotalAlertsCount={true} + showLegend={showLegend} showLinkToAlerts={onlyField == null ? true : false} showStackBy={onlyField == null} - legendPosition={'right'} + showTotalAlertsCount={true} + signalIndexName={signalIndexName} timelineId={timelineId} title={i18n.ALERT_COUNT} + titleSize={onlyField == null ? 'm' : 's'} updateDateRange={updateDateRangeCallback} /> ); diff --git a/x-pack/plugins/security_solution/public/plugin.tsx b/x-pack/plugins/security_solution/public/plugin.tsx index fe746d2e8e8d8..371b68e9bec8e 100644 --- a/x-pack/plugins/security_solution/public/plugin.tsx +++ b/x-pack/plugins/security_solution/public/plugin.tsx @@ -293,7 +293,7 @@ export class Plugin implements IPlugin node.id === originID)! ); const relatedEvents = [ diff --git a/x-pack/plugins/security_solution/public/resolver/models/indexed_process_tree/index.ts b/x-pack/plugins/security_solution/public/resolver/models/indexed_process_tree/index.ts index 3a8bf76e732a9..6dfeaa9723a33 100644 --- a/x-pack/plugins/security_solution/public/resolver/models/indexed_process_tree/index.ts +++ b/x-pack/plugins/security_solution/public/resolver/models/indexed_process_tree/index.ts @@ -162,6 +162,7 @@ export function root(tree: IndexedProcessTree) { // iteratively swap current w/ its parent while (parent(tree, current) !== undefined) { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion current = parent(tree, current)!; } return current; diff --git a/x-pack/plugins/security_solution/public/resolver/store/selectors.test.ts b/x-pack/plugins/security_solution/public/resolver/store/selectors.test.ts index 110ea476f5fb2..26cf874edda00 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/selectors.test.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/selectors.test.ts @@ -145,7 +145,7 @@ describe('resolver selectors', () => { }); }); it('the origin should be in view', () => { - const origin = selectors.graphNodeForID(state())(originID)!; + const origin = selectors.graphNodeForID(state())(originID); expect( selectors .visibleNodesAndEdgeLines(state())(0) @@ -153,7 +153,7 @@ describe('resolver selectors', () => { ).toBe(true); }); it('the first child should be in view', () => { - const firstChild = selectors.graphNodeForID(state())(firstChildID)!; + const firstChild = selectors.graphNodeForID(state())(firstChildID); expect( selectors .visibleNodesAndEdgeLines(state())(0) @@ -161,7 +161,7 @@ describe('resolver selectors', () => { ).toBe(true); }); it('the second child should not be in view', () => { - const secondChild = selectors.graphNodeForID(state())(secondChildID)!; + const secondChild = selectors.graphNodeForID(state())(secondChildID); expect( selectors .visibleNodesAndEdgeLines(state())(0) diff --git a/x-pack/plugins/security_solution/public/resolver/test_utilities/extend_jest.ts b/x-pack/plugins/security_solution/public/resolver/test_utilities/extend_jest.ts index 145e54dbbb7b2..7bb7180712c99 100644 --- a/x-pack/plugins/security_solution/public/resolver/test_utilities/extend_jest.ts +++ b/x-pack/plugins/security_solution/public/resolver/test_utilities/extend_jest.ts @@ -67,7 +67,7 @@ expect.extend({ ? () => `${this.utils.matcherHint(matcherName, undefined, undefined, options)}\n\n` + `Expected: not ${this.utils.printExpected(expected)}\n${ - this.utils.stringify(expected) !== this.utils.stringify(received[received.length - 1]!) + this.utils.stringify(expected) !== this.utils.stringify(received[received.length - 1]) ? `Received: ${this.utils.printReceived(received[received.length - 1])}` : '' }` @@ -131,7 +131,7 @@ expect.extend({ ? () => `${this.utils.matcherHint(matcherName, undefined, undefined, options)}\n\n` + `Expected: not ${this.utils.printExpected(expected)}\n${ - this.utils.stringify(expected) !== this.utils.stringify(received[received.length - 1]!) + this.utils.stringify(expected) !== this.utils.stringify(received[received.length - 1]) ? `Received: ${this.utils.printReceived(received[received.length - 1])}` : '' }` diff --git a/x-pack/plugins/security_solution/public/resolver/view/graph_controls.test.tsx b/x-pack/plugins/security_solution/public/resolver/view/graph_controls.test.tsx index 1a7477af3b3cf..6a146882fbab5 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/graph_controls.test.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/graph_controls.test.tsx @@ -104,7 +104,7 @@ describe('graph controls: when relsover is loaded with an origin node', () => { describe('when the user clicks the west panning button', () => { beforeEach(async () => { - (await simulator.resolve('resolver:graph-controls:west-button'))!.simulate('click'); + (await simulator.resolve('resolver:graph-controls:west-button'))?.simulate('click'); simulator.runAnimationFramesTimeFromNow(nudgeAnimationDuration); }); @@ -118,7 +118,7 @@ describe('graph controls: when relsover is loaded with an origin node', () => { describe('when the user clicks the south panning button', () => { beforeEach(async () => { - (await simulator.resolve('resolver:graph-controls:south-button'))!.simulate('click'); + (await simulator.resolve('resolver:graph-controls:south-button'))?.simulate('click'); simulator.runAnimationFramesTimeFromNow(nudgeAnimationDuration); }); @@ -132,7 +132,7 @@ describe('graph controls: when relsover is loaded with an origin node', () => { describe('when the user clicks the east panning button', () => { beforeEach(async () => { - (await simulator.resolve('resolver:graph-controls:east-button'))!.simulate('click'); + (await simulator.resolve('resolver:graph-controls:east-button'))?.simulate('click'); simulator.runAnimationFramesTimeFromNow(nudgeAnimationDuration); }); @@ -146,7 +146,7 @@ describe('graph controls: when relsover is loaded with an origin node', () => { describe('when the user clicks the north panning button', () => { beforeEach(async () => { - (await simulator.resolve('resolver:graph-controls:north-button'))!.simulate('click'); + (await simulator.resolve('resolver:graph-controls:north-button'))?.simulate('click'); simulator.runAnimationFramesTimeFromNow(nudgeAnimationDuration); }); @@ -160,9 +160,9 @@ describe('graph controls: when relsover is loaded with an origin node', () => { describe('when the user clicks the center panning button', () => { beforeEach(async () => { - (await simulator.resolve('resolver:graph-controls:north-button'))!.simulate('click'); + (await simulator.resolve('resolver:graph-controls:north-button'))?.simulate('click'); simulator.runAnimationFramesTimeFromNow(nudgeAnimationDuration); - (await simulator.resolve('resolver:graph-controls:center-button'))!.simulate('click'); + (await simulator.resolve('resolver:graph-controls:center-button'))?.simulate('click'); simulator.runAnimationFramesTimeFromNow(nudgeAnimationDuration); }); @@ -177,7 +177,7 @@ describe('graph controls: when relsover is loaded with an origin node', () => { describe('when the zoom in button is clicked', () => { beforeEach(async () => { - (await simulator.resolve('resolver:graph-controls:zoom-in'))!.simulate('click'); + (await simulator.resolve('resolver:graph-controls:zoom-in'))?.simulate('click'); simulator.runAnimationFramesTimeFromNow(nudgeAnimationDuration); }); @@ -191,7 +191,7 @@ describe('graph controls: when relsover is loaded with an origin node', () => { describe('when the zoom out button is clicked', () => { beforeEach(async () => { - (await simulator.resolve('resolver:graph-controls:zoom-out'))!.simulate('click'); + (await simulator.resolve('resolver:graph-controls:zoom-out'))?.simulate('click'); simulator.runAnimationFramesTimeFromNow(nudgeAnimationDuration); }); @@ -207,7 +207,7 @@ describe('graph controls: when relsover is loaded with an origin node', () => { beforeEach(async () => { await expect(originNodeStyle()).toYieldObjectEqualTo(originalSizeStyle); - (await simulator.resolve('resolver:graph-controls:zoom-slider'))!.simulate('change', { + (await simulator.resolve('resolver:graph-controls:zoom-slider'))?.simulate('change', { target: { value: 0.8 }, }); simulator.runAnimationFramesTimeFromNow(nudgeAnimationDuration); @@ -223,7 +223,7 @@ describe('graph controls: when relsover is loaded with an origin node', () => { describe('when the slider is moved downwards', () => { beforeEach(async () => { - (await simulator.resolve('resolver:graph-controls:zoom-slider'))!.simulate('change', { + (await simulator.resolve('resolver:graph-controls:zoom-slider'))?.simulate('change', { target: { value: 0.2 }, }); simulator.runAnimationFramesTimeFromNow(nudgeAnimationDuration); @@ -239,7 +239,7 @@ describe('graph controls: when relsover is loaded with an origin node', () => { describe('when the schema information button is clicked', () => { beforeEach(async () => { - (await simulator.resolve('resolver:graph-controls:schema-info-button'))!.simulate('click', { + (await simulator.resolve('resolver:graph-controls:schema-info-button'))?.simulate('click', { button: 0, }); }); @@ -257,7 +257,7 @@ describe('graph controls: when relsover is loaded with an origin node', () => { describe('when the node legend button is clicked', () => { beforeEach(async () => { - (await simulator.resolve('resolver:graph-controls:node-legend-button'))!.simulate('click', { + (await simulator.resolve('resolver:graph-controls:node-legend-button'))?.simulate('click', { button: 0, }); }); @@ -275,7 +275,7 @@ describe('graph controls: when relsover is loaded with an origin node', () => { describe('when the node legend button is clicked while the schema info button is open', () => { beforeEach(async () => { - (await simulator.resolve('resolver:graph-controls:schema-info-button'))!.simulate('click', { + (await simulator.resolve('resolver:graph-controls:schema-info-button'))?.simulate('click', { button: 0, }); }); @@ -284,8 +284,8 @@ describe('graph controls: when relsover is loaded with an origin node', () => { expect(simulator.testSubject('resolver:graph-controls:schema-info').length).toBe(1); await simulator - .testSubject('resolver:graph-controls:node-legend-button')! - .simulate('click', { button: 0 }); + .testSubject('resolver:graph-controls:node-legend-button') + ?.simulate('click', { button: 0 }); await expect( simulator.map(() => ({ diff --git a/x-pack/plugins/security_solution/public/resolver/view/panel.test.tsx b/x-pack/plugins/security_solution/public/resolver/view/panel.test.tsx index 3b2d222ac3812..72db334e17c2c 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/panel.test.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/panel.test.tsx @@ -150,13 +150,13 @@ describe(`Resolver: when analyzing a tree with no ancestors and two children and .filterWhere(Simulator.isDOM); expect(copyableFieldHoverArea).toHaveLength(1); - copyableFieldHoverArea!.simulate('mouseenter'); + copyableFieldHoverArea?.simulate('mouseenter'); }); describe('and when they click the copy-to-clipboard button', () => { beforeEach(async () => { const copyButton = await simulator().resolve('resolver:panel:clipboard'); expect(copyButton).toHaveLength(1); - copyButton!.simulate('click'); + copyButton?.simulate('click'); simulator().confirmTextWrittenToClipboard(); }); it(`should write ${value} to the clipboard`, async () => { @@ -232,11 +232,11 @@ describe(`Resolver: when analyzing a tree with no ancestors and two children and .filterWhere(Simulator.isDOM) ); }); - cExtHoverArea!.simulate('mouseenter'); + cExtHoverArea?.simulate('mouseenter'); }); describe('and when the user clicks the copy-to-clipboard button', () => { beforeEach(async () => { - (await simulator().resolve('resolver:panel:clipboard'))!.simulate('click'); + (await simulator().resolve('resolver:panel:clipboard'))?.simulate('click'); simulator().confirmTextWrittenToClipboard(); }); const expected = 'Sep 23, 2020 @ 08:25:32.316'; @@ -369,7 +369,7 @@ describe(`Resolver: when analyzing a tree with no ancestors and two children and beforeEach(async () => { const button = await simulator().resolve('resolver:panel:clipboard'); expect(button).toBeTruthy(); - button!.simulate('click'); + button?.simulate('click'); simulator().confirmTextWrittenToClipboard(); }); it(`should write ${expectedValue} to the clipboard`, async () => { diff --git a/x-pack/plugins/security_solution/public/resolver/view/side_effect_simulator_factory.ts b/x-pack/plugins/security_solution/public/resolver/view/side_effect_simulator_factory.ts index 8c3caf16eadd7..b3289a510deef 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/side_effect_simulator_factory.ts +++ b/x-pack/plugins/security_solution/public/resolver/view/side_effect_simulator_factory.ts @@ -41,6 +41,7 @@ export const sideEffectSimulatorFactory: () => SideEffectSimulator = () => { */ const getBoundingClientRect: (target: Element) => DOMRect = (target) => { if (contentRects.has(target)) { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion return contentRects.get(target)!; } const domRect: DOMRect = { diff --git a/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.test.tsx index 9851f11d9adba..e76e2800908c2 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.test.tsx @@ -70,7 +70,7 @@ describe('Field Renderers', () => { describe('#dateRenderer', () => { test('it renders correctly against snapshot', () => { - const wrapper = shallow(dateRenderer(mockData.complete.source!.firstSeen)); + const wrapper = shallow(dateRenderer(mockData.complete.source?.firstSeen)); expect(wrapper).toMatchSnapshot(); }); @@ -307,7 +307,7 @@ describe('Field Renderers', () => { ); expect( - wrapper.find('[data-test-subj="more-container"]').first().props().style!.overflow + wrapper.find('[data-test-subj="more-container"]').first().props().style?.overflow ).toEqual('auto'); }); @@ -322,7 +322,7 @@ describe('Field Renderers', () => { ); expect( - wrapper.find('[data-test-subj="more-container"]').first().props().style!.maxHeight + wrapper.find('[data-test-subj="more-container"]').first().props().style?.maxHeight ).toEqual(DEFAULT_MORE_MAX_HEIGHT); }); diff --git a/x-pack/plugins/security_solution/public/timelines/components/flyout/header/active_timelines.tsx b/x-pack/plugins/security_solution/public/timelines/components/flyout/header/active_timelines.tsx index 4eb91ca8ee272..639bc1ac6b57f 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/flyout/header/active_timelines.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/flyout/header/active_timelines.tsx @@ -77,6 +77,7 @@ const ActiveTimelinesComponent: React.FC = ({ diff --git a/x-pack/plugins/security_solution/public/timelines/components/flyout/header/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/flyout/header/index.tsx index 9f1730c367a81..1fdfb744f3071 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/flyout/header/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/flyout/header/index.tsx @@ -113,6 +113,7 @@ const FlyoutHeaderPanelComponent: React.FC = ({ timeline [dataProviders, kqlQuery] ); const getKqlQueryTimeline = useMemo(() => timelineSelectors.getKqlFilterQuerySelector(), []); + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const kqlQueryTimeline = useSelector((state: State) => getKqlQueryTimeline(state, timelineId)!); const kqlQueryExpression = @@ -333,6 +334,7 @@ const TimelineStatusInfoComponent: React.FC = ({ timelineId } @@ -372,6 +374,7 @@ const FlyoutHeaderComponent: React.FC = ({ timelineId }) => { ); const { dataProviders, filters, timelineType, kqlMode, activeTab } = timeline; const getKqlQueryTimeline = useMemo(() => timelineSelectors.getKqlFilterQuerySelector(), []); + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const kqlQueryTimeline = useSelector((state: State) => getKqlQueryTimeline(state, timelineId)!); const kqlQueryExpression = diff --git a/x-pack/plugins/security_solution/public/timelines/components/formatted_ip/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/formatted_ip/index.tsx index 913a0f7ed200b..e1f0954683e04 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/formatted_ip/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/formatted_ip/index.tsx @@ -10,6 +10,7 @@ import React, { useCallback, useMemo, useContext } from 'react'; import { useDispatch } from 'react-redux'; import deepEqual from 'fast-deep-equal'; +import { EuiButtonEmpty, EuiButtonIcon } from '@elastic/eui'; import { FlowTarget } from '../../../../common/search_strategy/security_solution/network'; import { DragEffects, @@ -145,11 +146,15 @@ interface AddressLinksItemProps extends Omit { const AddressLinksItemComponent: React.FC = ({ address, + Component, contextId, eventId, fieldName, + isButton, isDraggable, + onClick, truncate, + title, }) => { const key = `address-links-draggable-wrapper-${getUniqueId({ contextId, @@ -171,6 +176,10 @@ const AddressLinksItemComponent: React.FC = ({ const openNetworkDetailsSidePanel = useCallback( (e) => { e.preventDefault(); + if (onClick) { + onClick(); + } + if (eventContext && isInTimelineContext) { const { tabType, timelineID } = eventContext; const updatedExpandedDetail: TimelineExpandedDetailType = { @@ -196,22 +205,41 @@ const AddressLinksItemComponent: React.FC = ({ } } }, - [eventContext, isInTimelineContext, address, fieldName, dispatch] + [onClick, eventContext, isInTimelineContext, address, fieldName, dispatch] ); // The below is explicitly defined this way as the onClick takes precedence when it and the href are both defined // When this component is used outside of timeline/alerts table (i.e. in the flyout) we would still like it to link to the IP Overview page const content = useMemo( - () => ( - + () => + Component ? ( - - ), - [address, fieldName, isInTimelineContext, openNetworkDetailsSidePanel] + ) : ( + + + + ), + [ + Component, + address, + fieldName, + isButton, + isInTimelineContext, + openNetworkDetailsSidePanel, + title, + ] ); const render = useCallback( @@ -245,20 +273,28 @@ const AddressLinksItem = React.memo(AddressLinksItemComponent); interface AddressLinksProps { addresses: string[]; + Component?: typeof EuiButtonEmpty | typeof EuiButtonIcon; contextId: string; eventId: string; fieldName: string; + isButton?: boolean; isDraggable: boolean; + onClick?: () => void; truncate?: boolean; + title?: string; } const AddressLinksComponent: React.FC = ({ addresses, + Component, contextId, eventId, fieldName, + isButton, isDraggable, + onClick, truncate, + title, }) => { const uniqAddresses = useMemo(() => uniq(addresses), [addresses]); @@ -268,14 +304,29 @@ const AddressLinksComponent: React.FC = ({ )), - [contextId, eventId, fieldName, isDraggable, truncate, uniqAddresses] + [ + Component, + contextId, + eventId, + fieldName, + isButton, + isDraggable, + onClick, + title, + truncate, + uniqAddresses, + ] ); return <>{content}; @@ -293,13 +344,28 @@ const AddressLinks = React.memo( ); const FormattedIpComponent: React.FC<{ + Component?: typeof EuiButtonEmpty | typeof EuiButtonIcon; contextId: string; eventId: string; fieldName: string; + isButton?: boolean; isDraggable: boolean; + onClick?: () => void; + title?: string; truncate?: boolean; value: string | object | null | undefined; -}> = ({ contextId, eventId, fieldName, isDraggable, truncate, value }) => { +}> = ({ + Component, + contextId, + eventId, + fieldName, + isDraggable, + isButton, + onClick, + title, + truncate, + value, +}) => { if (isString(value) && !isEmpty(value)) { try { const addresses = JSON.parse(value); @@ -307,10 +373,14 @@ const FormattedIpComponent: React.FC<{ return ( ); @@ -323,11 +393,15 @@ const FormattedIpComponent: React.FC<{ return ( ); } else { diff --git a/x-pack/plugins/security_solution/public/timelines/components/netflow/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/netflow/index.test.tsx index 5392b382d6c82..23a52b878472f 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/netflow/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/netflow/index.test.tsx @@ -25,7 +25,7 @@ import { JA3_HASH_FIELD_NAME } from '../ja3_fingerprint'; import { DESTINATION_PORT_FIELD_NAME, SOURCE_PORT_FIELD_NAME, -} from '../../../network/components/port'; +} from '../../../network/components/port/helpers'; import { DESTINATION_GEO_CITY_NAME_FIELD_NAME, DESTINATION_GEO_CONTINENT_NAME_FIELD_NAME, diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/helpers.ts b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/helpers.ts index 2a3b49517b456..1fbddf61f8cd3 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/helpers.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/helpers.ts @@ -205,9 +205,11 @@ const convertToDefaultField = ({ and, ...dataProvider }: DataProviderResult) => if (dataProvider.type === DataProviderType.template) { return deepMerge(dataProvider, { type: DataProviderType.default, + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion enabled: dataProvider.queryMatch!.operator !== IS_OPERATOR, queryMatch: { value: + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion dataProvider.queryMatch!.operator === IS_OPERATOR ? '' : dataProvider.queryMatch!.value, }, }); diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/index.test.tsx index d59b75fcfb506..f3ec55ea0ddef 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/index.test.tsx @@ -318,7 +318,7 @@ describe('StatefulOpenTimeline', () => { await waitFor(() => { expect( wrapper.find(`.${OPEN_TIMELINE_CLASS_NAME} input`).first().getDOMNode().id === - document.activeElement!.id + document.activeElement?.id ).toBe(true); }); }); diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/note_previews/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/note_previews/index.test.tsx index 1cca5a3999b81..607bccdbc039d 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/note_previews/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/note_previews/index.test.tsx @@ -44,7 +44,7 @@ describe('NotePreviews', () => { const wrapper = mountWithIntl(); - hasNotes[0].notes!.forEach(({ savedObjectId }) => { + hasNotes[0].notes?.forEach(({ savedObjectId }) => { expect(wrapper.find(`[data-test-subj="note-preview-${savedObjectId}"]`).exists()).toBe(true); }); }); @@ -54,7 +54,7 @@ describe('NotePreviews', () => { const wrapper = mountWithIntl(); - hasNotes[0].notes!.forEach(({ savedObjectId }) => { + hasNotes[0].notes?.forEach(({ savedObjectId }) => { expect(wrapper.find(`[data-test-subj="note-preview-${savedObjectId}"]`).exists()).toBe(true); }); }); diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/actions_columns.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/actions_columns.tsx index b3cd5eedd19c3..a7953d60ba767 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/actions_columns.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/actions_columns.tsx @@ -40,6 +40,7 @@ export const getActionsColumns = ({ onOpenTimeline({ duplicate: true, timelineType: TimelineType.default, + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion timelineId: savedObjectId!, }); }, @@ -58,6 +59,7 @@ export const getActionsColumns = ({ onOpenTimeline({ duplicate: true, timelineType: TimelineType.template, + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion timelineId: savedObjectId!, }); }, diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/expandable_event.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/expandable_event.tsx index 53382fe8fa21d..17d43d80a5a9a 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/expandable_event.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/expandable_event.tsx @@ -108,7 +108,7 @@ export const ExpandableEvent = React.memo( ( {':'} - + {header.type}

diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/stateful_event.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/stateful_event.tsx index a7c989bfab64e..1473de5472b3e 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/stateful_event.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/stateful_event.tsx @@ -187,6 +187,7 @@ const StatefulEventComponent: React.FC = ({ const handleOnEventDetailPanelOpened = useCallback(() => { const eventId = event._id; + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const indexName = event._index!; const updatedExpandedDetail: TimelineExpandedDetailType = { diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/index.tsx index fc8bf2086471c..3ee0ef8804e89 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/index.tsx @@ -111,7 +111,7 @@ export const BodyComponent = React.memo( const onRowSelected: OnRowSelected = useCallback( ({ eventIds, isSelected }: { eventIds: string[]; isSelected: boolean }) => { - setSelected!({ + setSelected({ id, eventIds: getEventIdToDataMapping(data, eventIds, queryFields), isSelected, @@ -125,7 +125,7 @@ export const BodyComponent = React.memo( const onSelectAll: OnSelectAll = useCallback( ({ isSelected }: { isSelected: boolean }) => isSelected - ? setSelected!({ + ? setSelected({ id, eventIds: getEventIdToDataMapping( data, @@ -135,7 +135,7 @@ export const BodyComponent = React.memo( isSelected, isSelectAllChecked: isSelected, }) - : clearSelected!({ id }), + : clearSelected({ id }), [setSelected, clearSelected, id, data, queryFields] ); diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/column_renderer.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/column_renderer.ts index 1e6f613999ece..0ec974f876894 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/column_renderer.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/column_renderer.ts @@ -6,33 +6,44 @@ */ import type React from 'react'; +import { Filter } from '../../../../../../../../../src/plugins/data/public'; +import { BrowserFields } from '../../../../../../../timelines/common/search_strategy'; -import { BrowserFields, ColumnHeaderOptions, RowRenderer } from '../../../../../../common'; +import { ColumnHeaderOptions, RowRenderer } from '../../../../../../common'; import { Ecs } from '../../../../../../common/ecs'; import { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; export interface ColumnRenderer { isInstance: (columnName: string, data: TimelineNonEcsData[]) => boolean; renderColumn: ({ + browserFields, + className, columnName, eventId, field, + globalFilters, + isDetails, isDraggable, + linkValues, + rowRenderers, timelineId, truncate, values, - linkValues, }: { + asPlainText?: boolean; + browserFields?: BrowserFields; + className?: string; columnName: string; + ecsData?: Ecs; eventId: string; field: ColumnHeaderOptions; + globalFilters?: Filter[]; + isDetails?: boolean; isDraggable?: boolean; + linkValues?: string[] | null | undefined; + rowRenderers?: RowRenderer[]; timelineId: string; truncate?: boolean; values: string[] | null | undefined; - linkValues?: string[] | null | undefined; - ecsData?: Ecs; - rowRenderers?: RowRenderer[]; - browserFields?: BrowserFields; }) => React.ReactNode; } diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.tsx index 5eec4ef66f39c..63e7e164854df 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.tsx @@ -7,7 +7,7 @@ /* eslint-disable complexity */ -import { EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/eui'; +import { EuiButtonEmpty, EuiButtonIcon, EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/eui'; import { isNumber, isEmpty } from 'lodash/fp'; import React from 'react'; @@ -19,7 +19,8 @@ import { getOrEmptyTagFromValue } from '../../../../../common/components/empty_v import { FormattedDate } from '../../../../../common/components/formatted_date'; import { FormattedIp } from '../../../../components/formatted_ip'; -import { Port, PORT_NAMES } from '../../../../../network/components/port'; +import { Port } from '../../../../../network/components/port'; +import { PORT_NAMES } from '../../../../../network/components/port/helpers'; import { TruncatableText } from '../../../../../common/components/truncatable_text'; import { DATE_FIELD_TYPE, @@ -44,44 +45,60 @@ import { AgentStatuses } from './agent_statuses'; const columnNamesNotDraggable = [MESSAGE_FIELD_NAME]; const FormattedFieldValueComponent: React.FC<{ + asPlainText?: boolean; + /** `Component` is only used with `EuiDataGrid`; the grid keeps a reference to `Component` for show / hide functionality */ + Component?: typeof EuiButtonEmpty | typeof EuiButtonIcon; contextId: string; eventId: string; isObjectArray?: boolean; fieldFormat?: string; fieldName: string; fieldType?: string; + isButton?: boolean; isDraggable?: boolean; + onClick?: () => void; + title?: string; truncate?: boolean; value: string | number | undefined | null; linkValue?: string | null | undefined; }> = ({ + asPlainText, + Component, contextId, eventId, fieldFormat, fieldName, fieldType, + isButton, isObjectArray = false, isDraggable = true, - truncate, + onClick, + title, + truncate = true, value, linkValue, }) => { - if (isObjectArray) { - return <>{value}; + if (isObjectArray || asPlainText) { + return {value}; } else if (fieldType === IP_FIELD_TYPE) { return ( ); } else if (fieldType === GEO_FIELD_TYPE) { return <>{value}; } else if (fieldType === DATE_FIELD_TYPE) { + const classNames = truncate ? 'eui-textTruncate eui-alignMiddle' : undefined; return isDraggable ? ( - + ) : ( - + ); } else if (PORT_NAMES.some((portName) => fieldName === portName)) { return ( ); @@ -118,10 +137,14 @@ const FormattedFieldValueComponent: React.FC<{ } else if (fieldName === HOST_NAME_FIELD_NAME) { return ( ); @@ -138,11 +161,13 @@ const FormattedFieldValueComponent: React.FC<{ } else if (fieldName === SIGNAL_RULE_NAME_FIELD_NAME) { return ( @@ -185,7 +210,17 @@ const FormattedFieldValueComponent: React.FC<{ INDICATOR_REFERENCE, ].includes(fieldName) ) { - return renderUrl({ contextId, eventId, fieldName, linkValue, isDraggable, truncate, value }); + return renderUrl({ + contextId, + Component, + eventId, + fieldName, + linkValue, + isDraggable, + truncate, + title, + value, + }); } else if (columnNamesNotDraggable.includes(fieldName) || !isDraggable) { return truncate && !isEmpty(value) ? ( diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field_helpers.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field_helpers.tsx index 3343882e0071a..cda196fd79634 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field_helpers.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field_helpers.tsx @@ -5,9 +5,17 @@ * 2.0. */ -import { EuiLink, EuiFlexGroup, EuiFlexItem, EuiIcon, EuiToolTip } from '@elastic/eui'; +import { + EuiButtonEmpty, + EuiButtonIcon, + EuiLink, + EuiFlexGroup, + EuiFlexItem, + EuiIcon, + EuiToolTip, +} from '@elastic/eui'; import { isString, isEmpty } from 'lodash/fp'; -import React, { useCallback } from 'react'; +import React, { SyntheticEvent, useCallback, useMemo } from 'react'; import styled from 'styled-components'; import { DefaultDraggable } from '../../../../../common/components/draggables'; @@ -30,22 +38,26 @@ const EventModuleFlexItem = styled(EuiFlexItem)` `; interface RenderRuleNameProps { + Component?: typeof EuiButtonEmpty | typeof EuiButtonIcon; contextId: string; eventId: string; fieldName: string; isDraggable: boolean; linkValue: string | null | undefined; truncate?: boolean; + title?: string; value: string | number | null | undefined; } export const RenderRuleName: React.FC = ({ + Component, contextId, eventId, fieldName, isDraggable, linkValue, truncate, + title, value, }) => { const ruleName = `${value}`; @@ -69,15 +81,29 @@ export const RenderRuleName: React.FC = ({ [navigateToApp, ruleId, search] ); + const href = useMemo( + () => + getUrlForApp(APP_ID, { + deepLinkId: SecurityPageName.rules, + path: getRuleDetailsUrl(ruleId ?? '', search), + }), + [getUrlForApp, ruleId, search] + ); + const id = `event-details-value-default-draggable-${contextId}-${eventId}-${fieldName}-${value}-${ruleId}`; + if (isString(value) && ruleName.length > 0 && ruleId != null) { - const link = ( - + {title ?? value} + + ) : ( + {content} ); @@ -85,7 +111,7 @@ export const RenderRuleName: React.FC = ({ return isDraggable ? ( = ({ return isDraggable ? ( void; + title?: string; + iconType?: string; +}> = ({ children, Component, dataTestSubj, href, onClick, title, iconType = 'link' }) => { + return Component ? ( + + {title ?? children} + + ) : ( + + {title ?? children} + + ); +}; + +const GenericLink = React.memo(GenericLinkComponent); + export const renderUrl = ({ contextId, + Component, eventId, fieldName, isDraggable, linkValue, truncate, + title, value, }: { contextId: string; + /** `Component` is only used with `EuiDataGrid`; the grid keeps a reference to `Component` for show / hide functionality */ + Component?: typeof EuiButtonEmpty | typeof EuiButtonIcon; eventId: string; fieldName: string; isDraggable: boolean; linkValue: string | null | undefined; truncate?: boolean; + title?: string; value: string | number | null | undefined; }) => { const urlName = `${value}`; + const isUrlValid = !isUrlInvalid(urlName); const formattedValue = truncate ? {value} : value; - const content = ( - <> - {!isUrlInvalid(urlName) && ( - - {formattedValue} - - )} - {isUrlInvalid(urlName) && <>{formattedValue}} - + const content = isUrlValid ? ( + + ) : ( + <>{formattedValue} ); return isString(value) && urlName.length > 0 ? ( diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/host_name.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/host_name.tsx index c183d71212540..5864e144a681e 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/host_name.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/host_name.tsx @@ -6,6 +6,7 @@ */ import React, { useCallback, useContext, useMemo } from 'react'; +import { EuiButtonEmpty, EuiButtonIcon } from '@elastic/eui'; import { useDispatch } from 'react-redux'; import { isString } from 'lodash/fp'; import { HostDetailsLink } from '../../../../../common/components/links'; @@ -23,17 +24,25 @@ import { StatefulEventContext } from '../../../../../../../timelines/public'; interface Props { contextId: string; + Component?: typeof EuiButtonEmpty | typeof EuiButtonIcon; eventId: string; fieldName: string; isDraggable: boolean; + isButton?: boolean; + onClick?: () => void; value: string | number | undefined | null; + title?: string; } const HostNameComponent: React.FC = ({ fieldName, + Component, contextId, eventId, isDraggable, + isButton, + onClick, + title, value, }) => { const dispatch = useDispatch(); @@ -44,6 +53,10 @@ const HostNameComponent: React.FC = ({ const openHostDetailsSidePanel = useCallback( (e) => { e.preventDefault(); + + if (onClick) { + onClick(); + } if (eventContext && isInTimelineContext) { const { timelineID, tabType } = eventContext; const updatedExpandedDetail: TimelineExpandedDetailType = { @@ -66,7 +79,7 @@ const HostNameComponent: React.FC = ({ } } }, - [dispatch, eventContext, isInTimelineContext, hostName] + [onClick, eventContext, isInTimelineContext, hostName, dispatch] ); // The below is explicitly defined this way as the onClick takes precedence when it and the href are both defined @@ -74,14 +87,16 @@ const HostNameComponent: React.FC = ({ const content = useMemo( () => ( {hostName} ), - [hostName, isInTimelineContext, openHostDetailsSidePanel] + [Component, hostName, isButton, isInTimelineContext, openHostDetailsSidePanel, title] ); return isString(value) && hostName.length > 0 ? ( diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow.tsx index d6ea939c966ac..acc88ef3ee111 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow.tsx @@ -29,7 +29,7 @@ import { import { DESTINATION_PORT_FIELD_NAME, SOURCE_PORT_FIELD_NAME, -} from '../../../../../network/components/port'; +} from '../../../../../network/components/port/helpers'; import { DESTINATION_GEO_CITY_NAME_FIELD_NAME, DESTINATION_GEO_CONTINENT_NAME_FIELD_NAME, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/netflow_row_renderer.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/netflow_row_renderer.tsx index f38304e718675..e36e347fc0cc3 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/netflow_row_renderer.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/netflow_row_renderer.tsx @@ -34,7 +34,7 @@ import { import { DESTINATION_PORT_FIELD_NAME, SOURCE_PORT_FIELD_NAME, -} from '../../../../../../network/components/port'; +} from '../../../../../../network/components/port/helpers'; import { NETWORK_BYTES_FIELD_NAME, NETWORK_COMMUNITY_ID_FIELD_NAME, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_column_renderer.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_column_renderer.tsx index 8509e7be0d22b..2f0653826d11b 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_column_renderer.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_column_renderer.tsx @@ -7,6 +7,7 @@ import { head } from 'lodash/fp'; import React from 'react'; +import { Filter } from '../../../../../../../../../src/plugins/data/public'; import { ColumnHeaderOptions } from '../../../../../../common'; import { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; @@ -21,8 +22,8 @@ export const dataExistsAtColumn = (columnName: string, data: TimelineNonEcsData[ export const plainColumnRenderer: ColumnRenderer = { isInstance: (columnName: string, data: TimelineNonEcsData[]) => dataExistsAtColumn(columnName, data), - renderColumn: ({ + asPlainText, columnName, eventId, field, @@ -32,9 +33,11 @@ export const plainColumnRenderer: ColumnRenderer = { values, linkValues, }: { + asPlainText?: boolean; columnName: string; eventId: string; field: ColumnHeaderOptions; + globalFilters?: Filter[]; isDraggable?: boolean; timelineId: string; truncate?: boolean; @@ -44,16 +47,17 @@ export const plainColumnRenderer: ColumnRenderer = { values != null ? values.map((value, i) => ( )) : getEmptyTagValue(), diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/reason_column_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/reason_column_renderer.test.tsx index 9d711b9593622..8fdd6483a14f8 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/reason_column_renderer.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/reason_column_renderer.test.tsx @@ -19,7 +19,7 @@ import { RowRenderer, RowRendererId, } from '../../../../../../common'; -import { fireEvent, render } from '@testing-library/react'; +import { render } from '@testing-library/react'; import { TestProviders } from '../../../../../../../timelines/public/mock'; import { useDraggableKeyboardWrapper as mockUseDraggableKeyboardWrapper } from '../../../../../../../timelines/public/components'; import { cloneDeep } from 'lodash'; @@ -92,9 +92,10 @@ describe('reasonColumnRenderer', () => { expect(plainColumnRenderer.renderColumn).toBeCalledTimes(1); }); - it("doesn't call `plainColumnRenderer.renderColumn` when ecsData, rowRenderers or browserFields fields are not empty", () => { + it("doesn't call `plainColumnRenderer.renderColumn` in expanded value when ecsData, rowRenderers or browserFields fields are not empty", () => { reasonColumnRenderer.renderColumn({ ...defaultProps, + isDetails: true, ecsData: invalidEcs, rowRenderers, browserFields, @@ -103,50 +104,36 @@ describe('reasonColumnRenderer', () => { expect(plainColumnRenderer.renderColumn).toBeCalledTimes(0); }); - it("doesn't render popover button when getRowRenderer doesn't find a rowRenderer", () => { - const renderedColumn = reasonColumnRenderer.renderColumn({ + it('call `plainColumnRenderer.renderColumn` in cell value', () => { + reasonColumnRenderer.renderColumn({ ...defaultProps, + isDetails: false, ecsData: invalidEcs, rowRenderers, browserFields, }); - const wrapper = render({renderedColumn}); - - expect(wrapper.queryByTestId('reason-cell-button')).not.toBeInTheDocument(); - }); - - it('render popover button when getRowRenderer finds a rowRenderer', () => { - const renderedColumn = reasonColumnRenderer.renderColumn({ - ...defaultProps, - ecsData: validEcs, - rowRenderers, - browserFields, - }); - - const wrapper = render({renderedColumn}); - - expect(wrapper.queryByTestId('reason-cell-button')).toBeInTheDocument(); + expect(plainColumnRenderer.renderColumn).toBeCalledTimes(1); }); - it('render rowRender inside a popover when reson field button is clicked', () => { + it("doesn't render reason renderers button when getRowRenderer doesn't find a rowRenderer", () => { const renderedColumn = reasonColumnRenderer.renderColumn({ ...defaultProps, - ecsData: validEcs, + isDetails: true, + ecsData: invalidEcs, rowRenderers, browserFields, }); const wrapper = render({renderedColumn}); - fireEvent.click(wrapper.getByTestId('reason-cell-button')); - - expect(wrapper.queryByTestId('test-row-render')).toBeInTheDocument(); + expect(wrapper.queryByTestId('reason-cell-button')).not.toBeInTheDocument(); }); - it('the popover always contains a class that hides it when an overlay (e.g. the inspect modal) is displayed', () => { + it('render reason renderers when getRowRenderer finds a rowRenderer', () => { const renderedColumn = reasonColumnRenderer.renderColumn({ ...defaultProps, + isDetails: true, ecsData: validEcs, rowRenderers, browserFields, @@ -154,11 +141,7 @@ describe('reasonColumnRenderer', () => { const wrapper = render({renderedColumn}); - fireEvent.click(wrapper.getByTestId('reason-cell-button')); - - expect(wrapper.getByRole('dialog')).toHaveClass( - 'euiPanel euiPanel--paddingMedium euiPanel--borderRadiusMedium euiPanel--plain euiPanel--noShadow euiPopover__panel euiPopover__panel--right withHoverActions__popover' - ); + expect(wrapper.queryByTestId('reason-cell-renderer')).toBeInTheDocument(); }); }); }); diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/reason_column_renderer.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/reason_column_renderer.tsx index 52483b4853cbc..b3f145beb886b 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/reason_column_renderer.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/reason_column_renderer.tsx @@ -5,11 +5,10 @@ * 2.0. */ -import { EuiButtonEmpty, EuiPopover, EuiPopoverTitle } from '@elastic/eui'; +import { EuiSpacer, EuiPanel } from '@elastic/eui'; import { isEqual } from 'lodash/fp'; -import React, { useCallback, useMemo, useState } from 'react'; +import React, { useMemo } from 'react'; -import styled from 'styled-components'; import { BrowserFields, ColumnHeaderOptions, RowRenderer } from '../../../../../../common'; import { Ecs } from '../../../../../../common/ecs'; import { eventRendererNames } from '../../../row_renderers_browser/catalog/constants'; @@ -23,58 +22,59 @@ export const reasonColumnRenderer: ColumnRenderer = { isInstance: isEqual(REASON_FIELD_NAME), renderColumn: ({ + browserFields, columnName, + ecsData, eventId, field, + isDetails, isDraggable = true, + linkValues, + rowRenderers = [], timelineId, truncate, values, - linkValues, - ecsData, - rowRenderers = [], - browserFields, }: { + browserFields?: BrowserFields; columnName: string; + ecsData?: Ecs; eventId: string; field: ColumnHeaderOptions; + isDetails?: boolean; isDraggable?: boolean; + linkValues?: string[] | null | undefined; + rowRenderers?: RowRenderer[]; timelineId: string; truncate?: boolean; values: string[] | undefined | null; - linkValues?: string[] | null | undefined; - - ecsData?: Ecs; - rowRenderers?: RowRenderer[]; - browserFields?: BrowserFields; - }) => - values != null && ecsData && rowRenderers?.length > 0 && browserFields - ? values.map((value, i) => ( - - )) - : plainColumnRenderer.renderColumn({ - columnName, - eventId, - field, - isDraggable, - timelineId, - truncate, - values, - linkValues, - }), + }) => { + if (isDetails && values && ecsData && rowRenderers && browserFields) { + return values.map((value, i) => ( + + )); + } else { + return plainColumnRenderer.renderColumn({ + columnName, + eventId, + field, + isDetails, + isDraggable, + linkValues, + timelineId, + truncate, + values, + }); + } + }, }; -const StyledEuiButtonEmpty = styled(EuiButtonEmpty)` - font-weight: ${(props) => props.theme.eui.euiFontWeightRegular}; -`; - const ReasonCell: React.FC<{ value: string | number | undefined | null; timelineId: string; @@ -82,8 +82,6 @@ const ReasonCell: React.FC<{ rowRenderers: RowRenderer[]; browserFields: BrowserFields; }> = ({ ecsData, rowRenderers, browserFields, timelineId, value }) => { - const [isOpen, setIsOpen] = useState(false); - const rowRenderer = useMemo(() => getRowRenderer(ecsData, rowRenderers), [ecsData, rowRenderers]); const rowRender = useMemo(() => { @@ -98,38 +96,17 @@ const ReasonCell: React.FC<{ ); }, [rowRenderer, browserFields, ecsData, timelineId]); - const handleTogglePopOver = useCallback(() => setIsOpen(!isOpen), [setIsOpen, isOpen]); - const handleClosePopOver = useCallback(() => setIsOpen(false), [setIsOpen]); - - const button = useMemo( - () => ( - - {value} - - ), - [value, handleTogglePopOver] - ); - return ( <> {rowRenderer && rowRender ? ( - - - {i18n.EVENT_RENDERER_POPOVER_TITLE(eventRendererNames[rowRenderer.id] ?? '')} - - {rowRender} - + <> + {value} +

{i18n.REASON_RENDERER_TITLE(eventRendererNames[rowRenderer.id] ?? '')}

+ + +
{rowRender}
+
+ ) : ( value )} diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_row_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_row_renderer.test.tsx index 3703d6fe441c0..61ea659964e4d 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_row_renderer.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_row_renderer.test.tsx @@ -78,7 +78,7 @@ describe('suricata_row_renderer', () => { }); test('should render a suricata row even if it does not have a suricata signature', () => { - delete suricata!.suricata!.eve!.alert!.signature; + delete suricata?.suricata?.eve?.alert?.signature; const children = suricataRowRenderer.renderRow({ browserFields: mockBrowserFields, data: suricata, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/translations.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/translations.ts index a703c7afdaf7b..53cffa7d3708d 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/translations.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/translations.ts @@ -52,8 +52,8 @@ export const EMPTY_STATUS = i18n.translate( } ); -export const EVENT_RENDERER_POPOVER_TITLE = (eventRendererName: string) => - i18n.translate('xpack.securitySolution.event.reason.eventRenderPopoverTitle', { +export const REASON_RENDERER_TITLE = (eventRendererName: string) => + i18n.translate('xpack.securitySolution.event.reason.reasonRendererTitle', { values: { eventRendererName }, defaultMessage: 'Event renderer: {eventRendererName} ', }); diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_signature.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_signature.tsx index 41f35e7c50e30..7c010795682ac 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_signature.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_signature.tsx @@ -76,12 +76,12 @@ export const DraggableZeekElement = React.memo<{ and: [], enabled: true, id: escapeDataProviderId(`draggable-zeek-element-draggable-wrapper-${id}-${field}-${value}`), - name: value!, + name: String(value), excluded: false, kqlQuery: '', queryMatch: { field, - value: value!, + value: String(value), operator: IS_OPERATOR as QueryOperator, }, }), @@ -97,7 +97,7 @@ export const DraggableZeekElement = React.memo<{ ) : ( - {stringRenderer(value!)} + {stringRenderer(String(value))} ), diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/cell_rendering/default_cell_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/cell_rendering/default_cell_renderer.test.tsx index 5282276f8bb51..ef8fa01a63465 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/cell_rendering/default_cell_renderer.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/cell_rendering/default_cell_renderer.test.tsx @@ -16,6 +16,8 @@ import { DroppableWrapper } from '../../../../common/components/drag_and_drop/dr import { mockBrowserFields } from '../../../../common/containers/source/mock'; import { defaultHeaders, mockTimelineData, TestProviders } from '../../../../common/mock'; import { DefaultCellRenderer } from './default_cell_renderer'; +import { BrowserFields } from '../../../../../../timelines/common/search_strategy'; +import { Ecs } from '../../../../../common/ecs'; jest.mock('../../../../common/lib/kibana'); @@ -26,15 +28,16 @@ const mockImplementation = { }; describe('DefaultCellRenderer', () => { - const columnId = 'signal.rule.risk_score'; + const columnId = '@timestamp'; const eventId = '_id-123'; - const isDetails = true; const isExpandable = true; const isExpanded = true; const linkValues = ['foo', 'bar', '@baz']; const rowIndex = 3; const setCellProps = jest.fn(); const timelineId = 'test'; + const ecsData = {} as Ecs; + const browserFields = {} as BrowserFields; beforeEach(() => { jest.clearAllMocks(); @@ -44,14 +47,17 @@ describe('DefaultCellRenderer', () => { test('it invokes `getColumnRenderer` with the expected arguments', () => { const data = cloneDeep(mockTimelineData[0].data); const header = cloneDeep(defaultHeaders[0]); + const isDetails = true; mount( { expect(getColumnRenderer).toBeCalledWith(header.id, columnRenderers, data); }); - test('it invokes `renderColumn` with the expected arguments', () => { + test('if in tgrid expanded value, it invokes `renderColumn` with the expected arguments', () => { const data = cloneDeep(mockTimelineData[0].data); const header = cloneDeep(defaultHeaders[0]); + const isDetails = true; + const truncate = isDetails ? false : true; mount( { rowIndex={rowIndex} setCellProps={setCellProps} timelineId={timelineId} + truncate={truncate} /> @@ -99,14 +110,54 @@ describe('DefaultCellRenderer', () => { ); expect(mockImplementation.renderColumn).toBeCalledWith({ + asPlainText: false, + browserFields, columnName: header.id, + ecsData, eventId, field: header, + isDetails, isDraggable: true, linkValues, + rowRenderers: undefined, timelineId, - truncate: true, + truncate, values: ['2018-11-05T19:03:25.937Z'], }); }); + + test('if in tgrid expanded value, it renders ExpandedCellValueActions', () => { + const data = cloneDeep(mockTimelineData[0].data); + const header = cloneDeep(defaultHeaders[1]); + const isDetails = true; + const id = 'event.severity'; + const wrapper = mount( + + + + + + + + ); + + expect( + wrapper.find('[data-test-subj="data-grid-expanded-cell-value-actions"]').exists() + ).toBeTruthy(); + }); }); diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/cell_rendering/default_cell_renderer.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/cell_rendering/default_cell_renderer.tsx index d45c8103d1cca..5b9fee621b417 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/cell_rendering/default_cell_renderer.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/cell_rendering/default_cell_renderer.tsx @@ -12,36 +12,70 @@ import { columnRenderers } from '../body/renderers'; import { getColumnRenderer } from '../body/renderers/get_column_renderer'; import { CellValueElementProps } from '.'; +import { getLink } from '../../../../common/lib/cell_actions/helpers'; +import { + ExpandedCellValueActions, + StyledContent, +} from '../../../../common/lib/cell_actions/expanded_cell_value_actions'; + +const FIELDS_WITHOUT_CELL_ACTIONS = ['@timestamp', 'signal.rule.risk_score', 'signal.reason']; +const hasCellActions = (columnId?: string) => { + return columnId && FIELDS_WITHOUT_CELL_ACTIONS.indexOf(columnId) < 0; +}; export const DefaultCellRenderer: React.FC = ({ - columnId, + browserFields, data, + ecsData, eventId, + globalFilters, header, + isDetails, isDraggable, linkValues, + rowRenderers, setCellProps, timelineId, - rowRenderers, - browserFields, - ecsData, -}) => ( - <> - {getColumnRenderer(header.id, columnRenderers, data).renderColumn({ - columnName: header.id, - eventId, - field: header, - isDraggable, - linkValues, - timelineId, - truncate: true, - values: getMappedNonEcsValue({ - data, - fieldName: header.id, - }), - rowRenderers, - browserFields, - ecsData, - })} - -); + truncate, +}) => { + const values = getMappedNonEcsValue({ + data, + fieldName: header.id, + }); + const styledContentClassName = isDetails + ? 'eui-textBreakWord' + : 'eui-displayInlineBlock eui-textTruncate'; + return ( + <> + + {getColumnRenderer(header.id, columnRenderers, data).renderColumn({ + asPlainText: !!getLink(header.id, header.type), // we want to render value with links as plain text but keep other formatters like badge. + browserFields, + columnName: header.id, + ecsData, + eventId, + field: header, + isDetails, + isDraggable, + linkValues, + rowRenderers, + timelineId, + truncate, + values: getMappedNonEcsValue({ + data, + fieldName: header.id, + }), + })} + + {isDetails && browserFields && hasCellActions(header.id) && ( + + )} + + ); +}; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/add_data_provider_popover.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/add_data_provider_popover.tsx index 84f286b435a48..52443cf92a9cb 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/add_data_provider_popover.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/add_data_provider_popover.tsx @@ -113,7 +113,7 @@ const AddDataProviderPopoverComponent: React.FC = ( width: 400, content: ( = ( width: 400, content: ( = ( return ( = ({ users }) => { const List = useMemo( () => users.map((user) => ( - - + + )), diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/query_tab_content/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/query_tab_content/index.tsx index d2cf158818f75..2082e7f5b69bb 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/query_tab_content/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/query_tab_content/index.tsx @@ -463,7 +463,7 @@ const makeMapStateToProps = () => { status, timelineType, } = timeline; - const kqlQueryTimeline = getKqlQueryTimeline(state, timelineId)!; + const kqlQueryTimeline = getKqlQueryTimeline(state, timelineId); const timelineFilter = kqlMode === 'filter' ? filters || [] : []; // return events on empty search diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/index.tsx index 33ab2e0049828..96ca26a099d2f 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/index.tsx @@ -74,7 +74,7 @@ const StatefulSearchOrFilterComponent = React.memo( from={from} fromStr={fromStr} isRefreshPaused={isRefreshPaused} - kqlMode={kqlMode!} + kqlMode={kqlMode} refreshInterval={refreshInterval} savedQueryId={savedQueryId} setFilters={setFiltersInTimeline} @@ -82,7 +82,7 @@ const StatefulSearchOrFilterComponent = React.memo( timelineId={timelineId} to={to} toStr={toStr} - updateKqlMode={updateKqlMode!} + updateKqlMode={updateKqlMode} updateReduxTime={updateReduxTime} /> ); @@ -119,15 +119,19 @@ const makeMapStateToProps = () => { const policy: inputsModel.Policy = getInputsPolicy(state); return { dataProviders: timeline.dataProviders, + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion filterQuery: getKqlFilterQuery(state, timelineId)!, + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion filters: timeline.filters!, from: input.timerange.from, + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion fromStr: input.timerange.fromStr!, isRefreshPaused: policy.kind === 'manual', kqlMode: getOr('filter', 'kqlMode', timeline), refreshInterval: policy.duration, savedQueryId: getOr(null, 'savedQueryId', timeline), to: input.timerange.to, + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion toStr: input.timerange.toStr!, }; }; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/selectable_timeline/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/selectable_timeline/index.test.tsx index 44174009d0198..7269c005e9af5 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/selectable_timeline/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/selectable_timeline/index.test.tsx @@ -47,7 +47,7 @@ describe('SelectableTimeline', () => { const searchProps: EuiSelectableProps['searchProps'] = wrapper .find('[data-test-subj="selectable-input"]') .prop('searchProps'); - expect(searchProps!.placeholder).toEqual('e.g. Timeline name or description'); + expect(searchProps?.placeholder).toEqual('e.g. Timeline name or description'); }); }); @@ -65,7 +65,7 @@ describe('SelectableTimeline', () => { const searchProps: EuiSelectableProps['searchProps'] = wrapper .find('[data-test-subj="selectable-input"]') .prop('searchProps'); - expect(searchProps!.placeholder).toEqual('e.g. Timeline template name or description'); + expect(searchProps?.placeholder).toEqual('e.g. Timeline template name or description'); }); }); }); diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/selectable_timeline/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/selectable_timeline/index.tsx index 9d10584130194..e4070a051af46 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/selectable_timeline/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/selectable_timeline/index.tsx @@ -110,8 +110,8 @@ const SelectableTimelineComponent: React.FC = ({ selectableListOuterRef.current && selectableListInnerRef.current ) { - const clientHeight = selectableListOuterRef.current!.clientHeight; - const scrollHeight = selectableListInnerRef.current!.clientHeight; + const clientHeight = selectableListOuterRef.current.clientHeight; + const scrollHeight = selectableListInnerRef.current.clientHeight; const clientHeightTrigger = clientHeight * 1.2; if ( scrollOffset > 10 && diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/styles.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/styles.tsx index 3514766b334a0..af05198ef9974 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/styles.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/styles.tsx @@ -271,13 +271,13 @@ export const EventsTrData = styled.div.attrs(({ className = '' }) => ({ const TIMELINE_EVENT_DETAILS_OFFSET = 40; interface WidthProp { - width?: number; + width: number; } export const EventsTrSupplementContainer = styled.div.attrs(({ width }) => ({ role: 'dialog', style: { - width: `${width! - TIMELINE_EVENT_DETAILS_OFFSET}px`, + width: `${width - TIMELINE_EVENT_DETAILS_OFFSET}px`, }, }))``; diff --git a/x-pack/plugins/security_solution/public/timelines/containers/api.ts b/x-pack/plugins/security_solution/public/timelines/containers/api.ts index 789c942d0e29a..7f74912be09b4 100644 --- a/x-pack/plugins/security_solution/public/timelines/containers/api.ts +++ b/x-pack/plugins/security_solution/public/timelines/containers/api.ts @@ -156,6 +156,7 @@ export const persistTimeline = async ({ try { if (isEmpty(timelineId) && timeline.status === TimelineStatus.draft && timeline) { const temp: TimelineResponse | TimelineErrorResponse = await cleanDraftTimeline({ + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion timelineType: timeline.timelineType!, templateTimelineId: timeline.templateTimelineId ?? undefined, templateTimelineVersion: timeline.templateTimelineVersion ?? undefined, @@ -163,7 +164,7 @@ export const persistTimeline = async ({ const draftTimeline = decodeTimelineResponse(temp); const templateTimelineInfo = - timeline.timelineType! === TimelineType.template + timeline.timelineType === TimelineType.template ? { templateTimelineId: draftTimeline.data.persistTimeline.timeline.templateTimelineId ?? diff --git a/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.ts index 9d95036cb6076..164f293edee65 100644 --- a/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.ts +++ b/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.ts @@ -235,7 +235,7 @@ export const createTimelineEpic = mergeMap(([result, recentTimeline, allTimelineQuery, kibana]) => { const error = result as TimelineErrorResponse; if (error.status_code != null && error.status_code === 405) { - kibana.notifications!.toasts.addDanger({ + kibana.notifications.toasts.addDanger({ title: i18n.UPDATE_TIMELINE_ERROR_TITLE, text: error.message ?? i18n.UPDATE_TIMELINE_ERROR_TEXT, }); diff --git a/x-pack/plugins/security_solution/public/timelines/store/timeline/reducer.test.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/reducer.test.ts index eceafb9b56cdd..639d1b1e4f489 100644 --- a/x-pack/plugins/security_solution/public/timelines/store/timeline/reducer.test.ts +++ b/x-pack/plugins/security_solution/public/timelines/store/timeline/reducer.test.ts @@ -1126,8 +1126,8 @@ describe('Timeline', () => { const newAndProvider = update.foo.dataProviders[indexProvider].and.find( (i) => i.id === '456' ); - expect(oldAndProvider!.enabled).toEqual(false); - expect(newAndProvider!.enabled).toEqual(true); + expect(oldAndProvider?.enabled).toEqual(false); + expect(newAndProvider?.enabled).toEqual(true); }); }); @@ -1386,8 +1386,8 @@ describe('Timeline', () => { const newAndProvider = update.foo.dataProviders[indexProvider].and.find( (i) => i.id === '456' ); - expect(oldAndProvider!.excluded).toEqual(true); - expect(newAndProvider!.excluded).toEqual(false); + expect(oldAndProvider?.excluded).toEqual(true); + expect(newAndProvider?.excluded).toEqual(false); }); }); diff --git a/x-pack/plugins/security_solution/public/types.ts b/x-pack/plugins/security_solution/public/types.ts index c1a9c1735be8c..e595b905b998e 100644 --- a/x-pack/plugins/security_solution/public/types.ts +++ b/x-pack/plugins/security_solution/public/types.ts @@ -96,8 +96,7 @@ export interface SubPlugins { cases: Cases; hosts: Hosts; network: Network; - // TODO: Steph/ueba require ueba once no longer experimental - ueba?: Ueba; + ueba: Ueba; overview: Overview; timelines: Timelines; management: Management; @@ -111,8 +110,7 @@ export interface StartedSubPlugins { cases: ReturnType; hosts: ReturnType; network: ReturnType; - // TODO: Steph/ueba require ueba once no longer experimental - ueba?: ReturnType; + ueba: ReturnType; overview: ReturnType; timelines: ReturnType; management: ReturnType; diff --git a/x-pack/plugins/security_solution/server/deprecation_privileges/index.test.ts b/x-pack/plugins/security_solution/server/deprecation_privileges/index.test.ts new file mode 100644 index 0000000000000..f61940387c413 --- /dev/null +++ b/x-pack/plugins/security_solution/server/deprecation_privileges/index.test.ts @@ -0,0 +1,787 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { + DeprecationsServiceSetup, + GetDeprecationsContext, + RegisterDeprecationsConfig, +} from 'src/core/server'; +import { loggingSystemMock } from 'src/core/server/mocks'; + +import { registerPrivilegeDeprecations, updateSecuritySolutionPrivileges } from '.'; + +describe('deprecations', () => { + describe('create cases privileges from siem privileges without cases sub-feature', () => { + test('should be empty if siem privileges is an empty array', () => { + expect(updateSecuritySolutionPrivileges([])).toMatchInlineSnapshot(`Object {}`); + }); + + test('creates cases privilege ["all"] when siem privilege is ["all"]', () => { + expect(updateSecuritySolutionPrivileges(['all'])).toMatchInlineSnapshot(` + Object { + "securitySolutionCases": Array [ + "all", + ], + "siem": Array [ + "all", + ], + } + `); + }); + + test('creates cases privilege ["all"] when siem privilege is ["all", "read"]', () => { + expect(updateSecuritySolutionPrivileges(['all', 'read'])).toMatchInlineSnapshot(` + Object { + "securitySolutionCases": Array [ + "all", + ], + "siem": Array [ + "all", + "read", + ], + } + `); + }); + + test('creates cases privilege ["all"] when siem privilege is ["read", "all"]', () => { + expect(updateSecuritySolutionPrivileges(['read', 'all'])).toMatchInlineSnapshot(` + Object { + "securitySolutionCases": Array [ + "all", + ], + "siem": Array [ + "read", + "all", + ], + } + `); + }); + + test('creates cases privilege ["read"] when siem privilege is ["read"]', () => { + expect(updateSecuritySolutionPrivileges(['read'])).toMatchInlineSnapshot(` + Object { + "securitySolutionCases": Array [ + "read", + ], + "siem": Array [ + "read", + ], + } + `); + }); + }); + + describe('create cases privileges from siem privileges with cases sub-feature', () => { + test('No cases privilege when siem privilege is ["minimal_all"]', () => { + expect(updateSecuritySolutionPrivileges(['minimal_all'])).toMatchInlineSnapshot(` + Object { + "siem": Array [ + "minimal_all", + ], + } + `); + }); + + test('No cases privilege when siem privilege is ["minimal_read"]', () => { + expect(updateSecuritySolutionPrivileges(['minimal_read'])).toMatchInlineSnapshot(` + Object { + "siem": Array [ + "minimal_read", + ], + } + `); + }); + + test('No cases privilege when siem privilege is ["minimal_read", "minimal_all"]', () => { + expect(updateSecuritySolutionPrivileges(['minimal_read', 'minimal_all'])) + .toMatchInlineSnapshot(` + Object { + "siem": Array [ + "minimal_read", + "minimal_all", + ], + } + `); + }); + + test('creates cases privilege ["all"] when siem privilege is ["minimal_all", "all"]', () => { + expect(updateSecuritySolutionPrivileges(['minimal_all', 'all'])).toMatchInlineSnapshot(` + Object { + "securitySolutionCases": Array [ + "all", + ], + "siem": Array [ + "minimal_all", + "all", + ], + } + `); + }); + + test('creates cases privilege ["all"] when siem privilege is ["all", "minimal_read"]', () => { + expect(updateSecuritySolutionPrivileges(['all', 'minimal_read'])).toMatchInlineSnapshot(` + Object { + "securitySolutionCases": Array [ + "all", + ], + "siem": Array [ + "all", + "minimal_read", + ], + } + `); + }); + + test('creates cases privilege ["all"] when siem privilege is ["minimal_all", "cases_all"]', () => { + expect(updateSecuritySolutionPrivileges(['minimal_all', 'cases_all'])).toMatchInlineSnapshot(` + Object { + "securitySolutionCases": Array [ + "all", + ], + "siem": Array [ + "minimal_all", + "cases_all", + ], + } + `); + }); + + test('creates cases privilege ["all"] when siem privilege is [minimal_all, cases_read, cases_all]', () => { + expect(updateSecuritySolutionPrivileges(['minimal_all', 'cases_read', 'cases_all'])) + .toMatchInlineSnapshot(` + Object { + "securitySolutionCases": Array [ + "all", + ], + "siem": Array [ + "minimal_all", + "cases_read", + "cases_all", + ], + } + `); + }); + + test('creates cases privilege ["all"] when siem privilege is [minimal_all, cases_all, cases_read]', () => { + expect(updateSecuritySolutionPrivileges(['minimal_all', 'cases_all', 'cases_read'])) + .toMatchInlineSnapshot(` + Object { + "securitySolutionCases": Array [ + "all", + ], + "siem": Array [ + "minimal_all", + "cases_all", + "cases_read", + ], + } + `); + }); + + test('creates cases privilege ["all"] when siem privilege is ["all", "cases_read"]', () => { + expect(updateSecuritySolutionPrivileges(['all', 'cases_read'])).toMatchInlineSnapshot(` + Object { + "securitySolutionCases": Array [ + "all", + ], + "siem": Array [ + "all", + "cases_read", + ], + } + `); + }); + + test('creates cases privilege ["read"] when siem privilege is ["minimal_all", "read"]', () => { + expect(updateSecuritySolutionPrivileges(['minimal_all', 'read'])).toMatchInlineSnapshot(` + Object { + "securitySolutionCases": Array [ + "read", + ], + "siem": Array [ + "minimal_all", + "read", + ], + } + `); + }); + + test('creates cases privilege ["read"] when siem privilege is ["read", "minimal_read"]', () => { + expect(updateSecuritySolutionPrivileges(['read', 'minimal_read'])).toMatchInlineSnapshot(` + Object { + "securitySolutionCases": Array [ + "read", + ], + "siem": Array [ + "read", + "minimal_read", + ], + } + `); + }); + + test('creates cases privilege ["read"] when siem privilege is ["minimal_all", "cases_read"]', () => { + expect(updateSecuritySolutionPrivileges(['minimal_all', 'cases_read'])) + .toMatchInlineSnapshot(` + Object { + "securitySolutionCases": Array [ + "read", + ], + "siem": Array [ + "minimal_all", + "cases_read", + ], + } + `); + }); + + test('creates cases privilege ["read"] when siem privilege is ["minimal_all", "read", "cases_read"]', () => { + expect(updateSecuritySolutionPrivileges(['minimal_all', 'read', 'cases_read'])) + .toMatchInlineSnapshot(` + Object { + "securitySolutionCases": Array [ + "read", + ], + "siem": Array [ + "minimal_all", + "read", + "cases_read", + ], + } + `); + }); + + test('creates cases privilege ["read"] when siem privilege is ["minimal_read", "cases_read"]', () => { + expect(updateSecuritySolutionPrivileges(['minimal_read', 'cases_read'])) + .toMatchInlineSnapshot(` + Object { + "securitySolutionCases": Array [ + "read", + ], + "siem": Array [ + "minimal_read", + "cases_read", + ], + } + `); + }); + + test('creates cases privilege ["all"] when siem privilege is ["minimal_read", "cases_all"]', () => { + expect(updateSecuritySolutionPrivileges(['minimal_read', 'cases_all'])) + .toMatchInlineSnapshot(` + Object { + "securitySolutionCases": Array [ + "all", + ], + "siem": Array [ + "minimal_read", + "cases_all", + ], + } + `); + }); + + test('creates cases privilege ["all"] when siem privilege is [minimal_read, cases_read, cases_all]', () => { + expect(updateSecuritySolutionPrivileges(['minimal_read', 'cases_read', 'cases_all'])) + .toMatchInlineSnapshot(` + Object { + "securitySolutionCases": Array [ + "all", + ], + "siem": Array [ + "minimal_read", + "cases_read", + "cases_all", + ], + } + `); + }); + + test('creates cases privilege ["all"] when siem privilege is [minimal_read, cases_all, cases_read]', () => { + expect(updateSecuritySolutionPrivileges(['minimal_read', 'cases_all', 'cases_read'])) + .toMatchInlineSnapshot(` + Object { + "securitySolutionCases": Array [ + "all", + ], + "siem": Array [ + "minimal_read", + "cases_all", + "cases_read", + ], + } + `); + }); + }); + + describe('registerPrivilegeDeprecations', () => { + const mockContext = { + esClient: jest.fn(), + savedObjectsClient: jest.fn(), + } as unknown as GetDeprecationsContext; + const getDeprecations = jest.fn(); + const getKibanaRolesByFeatureId = jest.fn(); + const mockDeprecationsService: DeprecationsServiceSetup = { + registerDeprecations: (deprecationContext: RegisterDeprecationsConfig) => { + getDeprecations.mockImplementation(deprecationContext.getDeprecations); + }, + }; + + beforeAll(() => { + registerPrivilegeDeprecations({ + deprecationsService: mockDeprecationsService, + getKibanaRolesByFeatureId, + logger: loggingSystemMock.createLogger(), + }); + }); + beforeEach(() => { + getKibanaRolesByFeatureId.mockReset(); + }); + + test('getDeprecations return the errors from getKibanaRolesByFeatureId', async () => { + const errorResponse = { + errors: [ + { + correctiveActions: { + manualSteps: [ + "A user with the 'manage_security' cluster privilege is required to perform this check.", + ], + }, + level: 'fetch_error', + message: 'Error retrieving roles for privilege deprecations: Test error', + title: 'Error in privilege deprecations services', + }, + ], + }; + getKibanaRolesByFeatureId.mockResolvedValue(errorResponse); + const response = await getDeprecations(mockContext); + expect(response).toEqual(errorResponse.errors); + }); + + test('getDeprecations return empty array when securitySolutionCases privileges are already set up', async () => { + getKibanaRolesByFeatureId.mockResolvedValue({ + roles: [ + { + _transform_error: [], + _unrecognized_applications: [], + elasticsearch: { + cluster: [], + indices: [], + run_as: [], + }, + kibana: [ + { + base: [], + feature: { + bar: ['bar-privilege-1'], + securitySolutionCases: ['read'], + siem: ['minimal_read', 'cases_read'], + }, + spaces: ['securitySolutions'], + }, + ], + metadata: { + _reserved: true, + }, + name: 'first_role', + transient_metadata: { + enabled: true, + }, + }, + ], + }); + const response = await getDeprecations(mockContext); + expect(response).toMatchInlineSnapshot(`Array []`); + }); + + test('happy path build securitySolutionCases privileges from siem privileges', async () => { + getKibanaRolesByFeatureId.mockResolvedValue({ + roles: [ + { + _transform_error: [], + _unrecognized_applications: [], + elasticsearch: { + cluster: [], + indices: [], + run_as: [], + }, + kibana: [ + { + base: [], + feature: { + bar: ['bar-privilege-1'], + siem: ['minimal_all', 'cases_read'], + }, + spaces: ['securitySolutions'], + }, + ], + metadata: { + _reserved: true, + }, + name: 'first_role', + transient_metadata: { + enabled: true, + }, + }, + ], + }); + const response = await getDeprecations(mockContext); + expect(response).toMatchInlineSnapshot(` + Array [ + Object { + "correctiveActions": Object { + "api": Object { + "body": Object { + "elasticsearch": Object { + "cluster": Array [], + "indices": Array [], + "run_as": Array [], + }, + "kibana": Array [ + Object { + "base": Array [], + "feature": Object { + "bar": Array [ + "bar-privilege-1", + ], + "securitySolutionCases": Array [ + "read", + ], + "siem": Array [ + "minimal_all", + "cases_read", + ], + }, + "spaces": Array [ + "securitySolutions", + ], + }, + ], + "metadata": Object { + "_reserved": true, + }, + }, + "method": "PUT", + "omitContextFromBody": true, + "path": "/api/security/role/first_role", + }, + "manualSteps": Array [], + }, + "deprecationType": "feature", + "level": "warning", + "message": "The \\"Security\\" feature will be split into two separate features in 8.0. The \\"first_role\\" role grants access to this feature, and it needs to be updated before you upgrade Kibana. This will ensure that users have access to the same features after the upgrade.", + "title": "The \\"first_role\\" role needs to be updated", + }, + ] + `); + }); + + test('getDeprecations handles multiple roles and filters out any that have already been updated', async () => { + getKibanaRolesByFeatureId.mockResolvedValue({ + roles: [ + { + _transform_error: [], + _unrecognized_applications: [], + elasticsearch: { + cluster: [], + indices: [], + run_as: [], + }, + kibana: [ + { + base: [], + feature: { + bar: ['bar-privilege-1'], + securitySolutionCases: ['read'], + siem: ['minimal_read', 'cases_read'], + }, + spaces: ['readSecuritySolution_1'], + }, + ], + metadata: { + _reserved: true, + }, + name: 'first_role', + transient_metadata: { + enabled: true, + }, + }, + { + _transform_error: [], + _unrecognized_applications: [], + elasticsearch: { + cluster: [], + indices: [], + run_as: [], + }, + kibana: [ + { + base: [], + feature: { + bar: ['bar-privilege-1'], + siem: ['minimal_read', 'cases_read'], + }, + spaces: ['readSecuritySolution_2'], + }, + ], + metadata: { + _reserved: true, + }, + name: 'second_role', + transient_metadata: { + enabled: true, + }, + }, + { + _transform_error: [], + _unrecognized_applications: [], + elasticsearch: { + cluster: [], + indices: [], + run_as: [], + }, + kibana: [ + { + base: [], + feature: { + bar: ['bar-privilege-1'], + siem: ['minimal_all'], + }, + spaces: ['allSecuritySolution'], + }, + ], + metadata: { + _reserved: true, + }, + name: 'third_role', + transient_metadata: { + enabled: true, + }, + }, + ], + }); + const response = await getDeprecations(mockContext); + expect(response).toMatchInlineSnapshot(` + Array [ + Object { + "correctiveActions": Object { + "api": Object { + "body": Object { + "elasticsearch": Object { + "cluster": Array [], + "indices": Array [], + "run_as": Array [], + }, + "kibana": Array [ + Object { + "base": Array [], + "feature": Object { + "bar": Array [ + "bar-privilege-1", + ], + "securitySolutionCases": Array [ + "read", + ], + "siem": Array [ + "minimal_read", + "cases_read", + ], + }, + "spaces": Array [ + "readSecuritySolution_2", + ], + }, + ], + "metadata": Object { + "_reserved": true, + }, + }, + "method": "PUT", + "omitContextFromBody": true, + "path": "/api/security/role/second_role", + }, + "manualSteps": Array [], + }, + "deprecationType": "feature", + "level": "warning", + "message": "The \\"Security\\" feature will be split into two separate features in 8.0. The \\"second_role\\" role grants access to this feature, and it needs to be updated before you upgrade Kibana. This will ensure that users have access to the same features after the upgrade.", + "title": "The \\"second_role\\" role needs to be updated", + }, + ] + `); + }); + + test('getDeprecations handles multiple roles and filters out any that do not grant access to Cases', async () => { + getKibanaRolesByFeatureId.mockResolvedValue({ + roles: [ + { + _transform_error: [], + _unrecognized_applications: [], + elasticsearch: { + cluster: [], + indices: [], + run_as: [], + }, + kibana: [ + { + base: [], + feature: { + siem: ['all'], + }, + spaces: ['securitySolution_1'], + }, + ], + metadata: { + _reserved: true, + }, + name: 'role_siem_all', + transient_metadata: { + enabled: true, + }, + }, + { + _transform_error: [], + _unrecognized_applications: [], + elasticsearch: { + cluster: [], + indices: [], + run_as: [], + }, + kibana: [ + { + base: [], + feature: { + siem: ['read'], + }, + spaces: ['securitySolution_2'], + }, + ], + metadata: { + _reserved: true, + }, + name: 'role_siem_read', + transient_metadata: { + enabled: true, + }, + }, + { + _transform_error: [], + _unrecognized_applications: [], + elasticsearch: { + cluster: [], + indices: [], + run_as: [], + }, + kibana: [ + { + base: [], + feature: { + siem: ['minimal_all', 'cases_all', 'cases_read'], + }, + spaces: ['securitySolution_3'], + }, + ], + metadata: { + _reserved: true, + }, + name: 'role_siem_minimal_all_cases_all_cases_read', + transient_metadata: { + enabled: true, + }, + }, + { + _transform_error: [], + _unrecognized_applications: [], + elasticsearch: { + cluster: [], + indices: [], + run_as: [], + }, + kibana: [ + { + base: [], + feature: { + siem: ['minimal_read', 'cases_read'], + }, + spaces: ['securitySolution_4'], + }, + ], + metadata: { + _reserved: true, + }, + name: 'role_siem_minimal_read_cases_read', + transient_metadata: { + enabled: true, + }, + }, + { + _transform_error: [], + _unrecognized_applications: [], + elasticsearch: { + cluster: [], + indices: [], + run_as: [], + }, + kibana: [ + { + base: [], + feature: { + siem: ['minimal_all'], + }, + spaces: ['securitySolution_5'], + }, + ], + metadata: { + _reserved: true, + }, + name: 'role_siem_minimal_all', + transient_metadata: { + enabled: true, + }, + }, + { + _transform_error: [], + _unrecognized_applications: [], + elasticsearch: { + cluster: [], + indices: [], + run_as: [], + }, + kibana: [ + { + base: [], + feature: { + siem: ['minimal_read'], + }, + spaces: ['securitySolution_6'], + }, + ], + metadata: { + _reserved: true, + }, + name: 'role_siem_minimal_read', + transient_metadata: { + enabled: true, + }, + }, + ], + }); + const response = await getDeprecations(mockContext); + expect(response).toEqual([ + expect.objectContaining({ title: 'The "role_siem_all" role needs to be updated' }), + expect.objectContaining({ title: 'The "role_siem_read" role needs to be updated' }), + expect.objectContaining({ + title: 'The "role_siem_minimal_all_cases_all_cases_read" role needs to be updated', + }), + expect.objectContaining({ + title: 'The "role_siem_minimal_read_cases_read" role needs to be updated', + }), + // the fifth_role and sixth_role have been filtered out because they do not grant access to Cases + ]); + }); + }); +}); diff --git a/x-pack/plugins/security_solution/server/deprecation_privileges/index.ts b/x-pack/plugins/security_solution/server/deprecation_privileges/index.ts new file mode 100644 index 0000000000000..803231b236cbd --- /dev/null +++ b/x-pack/plugins/security_solution/server/deprecation_privileges/index.ts @@ -0,0 +1,188 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; +import type { Logger } from 'src/core/server'; + +import { DeprecationsDetails, DeprecationsServiceSetup } from '../../../../../src/core/server'; +import type { PrivilegeDeprecationsService, Role } from '../../../security/common/model'; +import { CASES_FEATURE_ID, SERVER_APP_ID } from '../../common/constants'; + +interface Deps { + deprecationsService: DeprecationsServiceSetup; + getKibanaRolesByFeatureId?: PrivilegeDeprecationsService['getKibanaRolesByFeatureId']; + logger: Logger; +} + +export const updateSecuritySolutionPrivileges = ( + siemPrivileges: string[] +): Partial> => { + const casesPrivs = new Set(); + + for (const priv of siemPrivileges) { + switch (priv) { + case 'all': + casesPrivs.add('all'); + break; + case 'read': + casesPrivs.add('read'); + break; + case 'cases_all': + casesPrivs.add('all'); + break; + case 'cases_read': + casesPrivs.add('read'); + break; + } + } + + const casePrivileges: string[] = casesPrivs.has('all') + ? ['all'] + : casesPrivs.has('read') + ? ['read'] + : []; + + return { + ...(siemPrivileges.length > 0 + ? { + [SERVER_APP_ID]: siemPrivileges, + } + : {}), + ...(casePrivileges.length > 0 + ? { + [CASES_FEATURE_ID]: casePrivileges, + } + : {}), + }; +}; + +const SIEM_PRIVILEGES_FOR_CASES = new Set(['all', 'read', 'cases_all', 'cases_read']); +function outdatedSiemRolePredicate(role: Role) { + return role.kibana.some( + ({ feature }) => + !feature[CASES_FEATURE_ID] && feature.siem.some((x) => SIEM_PRIVILEGES_FOR_CASES.has(x)) + ); +} + +export const registerPrivilegeDeprecations = ({ + deprecationsService, + getKibanaRolesByFeatureId, + logger, +}: Deps) => { + deprecationsService.registerDeprecations({ + getDeprecations: async (context) => { + let deprecatedRoles: DeprecationsDetails[] = []; + if (!getKibanaRolesByFeatureId) { + return deprecatedRoles; + } + const responseRoles = await getKibanaRolesByFeatureId({ + context, + featureId: 'siem', + }); + + if (responseRoles.errors && responseRoles.errors.length > 0) { + return responseRoles.errors; + } + + try { + const filteredRoles = (responseRoles.roles ?? []).filter(outdatedSiemRolePredicate); + deprecatedRoles = filteredRoles.map((role) => { + const { metadata, elasticsearch, kibana, name: roleName } = role; + + const updatedKibana = kibana.map((privilege) => { + const { siem, ...otherFeatures } = privilege.feature; + const privilegeContainsSiem = Array.isArray(siem) && siem.length > 0; + + if (privilegeContainsSiem) { + return { + ...privilege, + feature: { + ...otherFeatures, + ...updateSecuritySolutionPrivileges(siem), + }, + }; + } + return privilege; + }); + + const updatedRole = { + metadata, + elasticsearch, + kibana: updatedKibana, + }; + + return { + title: i18n.translate( + 'xpack.securitySolution.privilegeDeprecations.casesSubFeaturePrivileges.title', + { + defaultMessage: 'The "{roleName}" role needs to be updated', + values: { roleName }, + } + ), + message: i18n.translate( + 'xpack.securitySolution.privilegeDeprecations.casesSubFeaturePrivileges.message', + { + defaultMessage: + 'The "Security" feature will be split into two separate features in 8.0. The "{roleName}" role grants access to this feature, and it needs to be updated before you upgrade Kibana. This will ensure that users have access to the same features after the upgrade.', + values: { roleName }, + } + ), + level: 'warning', + deprecationType: 'feature', + correctiveActions: { + api: { + method: 'PUT', + path: `/api/security/role/${encodeURIComponent(role.name)}`, + body: updatedRole, + omitContextFromBody: true, + }, + manualSteps: [], + }, + }; + }); + } catch (err) { + const errMsg = err instanceof Error ? err.message : 'n/a'; + const message = i18n.translate( + 'xpack.securitySolution.privilegeDeprecations.error.casesSubFeaturePrivileges.message', + { + defaultMessage: `Failed to create cases roles from siem roles, unexpected error: {message}`, + values: { + message: errMsg, + }, + } + ); + logger.error( + `Failed to create cases roles from siem roles, unexpected error: ${errMsg ?? ''}` + ); + return [ + { + title: i18n.translate( + 'xpack.securitySolution.privilegeDeprecations.error.casesSubFeaturePrivileges.title', + { + defaultMessage: `Error in security solution to deprecate cases sub feature`, + } + ), + level: 'fetch_error', + message, + correctiveActions: { + manualSteps: [ + i18n.translate( + 'xpack.securitySolution.privilegeDeprecations.manualSteps.casesSubFeaturePrivileges.message', + { + defaultMessage: + 'A user will have to set cases privileges manually in your associated role', + } + ), + ], + }, + }, + ]; + } + return deprecatedRoles; + }, + }); +}; diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/task.ts b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/task.ts index a116311becfe5..cf6665a5dde2b 100644 --- a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/task.ts +++ b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/task.ts @@ -135,6 +135,7 @@ export class ManifestTask { } } + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion if (oldManifest! == null) { this.logger.debug('Last computed manifest not available yet'); return; diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/metadata/check_metadata_transforms_task.ts b/x-pack/plugins/security_solution/server/endpoint/lib/metadata/check_metadata_transforms_task.ts index 68f149bcc64c4..d55e3966f997b 100644 --- a/x-pack/plugins/security_solution/server/endpoint/lib/metadata/check_metadata_transforms_task.ts +++ b/x-pack/plugins/security_solution/server/endpoint/lib/metadata/check_metadata_transforms_task.ts @@ -119,7 +119,7 @@ export class CheckMetadataTransformsTask { const { transforms } = transformStatsResponse.body; if (!transforms.length) { - this.logger.info('no OLM metadata transforms found'); + this.logger.info('no endpoint metadata transforms found'); return; } diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts b/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts index a1b93b5bd59f7..32d5806a4b47a 100644 --- a/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts @@ -130,7 +130,7 @@ describe('Policy-Changing license watcher', () => { expect(packagePolicySvcMock.update).toHaveBeenCalled(); expect( - packagePolicySvcMock.update.mock.calls[0][3].inputs[0].config!.policy.value.windows.popup + packagePolicySvcMock.update.mock.calls[0][3].inputs[0].config?.policy.value.windows.popup .malware.message ).not.toEqual(CustomMessage); }); diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/isolation.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/isolation.ts index 4652630649ffc..e12299bedbb34 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/isolation.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/isolation.ts @@ -189,6 +189,7 @@ export const isolationRequestHandler = function ( }, } as Omit, user: { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion id: user!.username, }, }; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/enrichment.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/enrichment.test.ts index 39aa0bf2d8cf7..9b454a266834c 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/enrichment.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/enrichment.test.ts @@ -114,8 +114,8 @@ describe('test document enrichment', () => { const enrichedHostList = await enrichHostMetadata(docGen.generateHostMetadata(), metaReqCtx); expect(enrichedHostList.policy_info).toBeDefined(); - expect(enrichedHostList.policy_info!.agent.applied.id).toEqual(policyID); - expect(enrichedHostList.policy_info!.agent.applied.revision).toEqual(policyRev); + expect(enrichedHostList.policy_info?.agent.applied.id).toEqual(policyID); + expect(enrichedHostList.policy_info?.agent.applied.revision).toEqual(policyRev); }); it('reflects current fleet agent info', async () => { @@ -130,8 +130,8 @@ describe('test document enrichment', () => { const enrichedHostList = await enrichHostMetadata(docGen.generateHostMetadata(), metaReqCtx); expect(enrichedHostList.policy_info).toBeDefined(); - expect(enrichedHostList.policy_info!.agent.configured.id).toEqual(policyID); - expect(enrichedHostList.policy_info!.agent.configured.revision).toEqual(policyRev); + expect(enrichedHostList.policy_info?.agent.configured.id).toEqual(policyID); + expect(enrichedHostList.policy_info?.agent.configured.revision).toEqual(policyRev); }); it('reflects current endpoint policy info', async () => { @@ -151,8 +151,8 @@ describe('test document enrichment', () => { const enrichedHostList = await enrichHostMetadata(docGen.generateHostMetadata(), metaReqCtx); expect(enrichedHostList.policy_info).toBeDefined(); - expect(enrichedHostList.policy_info!.endpoint.id).toEqual(policyID); - expect(enrichedHostList.policy_info!.endpoint.revision).toEqual(policyRev); + expect(enrichedHostList.policy_info?.endpoint.id).toEqual(policyID); + expect(enrichedHostList.policy_info?.endpoint.revision).toEqual(policyRev); }); }); }); diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/handlers.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/handlers.ts index 5c06dbd3db14c..027107bcf1a59 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/handlers.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/handlers.ts @@ -114,6 +114,7 @@ export const getMetadataListRequestHandler = function ( } const endpointPolicies = await getAllEndpointPackagePolicies( + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion endpointAppContext.service.getPackagePolicyService()!, context.core.savedObjects.client ); @@ -344,6 +345,7 @@ export async function enrichHostMetadata( const status = await metadataRequestContext.endpointAppContextService ?.getAgentService() ?.getAgentStatusById(esClient.asCurrentUser, elasticAgentId); + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion hostStatus = fleetAgentStatusToEndpointHostStatus(status!); } catch (e) { if (e instanceof AgentNotFoundError) { @@ -361,6 +363,7 @@ export async function enrichHostMetadata( ?.getAgent(esClient.asCurrentUser, elasticAgentId); const agentPolicy = await metadataRequestContext.endpointAppContextService .getAgentPolicyService() + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion ?.get(esSavedObjectClient, agent?.policy_id!, true); const endpointPolicy = ((agentPolicy?.package_policies || []) as PackagePolicy[]).find( (policy: PackagePolicy) => policy.package?.name === 'endpoint' @@ -404,6 +407,7 @@ async function legacyListMetadataQuery( logger: Logger, endpointPolicies: PackagePolicy[] ): Promise { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const agentService = endpointAppContext.service.getAgentService()!; const metadataRequestContext: MetadataRequestContext = { @@ -512,11 +516,15 @@ async function queryUnitedIndex( return metadata && agent; }) .map((doc) => { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const { endpoint: metadata, agent } = doc!._source!.united!; + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const agentPolicy = agentPoliciesMap[agent.policy_id!]; + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const endpointPolicy = endpointPoliciesMap[agent.policy_id!]; return { metadata, + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion host_status: fleetAgentStatusToEndpointHostStatus(agent.last_checkin_status!), policy_info: { agent: { diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts index d9016e7a9c7cb..3e5050c05814a 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts @@ -171,8 +171,8 @@ describe('test endpoint route', () => { const esSearchMock = mockScopedClient.asCurrentUser.search; // should be called twice, united index first, then legacy index expect(esSearchMock).toHaveBeenCalledTimes(2); - expect(esSearchMock.mock.calls[0][0]!.index).toEqual(METADATA_UNITED_INDEX); - expect(esSearchMock.mock.calls[1][0]!.index).toEqual(metadataCurrentIndexPattern); + expect(esSearchMock.mock.calls[0][0]?.index).toEqual(METADATA_UNITED_INDEX); + expect(esSearchMock.mock.calls[1][0]?.index).toEqual(metadataCurrentIndexPattern); expect(routeConfig.options).toEqual({ authRequired: true, tags: ['access:securitySolution'], @@ -224,7 +224,7 @@ describe('test endpoint route', () => { ); expect(esSearchMock).toHaveBeenCalledTimes(1); - expect(esSearchMock.mock.calls[0][0]!.index).toEqual(METADATA_UNITED_INDEX); + expect(esSearchMock.mock.calls[0][0]?.index).toEqual(METADATA_UNITED_INDEX); expect(esSearchMock.mock.calls[0][0]?.body?.query).toEqual({ bool: { must: [ diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.ts index 448496671b4f9..7b09013496c6d 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.ts @@ -53,8 +53,8 @@ export async function kibanaRequestToMetadataListESQuery( body: { query: buildQueryBody( request, - queryBuilderOptions?.unenrolledAgentIds!, - queryBuilderOptions?.statusAgentIds! + queryBuilderOptions?.unenrolledAgentIds, + queryBuilderOptions?.statusAgentIds ), track_total_hits: true, sort: MetadataSortMethod, diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/policy/service.ts b/x-pack/plugins/security_solution/server/endpoint/routes/policy/service.ts index 987bef15afe98..ce46395a1f09f 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/policy/service.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/policy/service.ts @@ -120,12 +120,14 @@ export async function agentVersionsMap( const result: Map = new Map(); let hasMore = true; while (hasMore) { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const queryResult = await endpointAppContext.service .getAgentService()! .listAgents(esClient, searchOptions(page++)); queryResult.agents.forEach((agent: Agent) => { const agentVersion = agent.local_metadata?.elastic?.agent?.version; if (result.has(agentVersion)) { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion result.set(agentVersion, result.get(agentVersion)! + 1); } else { result.set(agentVersion, 1); diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/trusted_apps/service.ts b/x-pack/plugins/security_solution/server/endpoint/routes/trusted_apps/service.ts index 9cefc55eddec4..856a615c1ffa2 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/trusted_apps/service.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/trusted_apps/service.ts @@ -142,6 +142,7 @@ export const getTrustedAppsList = async ( data: results?.data.map(exceptionListItemToTrustedApp) ?? [], total: results?.total ?? 0, page: results?.page ?? 1, + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion per_page: results?.per_page ?? perPage!, }; }; @@ -262,6 +263,7 @@ export const getTrustedAppsSummary = async ( let page = 1; while (paging) { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const { data, total } = (await exceptionsListClient.findExceptionListItem({ listId: ENDPOINT_TRUSTED_APPS_LIST_ID, page, diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions.ts index a04a6eea5ab65..711d78ba51b59 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions.ts @@ -200,6 +200,7 @@ export const getPendingActionCounts = async ( }, { ignore: [404] } ) + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion .then((result) => result.body?.hits?.hits?.map((a) => a._source!) || []) .catch(catchAndWrapError); @@ -272,6 +273,7 @@ const fetchActionResponseIds = async ( }, { ignore: [404] } ) + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion .then((result) => result.body?.hits?.hits?.map((a) => a._source!) || []) .catch(catchAndWrapError); diff --git a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/artifact_client.ts b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/artifact_client.ts index ac19757e037b2..062702bb14a49 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/artifact_client.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/artifact_client.ts @@ -37,6 +37,7 @@ export class EndpointArtifactClient implements EndpointArtifactClientInterface { return { type: idPieces[1], + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion decodedSha256: idPieces.pop()!, identifier: idPieces.join('-'), }; @@ -74,7 +75,7 @@ export class EndpointArtifactClient implements EndpointArtifactClientInterface { async deleteArtifact(id: string) { // Ignoring the `id` not being in the type until we can refactor the types in endpoint. - // @ts-ignore + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const artifactId = (await this.getArtifact(id))?.id!; return this.fleetArtifacts.deleteArtifact(artifactId); } diff --git a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.mock.ts b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.mock.ts index 87a73e0130113..a7fb5dc23877c 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.mock.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.mock.ts @@ -42,14 +42,14 @@ export const mockFindExceptionListItemResponses = ( responses: Record> ) => { return jest.fn().mockImplementation((options: FindExceptionListItemOptions) => { - const matches = options.filter!.match(FILTER_REGEXP) || []; + const matches = options.filter?.match(FILTER_REGEXP) || []; - if (matches[4] && responses[options.listId]?.[`${matches![1]}-${matches[4]}`]) { + if (matches[4] && responses[options.listId]?.[`${matches?.[1]}-${matches[4]}`]) { return createExceptionListResponse( - responses[options.listId]?.[`${matches![1]}-${matches[4]}`] || [] + responses[options.listId]?.[`${matches?.[1]}-${matches[4]}`] || [] ); } else { - return createExceptionListResponse(responses[options.listId]?.[matches![1] || ''] || []); + return createExceptionListResponse(responses[options.listId]?.[matches?.[1] || ''] || []); } }); }; diff --git a/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.ts b/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.ts index 5e2f46aa4c285..23c21e431a344 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.ts @@ -171,6 +171,7 @@ export class EndpointMetadataService { // Get Agent Policy and Endpoint Package Policy if (fleetAgent) { try { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion fleetAgentPolicy = await this.getFleetAgentPolicy(fleetAgent.policy_id!); endpointPackagePolicy = fleetAgentPolicy.package_policies.find( (policy) => policy.package?.name === 'endpoint' @@ -183,7 +184,8 @@ export class EndpointMetadataService { return { metadata: endpointMetadata, host_status: fleetAgent - ? fleetAgentStatusToEndpointHostStatus(fleetAgent.status!) + ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + fleetAgentStatusToEndpointHostStatus(fleetAgent.status!) : DEFAULT_ENDPOINT_HOST_STATUS, policy_info: { agent: { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/create_migration.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/create_migration.ts index f9693c87631b7..8914e8eec87d0 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/create_migration.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/create_migration.ts @@ -94,7 +94,7 @@ export const createMigration = async ({ return { destinationIndex: migrationIndex, sourceIndex: index, - taskId: String(response.body.task!), + taskId: String(response.body.task), version, }; }; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/create_index_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/create_index_route.ts index 61635fdcef9f0..6ec23c32e4976 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/create_index_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/create_index_route.ts @@ -58,7 +58,7 @@ export const createIndexRoute = ( if (!siemClient) { return siemResponse.error({ statusCode: 404 }); } - await createDetectionIndex(context, siemClient!, ruleDataService, ruleRegistryEnabled); + await createDetectionIndex(context, siemClient, ruleDataService, ruleRegistryEnabled); return response.ok({ body: { acknowledged: true } }); } catch (err) { const error = transformError(err); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.test.ts index 48efcc4495aff..26e09d69d3a45 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.test.ts @@ -124,7 +124,7 @@ describe.each([ }); test('returns 404 if rulesClient is not available on the route', async () => { - context.alerting!.getRulesClient = jest.fn(); + context.alerting.getRulesClient = jest.fn(); const request = addPrepackagedRulesRequest(); const response = await server.inject(request, context); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_bulk_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_bulk_route.test.ts index 2c8696dbd4554..6f721bb2bb9c5 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_bulk_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_bulk_route.test.ts @@ -55,7 +55,7 @@ describe.each([ }); test('returns 404 if alertClient is not available on the route', async () => { - context.alerting!.getRulesClient = jest.fn(); + context.alerting.getRulesClient = jest.fn(); const response = await server.inject(getReadBulkRequest(), context); expect(response.status).toEqual(404); expect(response.body).toEqual({ message: 'Not Found', status_code: 404 }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_route.test.ts index d1be96a44930a..59fe5c0ff68a1 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_route.test.ts @@ -56,7 +56,7 @@ describe.each([ }); test('returns 404 if alertClient is not available on the route', async () => { - context.alerting!.getRulesClient = jest.fn(); + context.alerting.getRulesClient = jest.fn(); const response = await server.inject(getCreateRequest(), context); expect(response.status).toEqual(404); expect(response.body).toEqual({ message: 'Not Found', status_code: 404 }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.test.ts index 7db5651de2c34..49580fc09ca63 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.test.ts @@ -84,7 +84,7 @@ describe.each([ }); test('returns 404 if alertClient is not available on the route', async () => { - context.alerting!.getRulesClient = jest.fn(); + context.alerting.getRulesClient = jest.fn(); const response = await server.inject(getDeleteBulkRequest(), context); expect(response.status).toEqual(404); expect(response.body).toEqual({ message: 'Not Found', status_code: 404 }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/delete_rules_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/delete_rules_route.test.ts index 7c447660acb45..466012a045eb3 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/delete_rules_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/delete_rules_route.test.ts @@ -65,7 +65,7 @@ describe.each([ }); test('returns 404 if alertClient is not available on the route', async () => { - context.alerting!.getRulesClient = jest.fn(); + context.alerting.getRulesClient = jest.fn(); const response = await server.inject(getDeleteRequest(), context); expect(response.status).toEqual(404); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/find_rules_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/find_rules_route.test.ts index 7ae3f56b6fea9..0b0650d48872f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/find_rules_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/find_rules_route.test.ts @@ -48,7 +48,7 @@ describe.each([ }); test('returns 404 if alertClient is not available on the route', async () => { - context.alerting!.getRulesClient = jest.fn(); + context.alerting.getRulesClient = jest.fn(); const response = await server.inject(getFindRequest(), context); expect(response.status).toEqual(404); expect(response.body).toEqual({ message: 'Not Found', status_code: 404 }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/find_rules_status_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/find_rules_status_route.test.ts index 053e0b7178de5..5d6b9810a2cda 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/find_rules_status_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/find_rules_status_route.test.ts @@ -41,7 +41,7 @@ describe.each([ }); test('returns 404 if alertClient is not available on the route', async () => { - context.alerting!.getRulesClient = jest.fn(); + context.alerting.getRulesClient = jest.fn(); const response = await server.inject(ruleStatusRequest(), context); expect(response.status).toEqual(404); expect(response.body).toEqual({ message: 'Not Found', status_code: 404 }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.test.ts index 78572863f7472..e97744a5fe5a8 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.test.ts @@ -100,7 +100,7 @@ describe.each([ }); test('returns 404 if alertClient is not available on the route', async () => { - context.alerting!.getRulesClient = jest.fn(); + context.alerting.getRulesClient = jest.fn(); const response = await server.inject(getPrepackagedRulesStatusRequest(), context); expect(response.status).toEqual(404); expect(response.body).toEqual({ message: 'Not Found', status_code: 404 }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/import_rules_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/import_rules_route.test.ts index bf29dbe870153..aa301bcc0335e 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/import_rules_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/import_rules_route.test.ts @@ -77,7 +77,7 @@ describe.each([ }); test('returns 404 if alertClient is not available on the route', async () => { - context.alerting!.getRulesClient = jest.fn(); + context.alerting.getRulesClient = jest.fn(); const response = await server.inject(request, context); expect(response.status).toEqual(404); expect(response.body).toEqual({ message: 'Not Found', status_code: 404 }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.test.ts index 2c3db023dccc4..d0d5937eab2d7 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.test.ts @@ -89,7 +89,7 @@ describe.each([ }); test('returns 404 if alertClient is not available on the route', async () => { - context.alerting!.getRulesClient = jest.fn(); + context.alerting.getRulesClient = jest.fn(); const response = await server.inject(getPatchBulkRequest(), context); expect(response.status).toEqual(404); expect(response.body).toEqual({ message: 'Not Found', status_code: 404 }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/patch_rules_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/patch_rules_route.test.ts index 97773c45ce0d9..00d7180dfc9be 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/patch_rules_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/patch_rules_route.test.ts @@ -69,7 +69,7 @@ describe.each([ }); test('returns 404 if alertClient is not available on the route', async () => { - context.alerting!.getRulesClient = jest.fn(); + context.alerting.getRulesClient = jest.fn(); const response = await server.inject(getPatchRequest(), context); expect(response.status).toEqual(404); expect(response.body).toEqual({ message: 'Not Found', status_code: 404 }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/perform_bulk_action_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/perform_bulk_action_route.test.ts index ebc86acc964e6..41b909bd718c0 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/perform_bulk_action_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/perform_bulk_action_route.test.ts @@ -65,7 +65,7 @@ describe.each([ }); it('returns 404 if alertClient is not available on the route', async () => { - context.alerting!.getRulesClient = jest.fn(); + context.alerting.getRulesClient = jest.fn(); const response = await server.inject(getBulkActionRequest(), context); expect(response.status).toEqual(404); expect(response.body).toEqual({ message: 'Not Found', status_code: 404 }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/read_rules_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/read_rules_route.test.ts index 37b8228ac1e9b..bc9fa43b56ae7 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/read_rules_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/read_rules_route.test.ts @@ -86,7 +86,7 @@ describe.each([ }); test('returns 404 if alertClient is not available on the route', async () => { - context.alerting!.getRulesClient = jest.fn(); + context.alerting.getRulesClient = jest.fn(); const response = await server.inject(getReadRequest(), context); expect(response.status).toEqual(404); expect(response.body).toEqual({ message: 'Not Found', status_code: 404 }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_bulk_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_bulk_route.test.ts index 746a40dfa8dc2..f7bef76944a97 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_bulk_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_bulk_route.test.ts @@ -65,7 +65,7 @@ describe.each([ }); test('returns 404 if alertClient is not available on the route', async () => { - context.alerting!.getRulesClient = jest.fn(); + context.alerting.getRulesClient = jest.fn(); const response = await server.inject(getUpdateBulkRequest(), context); expect(response.status).toEqual(404); expect(response.body).toEqual({ message: 'Not Found', status_code: 404 }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_route.test.ts index 5b3e2737418c2..7d611f3cccbf2 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_route.test.ts @@ -66,7 +66,7 @@ describe.each([ }); test('returns 404 if alertClient is not available on the route', async () => { - context.alerting!.getRulesClient = jest.fn(); + context.alerting.getRulesClient = jest.fn(); const response = await server.inject(getUpdateRequest(), context); expect(response.status).toEqual(404); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/query_signals_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/query_signals_route.ts index 279a824426cec..e2be04fc6e7df 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/query_signals_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/query_signals_route.ts @@ -51,7 +51,7 @@ export const querySignalsRoute = (router: SecuritySolutionPluginRouter, config: }); } const esClient = context.core.elasticsearch.client.asCurrentUser; - const siemClient = context.securitySolution!.getAppClient(); + const siemClient = context.securitySolution.getAppClient(); // TODO: Once we are past experimental phase this code should be removed const { ruleRegistryEnabled } = parseExperimentalConfigValue(config.enableExperimental); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/event_log_adapter/event_log_adapter.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/event_log_adapter/event_log_adapter.ts index 6b1a0cd5b18d0..086cc12788a40 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/event_log_adapter/event_log_adapter.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/event_log_adapter/event_log_adapter.ts @@ -5,7 +5,10 @@ * 2.0. */ +import { sum } from 'lodash'; +import { SavedObjectsClientContract } from '../../../../../../../../src/core/server'; import { IEventLogService } from '../../../../../../event_log/server'; +import { SavedObjectsAdapter } from '../saved_objects_adapter/saved_objects_adapter'; import { FindBulkExecutionLogArgs, FindExecutionLogArgs, @@ -18,21 +21,32 @@ import { EventLogClient } from './event_log_client'; export class EventLogAdapter implements IRuleExecutionLogClient { private eventLogClient: EventLogClient; + /** + * @deprecated Saved objects adapter is used during the transition period while the event log doesn't support all features needed to implement the execution log. + * We use savedObjectsAdapter to write/read the latest rule execution status and eventLogClient to read/write historical execution data. + * We can remove savedObjectsAdapter as soon as the event log supports all methods that we need (find, findBulk). + */ + private savedObjectsAdapter: IRuleExecutionLogClient; - constructor(eventLogService: IEventLogService) { + constructor(eventLogService: IEventLogService, savedObjectsClient: SavedObjectsClientContract) { this.eventLogClient = new EventLogClient(eventLogService); + this.savedObjectsAdapter = new SavedObjectsAdapter(savedObjectsClient); } - public async find({ ruleId, logsCount = 1, spaceId }: FindExecutionLogArgs) { - return []; // TODO Implement + public async find(args: FindExecutionLogArgs) { + return this.savedObjectsAdapter.find(args); } - public async findBulk({ ruleIds, logsCount = 1, spaceId }: FindBulkExecutionLogArgs) { - return {}; // TODO Implement + public async findBulk(args: FindBulkExecutionLogArgs) { + return this.savedObjectsAdapter.findBulk(args); } - public async update({ attributes, spaceId, ruleName, ruleType }: UpdateExecutionLogArgs) { - // execution events are immutable, so we just log a status change istead of updating previous + public async update(args: UpdateExecutionLogArgs) { + const { attributes, spaceId, ruleName, ruleType } = args; + + await this.savedObjectsAdapter.update(args); + + // EventLog execution events are immutable, so we just log a status change istead of updating previous if (attributes.status) { this.eventLogClient.logStatusChange({ ruleName, @@ -45,16 +59,15 @@ export class EventLogAdapter implements IRuleExecutionLogClient { } public async delete(id: string) { - // execution events are immutable, nothing to do here + await this.savedObjectsAdapter.delete(id); + + // EventLog execution events are immutable, nothing to do here } - public async logExecutionMetrics({ - ruleId, - spaceId, - ruleType, - ruleName, - metrics, - }: LogExecutionMetricsArgs) { + public async logExecutionMetrics(args: LogExecutionMetricsArgs) { + const { ruleId, spaceId, ruleType, ruleName, metrics } = args; + await this.savedObjectsAdapter.logExecutionMetrics(args); + this.eventLogClient.logExecutionMetrics({ ruleId, ruleName, @@ -62,16 +75,19 @@ export class EventLogAdapter implements IRuleExecutionLogClient { spaceId, metrics: { executionGapDuration: metrics.executionGap?.asSeconds(), - totalIndexingDuration: metrics.indexingDurations?.reduce( - (acc, cur) => acc + Number(cur), - 0 - ), - totalSearchDuration: metrics.searchDurations?.reduce((acc, cur) => acc + Number(cur), 0), + totalIndexingDuration: metrics.indexingDurations + ? sum(metrics.indexingDurations.map(Number)) + : undefined, + totalSearchDuration: metrics.searchDurations + ? sum(metrics.searchDurations.map(Number)) + : undefined, }, }); } public async logStatusChange(args: LogStatusChangeArgs) { + await this.savedObjectsAdapter.logStatusChange(args); + if (args.metrics) { this.logExecutionMetrics({ ruleId: args.ruleId, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/index.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/index.ts new file mode 100644 index 0000000000000..5c7d9a875056a --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/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 './rule_execution_log_client'; +export * from './types'; +export * from './utils/normalization'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/rule_execution_log_client.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/rule_execution_log_client.ts index 87a3b00cf4ed3..7ae2f179f9692 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/rule_execution_log_client.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/rule_execution_log_client.ts @@ -18,6 +18,7 @@ import { UpdateExecutionLogArgs, UnderlyingLogClient, } from './types'; +import { truncateMessage } from './utils/normalization'; export interface RuleExecutionLogClientArgs { savedObjectsClient: SavedObjectsClientContract; @@ -38,7 +39,7 @@ export class RuleExecutionLogClient implements IRuleExecutionLogClient { this.client = new SavedObjectsAdapter(savedObjectsClient); break; case UnderlyingLogClient.eventLog: - this.client = new EventLogAdapter(eventLogService); + this.client = new EventLogAdapter(eventLogService, savedObjectsClient); break; } } @@ -52,7 +53,16 @@ export class RuleExecutionLogClient implements IRuleExecutionLogClient { } public async update(args: UpdateExecutionLogArgs) { - return this.client.update(args); + const { lastFailureMessage, lastSuccessMessage, ...restAttributes } = args.attributes; + + return this.client.update({ + ...args, + attributes: { + lastFailureMessage: truncateMessage(lastFailureMessage), + lastSuccessMessage: truncateMessage(lastSuccessMessage), + ...restAttributes, + }, + }); } public async delete(id: string) { @@ -64,6 +74,10 @@ export class RuleExecutionLogClient implements IRuleExecutionLogClient { } public async logStatusChange(args: LogStatusChangeArgs) { - return this.client.logStatusChange(args); + const message = args.message ? truncateMessage(args.message) : args.message; + return this.client.logStatusChange({ + ...args, + message, + }); } } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/utils/normalization.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/utils/normalization.ts new file mode 100644 index 0000000000000..baaee9446eee3 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/utils/normalization.ts @@ -0,0 +1,34 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { take, toString, truncate, uniq } from 'lodash'; + +// When we write rule execution status updates to `siem-detection-engine-rule-status` saved objects +// or to event log, we write success and failure messages as well. Those messages are built from +// N errors collected during the "big loop" in the Detection Engine, where N can be very large. +// When N is large the resulting message strings are so large that these documents are up to 26MB. +// These large documents may cause migrations to fail because a batch of 1000 documents easily +// exceed Elasticsearch's `http.max_content_length` which defaults to 100mb. +// In order to fix that, we need to truncate those messages to an adequate MAX length. +// https://github.com/elastic/kibana/pull/112257 + +const MAX_MESSAGE_LENGTH = 10240; +const MAX_LIST_LENGTH = 20; + +export const truncateMessage = (value: unknown): string | undefined => { + if (value === undefined) { + return value; + } + + const str = toString(value); + return truncate(str, { length: MAX_MESSAGE_LENGTH }); +}; + +export const truncateMessageList = (list: string[]): string[] => { + const deduplicatedList = uniq(list); + return take(deduplicatedList, MAX_LIST_LENGTH); +}; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/create_security_rule_type_wrapper.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/create_security_rule_type_wrapper.ts index b037e572f21b7..77981d92b2ba7 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/create_security_rule_type_wrapper.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/create_security_rule_type_wrapper.ts @@ -38,7 +38,7 @@ import { import { getNotificationResultsLink } from '../notifications/utils'; import { createResultObject } from './utils'; import { bulkCreateFactory, wrapHitsFactory, wrapSequencesFactory } from './factories'; -import { RuleExecutionLogClient } from '../rule_execution_log/rule_execution_log_client'; +import { RuleExecutionLogClient, truncateMessageList } from '../rule_execution_log'; import { RuleExecutionStatus } from '../../../../common/detection_engine/schemas/common/schemas'; import { scheduleThrottledNotificationActions } from '../notifications/schedule_throttle_notification_actions'; import { AlertAttributes } from '../signals/types'; @@ -282,7 +282,9 @@ export const createSecurityRuleTypeWrapper: CreateSecurityRuleTypeWrapper = } if (result.warningMessages.length) { - const warningMessage = buildRuleMessage(result.warningMessages.join()); + const warningMessage = buildRuleMessage( + truncateMessageList(result.warningMessages).join() + ); await ruleStatusClient.logStatusChange({ ...basicLogArguments, newStatus: RuleExecutionStatus['partial failure'], @@ -372,7 +374,7 @@ export const createSecurityRuleTypeWrapper: CreateSecurityRuleTypeWrapper = } else { const errorMessage = buildRuleMessage( 'Bulk Indexing of signals failed:', - result.errors.join() + truncateMessageList(result.errors).join() ); logger.error(errorMessage); await ruleStatusClient.logStatusChange({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/field_maps/cti.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/field_maps/cti.ts deleted file mode 100644 index daf54e4f7cf5c..0000000000000 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/field_maps/cti.ts +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -export const ctiFieldMap = { - 'threat.indicator': { - type: 'nested', - array: false, - required: false, - }, - 'threat.indicator.as.number': { - type: 'long', - array: false, - required: false, - }, - 'threat.indicator.as.organization.name': { - type: 'keyword', - array: false, - required: false, - }, - 'threat.indicator.confidence': { - type: 'keyword', - array: false, - required: false, - }, - 'threat.indicator.dataset': { - type: 'keyword', - array: false, - required: false, - }, - 'threat.indicator.description': { - type: 'keyword', - array: false, - required: false, - }, - 'threat.indicator.domain': { - type: 'keyword', - array: false, - required: false, - }, - 'threat.indicator.email.address': { - type: 'keyword', - array: false, - required: false, - }, - 'threat.indicator.first_seen': { - type: 'date', - array: false, - required: false, - }, - 'threat.indicator.geo.city_name': { - type: 'keyword', - array: false, - required: false, - }, - 'threat.indicator.geo.continent_name': { - type: 'keyword', - array: false, - required: false, - }, - 'threat.indicator.geo.country_iso_code': { - type: 'keyword', - array: false, - required: false, - }, - 'threat.indicator.geo.country_name': { - type: 'keyword', - array: false, - required: false, - }, - 'threat.indicator.geo.location': { - type: 'geo_point', - array: false, - required: false, - }, - 'threat.indicator.geo.name': { - type: 'keyword', - array: false, - required: false, - }, - 'threat.indicator.geo.region_iso_code': { - type: 'keyword', - array: false, - required: false, - }, - 'threat.indicator.geo.region_name': { - type: 'keyword', - array: false, - required: false, - }, - 'threat.indicator.ip': { - type: 'ip', - array: false, - required: false, - }, - 'threat.indicator.last_seen': { - type: 'date', - array: false, - required: false, - }, - 'threat.indicator.marking.tlp': { - type: 'keyword', - array: false, - required: false, - }, - 'threat.indicator.matched.atomic': { - type: 'keyword', - array: false, - required: false, - }, - 'threat.indicator.matched.field': { - type: 'keyword', - array: false, - required: false, - }, - 'threat.indicator.matched.type': { - type: 'keyword', - array: false, - required: false, - }, - 'threat.indicator.module': { - type: 'keyword', - array: false, - required: false, - }, - 'threat.indicator.port': { - type: 'long', - array: false, - required: false, - }, - 'threat.indicator.provider': { - type: 'keyword', - array: false, - required: false, - }, - 'threat.indicator.scanner_stats': { - type: 'long', - array: false, - required: false, - }, - 'threat.indicator.sightings': { - type: 'long', - array: false, - required: false, - }, - 'threat.indicator.type': { - type: 'keyword', - array: false, - required: false, - }, -}; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/indicator_match/create_indicator_match_alert_type.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/indicator_match/create_indicator_match_alert_type.test.ts index 576e409378213..1bd3d411adf11 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/indicator_match/create_indicator_match_alert_type.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/indicator_match/create_indicator_match_alert_type.test.ts @@ -42,7 +42,7 @@ describe('Indicator Match Alerts', () => { { field: 'file.hash.md5', type: 'mapping', - value: 'threatintel.indicator.file.hash.md5', + value: 'threat.indicator.file.hash.md5', }, ], }, @@ -156,11 +156,11 @@ describe('Indicator Match Alerts', () => { ...sampleDocNoSortId(v4()), _source: { ...sampleDocNoSortId(v4())._source, - 'threatintel.indicator.file.hash.md5': 'a1b2c3', + 'threat.indicator.file.hash.md5': 'a1b2c3', }, fields: { ...sampleDocNoSortId(v4()).fields, - 'threatintel.indicator.file.hash.md5': ['a1b2c3'], + 'threat.indicator.file.hash.md5': ['a1b2c3'], }, }, ], diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/scripts/create_rule_indicator_match.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/scripts/create_rule_indicator_match.sh index f50aac30a69c5..5beaea5e14475 100755 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/scripts/create_rule_indicator_match.sh +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/scripts/create_rule_indicator_match.sh @@ -46,7 +46,7 @@ curl -X POST ${KIBANA_URL}${SPACE_URL}/api/alerts/alert \ { "field":"file.hash.md5", "type":"mapping", - "value":"threatintel.indicator.file.hash.md5" + "value":"threat.indicator.file.hash.md5" } ] } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_all.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_all.ts index f44471e6e26f9..71079ccefc97a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_all.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_all.ts @@ -5,11 +5,12 @@ * 2.0. */ +import { transformDataToNdjson } from '@kbn/securitysolution-utils'; + import { RulesClient } from '../../../../../alerting/server'; import { getNonPackagedRules } from './get_existing_prepackaged_rules'; import { getExportDetailsNdjson } from './get_export_details_ndjson'; import { transformAlertsToRules } from '../routes/rules/utils'; -import { transformDataToNdjson } from '../../../utils/read_stream/create_stream_from_ndjson'; export const getExportAll = async ( rulesClient: RulesClient, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_by_object_ids.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_by_object_ids.ts index 31a7604306de7..4cf3ad9133a71 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_by_object_ids.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_by_object_ids.ts @@ -6,13 +6,13 @@ */ import { chunk } from 'lodash'; +import { transformDataToNdjson } from '@kbn/securitysolution-utils'; import { RulesSchema } from '../../../../common/detection_engine/schemas/response/rules_schema'; import { RulesClient } from '../../../../../alerting/server'; import { getExportDetailsNdjson } from './get_export_details_ndjson'; import { isAlertType } from '../rules/types'; import { transformAlertToRule } from '../routes/rules/utils'; -import { transformDataToNdjson } from '../../../utils/read_stream/create_stream_from_ndjson'; import { INTERNAL_RULE_ID_KEY } from '../../../../common/constants'; import { findRules } from './find_rules'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/collection_email_powershell_exchange_mailbox.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/collection_email_powershell_exchange_mailbox.json index 25ad15f1b0a51..6e2073bbb82b6 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/collection_email_powershell_exchange_mailbox.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/collection_email_powershell_exchange_mailbox.json @@ -42,7 +42,14 @@ { "id": "T1114", "name": "Email Collection", - "reference": "https://attack.mitre.org/techniques/T1114/" + "reference": "https://attack.mitre.org/techniques/T1114/", + "subtechnique": [ + { + "id": "T1114.002", + "name": "Remote Email Collection", + "reference": "https://attack.mitre.org/techniques/T1114/002/" + } + ] }, { "id": "T1005", @@ -54,5 +61,5 @@ ], "timestamp_override": "event.ingested", "type": "eql", - "version": 4 + "version": 5 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/collection_winrar_encryption.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/collection_winrar_encryption.json index 73c4300556a02..fa0ee2b18bb15 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/collection_winrar_encryption.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/collection_winrar_encryption.json @@ -38,12 +38,19 @@ { "id": "T1560", "name": "Archive Collected Data", - "reference": "https://attack.mitre.org/techniques/T1560/" + "reference": "https://attack.mitre.org/techniques/T1560/", + "subtechnique": [ + { + "id": "T1560.001", + "name": "Archive via Utility", + "reference": "https://attack.mitre.org/techniques/T1560/001/" + } + ] } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 3 + "version": 4 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_common_webservices.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_common_webservices.json index 0d80e78c556b9..b1774ab3dd052 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_common_webservices.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_common_webservices.json @@ -38,9 +38,36 @@ "reference": "https://attack.mitre.org/techniques/T1102/" } ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0010", + "name": "Exfiltration", + "reference": "https://attack.mitre.org/tactics/TA0010/" + }, + "technique": [ + { + "id": "T1567", + "name": "Exfiltration Over Web Service", + "reference": "https://attack.mitre.org/techniques/T1567/", + "subtechnique": [ + { + "id": "T1567.001", + "name": "Exfiltration to Code Repository", + "reference": "https://attack.mitre.org/techniques/T1567/001/" + }, + { + "id": "T1567.002", + "name": "Exfiltration to Cloud Storage", + "reference": "https://attack.mitre.org/techniques/T1567/002/" + } + ] + } + ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 4 + "version": 5 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_dns_directly_to_the_internet.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_dns_directly_to_the_internet.json index 8567b18670301..f57bd65b6d992 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_dns_directly_to_the_internet.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_dns_directly_to_the_internet.json @@ -2,7 +2,7 @@ "author": [ "Elastic" ], - "description": "This rule detects when an internal network client sends DNS traffic directly to the Internet. This is atypical behavior for a managed network and can be indicative of malware, exfiltration, command and control, or simply misconfiguration. This DNS activity also impacts your organization's ability to provide enterprise monitoring and logging of DNS and it opens your network to a variety of abuses and malicious communications.", + "description": "This rule detects when an internal network client sends DNS traffic directly to the Internet. This is atypical behavior for a managed network and can be indicative of malware, exfiltration, command and control, or simply misconfiguration. This DNS activity also impacts your organization's ability to provide enterprise monitoring and logging of DNS, and it opens your network to a variety of abuses and malicious communications.", "false_positives": [ "Exclude DNS servers from this rule as this is expected behavior. Endpoints usually query local DNS servers defined in their DHCP scopes, but this may be overridden if a user configures their endpoint to use a remote DNS server. This is uncommon in managed enterprise networks because it could break intranet name resolution when split horizon DNS is utilized. Some consumer VPN services and browser plug-ins may send DNS traffic to remote Internet destinations. In that case, such devices or networks can be excluded from this rule when this is expected behavior." ], @@ -45,5 +45,5 @@ ], "timestamp_override": "event.ingested", "type": "query", - "version": 11 + "version": 12 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_dns_tunneling_nslookup.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_dns_tunneling_nslookup.json index 0920f336bab44..29c30f6bc0b49 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_dns_tunneling_nslookup.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_dns_tunneling_nslookup.json @@ -38,7 +38,14 @@ { "id": "T1071", "name": "Application Layer Protocol", - "reference": "https://attack.mitre.org/techniques/T1071/" + "reference": "https://attack.mitre.org/techniques/T1071/", + "subtechnique": [ + { + "id": "T1071.004", + "name": "DNS", + "reference": "https://attack.mitre.org/techniques/T1071/004/" + } + ] } ] } @@ -50,5 +57,5 @@ "value": 15 }, "type": "threshold", - "version": 2 + "version": 3 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_download_rar_powershell_from_internet.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_download_rar_powershell_from_internet.json index 0bcbb0d2d031d..dcca38dd242d8 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_download_rar_powershell_from_internet.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_download_rar_powershell_from_internet.json @@ -2,7 +2,7 @@ "author": [ "Elastic" ], - "description": "Detects a Roshal Archive (RAR) file or PowerShell script downloaded from the internet by an internal host. Gaining initial access to a system and then downloading encoded or encrypted tools to move laterally is a common practice for adversaries as a way to protect their more valuable tools and TTPs (tactics, techniques, and procedures). This may be atypical behavior for a managed network and can be indicative of malware, exfiltration, or command and control.", + "description": "Detects a Roshal Archive (RAR) file or PowerShell script downloaded from the internet by an internal host. Gaining initial access to a system and then downloading encoded or encrypted tools to move laterally is a common practice for adversaries as a way to protect their more valuable tools and tactics, techniques, and procedures (TTPs). This may be atypical behavior for a managed network and can be indicative of malware, exfiltration, or command and control.", "false_positives": [ "Downloading RAR or PowerShell files from the Internet may be expected for certain systems. This rule should be tailored to either exclude systems as sources or destinations in which this behavior is expected." ], @@ -52,5 +52,5 @@ ], "timestamp_override": "event.ingested", "type": "query", - "version": 7 + "version": 8 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_iexplore_via_com.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_iexplore_via_com.json index 2cfbbc1c5e101..d0039ab4f02d4 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_iexplore_via_com.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_iexplore_via_com.json @@ -41,8 +41,30 @@ "reference": "https://attack.mitre.org/techniques/T1071/" } ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1559", + "name": "Inter-Process Communication", + "reference": "https://attack.mitre.org/techniques/T1559/", + "subtechnique": [ + { + "id": "T1559.001", + "name": "Component Object Model", + "reference": "https://attack.mitre.org/techniques/T1559/001/" + } + ] + } + ] } ], "type": "eql", - "version": 3 + "version": 4 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_port_forwarding_added_registry.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_port_forwarding_added_registry.json similarity index 66% rename from x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_port_forwarding_added_registry.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_port_forwarding_added_registry.json index cb5c8e87dcae8..65612e6c28f20 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_port_forwarding_added_registry.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_port_forwarding_added_registry.json @@ -24,33 +24,26 @@ "Host", "Windows", "Threat Detection", - "Defense Evasion" + "Command and Control" ], "threat": [ { "framework": "MITRE ATT&CK", "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" }, "technique": [ { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] + "id": "T1572", + "name": "Protocol Tunneling", + "reference": "https://attack.mitre.org/techniques/T1572/" } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 3 + "version": 4 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_rdp_tunnel_plink.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_rdp_tunnel_plink.json similarity index 69% rename from x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_rdp_tunnel_plink.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_rdp_tunnel_plink.json index dd6bdfa0c37d6..3c89ff7c9ff9a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_rdp_tunnel_plink.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_rdp_tunnel_plink.json @@ -2,7 +2,7 @@ "author": [ "Elastic" ], - "description": "Identifies potential use of an SSH utility to establish RDP over a reverse SSH Tunnel. This could be indicative of adversary lateral movement to interactively access restricted networks.", + "description": "Identifies potential use of an SSH utility to establish RDP over a reverse SSH Tunnel. This can be used by attackers to enable routing of network packets that would otherwise not reach their intended destination.", "from": "now-9m", "index": [ "logs-endpoint.events.*", @@ -24,26 +24,26 @@ "Host", "Windows", "Threat Detection", - "Lateral Movement" + "Command and Control" ], "threat": [ { "framework": "MITRE ATT&CK", "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" }, "technique": [ { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/" + "id": "T1572", + "name": "Protocol Tunneling", + "reference": "https://attack.mitre.org/techniques/T1572/" } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 3 + "version": 4 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_remote_file_copy_scripts.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_remote_file_copy_scripts.json index 428b08891c15a..eed29634daeef 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_remote_file_copy_scripts.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_remote_file_copy_scripts.json @@ -12,7 +12,7 @@ "language": "eql", "license": "Elastic License v2", "name": "Remote File Download via Script Interpreter", - "query": "sequence by host.id, process.entity_id\n [network where process.name : (\"wscript.exe\", \"cscript.exe\") and network.protocol != \"dns\" and\n network.direction == \"outgoing\" and network.type == \"ipv4\" and destination.ip != \"127.0.0.1\"\n ]\n [file where event.type == \"creation\" and file.extension : (\"exe\", \"dll\")]\n", + "query": "sequence by host.id, process.entity_id\n [network where process.name : (\"wscript.exe\", \"cscript.exe\") and network.protocol != \"dns\" and\n network.direction : (\"outgoing\", \"egress\") and network.type == \"ipv4\" and destination.ip != \"127.0.0.1\"\n ]\n [file where event.type == \"creation\" and file.extension : (\"exe\", \"dll\")]\n", "risk_score": 47, "rule_id": "1d276579-3380-4095-ad38-e596a01bc64f", "severity": "medium", @@ -41,5 +41,5 @@ } ], "type": "eql", - "version": 2 + "version": 3 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_teamviewer_remote_file_copy.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_teamviewer_remote_file_copy.json index 08d4df2556f6a..a1f0f061a69bc 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_teamviewer_remote_file_copy.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/command_and_control_teamviewer_remote_file_copy.json @@ -39,11 +39,16 @@ "id": "T1105", "name": "Ingress Tool Transfer", "reference": "https://attack.mitre.org/techniques/T1105/" + }, + { + "id": "T1219", + "name": "Remote Access Software", + "reference": "https://attack.mitre.org/techniques/T1219/" } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 4 + "version": 5 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_cmdline_dump_tool.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_cmdline_dump_tool.json index 32c271f736e4a..9671f3c4edf2a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_cmdline_dump_tool.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_cmdline_dump_tool.json @@ -38,12 +38,24 @@ { "id": "T1003", "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/" + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.001", + "name": "LSASS Memory", + "reference": "https://attack.mitre.org/techniques/T1003/001/" + }, + { + "id": "T1003.003", + "name": "NTDS", + "reference": "https://attack.mitre.org/techniques/T1003/003/" + } + ] } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 4 + "version": 5 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_copy_ntds_sam_volshadowcp_cmdline.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_copy_ntds_sam_volshadowcp_cmdline.json index 91613078c6167..0aeba88224138 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_copy_ntds_sam_volshadowcp_cmdline.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_copy_ntds_sam_volshadowcp_cmdline.json @@ -41,12 +41,19 @@ { "id": "T1003", "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/" + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.002", + "name": "Security Account Manager", + "reference": "https://attack.mitre.org/techniques/T1003/002/" + } + ] } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 4 + "version": 5 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_domain_backup_dpapi_private_keys.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_domain_backup_dpapi_private_keys.json index c031fcbf464b1..43ea1078d1583 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_domain_backup_dpapi_private_keys.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_domain_backup_dpapi_private_keys.json @@ -48,11 +48,16 @@ "reference": "https://attack.mitre.org/techniques/T1552/004/" } ] + }, + { + "id": "T1555", + "name": "Credentials from Password Stores", + "reference": "https://attack.mitre.org/techniques/T1555/" } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 5 + "version": 6 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_dump_registry_hives.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_dump_registry_hives.json index c3868162cc839..10c6996fa56aa 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_dump_registry_hives.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_dump_registry_hives.json @@ -38,12 +38,24 @@ { "id": "T1003", "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/" + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.002", + "name": "Security Account Manager", + "reference": "https://attack.mitre.org/techniques/T1003/002/" + }, + { + "id": "T1003.004", + "name": "LSA Secrets", + "reference": "https://attack.mitre.org/techniques/T1003/004/" + } + ] } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 3 + "version": 4 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_kerberoasting_unusual_process.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_kerberoasting_unusual_process.json index b05ddd7bcc8a2..8fc7cd7b379b8 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_kerberoasting_unusual_process.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_kerberoasting_unusual_process.json @@ -15,7 +15,7 @@ "language": "eql", "license": "Elastic License v2", "name": "Kerberos Traffic from Unusual Process", - "query": "network where event.type == \"start\" and network.direction == \"outgoing\" and\n destination.port == 88 and source.port >= 49152 and\n process.executable != \"C:\\\\Windows\\\\System32\\\\lsass.exe\" and destination.address !=\"127.0.0.1\" and destination.address !=\"::1\" and\n /* insert False Positives here */\n not process.name in (\"swi_fc.exe\", \"fsIPcam.exe\", \"IPCamera.exe\", \"MicrosoftEdgeCP.exe\", \"MicrosoftEdge.exe\", \"iexplore.exe\", \"chrome.exe\", \"msedge.exe\", \"opera.exe\", \"firefox.exe\")\n", + "query": "network where event.type == \"start\" and network.direction : (\"outgoing\", \"egress\") and\n destination.port == 88 and source.port >= 49152 and\n process.executable != \"C:\\\\Windows\\\\System32\\\\lsass.exe\" and destination.address !=\"127.0.0.1\" and destination.address !=\"::1\" and\n /* insert False Positives here */\n not process.name in (\"swi_fc.exe\", \"fsIPcam.exe\", \"IPCamera.exe\", \"MicrosoftEdgeCP.exe\", \"MicrosoftEdge.exe\", \"iexplore.exe\", \"chrome.exe\", \"msedge.exe\", \"opera.exe\", \"firefox.exe\")\n", "risk_score": 47, "rule_id": "897dc6b5-b39f-432a-8d75-d3730d50c782", "severity": "medium", @@ -45,5 +45,5 @@ ], "timestamp_override": "event.ingested", "type": "eql", - "version": 3 + "version": 4 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_kerberosdump_kcc.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_kerberosdump_kcc.json index de5a9d80ed3df..3338895f30feb 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_kerberosdump_kcc.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_kerberosdump_kcc.json @@ -39,11 +39,23 @@ "id": "T1003", "name": "OS Credential Dumping", "reference": "https://attack.mitre.org/techniques/T1003/" + }, + { + "id": "T1558", + "name": "Steal or Forge Kerberos Tickets", + "reference": "https://attack.mitre.org/techniques/T1558/", + "subtechnique": [ + { + "id": "T1558.003", + "name": "Kerberoasting", + "reference": "https://attack.mitre.org/techniques/T1558/003/" + } + ] } ] } ], "timestamp_override": "event.ingested", "type": "query", - "version": 3 + "version": 4 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_lsass_memdump_file_created.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_lsass_memdump_file_created.json index 36b614c628b19..d083fb322e895 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_lsass_memdump_file_created.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_lsass_memdump_file_created.json @@ -39,12 +39,19 @@ { "id": "T1003", "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/" + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.001", + "name": "LSASS Memory", + "reference": "https://attack.mitre.org/techniques/T1003/001/" + } + ] } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 4 + "version": 5 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_potential_lsa_memdump_via_mirrordump.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_potential_lsa_memdump_via_mirrordump.json new file mode 100644 index 0000000000000..1024d7f3461f5 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_potential_lsa_memdump_via_mirrordump.json @@ -0,0 +1,55 @@ +{ + "author": [ + "Elastic" + ], + "description": "Identifies suspicious access to an LSASS handle via DuplicateHandle from an unknown call trace module. This may indicate an attempt to bypass the NtOpenProcess API to evade detection and dump Lsass memory for credential access.", + "from": "now-9m", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "language": "eql", + "license": "Elastic License v2", + "name": "Potential Credential Access via DuplicateHandle in LSASS", + "query": "process where event.code == \"10\" and \n\n /* LSASS requesting DuplicateHandle access right to another process */\n process.name : \"lsass.exe\" and winlog.event_data.GrantedAccess == \"0x40\" and\n\n /* call is coming from an unknown executable region */\n winlog.event_data.CallTrace : \"*UNKNOWN*\"\n", + "references": [ + "https://github.com/CCob/MirrorDump" + ], + "risk_score": 47, + "rule_id": "02a4576a-7480-4284-9327-548a806b5e48", + "severity": "medium", + "tags": [ + "Elastic", + "Host", + "Windows", + "Threat Detection", + "Credential Access" + ], + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.001", + "name": "LSASS Memory", + "reference": "https://attack.mitre.org/techniques/T1003/001/" + } + ] + } + ] + } + ], + "timestamp_override": "event.ingested", + "type": "eql", + "version": 1 +} diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_saved_creds_vaultcmd.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_saved_creds_vaultcmd.json index bfb4e44d39b0d..c6db4426ac8c1 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_saved_creds_vaultcmd.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/credential_access_saved_creds_vaultcmd.json @@ -40,11 +40,23 @@ "id": "T1003", "name": "OS Credential Dumping", "reference": "https://attack.mitre.org/techniques/T1003/" + }, + { + "id": "T1555", + "name": "Credentials from Password Stores", + "reference": "https://attack.mitre.org/techniques/T1555/", + "subtechnique": [ + { + "id": "T1555.004", + "name": "Windows Credential Manager", + "reference": "https://attack.mitre.org/techniques/T1555/004/" + } + ] } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 1 + "version": 2 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_clearing_windows_event_logs.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_clearing_windows_event_logs.json index 79e059d68a52a..2759055b0fe5b 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_clearing_windows_event_logs.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_clearing_windows_event_logs.json @@ -35,12 +35,19 @@ { "id": "T1070", "name": "Indicator Removal on Host", - "reference": "https://attack.mitre.org/techniques/T1070/" + "reference": "https://attack.mitre.org/techniques/T1070/", + "subtechnique": [ + { + "id": "T1070.001", + "name": "Clear Windows Event Logs", + "reference": "https://attack.mitre.org/techniques/T1070/001/" + } + ] } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 9 + "version": 10 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_clearing_windows_security_logs.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_clearing_windows_security_logs.json index d04c2b2a38915..eedca883e371c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_clearing_windows_security_logs.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_clearing_windows_security_logs.json @@ -7,7 +7,8 @@ "from": "now-9m", "index": [ "winlogbeat-*", - "logs-windows.*" + "logs-windows.*", + "logs-system.*" ], "language": "kuery", "license": "Elastic License v2", @@ -35,12 +36,19 @@ { "id": "T1070", "name": "Indicator Removal on Host", - "reference": "https://attack.mitre.org/techniques/T1070/" + "reference": "https://attack.mitre.org/techniques/T1070/", + "subtechnique": [ + { + "id": "T1070.001", + "name": "Clear Windows Event Logs", + "reference": "https://attack.mitre.org/techniques/T1070/001/" + } + ] } ] } ], "timestamp_override": "event.ingested", "type": "query", - "version": 1 + "version": 2 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_defender_exclusion_via_powershell.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_defender_exclusion_via_powershell.json index 000384eac660e..716040d337c10 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_defender_exclusion_via_powershell.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_defender_exclusion_via_powershell.json @@ -12,7 +12,7 @@ "language": "eql", "license": "Elastic License v2", "name": "Windows Defender Exclusions Added via PowerShell", - "note": "## Triage and analysis\n\nDetections should be investigated to identify if the activity corresponds to legitimate activity used to put in exceptions for Windows Defender. As this rule detects post-exploitation process activity, investigations into this should be prioritized.", + "note": "## Triage and analysis\n\n### Investigating Windows Defender Exclusions\n\nMicrosoft Windows Defender is an anti-virus product built-in within Microsoft Windows. Since this software product is\nused to prevent and stop malware, it's important to monitor what specific exclusions are made to the product's configuration\nsettings. These can often be signs of an adversary or malware trying to bypass Windows Defender's capabilities. One of the more\nnotable [examples](https://www.cyberbit.com/blog/endpoint-security/latest-trickbot-variant-has-new-tricks-up-its-sleeve/) was observed in 2018 where Trickbot incorporated mechanisms to disable Windows Defense to avoid detection.\n\n#### Possible investigation steps:\n- With this specific rule, it's completely possible to trigger detections on network administrative activity or benign users\nusing scripting and PowerShell to configure the different exclusions for Windows Defender. Therefore, it's important to\nidentify the source of the activity first and determine if there is any mal-intent behind the events.\n- The actual exclusion such as the process, the file or directory should be reviewed in order to determine the original\nintent behind the exclusion. Is the excluded file or process malicious in nature or is it related to software that needs\nto be legitimately whitelisted from Windows Defender?\n\n### False Positive Analysis\n- This rule has a higher chance to produce false positives based on the nature around configuring exclusions by possibly\na network administrator. In order to validate the activity further, review the specific exclusion made and determine based\non the exclusion of the original intent behind the exclusion. There are often many legitimate reasons why exclusions are made\nwith Windows Defender so it's important to gain context around the exclusion.\n\n### Related Rules\n- Windows Defender Disabled via Registry Modification\n- Disabling Windows Defender Security Settings via PowerShell\n\n### Response and Remediation\n- Since this is related to post-exploitation activity, immediate response should be taken to review, investigate and\npotentially isolate further activity\n- If further analysis showed malicious intent was behind the Defender exclusions, administrators should remove\nthe exclusion and ensure antimalware capability has not been disabled or deleted\n- Exclusion lists for antimalware capabilities should always be routinely monitored for review\n", "query": "process where event.type == \"start\" and\n (process.name : (\"powershell.exe\", \"pwsh.exe\") or process.pe.original_file_name : (\"powershell.exe\", \"pwsh.exe\")) and\n process.args : (\"*Add-MpPreference*-Exclusion*\", \"*Set-MpPreference*-Exclusion*\")\n", "references": [ "https://www.bitdefender.com/files/News/CaseStudies/study/400/Bitdefender-PR-Whitepaper-MosaicLoader-creat5540-en-EN.pdf" @@ -80,5 +80,5 @@ ], "timestamp_override": "event.ingested", "type": "eql", - "version": 2 + "version": 3 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_disable_windows_firewall_rules_with_netsh.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_disable_windows_firewall_rules_with_netsh.json index 00f18df34f864..2e18f3ba62786 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_disable_windows_firewall_rules_with_netsh.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_disable_windows_firewall_rules_with_netsh.json @@ -38,9 +38,9 @@ "reference": "https://attack.mitre.org/techniques/T1562/", "subtechnique": [ { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" + "id": "T1562.004", + "name": "Disable or Modify System Firewall", + "reference": "https://attack.mitre.org/techniques/T1562/004/" } ] } @@ -49,5 +49,5 @@ ], "timestamp_override": "event.ingested", "type": "eql", - "version": 9 + "version": 10 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_disabling_windows_logs.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_disabling_windows_logs.json index d2612101a3e4c..256d1c7d9c135 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_disabling_windows_logs.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_disabling_windows_logs.json @@ -40,12 +40,19 @@ { "id": "T1070", "name": "Indicator Removal on Host", - "reference": "https://attack.mitre.org/techniques/T1070/" + "reference": "https://attack.mitre.org/techniques/T1070/", + "subtechnique": [ + { + "id": "T1070.001", + "name": "Clear Windows Event Logs", + "reference": "https://attack.mitre.org/techniques/T1070/001/" + } + ] } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 1 + "version": 2 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_dotnet_compiler_parent_process.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_dotnet_compiler_parent_process.json index 4588a8ab28657..e8edb8fba6472 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_dotnet_compiler_parent_process.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_dotnet_compiler_parent_process.json @@ -33,14 +33,21 @@ }, "technique": [ { - "id": "T1055", - "name": "Process Injection", - "reference": "https://attack.mitre.org/techniques/T1055/" + "id": "T1027", + "name": "Obfuscated Files or Information", + "reference": "https://attack.mitre.org/techniques/T1027/", + "subtechnique": [ + { + "id": "T1027.004", + "name": "Compile After Delivery", + "reference": "https://attack.mitre.org/techniques/T1027/004/" + } + ] } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 4 + "version": 5 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_elasticache_security_group_creation.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_elasticache_security_group_creation.json new file mode 100644 index 0000000000000..5685ac76b3ef9 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_elasticache_security_group_creation.json @@ -0,0 +1,61 @@ +{ + "author": [ + "Austin Songer" + ], + "description": "Identifies when an ElastiCache security group has been created.", + "false_positives": [ + "A ElastiCache security group may be created by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Security group creations from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "from": "now-60m", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "interval": "10m", + "language": "kuery", + "license": "Elastic License v2", + "name": "AWS ElastiCache Security Group Created", + "note": "## Config\n\nThe AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "query": "event.dataset:aws.cloudtrail and event.provider:elasticache.amazonaws.com and event.action:\"Create Cache Security Group\" and \nevent.outcome:success\n", + "references": [ + "https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_CreateCacheSecurityGroup.html" + ], + "risk_score": 21, + "rule_id": "7b3da11a-60a2-412e-8aa7-011e1eb9ed47", + "severity": "low", + "tags": [ + "Elastic", + "Cloud", + "AWS", + "Continuous Monitoring", + "SecOps", + "Monitoring" + ], + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.007", + "name": "Disable or Modify Cloud Firewall", + "reference": "https://attack.mitre.org/techniques/T1562/007/" + } + ] + } + ] + } + ], + "timestamp_override": "event.ingested", + "type": "query", + "version": 1 +} diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_elasticache_security_group_modified_or_deleted.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_elasticache_security_group_modified_or_deleted.json new file mode 100644 index 0000000000000..83b58c0c046e0 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_elasticache_security_group_modified_or_deleted.json @@ -0,0 +1,61 @@ +{ + "author": [ + "Austin Songer" + ], + "description": "Identifies when an ElastiCache security group has been modified or deleted.", + "false_positives": [ + "A ElastiCache security group deletion may be done by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Security Group deletions from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "from": "now-60m", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "interval": "10m", + "language": "kuery", + "license": "Elastic License v2", + "name": "AWS ElastiCache Security Group Modified or Deleted", + "note": "## Config\n\nThe AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "query": "event.dataset:aws.cloudtrail and event.provider:elasticache.amazonaws.com and event.action:(\"Delete Cache Security Group\" or \n\"Authorize Cache Security Group Ingress\" or \"Revoke Cache Security Group Ingress\" or \"AuthorizeCacheSecurityGroupEgress\" or \n\"RevokeCacheSecurityGroupEgress\") and event.outcome:success\n", + "references": [ + "https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/Welcome.html" + ], + "risk_score": 21, + "rule_id": "1ba5160d-f5a2-4624-b0ff-6a1dc55d2516", + "severity": "low", + "tags": [ + "Elastic", + "Cloud", + "AWS", + "Continuous Monitoring", + "SecOps", + "Monitoring" + ], + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.007", + "name": "Disable or Modify Cloud Firewall", + "reference": "https://attack.mitre.org/techniques/T1562/007/" + } + ] + } + ] + } + ], + "timestamp_override": "event.ingested", + "type": "query", + "version": 1 +} diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_enable_inbound_rdp_with_netsh.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_enable_inbound_rdp_with_netsh.json index 93454122d1160..e6b53af71433a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_enable_inbound_rdp_with_netsh.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_enable_inbound_rdp_with_netsh.json @@ -38,9 +38,9 @@ "reference": "https://attack.mitre.org/techniques/T1562/", "subtechnique": [ { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" + "id": "T1562.004", + "name": "Disable or Modify System Firewall", + "reference": "https://attack.mitre.org/techniques/T1562/004/" } ] } @@ -49,5 +49,5 @@ ], "timestamp_override": "event.ingested", "type": "eql", - "version": 3 + "version": 4 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_enable_network_discovery_with_netsh.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_enable_network_discovery_with_netsh.json index 5fcbec498a177..bf688fd74ce14 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_enable_network_discovery_with_netsh.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_enable_network_discovery_with_netsh.json @@ -41,9 +41,9 @@ "reference": "https://attack.mitre.org/techniques/T1562/", "subtechnique": [ { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" + "id": "T1562.004", + "name": "Disable or Modify System Firewall", + "reference": "https://attack.mitre.org/techniques/T1562/004/" } ] } @@ -52,5 +52,5 @@ ], "timestamp_override": "event.ingested", "type": "eql", - "version": 1 + "version": 2 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_execution_control_panel_suspicious_args.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_execution_control_panel_suspicious_args.json new file mode 100644 index 0000000000000..787e61cfe25c4 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_execution_control_panel_suspicious_args.json @@ -0,0 +1,56 @@ +{ + "author": [ + "Elastic" + ], + "description": "Identifies unusual instances of Control Panel with suspicious keywords or paths in the process command line value. Adversaries may abuse Control.exe to proxy execution of malicious code.", + "from": "now-9m", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*" + ], + "language": "eql", + "license": "Elastic License v2", + "name": "Control Panel Process with Unusual Arguments", + "query": "process where event.type in (\"start\", \"process_started\") and\n process.executable : (\"?:\\\\Windows\\\\SysWOW64\\\\control.exe\", \"?:\\\\Windows\\\\System32\\\\control.exe\") and\n process.command_line :\n (\"*.jpg*\",\n \"*.png*\",\n \"*.gif*\",\n \"*.bmp*\",\n \"*.jpeg*\",\n \"*.TIFF*\",\n \"*.inf*\",\n \"*.dat*\",\n \"*.cpl:*/*\",\n \"*../../..*\",\n \"*/AppData/Local/*\",\n \"*:\\\\Users\\\\Public\\\\*\",\n \"*\\\\AppData\\\\Local\\\\*\")\n", + "references": [ + "https://www.joesandbox.com/analysis/476188/1/html" + ], + "risk_score": 73, + "rule_id": "416697ae-e468-4093-a93d-59661fa619ec", + "severity": "high", + "tags": [ + "Elastic", + "Host", + "Windows", + "Threat Detection", + "Defense Evasion" + ], + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "Signed Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/", + "subtechnique": [ + { + "id": "T1218.002", + "name": "Control Panel", + "reference": "https://attack.mitre.org/techniques/T1218/002/" + } + ] + } + ] + } + ], + "timestamp_override": "event.ingested", + "type": "eql", + "version": 1 +} diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_execution_msbuild_started_by_office_app.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_execution_msbuild_started_by_office_app.json index d56c90552d457..0ad45f03a0499 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_execution_msbuild_started_by_office_app.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_execution_msbuild_started_by_office_app.json @@ -41,7 +41,14 @@ { "id": "T1127", "name": "Trusted Developer Utilities Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1127/" + "reference": "https://attack.mitre.org/techniques/T1127/", + "subtechnique": [ + { + "id": "T1127.001", + "name": "MSBuild", + "reference": "https://attack.mitre.org/techniques/T1127/001/" + } + ] } ] }, @@ -57,5 +64,5 @@ ], "timestamp_override": "event.ingested", "type": "eql", - "version": 8 + "version": 9 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_execution_msbuild_started_by_script.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_execution_msbuild_started_by_script.json index 3b640d8757b51..60b2a8f50c3f4 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_execution_msbuild_started_by_script.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_execution_msbuild_started_by_script.json @@ -38,7 +38,14 @@ { "id": "T1127", "name": "Trusted Developer Utilities Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1127/" + "reference": "https://attack.mitre.org/techniques/T1127/", + "subtechnique": [ + { + "id": "T1127.001", + "name": "MSBuild", + "reference": "https://attack.mitre.org/techniques/T1127/001/" + } + ] } ] }, @@ -54,5 +61,5 @@ ], "timestamp_override": "event.ingested", "type": "eql", - "version": 8 + "version": 9 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_execution_msbuild_started_by_system_process.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_execution_msbuild_started_by_system_process.json index 33094a88af313..fdee8ee548218 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_execution_msbuild_started_by_system_process.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_execution_msbuild_started_by_system_process.json @@ -38,7 +38,14 @@ { "id": "T1127", "name": "Trusted Developer Utilities Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1127/" + "reference": "https://attack.mitre.org/techniques/T1127/", + "subtechnique": [ + { + "id": "T1127.001", + "name": "MSBuild", + "reference": "https://attack.mitre.org/techniques/T1127/001/" + } + ] } ] }, @@ -54,5 +61,5 @@ ], "timestamp_override": "event.ingested", "type": "eql", - "version": 8 + "version": 9 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_execution_msbuild_started_renamed.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_execution_msbuild_started_renamed.json index 43051cb8b27c9..a22594083bedb 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_execution_msbuild_started_renamed.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_execution_msbuild_started_renamed.json @@ -38,12 +38,19 @@ { "id": "T1036", "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/" + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.003", + "name": "Rename System Utilities", + "reference": "https://attack.mitre.org/techniques/T1036/003/" + } + ] } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 8 + "version": 9 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_execution_windefend_unusual_path.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_execution_windefend_unusual_path.json index 7812dee8235ca..826d55f3b1882 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_execution_windefend_unusual_path.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_execution_windefend_unusual_path.json @@ -1,6 +1,7 @@ { "author": [ - "Elastic" + "Elastic", + "Dennis Perto" ], "description": "Identifies a Windows trusted program that is known to be vulnerable to DLL Search Order Hijacking starting after being renamed or from a non-standard path. This is uncommon behavior and may indicate an attempt to evade defenses via side-loading a malicious DLL within the memory space of one of those processes.", "false_positives": [ @@ -15,7 +16,7 @@ "language": "eql", "license": "Elastic License v2", "name": "Potential DLL Side-Loading via Microsoft Antimalware Service Executable", - "query": "process where event.type == \"start\" and\n (process.pe.original_file_name == \"MsMpEng.exe\" and not process.name : \"MsMpEng.exe\") or\n (process.name : \"MsMpEng.exe\" and not\n process.executable : (\"?:\\\\ProgramData\\\\Microsoft\\\\Windows Defender\\\\*.exe\",\n \"?:\\\\Program Files\\\\Windows Defender\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\Windows Defender\\\\*.exe\"))\n", + "query": "process where event.type == \"start\" and\n (process.pe.original_file_name == \"MsMpEng.exe\" and not process.name : \"MsMpEng.exe\") or\n (process.name : \"MsMpEng.exe\" and not\n process.executable : (\"?:\\\\ProgramData\\\\Microsoft\\\\Windows Defender\\\\*.exe\",\n \"?:\\\\Program Files\\\\Windows Defender\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\Windows Defender\\\\*.exe\",\n \"?:\\\\Program Files\\\\Microsoft Security Client\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\Microsoft Security Client\\\\*.exe\"))\n", "references": [ "https://news.sophos.com/en-us/2021/07/04/independence-day-revil-uses-supply-chain-exploit-to-attack-hundreds-of-businesses/" ], @@ -55,5 +56,5 @@ ], "timestamp_override": "event.ingested", "type": "eql", - "version": 1 + "version": 2 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_file_creation_mult_extension.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_file_creation_mult_extension.json index 24cbb1e41dad6..4cbfb8bbbce6c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_file_creation_mult_extension.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_file_creation_mult_extension.json @@ -45,9 +45,31 @@ ] } ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1204", + "name": "User Execution", + "reference": "https://attack.mitre.org/techniques/T1204/", + "subtechnique": [ + { + "id": "T1204.002", + "name": "Malicious File", + "reference": "https://attack.mitre.org/techniques/T1204/002/" + } + ] + } + ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 2 + "version": 3 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_frontdoor_firewall_policy_deletion.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_frontdoor_firewall_policy_deletion.json new file mode 100644 index 0000000000000..c443d45dde4f0 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_frontdoor_firewall_policy_deletion.json @@ -0,0 +1,60 @@ +{ + "author": [ + "Austin Songer" + ], + "description": "Identifies the deletion of a Frontdoor Web Application Firewall (WAF) Policy in Azure. An adversary may delete a Frontdoor Web Application Firewall (WAF) Policy in an attempt to evade defenses and/or to eliminate barriers in carrying out their initiative.", + "false_positives": [ + "Azure Front Web Application Firewall (WAF) Policy deletions may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Azure Front Web Application Firewall (WAF) Policy deletions from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "from": "now-25m", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "language": "kuery", + "license": "Elastic License v2", + "name": "Azure Frontdoor Web Application Firewall (WAF) Policy Deleted", + "note": "## Config\n\nThe Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.NETWORK/FRONTDOORWEBAPPLICATIONFIREWALLPOLICIES/DELETE\" and event.outcome:(Success or success)\n", + "references": [ + "https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations#networking" + ], + "risk_score": 21, + "rule_id": "09d028a5-dcde-409f-8ae0-557cef1b7082", + "severity": "low", + "tags": [ + "Elastic", + "Cloud", + "Azure", + "Continuous Monitoring", + "SecOps", + "Network Security" + ], + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "timestamp_override": "event.ingested", + "type": "query", + "version": 1 +} diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_hide_encoded_executable_registry.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_hide_encoded_executable_registry.json index 006f95054d047..c40bbf236d668 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_hide_encoded_executable_registry.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_hide_encoded_executable_registry.json @@ -36,11 +36,16 @@ "id": "T1140", "name": "Deobfuscate/Decode Files or Information", "reference": "https://attack.mitre.org/techniques/T1140/" + }, + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 3 + "version": 4 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_iis_httplogging_disabled.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_iis_httplogging_disabled.json index 16de1c9c21f97..da12646d40226 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_iis_httplogging_disabled.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_iis_httplogging_disabled.json @@ -34,14 +34,21 @@ }, "technique": [ { - "id": "T1070", - "name": "Indicator Removal on Host", - "reference": "https://attack.mitre.org/techniques/T1070/" + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.002", + "name": "Disable Windows Event Logging", + "reference": "https://attack.mitre.org/techniques/T1562/002/" + } + ] } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 5 + "version": 6 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_installutil_beacon.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_installutil_beacon.json index 4917cffd64ccb..72ef939fd2c1c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_installutil_beacon.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_installutil_beacon.json @@ -12,7 +12,7 @@ "language": "eql", "license": "Elastic License v2", "name": "InstallUtil Process Making Network Connections", - "query": "/* the benefit of doing this as an eql sequence vs kql is this will limit to alerting only on the first network connection */\n\nsequence by process.entity_id\n [process where event.type in (\"start\", \"process_started\") and process.name : \"installutil.exe\"]\n [network where process.name : \"installutil.exe\" and network.direction == \"outgoing\"]\n", + "query": "/* the benefit of doing this as an eql sequence vs kql is this will limit to alerting only on the first network connection */\n\nsequence by process.entity_id\n [process where event.type in (\"start\", \"process_started\") and process.name : \"installutil.exe\"]\n [network where process.name : \"installutil.exe\" and network.direction : (\"outgoing\", \"egress\")]\n", "risk_score": 21, "rule_id": "a13167f1-eec2-4015-9631-1fee60406dcf", "severity": "medium", @@ -48,5 +48,5 @@ } ], "type": "eql", - "version": 3 + "version": 4 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_masquerading_renamed_autoit.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_masquerading_renamed_autoit.json index bd0a3ac9f918d..5c855207dda7d 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_masquerading_renamed_autoit.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_masquerading_renamed_autoit.json @@ -35,12 +35,19 @@ { "id": "T1036", "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/" + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.003", + "name": "Rename System Utilities", + "reference": "https://attack.mitre.org/techniques/T1036/003/" + } + ] } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 4 + "version": 5 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_masquerading_trusted_directory.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_masquerading_trusted_directory.json index b0d11121c1a15..7ac21a70100c0 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_masquerading_trusted_directory.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_masquerading_trusted_directory.json @@ -35,12 +35,19 @@ { "id": "T1036", "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/" + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.005", + "name": "Match Legitimate Name or Location", + "reference": "https://attack.mitre.org/techniques/T1036/005/" + } + ] } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 4 + "version": 5 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_masquerading_werfault.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_masquerading_werfault.json index 2733bf992838e..a08e3040c6c95 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_masquerading_werfault.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_masquerading_werfault.json @@ -15,7 +15,7 @@ "language": "eql", "license": "Elastic License v2", "name": "Potential Windows Error Manager Masquerading", - "query": "sequence by host.id, process.entity_id with maxspan = 5s\n [process where event.type:\"start\" and process.name : (\"wermgr.exe\", \"WerFault.exe\") and process.args_count == 1]\n [network where process.name : (\"wermgr.exe\", \"WerFault.exe\") and network.protocol != \"dns\" and\n network.direction == \"outgoing\" and destination.ip !=\"::1\" and destination.ip !=\"127.0.0.1\"\n ]\n", + "query": "sequence by host.id, process.entity_id with maxspan = 5s\n [process where event.type:\"start\" and process.name : (\"wermgr.exe\", \"WerFault.exe\") and process.args_count == 1]\n [network where process.name : (\"wermgr.exe\", \"WerFault.exe\") and network.protocol != \"dns\" and\n network.direction : (\"outgoing\", \"egress\") and destination.ip !=\"::1\" and destination.ip !=\"127.0.0.1\"\n ]\n", "references": [ "https://twitter.com/SBousseaden/status/1235533224337641473", "https://www.hexacorn.com/blog/2019/09/20/werfault-command-line-switches-v0-1/", @@ -49,5 +49,5 @@ } ], "type": "eql", - "version": 3 + "version": 4 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_msbuild_making_network_connections.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_msbuild_making_network_connections.json index a2019165f93c6..6d0110c229c33 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_msbuild_making_network_connections.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_msbuild_making_network_connections.json @@ -35,11 +35,18 @@ { "id": "T1127", "name": "Trusted Developer Utilities Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1127/" + "reference": "https://attack.mitre.org/techniques/T1127/", + "subtechnique": [ + { + "id": "T1127.001", + "name": "MSBuild", + "reference": "https://attack.mitre.org/techniques/T1127/001/" + } + ] } ] } ], "type": "eql", - "version": 7 + "version": 8 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_process_termination_followed_by_deletion.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_process_termination_followed_by_deletion.json index b7d65b2336001..85316f7836b89 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_process_termination_followed_by_deletion.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_process_termination_followed_by_deletion.json @@ -33,11 +33,18 @@ { "id": "T1070", "name": "Indicator Removal on Host", - "reference": "https://attack.mitre.org/techniques/T1070/" + "reference": "https://attack.mitre.org/techniques/T1070/", + "subtechnique": [ + { + "id": "T1070.004", + "name": "File Deletion", + "reference": "https://attack.mitre.org/techniques/T1070/004/" + } + ] } ] } ], "type": "eql", - "version": 2 + "version": 3 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_unusual_dir_ads.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_unusual_dir_ads.json index 196a3de9b9e6f..f926a1ba24faf 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_unusual_dir_ads.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_unusual_dir_ads.json @@ -35,12 +35,19 @@ { "id": "T1564", "name": "Hide Artifacts", - "reference": "https://attack.mitre.org/techniques/T1564/" + "reference": "https://attack.mitre.org/techniques/T1564/", + "subtechnique": [ + { + "id": "T1564.004", + "name": "NTFS File Attributes", + "reference": "https://attack.mitre.org/techniques/T1564/004/" + } + ] } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 4 + "version": 5 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_via_filter_manager.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_via_filter_manager.json index 51d1789804548..c0d171739b76d 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_via_filter_manager.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_via_filter_manager.json @@ -33,14 +33,21 @@ }, "technique": [ { - "id": "T1222", - "name": "File and Directory Permissions Modification", - "reference": "https://attack.mitre.org/techniques/T1222/" + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 7 + "version": 8 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_whitespace_padding_in_command_line.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_whitespace_padding_in_command_line.json index fc9b480023c95..f022f0c27ff5e 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_whitespace_padding_in_command_line.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_whitespace_padding_in_command_line.json @@ -12,7 +12,7 @@ "language": "eql", "license": "Elastic License v2", "name": "Whitespace Padding in Process Command Line", - "note": "## Triage and analysis\n\n- Analyze the command line of the process in question for evidence of malicious code execution.\n- Review the ancestry and child processes spawned by the process in question for indicators of further malicious code execution.", + "note": "## Triage and analysis\n\n- Analyze the command line of the process in question for evidence of malicious code execution.\n- Review the ancestor and child processes spawned by the process in question for indicators of further malicious code execution.", "query": "process where event.type in (\"start\", \"process_started\") and\n process.command_line regex \".*[ ]{20,}.*\" or \n \n /* this will match on 3 or more separate occurrences of 5+ contiguous whitespace characters */\n process.command_line regex \".*(.*[ ]{5,}[^ ]*){3,}.*\"\n", "references": [ "https://twitter.com/JohnLaTwC/status/1419251082736201737" @@ -40,5 +40,5 @@ ], "timestamp_override": "event.ingested", "type": "eql", - "version": 1 + "version": 2 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/discovery_adfind_command_activity.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/discovery_adfind_command_activity.json index 97ba7da6c5f3b..9af3832303666 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/discovery_adfind_command_activity.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/discovery_adfind_command_activity.json @@ -12,7 +12,7 @@ "language": "eql", "license": "Elastic License v2", "name": "AdFind Command Activity", - "note": "## Triage and analysis\n\n`AdFind.exe` is a legitimate domain query tool. Rule alerts should be investigated to identify if the user has a role that would explain using this tool and that it is being run from an expected directory and endpoint. Leverage the exception workflow in the Kibana Security App or Elasticsearch API to tune this rule to your environment.", + "note": "## Triage and analysis\n\n### Investigating AdFind Command Activity\n\n[AdFind](http://www.joeware.net/freetools/tools/adfind/) is a freely available command-line tool used to retrieve information from\nActivity Directory (AD). Network discovery and enumeration tools like `AdFind` are useful to adversaries in the same ways\nthey are effective for network administrators. This tool provides quick ability to scope AD person/computer objects and\nunderstand subnets and domain information. There are many [examples](https://thedfirreport.com/category/adfind/)\nobserved where this tool has been adopted by ransomware and criminal groups and used in compromises.\n\n#### Possible investigation steps:\n- `AdFind` is a legitimate Active Directory enumeration tool used by network administrators, it's important to understand\nthe source of the activity. This could involve identifying the account using `AdFind` and determining based on the command-lines\nwhat information was retrieved, then further determining if these actions are in scope of that user's traditional responsibilities.\n- In multiple public references, `AdFind` is leveraged after initial access is achieved, review previous activity on impacted\nmachine looking for suspicious indicators such as previous anti-virus/EDR alerts, phishing emails received, or network traffic\nto suspicious infrastructure\n\n### False Positive Analysis\n- This rule has the high chance to produce false positives as it is a legitimate tool used by network administrators. One\noption could be whitelisting specific users or groups who use the tool as part of their daily responsibilities. This can\nbe done by leveraging the exception workflow in the Kibana Security App or Elasticsearch API to tune this rule to your environment\n- Malicious behavior with `AdFind` should be investigated as part of a step within an attack chain. It doesn't happen in\nisolation, so reviewing previous logs/activity from impacted machines could be very telling.\n\n### Related Rules\n- Windows Network Enumeration\n- Enumeration of Administrator Accounts\n- Enumeration Command Spawned via WMIPrvSE\n\n### Response and Remediation\n- Immediate response should be taken to validate activity, investigate and potentially isolate activity to prevent further\npost-compromise behavior\n- It's important to understand that `AdFind` is an Active Directory enumeration tool and can be used for malicious or legitimate\npurposes, so understanding the intent behind the activity will help determine the appropropriate response.\n", "query": "process where event.type in (\"start\", \"process_started\") and \n (process.name : \"AdFind.exe\" or process.pe.original_file_name == \"AdFind.exe\") and \n process.args : (\"objectcategory=computer\", \"(objectcategory=computer)\", \n \"objectcategory=person\", \"(objectcategory=person)\",\n \"objectcategory=subnet\", \"(objectcategory=subnet)\",\n \"objectcategory=group\", \"(objectcategory=group)\", \n \"objectcategory=organizationalunit\", \"(objectcategory=organizationalunit)\",\n \"objectcategory=attributeschema\", \"(objectcategory=attributeschema)\",\n \"domainlist\", \"dcmodes\", \"adinfo\", \"dclist\", \"computers_pwnotreqd\", \"trustdmp\")\n", "references": [ "http://www.joeware.net/freetools/tools/adfind/", @@ -69,11 +69,16 @@ "id": "T1482", "name": "Domain Trust Discovery", "reference": "https://attack.mitre.org/techniques/T1482/" + }, + { + "id": "T1018", + "name": "Remote System Discovery", + "reference": "https://attack.mitre.org/techniques/T1018/" } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 4 + "version": 5 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/discovery_admin_recon.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/discovery_admin_recon.json index 1a3ceebe7218f..d5026780fdf56 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/discovery_admin_recon.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/discovery_admin_recon.json @@ -35,7 +35,14 @@ { "id": "T1069", "name": "Permission Groups Discovery", - "reference": "https://attack.mitre.org/techniques/T1069/" + "reference": "https://attack.mitre.org/techniques/T1069/", + "subtechnique": [ + { + "id": "T1069.002", + "name": "Domain Groups", + "reference": "https://attack.mitre.org/techniques/T1069/002/" + } + ] }, { "id": "T1087", @@ -47,5 +54,5 @@ ], "timestamp_override": "event.ingested", "type": "eql", - "version": 3 + "version": 4 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/discovery_net_command_system_account.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/discovery_net_command_system_account.json index 87b32d14791bb..dc855f3ed9a57 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/discovery_net_command_system_account.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/discovery_net_command_system_account.json @@ -33,14 +33,14 @@ }, "technique": [ { - "id": "T1087", - "name": "Account Discovery", - "reference": "https://attack.mitre.org/techniques/T1087/" + "id": "T1033", + "name": "System Owner/User Discovery", + "reference": "https://attack.mitre.org/techniques/T1033/" } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 7 + "version": 8 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/discovery_security_software_wmic.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/discovery_security_software_wmic.json index d0f26c6e41756..92731ab40e78a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/discovery_security_software_wmic.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/discovery_security_software_wmic.json @@ -35,12 +35,19 @@ { "id": "T1518", "name": "Software Discovery", - "reference": "https://attack.mitre.org/techniques/T1518/" + "reference": "https://attack.mitre.org/techniques/T1518/", + "subtechnique": [ + { + "id": "T1518.001", + "name": "Security Software Discovery", + "reference": "https://attack.mitre.org/techniques/T1518/001/" + } + ] } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 3 + "version": 4 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/discovery_virtual_machine_fingerprinting_grep.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/discovery_virtual_machine_fingerprinting_grep.json new file mode 100644 index 0000000000000..e557e37db23d6 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/discovery_virtual_machine_fingerprinting_grep.json @@ -0,0 +1,52 @@ +{ + "author": [ + "Elastic" + ], + "description": "An adversary may attempt to get detailed information about the operating system and hardware. This rule identifies common locations used to discover virtual machine hardware by a non-root user. This technique has been used by the Pupy RAT and other malware.", + "false_positives": [ + "Certain tools or automated software may enumerate hardware information. These tools can be exempted via user name or process arguments to eliminate potential noise." + ], + "from": "now-9m", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "language": "eql", + "license": "Elastic License v2", + "name": "Virtual Machine Fingerprinting via Grep", + "query": "process where event.type == \"start\" and\n process.name in (\"grep\", \"egrep\") and user.id != \"0\" and\n process.args : (\"parallels*\", \"vmware*\", \"virtualbox*\") and process.args : \"Manufacturer*\" and \n not process.parent.executable in (\"/Applications/Docker.app/Contents/MacOS/Docker\", \"/usr/libexec/kcare/virt-what\")\n", + "references": [ + "https://objective-see.com/blog/blog_0x4F.html" + ], + "risk_score": 47, + "rule_id": "c85eb82c-d2c8-485c-a36f-534f914b7663", + "severity": "medium", + "tags": [ + "Elastic", + "Host", + "macOS", + "Linux", + "Threat Detection", + "Discovery" + ], + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1082", + "name": "System Information Discovery", + "reference": "https://attack.mitre.org/techniques/T1082/" + } + ] + } + ], + "timestamp_override": "event.ingested", + "type": "eql", + "version": 1 +} diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/execution_enumeration_via_wmiprvse.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/execution_enumeration_via_wmiprvse.json index 6a967d9644c47..441e01b4a1b12 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/execution_enumeration_via_wmiprvse.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/execution_enumeration_via_wmiprvse.json @@ -38,9 +38,34 @@ "reference": "https://attack.mitre.org/techniques/T1047/" } ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1518", + "name": "Software Discovery", + "reference": "https://attack.mitre.org/techniques/T1518/" + }, + { + "id": "T1087", + "name": "Account Discovery", + "reference": "https://attack.mitre.org/techniques/T1087/" + }, + { + "id": "T1018", + "name": "Remote System Discovery", + "reference": "https://attack.mitre.org/techniques/T1018/" + } + ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 1 + "version": 2 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/execution_html_help_executable_program_connecting_to_the_internet.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/execution_html_help_executable_program_connecting_to_the_internet.json index abc41d9f6d5c3..094b87f33ada7 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/execution_html_help_executable_program_connecting_to_the_internet.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/execution_html_help_executable_program_connecting_to_the_internet.json @@ -34,7 +34,20 @@ "name": "Execution", "reference": "https://attack.mitre.org/tactics/TA0002/" }, - "technique": [] + "technique": [ + { + "id": "T1204", + "name": "User Execution", + "reference": "https://attack.mitre.org/techniques/T1204/", + "subtechnique": [ + { + "id": "T1204.002", + "name": "Malicious File", + "reference": "https://attack.mitre.org/techniques/T1204/002/" + } + ] + } + ] }, { "framework": "MITRE ATT&CK", @@ -60,5 +73,5 @@ } ], "type": "eql", - "version": 8 + "version": 9 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/execution_scheduled_task_powershell_source.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/execution_scheduled_task_powershell_source.json index 24492343e98c0..3814b00321417 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/execution_scheduled_task_powershell_source.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/execution_scheduled_task_powershell_source.json @@ -41,11 +41,18 @@ { "id": "T1053", "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/" + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.005", + "name": "Scheduled Task", + "reference": "https://attack.mitre.org/techniques/T1053/005/" + } + ] } ] } ], "type": "eql", - "version": 2 + "version": 3 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/execution_via_compiled_html_file.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/execution_via_compiled_html_file.json index efc3884b417fb..73c796c4e206d 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/execution_via_compiled_html_file.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/execution_via_compiled_html_file.json @@ -34,7 +34,20 @@ "name": "Execution", "reference": "https://attack.mitre.org/tactics/TA0002/" }, - "technique": [] + "technique": [ + { + "id": "T1204", + "name": "User Execution", + "reference": "https://attack.mitre.org/techniques/T1204/", + "subtechnique": [ + { + "id": "T1204.002", + "name": "Malicious File", + "reference": "https://attack.mitre.org/techniques/T1204/002/" + } + ] + } + ] }, { "framework": "MITRE ATT&CK", @@ -61,5 +74,5 @@ ], "timestamp_override": "event.ingested", "type": "eql", - "version": 8 + "version": 9 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/exfiltration_rds_snapshot_export.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/exfiltration_rds_snapshot_export.json index 430d97690b6f4..b59adc45b4236 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/exfiltration_rds_snapshot_export.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/exfiltration_rds_snapshot_export.json @@ -1,6 +1,7 @@ { "author": [ - "Elastic" + "Elastic", + "Austin Songer" ], "description": "Identifies the export of an Amazon Relational Database Service (RDS) Aurora database snapshot.", "false_positives": [ @@ -44,5 +45,5 @@ ], "timestamp_override": "event.ingested", "type": "query", - "version": 1 + "version": 2 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/impact_backup_file_deletion.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/impact_backup_file_deletion.json new file mode 100644 index 0000000000000..93c4c287d12ce --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/impact_backup_file_deletion.json @@ -0,0 +1,52 @@ +{ + "author": [ + "Elastic" + ], + "description": "Identifies the deletion of backup files, saved using third-party software, by a process outside of the backup suite. Adversaries may delete Backup files to ensure that recovery from a Ransomware attack is less likely.", + "false_positives": [ + "Certain utilities that delete files for disk cleanup or Administrators manually removing backup files." + ], + "from": "now-9m", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ], + "language": "eql", + "license": "Elastic License v2", + "name": "Third-party Backup Files Deleted via Unexpected Process", + "query": "file where event.type == \"deletion\" and\n (\n /* Veeam Related Backup Files */\n (file.extension : (\"VBK\", \"VIB\", \"VBM\") and\n not process.executable : (\"?:\\\\Windows\\\\Veeam\\\\Backup\\\\*\",\n \"?:\\\\Program Files\\\\Veeam\\\\Backup and Replication\\\\*\",\n \"?:\\\\Program Files (x86)\\\\Veeam\\\\Backup and Replication\\\\*\")) or\n\n /* Veritas Backup Exec Related Backup File */\n (file.extension : \"BKF\" and\n not process.executable : (\"?:\\\\Program Files\\\\Veritas\\\\Backup Exec\\\\*\",\n \"?:\\\\Program Files (x86)\\\\Veritas\\\\Backup Exec\\\\*\"))\n )\n", + "references": [ + "https://www.advintel.io/post/backup-removal-solutions-from-conti-ransomware-with-love" + ], + "risk_score": 47, + "rule_id": "11ea6bec-ebde-4d71-a8e9-784948f8e3e9", + "severity": "medium", + "tags": [ + "Elastic", + "Host", + "Windows", + "Threat Detection", + "Impact" + ], + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1490", + "name": "Inhibit System Recovery", + "reference": "https://attack.mitre.org/techniques/T1490/" + } + ] + } + ], + "timestamp_override": "event.ingested", + "type": "eql", + "version": 1 +} diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_deleting_backup_catalogs_with_wbadmin.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/impact_deleting_backup_catalogs_with_wbadmin.json similarity index 66% rename from x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_deleting_backup_catalogs_with_wbadmin.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/impact_deleting_backup_catalogs_with_wbadmin.json index 5d1233ebfcb78..0c0c2a71b8263 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_deleting_backup_catalogs_with_wbadmin.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/impact_deleting_backup_catalogs_with_wbadmin.json @@ -21,33 +21,26 @@ "Host", "Windows", "Threat Detection", - "Defense Evasion" + "Impact" ], "threat": [ { "framework": "MITRE ATT&CK", "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" }, "technique": [ { - "id": "T1070", - "name": "Indicator Removal on Host", - "reference": "https://attack.mitre.org/techniques/T1070/", - "subtechnique": [ - { - "id": "T1070.004", - "name": "File Deletion", - "reference": "https://attack.mitre.org/techniques/T1070/004/" - } - ] + "id": "T1490", + "name": "Inhibit System Recovery", + "reference": "https://attack.mitre.org/techniques/T1490/" } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 9 + "version": 10 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/impact_microsoft_365_potential_ransomware_activity.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/impact_microsoft_365_potential_ransomware_activity.json new file mode 100644 index 0000000000000..52094400232b6 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/impact_microsoft_365_potential_ransomware_activity.json @@ -0,0 +1,54 @@ +{ + "author": [ + "Austin Songer" + ], + "description": "Identifies when Microsoft Cloud App Security reported when a user uploads files to the cloud that might be infected with ransomware.", + "false_positives": [ + "If Cloud App Security identifies, for example, a high rate of file uploads or file deletion activities it may represent an adverse encryption process." + ], + "from": "now-30m", + "index": [ + "filebeat-*", + "logs-o365*" + ], + "language": "kuery", + "license": "Elastic License v2", + "name": "Microsoft 365 Potential ransomware activity", + "note": "## Config\n\nThe Microsoft 365 Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.\n", + "query": "event.dataset:o365.audit and event.provider:SecurityComplianceCenter and event.category:web and event.action:\"Potential ransomware activity\" and event.outcome:success\n", + "references": [ + "https://docs.microsoft.com/en-us/cloud-app-security/anomaly-detection-policy", + "https://docs.microsoft.com/en-us/cloud-app-security/policy-template-reference" + ], + "risk_score": 47, + "rule_id": "721999d0-7ab2-44bf-b328-6e63367b9b29", + "severity": "medium", + "tags": [ + "Elastic", + "Cloud", + "Microsoft 365", + "Continuous Monitoring", + "SecOps", + "Configuration Audit" + ], + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1486", + "name": "Data Encrypted for Impact", + "reference": "https://attack.mitre.org/techniques/T1486/" + } + ] + } + ], + "timestamp_override": "event.ingested", + "type": "query", + "version": 1 +} diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/impact_microsoft_365_unusual_volume_of_file_deletion.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/impact_microsoft_365_unusual_volume_of_file_deletion.json new file mode 100644 index 0000000000000..c3a53310781df --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/impact_microsoft_365_unusual_volume_of_file_deletion.json @@ -0,0 +1,54 @@ +{ + "author": [ + "Austin Songer" + ], + "description": "Identifies that a user has deleted an unusually large volume of files as reported by Microsoft Cloud App Security.", + "false_positives": [ + "Users or System Administrator cleaning out folders." + ], + "from": "now-30m", + "index": [ + "filebeat-*", + "logs-o365*" + ], + "language": "kuery", + "license": "Elastic License v2", + "name": "Microsoft 365 Unusual Volume of File Deletion", + "note": "## Config\n\nThe Microsoft 365 Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.\n", + "query": "event.dataset:o365.audit and event.provider:SecurityComplianceCenter and event.category:web and event.action:\"Unusual volume of file deletion\" and event.outcome:success\n", + "references": [ + "https://docs.microsoft.com/en-us/cloud-app-security/anomaly-detection-policy", + "https://docs.microsoft.com/en-us/cloud-app-security/policy-template-reference" + ], + "risk_score": 47, + "rule_id": "b2951150-658f-4a60-832f-a00d1e6c6745", + "severity": "medium", + "tags": [ + "Elastic", + "Cloud", + "Microsoft 365", + "Continuous Monitoring", + "SecOps", + "Configuration Audit" + ], + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1485", + "name": "Data Destruction", + "reference": "https://attack.mitre.org/techniques/T1485/" + } + ] + } + ], + "timestamp_override": "event.ingested", + "type": "query", + "version": 1 +} diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_modification_of_boot_config.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/impact_modification_of_boot_config.json similarity index 69% rename from x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_modification_of_boot_config.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/impact_modification_of_boot_config.json index 7c58d82ec1061..91f5959bee119 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_modification_of_boot_config.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/impact_modification_of_boot_config.json @@ -21,33 +21,26 @@ "Host", "Windows", "Threat Detection", - "Defense Evasion" + "Impact" ], "threat": [ { "framework": "MITRE ATT&CK", "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" }, "technique": [ { - "id": "T1070", - "name": "Indicator Removal on Host", - "reference": "https://attack.mitre.org/techniques/T1070/", - "subtechnique": [ - { - "id": "T1070.004", - "name": "File Deletion", - "reference": "https://attack.mitre.org/techniques/T1070/004/" - } - ] + "id": "T1490", + "name": "Inhibit System Recovery", + "reference": "https://attack.mitre.org/techniques/T1490/" } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 8 + "version": 9 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_stop_process_service_threshold.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/impact_stop_process_service_threshold.json similarity index 64% rename from x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_stop_process_service_threshold.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/impact_stop_process_service_threshold.json index 86903058b62fe..ec361a8795538 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_stop_process_service_threshold.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/impact_stop_process_service_threshold.json @@ -2,7 +2,7 @@ "author": [ "Elastic" ], - "description": "This rule identifies a high number (10) of process terminations (stop, delete, or suspend) from the same host within a short time period. This may indicate a defense evasion attempt.", + "description": "This rule identifies a high number (10) of process terminations (stop, delete, or suspend) from the same host within a short time period.", "from": "now-9m", "index": [ "winlogbeat-*", @@ -21,28 +21,21 @@ "Host", "Windows", "Threat Detection", - "Defense Evasion" + "Impact" ], "threat": [ { "framework": "MITRE ATT&CK", "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" }, "technique": [ { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] + "id": "T1489", + "name": "Service Stop", + "reference": "https://attack.mitre.org/techniques/T1489/" } ] } @@ -54,5 +47,5 @@ "value": 10 }, "type": "threshold", - "version": 2 + "version": 3 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/impact_volume_shadow_copy_deletion_via_vssadmin.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/impact_volume_shadow_copy_deletion_or_resized_via_vssadmin.json similarity index 70% rename from x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/impact_volume_shadow_copy_deletion_via_vssadmin.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/impact_volume_shadow_copy_deletion_or_resized_via_vssadmin.json index f0ac38e98441e..940229bf63751 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/impact_volume_shadow_copy_deletion_via_vssadmin.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/impact_volume_shadow_copy_deletion_or_resized_via_vssadmin.json @@ -2,7 +2,7 @@ "author": [ "Elastic" ], - "description": "Identifies use of vssadmin.exe for shadow copy deletion on endpoints. This commonly occurs in tandem with ransomware or other destructive attacks.", + "description": "Identifies use of vssadmin.exe for shadow copy deletion or resizing on endpoints. This commonly occurs in tandem with ransomware or other destructive attacks.", "from": "now-9m", "index": [ "winlogbeat-*", @@ -11,8 +11,8 @@ ], "language": "eql", "license": "Elastic License v2", - "name": "Volume Shadow Copy Deletion via VssAdmin", - "query": "process where event.type in (\"start\", \"process_started\") and\n (process.name : \"vssadmin.exe\" or process.pe.original_file_name == \"VSSADMIN.EXE\") and\n process.args : \"delete\" and process.args : \"shadows\"\n", + "name": "Volume Shadow Copy Deleted or Resized via VssAdmin", + "query": "process where event.type in (\"start\", \"process_started\") and event.action == \"start\" \n and (process.name : \"vssadmin.exe\" or process.pe.original_file_name == \"VSSADMIN.EXE\") and\n process.args in (\"delete\", \"resize\") and process.args : \"shadows*\"\n", "risk_score": 73, "rule_id": "b5ea4bfe-a1b2-421f-9d47-22a75a6f2921", "severity": "high", @@ -42,5 +42,5 @@ ], "timestamp_override": "event.ingested", "type": "eql", - "version": 9 + "version": 10 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/impact_volume_shadow_copy_deletion_via_powershell.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/impact_volume_shadow_copy_deletion_via_powershell.json new file mode 100644 index 0000000000000..43dce4acf4df8 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/impact_volume_shadow_copy_deletion_via_powershell.json @@ -0,0 +1,52 @@ +{ + "author": [ + "Elastic", + "Austin Songer" + ], + "description": "Identifies the use of the Win32_ShadowCopy class and related cmdlets to achieve shadow copy deletion. This commonly occurs in tandem with ransomware or other destructive attacks.", + "from": "now-9m", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ], + "language": "eql", + "license": "Elastic License v2", + "name": "Volume Shadow Copy Deletion via PowerShell", + "query": "process where event.type in (\"start\", \"process_started\") and\n process.name : (\"powershell.exe\", \"pwsh.exe\") and \n process.args : (\"*Get-WmiObject*\", \"*gwmi*\", \"*Get-CimInstance*\", \"*gcim*\") and\n process.args : (\"*Win32_ShadowCopy*\") and\n process.args : (\"*.Delete()*\", \"*Remove-WmiObject*\", \"*rwmi*\", \"*Remove-CimInstance*\", \"*rcim*\")\n", + "references": [ + "https://docs.microsoft.com/en-us/previous-versions/windows/desktop/vsswmi/win32-shadowcopy", + "https://powershell.one/wmi/root/cimv2/win32_shadowcopy", + "https://www.fortinet.com/blog/threat-research/stomping-shadow-copies-a-second-look-into-deletion-methods" + ], + "risk_score": 73, + "rule_id": "d99a037b-c8e2-47a5-97b9-170d076827c4", + "severity": "high", + "tags": [ + "Elastic", + "Host", + "Windows", + "Threat Detection", + "Impact" + ], + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1490", + "name": "Inhibit System Recovery", + "reference": "https://attack.mitre.org/techniques/T1490/" + } + ] + } + ], + "timestamp_override": "event.ingested", + "type": "eql", + "version": 1 +} diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_volume_shadow_copy_deletion_via_wmic.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/impact_volume_shadow_copy_deletion_via_wmic.json similarity index 66% rename from x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_volume_shadow_copy_deletion_via_wmic.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/impact_volume_shadow_copy_deletion_via_wmic.json index e519b23a32b0d..f4f530362a5b8 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/defense_evasion_volume_shadow_copy_deletion_via_wmic.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/impact_volume_shadow_copy_deletion_via_wmic.json @@ -21,33 +21,26 @@ "Host", "Windows", "Threat Detection", - "Defense Evasion" + "Impact" ], "threat": [ { "framework": "MITRE ATT&CK", "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" }, "technique": [ { - "id": "T1070", - "name": "Indicator Removal on Host", - "reference": "https://attack.mitre.org/techniques/T1070/", - "subtechnique": [ - { - "id": "T1070.004", - "name": "File Deletion", - "reference": "https://attack.mitre.org/techniques/T1070/004/" - } - ] + "id": "T1490", + "name": "Inhibit System Recovery", + "reference": "https://attack.mitre.org/techniques/T1490/" } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 9 + "version": 10 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/index.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/index.ts index 093d5c806c282..1c5006f5e6f48 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/index.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/index.ts @@ -41,38 +41,38 @@ import rule28 from './command_and_control_vnc_virtual_network_computing_to_the_i import rule29 from './defense_evasion_adding_the_hidden_file_attribute_with_via_attribexe.json'; import rule30 from './defense_evasion_clearing_windows_event_logs.json'; import rule31 from './defense_evasion_delete_volume_usn_journal_with_fsutil.json'; -import rule32 from './defense_evasion_deleting_backup_catalogs_with_wbadmin.json'; -import rule33 from './defense_evasion_disable_windows_firewall_rules_with_netsh.json'; -import rule34 from './defense_evasion_misc_lolbin_connecting_to_the_internet.json'; -import rule35 from './defense_evasion_msbuild_making_network_connections.json'; -import rule36 from './defense_evasion_suspicious_certutil_commands.json'; -import rule37 from './defense_evasion_unusual_network_connection_via_rundll32.json'; -import rule38 from './defense_evasion_unusual_process_network_connection.json'; -import rule39 from './defense_evasion_via_filter_manager.json'; -import rule40 from './defense_evasion_volume_shadow_copy_deletion_via_wmic.json'; -import rule41 from './discovery_whoami_command_activity.json'; -import rule42 from './endgame_adversary_behavior_detected.json'; -import rule43 from './endgame_cred_dumping_detected.json'; -import rule44 from './endgame_cred_dumping_prevented.json'; -import rule45 from './endgame_cred_manipulation_detected.json'; -import rule46 from './endgame_cred_manipulation_prevented.json'; -import rule47 from './endgame_exploit_detected.json'; -import rule48 from './endgame_exploit_prevented.json'; -import rule49 from './endgame_malware_detected.json'; -import rule50 from './endgame_malware_prevented.json'; -import rule51 from './endgame_permission_theft_detected.json'; -import rule52 from './endgame_permission_theft_prevented.json'; -import rule53 from './endgame_process_injection_detected.json'; -import rule54 from './endgame_process_injection_prevented.json'; -import rule55 from './endgame_ransomware_detected.json'; -import rule56 from './endgame_ransomware_prevented.json'; -import rule57 from './execution_command_prompt_connecting_to_the_internet.json'; -import rule58 from './execution_command_shell_started_by_svchost.json'; -import rule59 from './execution_html_help_executable_program_connecting_to_the_internet.json'; -import rule60 from './execution_psexec_lateral_movement_command.json'; -import rule61 from './execution_register_server_program_connecting_to_the_internet.json'; -import rule62 from './execution_via_compiled_html_file.json'; -import rule63 from './impact_volume_shadow_copy_deletion_via_vssadmin.json'; +import rule32 from './defense_evasion_disable_windows_firewall_rules_with_netsh.json'; +import rule33 from './defense_evasion_misc_lolbin_connecting_to_the_internet.json'; +import rule34 from './defense_evasion_msbuild_making_network_connections.json'; +import rule35 from './defense_evasion_suspicious_certutil_commands.json'; +import rule36 from './defense_evasion_unusual_network_connection_via_rundll32.json'; +import rule37 from './defense_evasion_unusual_process_network_connection.json'; +import rule38 from './defense_evasion_via_filter_manager.json'; +import rule39 from './discovery_whoami_command_activity.json'; +import rule40 from './endgame_adversary_behavior_detected.json'; +import rule41 from './endgame_cred_dumping_detected.json'; +import rule42 from './endgame_cred_dumping_prevented.json'; +import rule43 from './endgame_cred_manipulation_detected.json'; +import rule44 from './endgame_cred_manipulation_prevented.json'; +import rule45 from './endgame_exploit_detected.json'; +import rule46 from './endgame_exploit_prevented.json'; +import rule47 from './endgame_malware_detected.json'; +import rule48 from './endgame_malware_prevented.json'; +import rule49 from './endgame_permission_theft_detected.json'; +import rule50 from './endgame_permission_theft_prevented.json'; +import rule51 from './endgame_process_injection_detected.json'; +import rule52 from './endgame_process_injection_prevented.json'; +import rule53 from './endgame_ransomware_detected.json'; +import rule54 from './endgame_ransomware_prevented.json'; +import rule55 from './execution_command_prompt_connecting_to_the_internet.json'; +import rule56 from './execution_command_shell_started_by_svchost.json'; +import rule57 from './execution_html_help_executable_program_connecting_to_the_internet.json'; +import rule58 from './execution_psexec_lateral_movement_command.json'; +import rule59 from './execution_register_server_program_connecting_to_the_internet.json'; +import rule60 from './execution_via_compiled_html_file.json'; +import rule61 from './impact_deleting_backup_catalogs_with_wbadmin.json'; +import rule62 from './impact_volume_shadow_copy_deletion_or_resized_via_vssadmin.json'; +import rule63 from './impact_volume_shadow_copy_deletion_via_wmic.json'; import rule64 from './initial_access_rpc_remote_procedure_call_from_the_internet.json'; import rule65 from './initial_access_rpc_remote_procedure_call_to_the_internet.json'; import rule66 from './initial_access_script_executing_powershell.json'; @@ -95,7 +95,7 @@ import rule82 from './persistence_system_shells_via_services.json'; import rule83 from './persistence_user_account_creation.json'; import rule84 from './persistence_via_application_shimming.json'; import rule85 from './privilege_escalation_unusual_parentchild_relationship.json'; -import rule86 from './defense_evasion_modification_of_boot_config.json'; +import rule86 from './impact_modification_of_boot_config.json'; import rule87 from './privilege_escalation_uac_bypass_event_viewer.json'; import rule88 from './defense_evasion_msxsl_network.json'; import rule89 from './discovery_net_command_system_account.json'; @@ -328,7 +328,7 @@ import rule315 from './command_and_control_cobalt_strike_default_teamserver_cert import rule316 from './defense_evasion_enable_inbound_rdp_with_netsh.json'; import rule317 from './defense_evasion_execution_lolbas_wuauclt.json'; import rule318 from './privilege_escalation_unusual_svchost_childproc_childless.json'; -import rule319 from './lateral_movement_rdp_tunnel_plink.json'; +import rule319 from './command_and_control_rdp_tunnel_plink.json'; import rule320 from './privilege_escalation_uac_bypass_winfw_mmc_hijack.json'; import rule321 from './persistence_ms_office_addins_file.json'; import rule322 from './discovery_adfind_command_activity.json'; @@ -428,8 +428,8 @@ import rule415 from './credential_access_copy_ntds_sam_volshadowcp_cmdline.json' import rule416 from './credential_access_lsass_memdump_file_created.json'; import rule417 from './lateral_movement_incoming_winrm_shell_execution.json'; import rule418 from './lateral_movement_powershell_remoting_target.json'; -import rule419 from './defense_evasion_hide_encoded_executable_registry.json'; -import rule420 from './defense_evasion_port_forwarding_added_registry.json'; +import rule419 from './command_and_control_port_forwarding_added_registry.json'; +import rule420 from './defense_evasion_hide_encoded_executable_registry.json'; import rule421 from './lateral_movement_rdp_enabled_registry.json'; import rule422 from './privilege_escalation_printspooler_registry_copyfiles.json'; import rule423 from './privilege_escalation_rogue_windir_environment_var.json'; @@ -443,7 +443,7 @@ import rule430 from './credential_access_microsoft_365_brute_force_user_account_ import rule431 from './microsoft_365_teams_custom_app_interaction_allowed.json'; import rule432 from './persistence_microsoft_365_teams_external_access_enabled.json'; import rule433 from './credential_access_microsoft_365_potential_password_spraying_attack.json'; -import rule434 from './defense_evasion_stop_process_service_threshold.json'; +import rule434 from './impact_stop_process_service_threshold.json'; import rule435 from './collection_winrar_encryption.json'; import rule436 from './defense_evasion_unusual_dir_ads.json'; import rule437 from './discovery_admin_recon.json'; @@ -466,8 +466,8 @@ import rule453 from './execution_apt_solarwinds_backdoor_child_cmd_powershell.js import rule454 from './execution_apt_solarwinds_backdoor_unusual_child_processes.json'; import rule455 from './initial_access_azure_active_directory_powershell_signin.json'; import rule456 from './collection_email_powershell_exchange_mailbox.json'; -import rule457 from './collection_persistence_powershell_exch_mailbox_activesync_add_device.json'; -import rule458 from './execution_scheduled_task_powershell_source.json'; +import rule457 from './execution_scheduled_task_powershell_source.json'; +import rule458 from './persistence_powershell_exch_mailbox_activesync_add_device.json'; import rule459 from './persistence_docker_shortcuts_plist_modification.json'; import rule460 from './persistence_evasion_hidden_local_account_creation.json'; import rule461 from './persistence_finder_sync_plugin_pluginkit.json'; @@ -551,36 +551,54 @@ import rule538 from './persistence_ec2_security_group_configuration_change_detec import rule539 from './defense_evasion_disabling_windows_logs.json'; import rule540 from './persistence_route_53_domain_transfer_lock_disabled.json'; import rule541 from './persistence_route_53_domain_transferred_to_another_account.json'; -import rule542 from './credential_access_user_excessive_sso_logon_errors.json'; -import rule543 from './defense_evasion_suspicious_execution_from_mounted_device.json'; -import rule544 from './defense_evasion_unusual_network_connection_via_dllhost.json'; -import rule545 from './defense_evasion_amsienable_key_mod.json'; -import rule546 from './impact_rds_group_deletion.json'; -import rule547 from './persistence_rds_group_creation.json'; -import rule548 from './exfiltration_rds_snapshot_export.json'; -import rule549 from './persistence_rds_instance_creation.json'; -import rule550 from './ml_auth_rare_hour_for_a_user_to_logon.json'; -import rule551 from './ml_auth_rare_source_ip_for_a_user.json'; -import rule552 from './ml_auth_rare_user_logon.json'; -import rule553 from './ml_auth_spike_in_failed_logon_events.json'; -import rule554 from './ml_auth_spike_in_logon_events.json'; -import rule555 from './ml_auth_spike_in_logon_events_from_a_source_ip.json'; -import rule556 from './privilege_escalation_cyberarkpas_error_audit_event_promotion.json'; -import rule557 from './privilege_escalation_cyberarkpas_recommended_events_to_monitor_promotion.json'; -import rule558 from './privilege_escalation_printspooler_malicious_driver_file_changes.json'; -import rule559 from './privilege_escalation_printspooler_malicious_registry_modification.json'; -import rule560 from './privilege_escalation_printspooler_suspicious_file_deletion.json'; -import rule561 from './privilege_escalation_unusual_printspooler_childprocess.json'; -import rule562 from './defense_evasion_disabling_windows_defender_powershell.json'; -import rule563 from './defense_evasion_enable_network_discovery_with_netsh.json'; -import rule564 from './defense_evasion_execution_windefend_unusual_path.json'; -import rule565 from './defense_evasion_agent_spoofing_mismatched_id.json'; -import rule566 from './defense_evasion_agent_spoofing_multiple_hosts.json'; -import rule567 from './defense_evasion_parent_process_pid_spoofing.json'; -import rule568 from './defense_evasion_defender_exclusion_via_powershell.json'; -import rule569 from './defense_evasion_whitespace_padding_in_command_line.json'; -import rule570 from './persistence_webshell_detection.json'; -import rule571 from './persistence_via_bits_job_notify_command.json'; +import rule542 from './initial_access_okta_user_attempted_unauthorized_access.json'; +import rule543 from './credential_access_user_excessive_sso_logon_errors.json'; +import rule544 from './persistence_exchange_suspicious_mailbox_right_delegation.json'; +import rule545 from './privilege_escalation_new_or_modified_federation_domain.json'; +import rule546 from './privilege_escalation_sts_getsessiontoken_abuse.json'; +import rule547 from './defense_evasion_suspicious_execution_from_mounted_device.json'; +import rule548 from './defense_evasion_unusual_network_connection_via_dllhost.json'; +import rule549 from './defense_evasion_amsienable_key_mod.json'; +import rule550 from './impact_rds_group_deletion.json'; +import rule551 from './persistence_rds_group_creation.json'; +import rule552 from './persistence_route_table_modified_or_deleted.json'; +import rule553 from './exfiltration_rds_snapshot_export.json'; +import rule554 from './persistence_rds_instance_creation.json'; +import rule555 from './ml_auth_rare_hour_for_a_user_to_logon.json'; +import rule556 from './ml_auth_rare_source_ip_for_a_user.json'; +import rule557 from './ml_auth_rare_user_logon.json'; +import rule558 from './ml_auth_spike_in_failed_logon_events.json'; +import rule559 from './ml_auth_spike_in_logon_events.json'; +import rule560 from './ml_auth_spike_in_logon_events_from_a_source_ip.json'; +import rule561 from './privilege_escalation_cyberarkpas_error_audit_event_promotion.json'; +import rule562 from './privilege_escalation_cyberarkpas_recommended_events_to_monitor_promotion.json'; +import rule563 from './privilege_escalation_printspooler_malicious_driver_file_changes.json'; +import rule564 from './privilege_escalation_printspooler_malicious_registry_modification.json'; +import rule565 from './privilege_escalation_printspooler_suspicious_file_deletion.json'; +import rule566 from './privilege_escalation_unusual_printspooler_childprocess.json'; +import rule567 from './defense_evasion_disabling_windows_defender_powershell.json'; +import rule568 from './defense_evasion_enable_network_discovery_with_netsh.json'; +import rule569 from './defense_evasion_execution_windefend_unusual_path.json'; +import rule570 from './defense_evasion_agent_spoofing_mismatched_id.json'; +import rule571 from './defense_evasion_agent_spoofing_multiple_hosts.json'; +import rule572 from './defense_evasion_parent_process_pid_spoofing.json'; +import rule573 from './impact_microsoft_365_potential_ransomware_activity.json'; +import rule574 from './impact_microsoft_365_unusual_volume_of_file_deletion.json'; +import rule575 from './initial_access_microsoft_365_user_restricted_from_sending_email.json'; +import rule576 from './defense_evasion_elasticache_security_group_creation.json'; +import rule577 from './defense_evasion_elasticache_security_group_modified_or_deleted.json'; +import rule578 from './impact_volume_shadow_copy_deletion_via_powershell.json'; +import rule579 from './defense_evasion_defender_exclusion_via_powershell.json'; +import rule580 from './defense_evasion_whitespace_padding_in_command_line.json'; +import rule581 from './defense_evasion_frontdoor_firewall_policy_deletion.json'; +import rule582 from './persistence_webshell_detection.json'; +import rule583 from './defense_evasion_execution_control_panel_suspicious_args.json'; +import rule584 from './credential_access_potential_lsa_memdump_via_mirrordump.json'; +import rule585 from './discovery_virtual_machine_fingerprinting_grep.json'; +import rule586 from './impact_backup_file_deletion.json'; +import rule587 from './persistence_screensaver_engine_unexpected_child_process.json'; +import rule588 from './persistence_screensaver_plist_file_modification.json'; +import rule589 from './persistence_via_bits_job_notify_command.json'; export const rawRules = [ rule1, @@ -1154,4 +1172,22 @@ export const rawRules = [ rule569, rule570, rule571, + rule572, + rule573, + rule574, + rule575, + rule576, + rule577, + rule578, + rule579, + rule580, + rule581, + rule582, + rule583, + rule584, + rule585, + rule586, + rule587, + rule588, + rule589, ]; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/initial_access_microsoft_365_user_restricted_from_sending_email.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/initial_access_microsoft_365_user_restricted_from_sending_email.json new file mode 100644 index 0000000000000..31950fc345c0e --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/initial_access_microsoft_365_user_restricted_from_sending_email.json @@ -0,0 +1,54 @@ +{ + "author": [ + "Austin Songer" + ], + "description": "Identifies when a user has been restricted from sending email due to exceeding sending limits of the service policies per the Security Compliance Center.", + "false_positives": [ + "A user sending emails using personal distribution folders may trigger the event." + ], + "from": "now-30m", + "index": [ + "filebeat-*", + "logs-o365*" + ], + "language": "kuery", + "license": "Elastic License v2", + "name": "Microsoft 365 User Restricted from Sending Email", + "note": "## Config\n\nThe Microsoft 365 Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.\n", + "query": "event.dataset:o365.audit and event.provider:SecurityComplianceCenter and event.category:web and event.action:\"User restricted from sending email\" and event.outcome:success\n", + "references": [ + "https://docs.microsoft.com/en-us/cloud-app-security/anomaly-detection-policy", + "https://docs.microsoft.com/en-us/cloud-app-security/policy-template-reference" + ], + "risk_score": 47, + "rule_id": "0136b315-b566-482f-866c-1d8e2477ba16", + "severity": "medium", + "tags": [ + "Elastic", + "Cloud", + "Microsoft 365", + "Continuous Monitoring", + "SecOps", + "Configuration Audit" + ], + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + } + ], + "timestamp_override": "event.ingested", + "type": "query", + "version": 1 +} diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/initial_access_okta_user_attempted_unauthorized_access.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/initial_access_okta_user_attempted_unauthorized_access.json new file mode 100644 index 0000000000000..222d30723bc9e --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/initial_access_okta_user_attempted_unauthorized_access.json @@ -0,0 +1,74 @@ +{ + "author": [ + "Elastic", + "Austin Songer" + ], + "description": "Identifies when an unauthorized access attempt is made by a user for an Okta application.", + "index": [ + "filebeat-*", + "logs-okta*" + ], + "language": "kuery", + "license": "Elastic License v2", + "name": "Unauthorized Access to an Okta Application", + "note": "## Config\n\nThe Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "query": "event.dataset:okta.system and event.action:app.generic.unauth_app_access_attempt\n", + "risk_score": 21, + "rule_id": "4edd3e1a-3aa0-499b-8147-4d2ea43b1613", + "severity": "low", + "tags": [ + "Elastic", + "Identity", + "Okta", + "Continuous Monitoring", + "SecOps", + "Identity and Access" + ], + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [] + } + ], + "timestamp_override": "event.ingested", + "type": "query", + "version": 1 +} diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/initial_access_suspicious_ms_office_child_process.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/initial_access_suspicious_ms_office_child_process.json index 16486590cb093..17e9195181f3d 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/initial_access_suspicious_ms_office_child_process.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/initial_access_suspicious_ms_office_child_process.json @@ -12,7 +12,7 @@ "language": "eql", "license": "Elastic License v2", "name": "Suspicious MS Office Child Process", - "query": "process where event.type in (\"start\", \"process_started\") and\n process.parent.name : (\"eqnedt32.exe\", \"excel.exe\", \"fltldr.exe\", \"msaccess.exe\", \"mspub.exe\", \"powerpnt.exe\", \"winword.exe\") and\n process.name : (\"Microsoft.Workflow.Compiler.exe\", \"arp.exe\", \"atbroker.exe\", \"bginfo.exe\", \"bitsadmin.exe\", \"cdb.exe\", \"certutil.exe\",\n \"cmd.exe\", \"cmstp.exe\", \"cscript.exe\", \"csi.exe\", \"dnx.exe\", \"dsget.exe\", \"dsquery.exe\", \"forfiles.exe\", \"fsi.exe\",\n \"ftp.exe\", \"gpresult.exe\", \"hostname.exe\", \"ieexec.exe\", \"iexpress.exe\", \"installutil.exe\", \"ipconfig.exe\", \"mshta.exe\",\n \"msxsl.exe\", \"nbtstat.exe\", \"net.exe\", \"net1.exe\", \"netsh.exe\", \"netstat.exe\", \"nltest.exe\", \"odbcconf.exe\", \"ping.exe\",\n \"powershell.exe\", \"pwsh.exe\", \"qprocess.exe\", \"quser.exe\", \"qwinsta.exe\", \"rcsi.exe\", \"reg.exe\", \"regasm.exe\", \"regsvcs.exe\",\n \"regsvr32.exe\", \"sc.exe\", \"schtasks.exe\", \"systeminfo.exe\", \"tasklist.exe\", \"tracert.exe\", \"whoami.exe\",\n \"wmic.exe\", \"wscript.exe\", \"xwizard.exe\", \"explorer.exe\", \"rundll32.exe\", \"hh.exe\")\n", + "query": "process where event.type in (\"start\", \"process_started\") and\n process.parent.name : (\"eqnedt32.exe\", \"excel.exe\", \"fltldr.exe\", \"msaccess.exe\", \"mspub.exe\", \"powerpnt.exe\", \"winword.exe\") and\n process.name : (\"Microsoft.Workflow.Compiler.exe\", \"arp.exe\", \"atbroker.exe\", \"bginfo.exe\", \"bitsadmin.exe\", \"cdb.exe\", \"certutil.exe\",\n \"cmd.exe\", \"cmstp.exe\", \"control.exe\", \"cscript.exe\", \"csi.exe\", \"dnx.exe\", \"dsget.exe\", \"dsquery.exe\", \"forfiles.exe\", \n \"fsi.exe\", \"ftp.exe\", \"gpresult.exe\", \"hostname.exe\", \"ieexec.exe\", \"iexpress.exe\", \"installutil.exe\", \"ipconfig.exe\", \n \"mshta.exe\", \"msxsl.exe\", \"nbtstat.exe\", \"net.exe\", \"net1.exe\", \"netsh.exe\", \"netstat.exe\", \"nltest.exe\", \"odbcconf.exe\", \n \"ping.exe\", \"powershell.exe\", \"pwsh.exe\", \"qprocess.exe\", \"quser.exe\", \"qwinsta.exe\", \"rcsi.exe\", \"reg.exe\", \"regasm.exe\", \n \"regsvcs.exe\", \"regsvr32.exe\", \"sc.exe\", \"schtasks.exe\", \"systeminfo.exe\", \"tasklist.exe\", \"tracert.exe\", \"whoami.exe\",\n \"wmic.exe\", \"wscript.exe\", \"xwizard.exe\", \"explorer.exe\", \"rundll32.exe\", \"hh.exe\")\n", "risk_score": 47, "rule_id": "a624863f-a70d-417f-a7d2-7a404638d47f", "severity": "medium", @@ -49,5 +49,5 @@ ], "timestamp_override": "event.ingested", "type": "eql", - "version": 8 + "version": 9 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_credential_access_kerberos_bifrostconsole.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_credential_access_kerberos_bifrostconsole.json index 82fa9d8d72a92..0fd10fc807846 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_credential_access_kerberos_bifrostconsole.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_credential_access_kerberos_bifrostconsole.json @@ -60,12 +60,19 @@ { "id": "T1558", "name": "Steal or Forge Kerberos Tickets", - "reference": "https://attack.mitre.org/techniques/T1558/" + "reference": "https://attack.mitre.org/techniques/T1558/", + "subtechnique": [ + { + "id": "T1558.003", + "name": "Kerberoasting", + "reference": "https://attack.mitre.org/techniques/T1558/003/" + } + ] } ] } ], "timestamp_override": "event.ingested", "type": "query", - "version": 1 + "version": 2 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_dcom_hta.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_dcom_hta.json index 707596aa333d0..f832eb51336f8 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_dcom_hta.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_dcom_hta.json @@ -12,7 +12,7 @@ "language": "eql", "license": "Elastic License v2", "name": "Incoming DCOM Lateral Movement via MSHTA", - "query": "sequence with maxspan=1m\n [process where event.type in (\"start\", \"process_started\") and\n process.name : \"mshta.exe\" and process.args : \"-Embedding\"\n ] by host.id, process.entity_id\n [network where event.type == \"start\" and process.name : \"mshta.exe\" and \n network.direction == \"incoming\" and network.transport == \"tcp\" and\n source.port > 49151 and destination.port > 49151 and not source.address in (\"127.0.0.1\", \"::1\")\n ] by host.id, process.entity_id\n", + "query": "sequence with maxspan=1m\n [process where event.type in (\"start\", \"process_started\") and\n process.name : \"mshta.exe\" and process.args : \"-Embedding\"\n ] by host.id, process.entity_id\n [network where event.type == \"start\" and process.name : \"mshta.exe\" and \n network.direction : (\"incoming\", \"ingress\") and network.transport == \"tcp\" and\n source.port > 49151 and destination.port > 49151 and not source.address in (\"127.0.0.1\", \"::1\")\n ] by host.id, process.entity_id\n", "references": [ "https://codewhitesec.blogspot.com/2018/07/lethalhta.html" ], @@ -38,11 +38,40 @@ { "id": "T1021", "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/" + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.003", + "name": "Distributed Component Object Model", + "reference": "https://attack.mitre.org/techniques/T1021/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "Signed Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/", + "subtechnique": [ + { + "id": "T1218.005", + "name": "Mshta", + "reference": "https://attack.mitre.org/techniques/T1218/005/" + } + ] } ] } ], "type": "eql", - "version": 2 + "version": 4 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_dcom_mmc20.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_dcom_mmc20.json index c78343223a10f..8cb2e2c3690e6 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_dcom_mmc20.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_dcom_mmc20.json @@ -12,7 +12,7 @@ "language": "eql", "license": "Elastic License v2", "name": "Incoming DCOM Lateral Movement with MMC", - "query": "sequence by host.id with maxspan=1m\n [network where event.type == \"start\" and process.name : \"mmc.exe\" and\n source.port >= 49152 and destination.port >= 49152 and source.address not in (\"127.0.0.1\", \"::1\") and\n network.direction == \"incoming\" and network.transport == \"tcp\"\n ] by process.entity_id\n [process where event.type in (\"start\", \"process_started\") and process.parent.name : \"mmc.exe\"\n ] by process.parent.entity_id\n", + "query": "sequence by host.id with maxspan=1m\n [network where event.type == \"start\" and process.name : \"mmc.exe\" and\n source.port >= 49152 and destination.port >= 49152 and source.address not in (\"127.0.0.1\", \"::1\") and\n network.direction : (\"incoming\", \"ingress\") and network.transport == \"tcp\"\n ] by process.entity_id\n [process where event.type in (\"start\", \"process_started\") and process.parent.name : \"mmc.exe\"\n ] by process.parent.entity_id\n", "references": [ "https://enigma0x3.net/2017/01/05/lateral-movement-using-the-mmc20-application-com-object/" ], @@ -38,11 +38,18 @@ { "id": "T1021", "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/" + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.003", + "name": "Distributed Component Object Model", + "reference": "https://attack.mitre.org/techniques/T1021/003/" + } + ] } ] } ], "type": "eql", - "version": 2 + "version": 4 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_dcom_shellwindow_shellbrowserwindow.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_dcom_shellwindow_shellbrowserwindow.json index 617cbc2fab05e..9ca759cc2facd 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_dcom_shellwindow_shellbrowserwindow.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_dcom_shellwindow_shellbrowserwindow.json @@ -12,7 +12,7 @@ "language": "eql", "license": "Elastic License v2", "name": "Incoming DCOM Lateral Movement with ShellBrowserWindow or ShellWindows", - "query": "sequence by host.id with maxspan=5s\n [network where event.type == \"start\" and process.name : \"explorer.exe\" and\n network.direction == \"incoming\" and network.transport == \"tcp\" and\n source.port > 49151 and destination.port > 49151 and not source.address in (\"127.0.0.1\", \"::1\")\n ] by process.entity_id\n [process where event.type in (\"start\", \"process_started\") and\n process.parent.name : \"explorer.exe\"\n ] by process.parent.entity_id\n", + "query": "sequence by host.id with maxspan=5s\n [network where event.type == \"start\" and process.name : \"explorer.exe\" and\n network.direction : (\"incoming\", \"ingress\") and network.transport == \"tcp\" and\n source.port > 49151 and destination.port > 49151 and not source.address in (\"127.0.0.1\", \"::1\")\n ] by process.entity_id\n [process where event.type in (\"start\", \"process_started\") and\n process.parent.name : \"explorer.exe\"\n ] by process.parent.entity_id\n", "references": [ "https://enigma0x3.net/2017/01/23/lateral-movement-via-dcom-round-2/" ], @@ -38,11 +38,18 @@ { "id": "T1021", "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/" + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.003", + "name": "Distributed Component Object Model", + "reference": "https://attack.mitre.org/techniques/T1021/003/" + } + ] } ] } ], "type": "eql", - "version": 2 + "version": 4 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_direct_outbound_smb_connection.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_direct_outbound_smb_connection.json index b4534c48d0fa2..c9983d2ba186e 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_direct_outbound_smb_connection.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_direct_outbound_smb_connection.json @@ -33,13 +33,20 @@ }, "technique": [ { - "id": "T1210", - "name": "Exploitation of Remote Services", - "reference": "https://attack.mitre.org/techniques/T1210/" + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.002", + "name": "SMB/Windows Admin Shares", + "reference": "https://attack.mitre.org/techniques/T1021/002/" + } + ] } ] } ], "type": "eql", - "version": 6 + "version": 7 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_dns_server_overflow.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_dns_server_overflow.json index b34badc7c8611..6e11258e23d00 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_dns_server_overflow.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_dns_server_overflow.json @@ -13,7 +13,7 @@ "language": "kuery", "license": "Elastic License v2", "name": "Abnormally Large DNS Response", - "note": "## Triage and analysis\n\n### Investigating Large DNS Responses\nDetection alerts from this rule indicate an attempt was made to exploit CVE-2020-1350 (SigRed) through the use of large DNS responses on a Windows DNS server. Here are some possible avenues of investigation:\n- Investigate any corresponding Intrusion Detection Signatures (IDS) alerts that can validate this detection alert.\n- Examine the `dns.question_type` network fieldset with a protocol analyzer, such as Zeek, Packetbeat, or Suricata, for `SIG` or `RRSIG` data.\n- Validate the patch level and OS of the targeted DNS server to validate the observed activity was not large-scale Internet vulnerability scanning.\n- Validate that the source of the network activity was not from an authorized vulnerability scan or compromise assessment.", + "note": "## Triage and analysis\n\n### Investigating Large DNS Responses\nDetection alerts from this rule indicate possible anomalous activity around large byte DNS responses from a Windows DNS\nserver. This detection rule was created based on activity represented in exploitation of vulnerability (CVE-2020-1350)\nalso known as [SigRed](https://www.elastic.co/blog/detection-rules-for-sigred-vulnerability) during July 2020.\n\n#### Possible investigation steps:\n- This specific rule is sourced from network log activity such as DNS or network level data. It's important to validate\nthe source of the incoming traffic and determine if this activity has been observed previously within an environment.\n- Activity can be further investigated and validated by reviewing available corresponding Intrusion Detection Signatures (IDS) alerts associated with activity.\n- Further examination can be made by reviewing the `dns.question_type` network fieldset with a protocol analyzer, such as Zeek, Packetbeat, or Suricata, for `SIG` or `RRSIG` data.\n- Validate the patch level and OS of the targeted DNS server to validate the observed activity was not large-scale Internet vulnerability scanning.\n- Validate that the source of the network activity was not from an authorized vulnerability scan or compromise assessment.\n\n#### False Positive Analysis\n- Based on this rule which looks for a threshold of 60k bytes, it is possible for activity to be generated under 65k bytes\nand related to legitimate behavior. In packet capture files received by the [SANS Internet Storm Center](https://isc.sans.edu/forums/diary/PATCH+NOW+SIGRed+CVE20201350+Microsoft+DNS+Server+Vulnerability/26356/), byte responses\nwere all observed as greater than 65k bytes.\n- This activity has the ability to be triggered from compliance/vulnerability scanning or compromise assessment, it's\nimportant to determine the source of the activity and potential whitelist the source host\n\n\n### Related Rules\n- Unusual Child Process of dns.exe\n- Unusual File Modification by dns.exe\n\n### Response and Remediation\n- Review and implement the above detection logic within your environment using technology such as Endpoint security, Winlogbeat, Packetbeat, or network security monitoring (NSM) platforms such as Zeek or Suricata.\n- Ensure that you have deployed the latest Microsoft [Security Update](https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2020-1350) (Monthly Rollup or Security Only) and restart the\npatched machines. If unable to patch immediately: Microsoft [released](https://support.microsoft.com/en-us/help/4569509/windows-dns-server-remote-code-execution-vulnerability) a registry-based workaround that doesn\u2019t require a\nrestart. This can be used as a temporary solution before the patch is applied.\n- Maintain backups of your critical systems to aid in quick recovery.\n- Perform routine vulnerability scans of your systems, monitor [CISA advisories](https://us-cert.cisa.gov/ncas/current-activity) and patch identified vulnerabilities.\n- If observed true positive activity, implement a remediation plan and monitor host-based artifacts for additional post-exploitation behavior.\n", "query": "event.category:(network or network_traffic) and destination.port:53 and\n (event.dataset:zeek.dns or type:dns or event.type:connection) and network.bytes > 60000\n", "references": [ "https://research.checkpoint.com/2020/resolving-your-way-into-domain-admin-exploiting-a-17-year-old-bug-in-windows-dns-servers/", @@ -48,5 +48,5 @@ ], "timestamp_override": "event.ingested", "type": "query", - "version": 4 + "version": 5 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_executable_tool_transfer_smb.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_executable_tool_transfer_smb.json index 8173ddc6f1003..5fe9d066bc76d 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_executable_tool_transfer_smb.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_executable_tool_transfer_smb.json @@ -12,7 +12,7 @@ "language": "eql", "license": "Elastic License v2", "name": "Lateral Tool Transfer", - "query": "sequence by host.id with maxspan=30s\n [network where event.type == \"start\" and process.pid == 4 and destination.port == 445 and\n network.direction == \"incoming\" and network.transport == \"tcp\" and\n source.address != \"127.0.0.1\" and source.address != \"::1\"\n ] by process.entity_id\n /* add more executable extensions here if they are not noisy in your environment */\n [file where event.type in (\"creation\", \"change\") and process.pid == 4 and file.extension : (\"exe\", \"dll\", \"bat\", \"cmd\")] by process.entity_id\n", + "query": "sequence by host.id with maxspan=30s\n [network where event.type == \"start\" and process.pid == 4 and destination.port == 445 and\n network.direction : (\"incoming\", \"ingress\") and network.transport == \"tcp\" and\n source.address != \"127.0.0.1\" and source.address != \"::1\"\n ] by process.entity_id\n /* add more executable extensions here if they are not noisy in your environment */\n [file where event.type in (\"creation\", \"change\") and process.pid == 4 and file.extension : (\"exe\", \"dll\", \"bat\", \"cmd\")] by process.entity_id\n", "risk_score": 47, "rule_id": "58bc134c-e8d2-4291-a552-b4b3e537c60b", "severity": "medium", @@ -41,5 +41,5 @@ } ], "type": "eql", - "version": 2 + "version": 3 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_incoming_winrm_shell_execution.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_incoming_winrm_shell_execution.json index 062013549e1da..04a60f99556f4 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_incoming_winrm_shell_execution.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_incoming_winrm_shell_execution.json @@ -15,7 +15,7 @@ "language": "eql", "license": "Elastic License v2", "name": "Incoming Execution via WinRM Remote Shell", - "query": "sequence by host.id with maxspan=30s\n [network where process.pid == 4 and network.direction == \"incoming\" and\n destination.port in (5985, 5986) and network.protocol == \"http\" and not source.address in (\"::1\", \"127.0.0.1\")\n ]\n [process where event.type == \"start\" and process.parent.name : \"winrshost.exe\" and not process.name : \"conhost.exe\"]\n", + "query": "sequence by host.id with maxspan=30s\n [network where process.pid == 4 and network.direction : (\"incoming\", \"ingress\") and\n destination.port in (5985, 5986) and network.protocol == \"http\" and not source.address in (\"::1\", \"127.0.0.1\")\n ]\n [process where event.type == \"start\" and process.parent.name : \"winrshost.exe\" and not process.name : \"conhost.exe\"]\n", "risk_score": 47, "rule_id": "1cd01db9-be24-4bef-8e7c-e923f0ff78ab", "severity": "medium", @@ -44,5 +44,5 @@ } ], "type": "eql", - "version": 2 + "version": 3 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_incoming_wmi.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_incoming_wmi.json index 901a19d896ff3..9b13ade43812f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_incoming_wmi.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_incoming_wmi.json @@ -12,7 +12,7 @@ "language": "eql", "license": "Elastic License v2", "name": "WMI Incoming Lateral Movement", - "query": "sequence by host.id with maxspan = 2s\n\n /* Accepted Incoming RPC connection by Winmgmt service */\n\n [network where process.name : \"svchost.exe\" and network.direction == \"incoming\" and\n source.address != \"127.0.0.1\" and source.address != \"::1\" and \n source.port >= 49152 and destination.port >= 49152\n ]\n\n /* Excluding Common FPs Nessus and SCCM */\n\n [process where event.type in (\"start\", \"process_started\") and process.parent.name : \"WmiPrvSE.exe\" and\n not process.args : (\"C:\\\\windows\\\\temp\\\\nessus_*.txt\", \n \"C:\\\\windows\\\\TEMP\\\\nessus_*.TMP\", \n \"C:\\\\Windows\\\\CCM\\\\SystemTemp\\\\*\", \n \"C:\\\\Windows\\\\CCMCache\\\\*\", \n \"C:\\\\CCM\\\\Cache\\\\*\")\n ]\n", + "query": "sequence by host.id with maxspan = 2s\n\n /* Accepted Incoming RPC connection by Winmgmt service */\n\n [network where process.name : \"svchost.exe\" and network.direction : (\"incoming\", \"ingress\") and\n source.address != \"127.0.0.1\" and source.address != \"::1\" and \n source.port >= 49152 and destination.port >= 49152\n ]\n\n /* Excluding Common FPs Nessus and SCCM */\n\n [process where event.type in (\"start\", \"process_started\") and process.parent.name : \"WmiPrvSE.exe\" and\n not process.args : (\"C:\\\\windows\\\\temp\\\\nessus_*.txt\", \n \"C:\\\\windows\\\\TEMP\\\\nessus_*.TMP\", \n \"C:\\\\Windows\\\\CCM\\\\SystemTemp\\\\*\", \n \"C:\\\\Windows\\\\CCMCache\\\\*\", \n \"C:\\\\CCM\\\\Cache\\\\*\")\n ]\n", "risk_score": 47, "rule_id": "f3475224-b179-4f78-8877-c2bd64c26b88", "severity": "medium", @@ -50,5 +50,5 @@ } ], "type": "eql", - "version": 2 + "version": 3 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_powershell_remoting_target.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_powershell_remoting_target.json index 33b5ef7c0dacb..94708f90d20bb 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_powershell_remoting_target.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_powershell_remoting_target.json @@ -15,7 +15,7 @@ "language": "eql", "license": "Elastic License v2", "name": "Incoming Execution via PowerShell Remoting", - "query": "sequence by host.id with maxspan = 30s\n [network where network.direction == \"incoming\" and destination.port in (5985, 5986) and\n network.protocol == \"http\" and source.address != \"127.0.0.1\" and source.address != \"::1\"\n ]\n [process where event.type == \"start\" and process.parent.name : \"wsmprovhost.exe\" and not process.name : \"conhost.exe\"]\n", + "query": "sequence by host.id with maxspan = 30s\n [network where network.direction : (\"incoming\", \"ingress\") and destination.port in (5985, 5986) and\n network.protocol == \"http\" and source.address != \"127.0.0.1\" and source.address != \"::1\"\n ]\n [process where event.type == \"start\" and process.parent.name : \"wsmprovhost.exe\" and not process.name : \"conhost.exe\"]\n", "references": [ "https://docs.microsoft.com/en-us/powershell/scripting/learn/remoting/running-remote-commands?view=powershell-7.1" ], @@ -47,5 +47,5 @@ } ], "type": "eql", - "version": 2 + "version": 3 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_rdp_enabled_registry.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_rdp_enabled_registry.json index 6b2f782e488c4..584f24cfb30f3 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_rdp_enabled_registry.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_rdp_enabled_registry.json @@ -35,12 +35,19 @@ { "id": "T1021", "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/" + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.001", + "name": "Remote Desktop Protocol", + "reference": "https://attack.mitre.org/techniques/T1021/001/" + } + ] } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 3 + "version": 4 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_rdp_sharprdp_target.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_rdp_sharprdp_target.json index 0318883e374d3..0e5b7e7bc9001 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_rdp_sharprdp_target.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_rdp_sharprdp_target.json @@ -12,7 +12,7 @@ "language": "eql", "license": "Elastic License v2", "name": "Potential SharpRDP Behavior", - "query": "/* Incoming RDP followed by a new RunMRU string value set to cmd, powershell, taskmgr or tsclient, followed by process execution within 1m */\n\nsequence by host.id with maxspan=1m\n [network where event.type == \"start\" and process.name : \"svchost.exe\" and destination.port == 3389 and \n network.direction == \"incoming\" and network.transport == \"tcp\" and\n source.address != \"127.0.0.1\" and source.address != \"::1\"\n ]\n\n [registry where process.name : \"explorer.exe\" and \n registry.path : (\"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Explorer\\\\RunMRU\\\\*\") and\n registry.data.strings : (\"cmd.exe*\", \"powershell.exe*\", \"taskmgr*\", \"\\\\\\\\tsclient\\\\*.exe\\\\*\")\n ]\n \n [process where event.type in (\"start\", \"process_started\") and\n (process.parent.name : (\"cmd.exe\", \"powershell.exe\", \"taskmgr.exe\") or process.args : (\"\\\\\\\\tsclient\\\\*.exe\")) and \n not process.name : \"conhost.exe\"\n ]\n", + "query": "/* Incoming RDP followed by a new RunMRU string value set to cmd, powershell, taskmgr or tsclient, followed by process execution within 1m */\n\nsequence by host.id with maxspan=1m\n [network where event.type == \"start\" and process.name : \"svchost.exe\" and destination.port == 3389 and \n network.direction : (\"incoming\", \"ingress\") and network.transport == \"tcp\" and\n source.address != \"127.0.0.1\" and source.address != \"::1\"\n ]\n\n [registry where process.name : \"explorer.exe\" and \n registry.path : (\"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Explorer\\\\RunMRU\\\\*\") and\n registry.data.strings : (\"cmd.exe*\", \"powershell.exe*\", \"taskmgr*\", \"\\\\\\\\tsclient\\\\*.exe\\\\*\")\n ]\n \n [process where event.type in (\"start\", \"process_started\") and\n (process.parent.name : (\"cmd.exe\", \"powershell.exe\", \"taskmgr.exe\") or process.args : (\"\\\\\\\\tsclient\\\\*.exe\")) and \n not process.name : \"conhost.exe\"\n ]\n", "references": [ "https://posts.specterops.io/revisiting-remote-desktop-lateral-movement-8fb905cb46c3", "https://github.com/sbousseaden/EVTX-ATTACK-SAMPLES/blob/master/Lateral%20Movement/LM_sysmon_3_12_13_1_SharpRDP.evtx" @@ -39,11 +39,18 @@ { "id": "T1021", "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/" + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.001", + "name": "Remote Desktop Protocol", + "reference": "https://attack.mitre.org/techniques/T1021/001/" + } + ] } ] } ], "type": "eql", - "version": 2 + "version": 4 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_remote_services.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_remote_services.json index 88f5e0e63a052..5220506d37f58 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_remote_services.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_remote_services.json @@ -12,7 +12,7 @@ "language": "eql", "license": "Elastic License v2", "name": "Remotely Started Services via RPC", - "query": "sequence with maxspan=1s\n [network where process.name : \"services.exe\" and\n network.direction == \"incoming\" and network.transport == \"tcp\" and \n source.port >= 49152 and destination.port >= 49152 and source.address not in (\"127.0.0.1\", \"::1\")\n ] by host.id, process.entity_id\n\n [process where event.type in (\"start\", \"process_started\") and process.parent.name : \"services.exe\" and \n not (process.name : \"svchost.exe\" and process.args : \"tiledatamodelsvc\") and \n not (process.name : \"msiexec.exe\" and process.args : \"/V\")\n \n /* uncomment if psexec is noisy in your environment */\n /* and not process.name : \"PSEXESVC.exe\" */\n ] by host.id, process.parent.entity_id\n", + "query": "sequence with maxspan=1s\n [network where process.name : \"services.exe\" and\n network.direction : (\"incoming\", \"ingress\") and network.transport == \"tcp\" and \n source.port >= 49152 and destination.port >= 49152 and source.address not in (\"127.0.0.1\", \"::1\")\n ] by host.id, process.entity_id\n\n [process where event.type in (\"start\", \"process_started\") and process.parent.name : \"services.exe\" and \n not (process.name : \"svchost.exe\" and process.args : \"tiledatamodelsvc\") and \n not (process.name : \"msiexec.exe\" and process.args : \"/V\")\n \n /* uncomment if psexec is noisy in your environment */\n /* and not process.name : \"PSEXESVC.exe\" */\n ] by host.id, process.parent.entity_id\n", "risk_score": 47, "rule_id": "aa9a274d-6b53-424d-ac5e-cb8ca4251650", "severity": "medium", @@ -41,5 +41,5 @@ } ], "type": "eql", - "version": 2 + "version": 3 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_scheduled_task_target.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_scheduled_task_target.json index b66b5a94fe27f..b60717e61765a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_scheduled_task_target.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/lateral_movement_scheduled_task_target.json @@ -12,8 +12,8 @@ "language": "eql", "license": "Elastic License v2", "name": "Remote Scheduled Task Creation", - "note": "## Triage and analysis\n\nDecode the base64 encoded tasks actions registry value to investigate the task configured action.", - "query": "/* Task Scheduler service incoming connection followed by TaskCache registry modification */\n\nsequence by host.id, process.entity_id with maxspan = 1m\n [network where process.name : \"svchost.exe\" and\n network.direction == \"incoming\" and source.port >= 49152 and destination.port >= 49152 and\n source.address != \"127.0.0.1\" and source.address != \"::1\"\n ]\n [registry where registry.path : \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Schedule\\\\TaskCache\\\\Tasks\\\\*\\\\Actions\"]\n", + "note": "## Triage and analysis\n\n### Investigating Creation of Remote Scheduled Tasks\n\n[Scheduled tasks](https://docs.microsoft.com/en-us/windows/win32/taskschd/about-the-task-scheduler) are a great mechanism used for persistence and executing programs. These features can\nbe used remotely for a variety of legitimate reasons, but at the same time used by malware and adversaries.\nWhen investigating scheduled tasks that have been set-up remotely, one of the first methods should be determining the\noriginal intent behind the configuration and verify if the activity is tied to benign behavior such as software installations or any kind\nof network administrator work. One objective for these alerts is to understand the configured action within the scheduled\ntask, this is captured within the registry event data for this rule and can be base64 decoded to view the value.\n\n#### Possible investigation steps:\n- Review the base64 encoded tasks actions registry value to investigate the task configured action.\n- Determine if task is related to legitimate or benign behavior based on the corresponding process or program tied to the\nscheduled task.\n- Further examination should include both the source and target machines where host-based artifacts and network logs\nshould be reviewed further around the time window of the creation of the scheduled task.\n\n### False Positive Analysis\n- There is a high possibility of benign activity tied to the creation of remote scheduled tasks as it is a general feature\nwithin Windows and used for legitimate purposes for a wide range of activity. Any kind of context should be found to\nfurther understand the source of the activity and determine the intent based on the scheduled task contents.\n\n### Related Rules\n- Service Command Lateral Movement\n- Remotely Started Services via RPC\n\n### Response and Remediation\n- This behavior represents post-exploitation actions such as persistence or lateral movement, immediate response should\nbe taken to review and investigate the activity and potentially isolate involved machines to prevent further post-compromise\nbehavior.\n- Remove scheduled task and any other related artifacts to the activity.\n- Review privileged account management and user account management settings such as implementing GPO policies to further\nrestrict activity or configure settings that only allow Administrators to create remote scheduled tasks.\n", + "query": "/* Task Scheduler service incoming connection followed by TaskCache registry modification */\n\nsequence by host.id, process.entity_id with maxspan = 1m\n [network where process.name : \"svchost.exe\" and\n network.direction : (\"incoming\", \"ingress\") and source.port >= 49152 and destination.port >= 49152 and\n source.address != \"127.0.0.1\" and source.address != \"::1\"\n ]\n [registry where registry.path : \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Schedule\\\\TaskCache\\\\Tasks\\\\*\\\\Actions\"]\n", "risk_score": 47, "rule_id": "954ee7c8-5437-49ae-b2d6-2960883898e9", "severity": "medium", @@ -51,11 +51,18 @@ { "id": "T1053", "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/" + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.005", + "name": "Scheduled Task", + "reference": "https://attack.mitre.org/techniques/T1053/005/" + } + ] } ] } ], "type": "eql", - "version": 3 + "version": 5 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_auth_rare_user_logon.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_auth_rare_user_logon.json index 2f0a60b3efba9..d5d055bfa1658 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_auth_rare_user_logon.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_auth_rare_user_logon.json @@ -3,7 +3,7 @@ "author": [ "Elastic" ], - "description": "A machine learning job found an unusual user name in the authentication logs. An unusual user name is one way of detecting credentialed access by means of a new or dormant user account. A user account that is normally inactive (because the user has left the organization) that becomes active may be due to credentialed access using a compromised account password. Threat actors will sometimes also create new users as a means of persisting in a compromised web application.", + "description": "A machine learning job found an unusual user name in the authentication logs. An unusual user name is one way of detecting credentialed access by means of a new or dormant user account. An inactive user account (because the user has left the organization) that becomes active may be due to credentialed access using a compromised account password. Threat actors will sometimes also create new users as a means of persisting in a compromised web application.", "false_positives": [ "User accounts that are rarely active, such as a site reliability engineer (SRE) or developer logging into a production server for troubleshooting, may trigger this alert. Under some conditions, a newly created user account may briefly trigger this alert while the model is learning." ], @@ -25,5 +25,5 @@ "ML" ], "type": "machine_learning", - "version": 2 + "version": 3 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_auth_spike_in_logon_events_from_a_source_ip.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_auth_spike_in_logon_events_from_a_source_ip.json index 8e007c96c37fb..ee9acc43ac8d7 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_auth_spike_in_logon_events_from_a_source_ip.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_auth_spike_in_logon_events_from_a_source_ip.json @@ -3,7 +3,7 @@ "author": [ "Elastic" ], - "description": "A machine learning job found an unusually large spike in successful authentication events events from a particular source IP address. This can be due to password spraying, user enumeration or brute force activity.", + "description": "A machine learning job found an unusually large spike in successful authentication events from a particular source IP address. This can be due to password spraying, user enumeration or brute force activity.", "false_positives": [ "Build servers and CI systems can sometimes trigger this alert. Security test cycles that include brute force or password spraying activities may trigger this alert." ], @@ -25,5 +25,5 @@ "ML" ], "type": "machine_learning", - "version": 1 + "version": 2 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_cloudtrail_error_message_spike.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_cloudtrail_error_message_spike.json index e9ebbf2470b53..1b64f1d85301a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_cloudtrail_error_message_spike.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_cloudtrail_error_message_spike.json @@ -12,7 +12,7 @@ "license": "Elastic License v2", "machine_learning_job_id": "high_distinct_count_error_message", "name": "Spike in AWS Error Messages", - "note": "## Config\n\nThe AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.\n\n## Triage and analysis\n\n### Investigating Spikes in CloudTrail Errors\nDetection alerts from this rule indicate a large spike in the number of CloudTrail log messages that contain a particular error message. The error message in question was associated with the response to an AWS API command or method call. Here are some possible avenues of investigation:\n- Examine the history of the error. Has it manifested before? If the error, which is visible in the `aws.cloudtrail.error_message` field, only manifested recently, it might be related to recent changes in an automation module or script.\n- Examine the request parameters. These may provide indications as to the nature of the task being performed when the error occurred. Is the error related to unsuccessful attempts to enumerate or access objects, data, or secrets? If so, this can sometimes be a byproduct of discovery, privilege escalation or lateral movement attempts.\n- Consider the user as identified by the user.name field. Is this activity part of an expected workflow for the user context? Examine the user identity in the `aws.cloudtrail.user_identity.arn` field and the access key id in the `aws.cloudtrail.user_identity.access_key_id` field, which can help identify the precise user context. The user agent details in the `user_agent.original` field may also indicate what kind of a client made the request.\n- Consider the source IP address and geolocation for the calling user who issued the command. Do they look normal for the calling user? If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts, or could it be sourcing from an EC2 instance not under your control? If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?", + "note": "## Config\n\nThe AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.\n\n## Triage and analysis\n\n### Investigating Spikes in CloudTrail Errors\n\nCloudTrail logging provides visibility on actions taken within an AWS environment. By monitoring these events and understanding\nwhat is considered normal behavior within an organization, suspicious or malicious activity can be spotted when deviations\nare observed. This example rule triggers from a large spike in the number of CloudTrail log messages that contain a\nparticular error message. The error message in question was associated with the response to an AWS API command or method call,\nthis has the potential to uncover unknown threats or activity.\n\n#### Possible investigation steps:\n- Examine the history of the error. Has it manifested before? If the error, which is visible in the `aws.cloudtrail.error_message` field, only manifested recently, it might be related to recent changes in an automation module or script.\n- Examine the request parameters. These may provide indications as to the nature of the task being performed when the error occurred. Is the error related to unsuccessful attempts to enumerate or access objects, data, or secrets? If so, this can sometimes be a byproduct of discovery, privilege escalation or lateral movement attempts.\n- Consider the user as identified by the `user.name field`. Is this activity part of an expected workflow for the user context? Examine the user identity in the `aws.cloudtrail.user_identity.arn` field and the access key ID in the `aws.cloudtrail.user_identity.access_key_id` field, which can help identify the precise user context. The user agent details in the `user_agent.original` field may also indicate what kind of a client made the request.\n- Consider the source IP address and geolocation for the calling user who issued the command. Do they look normal for the calling user? If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts, or could it be sourcing from an EC2 instance that's not under your control? If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n\n### False Positive Analysis\n- This rule has the possibility to produce false positives based on unexpected activity occurring such as bugs or recent\nchanges to automation modules or scripting.\n- Adoption of new services or implementing new functionality to scripts may generate false positives\n\n### Related Rules\n- Unusual AWS Command for a User\n- Rare AWS Error Code\n\n### Response and Remediation\n- If activity is observed as suspicious or malicious, immediate response should be looked into rotating and deleting AWS IAM access keys\n- Validate if any unauthorized new users were created, remove these accounts and request password resets for other IAM users\n- Look into enabling multi-factor authentication for users\n- Follow security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS\n", "references": [ "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" ], @@ -26,5 +26,5 @@ "ML" ], "type": "machine_learning", - "version": 6 + "version": 7 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_cloudtrail_rare_error_code.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_cloudtrail_rare_error_code.json index ac7a867f5cd6e..d9e2b3e358760 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_cloudtrail_rare_error_code.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_cloudtrail_rare_error_code.json @@ -12,7 +12,7 @@ "license": "Elastic License v2", "machine_learning_job_id": "rare_error_code", "name": "Rare AWS Error Code", - "note": "## Config\n\nThe AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.\n\n## Triage and analysis\n\nInvestigating Unusual CloudTrail Error Activity ###\nDetection alerts from this rule indicate a rare and unusual error code that was associated with the response to an AWS API command or method call. Here are some possible avenues of investigation:\n- Examine the history of the error. Has it manifested before? If the error, which is visible in the `aws.cloudtrail.error_code field`, only manifested recently, it might be related to recent changes in an automation module or script.\n- Examine the request parameters. These may provide indications as to the nature of the task being performed when the error occurred. Is the error related to unsuccessful attempts to enumerate or access objects, data, or secrets? If so, this can sometimes be a byproduct of discovery, privilege escalation, or lateral movement attempts.\n- Consider the user as identified by the `user.name` field. Is this activity part of an expected workflow for the user context? Examine the user identity in the `aws.cloudtrail.user_identity.arn` field and the access key id in the `aws.cloudtrail.user_identity.access_key_id` field, which can help identify the precise user context. The user agent details in the `user_agent.original` field may also indicate what kind of a client made the request.\n- Consider the source IP address and geolocation for the calling user who issued the command. Do they look normal for the calling user? If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts, or could it be sourcing from an EC2 instance not under your control? If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?", + "note": "## Config\n\nThe AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.\n\n## Triage and analysis\n\nInvestigating Unusual CloudTrail Error Activity ###\nDetection alerts from this rule indicate a rare and unusual error code that was associated with the response to an AWS API command or method call. Here are some possible avenues of investigation:\n- Examine the history of the error. Has it manifested before? If the error, which is visible in the `aws.cloudtrail.error_code field`, only manifested recently, it might be related to recent changes in an automation module or script.\n- Examine the request parameters. These may provide indications as to the nature of the task being performed when the error occurred. Is the error related to unsuccessful attempts to enumerate or access objects, data, or secrets? If so, this can sometimes be a byproduct of discovery, privilege escalation, or lateral movement attempts.\n- Consider the user as identified by the `user.name` field. Is this activity part of an expected workflow for the user context? Examine the user identity in the `aws.cloudtrail.user_identity.arn` field and the access key ID in the `aws.cloudtrail.user_identity.access_key_id` field, which can help identify the precise user context. The user agent details in the `user_agent.original` field may also indicate what kind of a client made the request.\n- Consider the source IP address and geolocation for the calling user who issued the command. Do they look normal for the calling user? If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts, or could it be sourcing from an EC2 instance that's not under your control? If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?", "references": [ "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" ], @@ -26,5 +26,5 @@ "ML" ], "type": "machine_learning", - "version": 6 + "version": 7 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_cloudtrail_rare_method_by_city.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_cloudtrail_rare_method_by_city.json index 2a31ce8c065d8..a3d6208eb9f05 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_cloudtrail_rare_method_by_city.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_cloudtrail_rare_method_by_city.json @@ -12,7 +12,7 @@ "license": "Elastic License v2", "machine_learning_job_id": "rare_method_for_a_city", "name": "Unusual City For an AWS Command", - "note": "## Config\n\nThe AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.\n\n## Triage and analysis\n\n### Investigating an Unusual CloudTrail Event\nDetection alerts from this rule indicate an AWS API command or method call that is rare and unusual for the geolocation of the source IP address. Here are some possible avenues of investigation:\n- Consider the source IP address and geolocation for the calling user who issued the command. Do they look normal for the calling user? If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts, or could it be sourcing from an EC2 instance not under your control? If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- Consider the user as identified by the `user.name` field. Is this command part of an expected workflow for the user context? Examine the user identity in the `aws.cloudtrail.user_identity.arn` field and the access key id in the `aws.cloudtrail.user_identity.access_key_id` field, which can help identify the precise user context. The user agent details in the `user_agent.original` field may also indicate what kind of a client made the request.\n- Consider the time of day. If the user is a human, not a program or script, did the activity take place during a normal time of day?\n- Examine the history of the command. If the command, which is visible in the `event.action field`, only manifested recently, it might be part of a new automation module or script. If it has a consistent cadence (for example, if it appears in small numbers on a weekly or monthly cadence), it might be part of a housekeeping or maintenance process.\n- Examine the request parameters. These may provide indications as to the source of the program or the nature of the tasks it is performing.", + "note": "## Config\n\nThe AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.\n\n## Triage and analysis\n\n### Investigating an Unusual CloudTrail Event\nDetection alerts from this rule indicate an AWS API command or method call that is rare and unusual for the geolocation of the source IP address. Here are some possible avenues of investigation:\n- Consider the source IP address and geolocation for the calling user who issued the command. Do they look normal for the calling user? If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts, or could it be sourcing from an EC2 instance that's not under your control? If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- Consider the user as identified by the `user.name` field. Is this command part of an expected workflow for the user context? Examine the user identity in the `aws.cloudtrail.user_identity.arn` field and the access key ID in the `aws.cloudtrail.user_identity.access_key_id` field, which can help identify the precise user context. The user agent details in the `user_agent.original` field may also indicate what kind of a client made the request.\n- Consider the time of day. If the user is a human, not a program or script, did the activity take place during a normal time of day?\n- Examine the history of the command. If the command, which is visible in the `event.action field`, only manifested recently, it might be part of a new automation module or script. If it has a consistent cadence (for example, if it appears in small numbers on a weekly or monthly cadence), it might be part of a housekeeping or maintenance process.\n- Examine the request parameters. These may provide indications as to the source of the program or the nature of the tasks it is performing.", "references": [ "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" ], @@ -26,5 +26,5 @@ "ML" ], "type": "machine_learning", - "version": 6 + "version": 7 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_cloudtrail_rare_method_by_country.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_cloudtrail_rare_method_by_country.json index ebe7971e94289..4576b080e1ea6 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_cloudtrail_rare_method_by_country.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_cloudtrail_rare_method_by_country.json @@ -12,7 +12,7 @@ "license": "Elastic License v2", "machine_learning_job_id": "rare_method_for_a_country", "name": "Unusual Country For an AWS Command", - "note": "## Config\n\nThe AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.\n\n## Triage and analysis\n\n### Investigating an Unusual CloudTrail Event\nDetection alerts from this rule indicate an AWS API command or method call that is rare and unusual for the geolocation of the source IP address. Here are some possible avenues of investigation:\n- Consider the source IP address and geolocation for the calling user who issued the command. Do they look normal for the calling user? If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts, or could it be sourcing from an EC2 instance not under your control? If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- Consider the user as identified by the `user.name` field. Is this command part of an expected workflow for the user context? Examine the user identity in the `aws.cloudtrail.user_identity.arn` field and the access key id in the `aws.cloudtrail.user_identity.access_key_id` field, which can help identify the precise user context. The user agent details in the `user_agent.original` field may also indicate what kind of a client made the request.\n- Consider the time of day. If the user is a human, not a program or script, did the activity take place during a normal time of day?\n- Examine the history of the command. If the command, which is visible in the `event.action field`, only manifested recently, it might be part of a new automation module or script. If it has a consistent cadence (for example, if it appears in small numbers on a weekly or monthly cadence), it might be part of a housekeeping or maintenance process.\n- Examine the request parameters. These may provide indications as to the source of the program or the nature of the tasks it is performing.", + "note": "## Config\n\nThe AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.\n\n## Triage and analysis\n\n### Investigating an Unusual Country For an AWS Command\n\nCloudTrail logging provides visibility on actions taken within an AWS environment. By monitoring these events and understanding\nwhat is considered normal behavior within an organization, suspicious or malicious activity can be spotted when deviations\nare observed. This example rule focuses on AWS command activity where the country from the source of the activity has been\nconsidered unusual based on previous history.\n\n#### Possible investigation steps:\n- Consider the source IP address and geolocation for the calling user who issued the command. Do they look normal for the calling user? If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts, or could it be sourcing from an EC2 instance that's not under your control? If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- Consider the user as identified by the `user.name` field. Is this command part of an expected workflow for the user context? Examine the user identity in the `aws.cloudtrail.user_identity.arn` field and the access key ID in the `aws.cloudtrail.user_identity.access_key_id` field, which can help identify the precise user context. The user agent details in the `user_agent.original` field may also indicate what kind of a client made the request.\n- Consider the time of day. If the user is a human, not a program or script, did the activity take place during a normal time of day?\n- Examine the history of the command. If the command, which is visible in the `event.action field`, only manifested recently, it might be part of a new automation module or script. If it has a consistent cadence (for example, if it appears in small numbers on a weekly or monthly cadence), it might be part of a housekeeping or maintenance process.\n- Examine the request parameters. These may provide indications as to the source of the program or the nature of the tasks it is performing.\n\n### False Positive Analysis\n- False positives can occur if activity is coming from new employees based in a country with no previous history in AWS,\ntherefore it's important to validate the activity listed in the investigation steps above.\n\n### Related Rules\n- Unusual City For an AWS Command\n- Unusual AWS Command for a User\n- Rare AWS Error Code\n\n### Response and Remediation\n- If activity is observed as suspicious or malicious, immediate response should be looked into rotating and deleting AWS IAM access keys\n- Validate if any unauthorized new users were created, remove these accounts and request password resets for other IAM users\n- Look into enabling multi-factor authentication for users\n- Follow security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS\n", "references": [ "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" ], @@ -26,5 +26,5 @@ "ML" ], "type": "machine_learning", - "version": 6 + "version": 7 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_cloudtrail_rare_method_by_user.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_cloudtrail_rare_method_by_user.json index ab9364c453423..53f9fab8d1b48 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_cloudtrail_rare_method_by_user.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_cloudtrail_rare_method_by_user.json @@ -12,7 +12,7 @@ "license": "Elastic License v2", "machine_learning_job_id": "rare_method_for_a_username", "name": "Unusual AWS Command for a User", - "note": "## Config\n\nThe AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.\n\n## Triage and analysis\n\n### Investigating an Unusual CloudTrail Event\n\nDetection alerts from this rule indicate an AWS API command or method call that is rare and unusual for the calling IAM user. Here are some possible avenues of investigation:\n- Consider the user as identified by the `user.name` field. Is this command part of an expected workflow for the user context? Examine the user identity in the `aws.cloudtrail.user_identity.arn` field and the access key id in the `aws.cloudtrail.user_identity.access_key_id` field, which can help identify the precise user context. The user agent details in the `user_agent.original` field may also indicate what kind of a client made the request.\n- Consider the source IP address and geolocation for the calling user who issued the command. Do they look normal for the calling user? If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts, or could it be sourcing from an EC2 instance not under your control? If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- Consider the time of day. If the user is a human, not a program or script, did the activity take place during a normal time of day?\n- Examine the history of the command. If the command, which is visible in the `event.action field`, only manifested recently, it might be part of a new automation module or script. If it has a consistent cadence (for example, if it appears in small numbers on a weekly or monthly cadence), it might be part of a housekeeping or maintenance process.\n- Examine the request parameters. These may provide indications as to the source of the program or the nature of the tasks it is performing.", + "note": "## Config\n\nThe AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.\n\n## Triage and analysis\n\n### Investigating an Unusual CloudTrail Event\n\nDetection alerts from this rule indicate an AWS API command or method call that is rare and unusual for the calling IAM user. Here are some possible avenues of investigation:\n- Consider the user as identified by the `user.name` field. Is this command part of an expected workflow for the user context? Examine the user identity in the `aws.cloudtrail.user_identity.arn` field and the access key ID in the `aws.cloudtrail.user_identity.access_key_id` field, which can help identify the precise user context. The user agent details in the `user_agent.original` field may also indicate what kind of a client made the request.\n- Consider the source IP address and geolocation for the calling user who issued the command. Do they look normal for the calling user? If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts, or could it be sourcing from an EC2 instance that's not under your control? If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- Consider the time of day. If the user is a human, not a program or script, did the activity take place during a normal time of day?\n- Examine the history of the command. If the command, which is visible in the `event.action field`, only manifested recently, it might be part of a new automation module or script. If it has a consistent cadence (for example, if it appears in small numbers on a weekly or monthly cadence), it might be part of a housekeeping or maintenance process.\n- Examine the request parameters. These may provide indications as to the source of the program or the nature of the tasks it is performing.", "references": [ "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" ], @@ -26,5 +26,5 @@ "ML" ], "type": "machine_learning", - "version": 6 + "version": 7 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_rare_process_by_host_windows.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_rare_process_by_host_windows.json index 8729de9a8689d..d8bf26884b16f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_rare_process_by_host_windows.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/ml_rare_process_by_host_windows.json @@ -15,7 +15,7 @@ "v2_rare_process_by_host_windows_ecs" ], "name": "Unusual Process For a Windows Host", - "note": "## Triage and analysis\n\n### Investigating an Unusual Windows Process\nDetection alerts from this rule indicate the presence of a Windows process that is rare and unusual for the host it ran on. Here are some possible avenues of investigation:\n- Consider the user as identified by the username field. Is this program part of an expected workflow for the user who ran this program on this host?\n- Examine the history of execution. If this process only manifested recently, it might be part of a new software package. If it has a consistent cadence (for example if it runs monthly or quarterly), it might be part of a monthly or quarterly business process.\n- Examine the process metadata like the values of the Company, Description and Product fields which may indicate whether the program is associated with an expected software vendor or package.\n- Examine arguments and working directory. These may provide indications as to the source of the program or the nature of the tasks it is performing.\n- Consider the same for the parent process. If the parent process is a legitimate system utility or service, this could be related to software updates or system management. If the parent process is something user-facing like an Office application, this process could be more suspicious.\n- If you have file hash values in the event data, and you suspect malware, you can optionally run a search for the file hash to see if the file is identified as malware by anti-malware tools. ", + "note": "## Triage and analysis\n\n### Investigating an Unusual Windows Process\n\nSearching for abnormal Windows processes is a good methodology to find potentially malicious activity within a network.\nBy understanding what is commonly run within an environment and developing baselines for legitimate activity can help\nuncover potential malware and suspicious behaviors.\n\n#### Possible investigation steps:\n- Consider the user as identified by the `user.name` field. Is this program part of an expected workflow for the user who ran this program on this host?\n- Examine the history of execution. If this process only manifested recently, it might be part of a new software package. If it has a consistent cadence (for example if it runs monthly or quarterly), it might be part of a monthly or quarterly business process.\n- Examine the process metadata like the values of the Company, Description and Product fields which may indicate whether the program is associated with an expected software vendor or package.\n- Examine arguments and working directory. These may provide indications as to the source of the program or the nature of the tasks it is performing.\n- Consider the same for the parent process. If the parent process is a legitimate system utility or service, this could be related to software updates or system management. If the parent process is something user-facing like an Office application, this process could be more suspicious.\n- If you have file hash values in the event data, and you suspect malware, you can optionally run a search for the file hash to see if the file is identified as malware by anti-malware tools.\n\n### False Positive Analysis\n- Validate the unusual Windows process is not related to new benign software installation activity. If related to\nlegitimate software, this can be done by leveraging the exception workflow in the Kibana Security App or Elasticsearch\nAPI to tune this rule to your environment\n- Try to understand the context of the execution by thinking about the user, machine, or business purpose. It's possible that a small number of endpoints\nsuch as servers that have very unique software that might appear to be unusual, but satisfy a specific business need.\n\n### Related Rules\n- Anomalous Windows Process Creation\n- Unusual Windows Path Activity\n- Unusual Windows Process Calling the Metadata Service\n\n### Response and Remediation\n- This rule is related to process execution events and should be immediately reviewed and investigated to determine if malicious\n- Based on validation and if malicious, the impacted machine should be isolated and analyzed to determine other post-compromise\nbehavior such as setting up persistence or performing lateral movement.\n- Look into preventive measures such as Windows Defender Application Control and AppLocker to gain better control on\nwhat is allowed to run on Windows infrastructure.\n", "references": [ "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" ], @@ -30,5 +30,5 @@ "ML" ], "type": "machine_learning", - "version": 7 + "version": 8 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_ec2_security_group_configuration_change_detection.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_ec2_security_group_configuration_change_detection.json index a3468f4a68948..b7421934ba8e8 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_ec2_security_group_configuration_change_detection.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_ec2_security_group_configuration_change_detection.json @@ -3,7 +3,7 @@ "Elastic", "Austin Songer" ], - "description": "Identifies a change to an AWS Security Group Configuration. A security group is like a virtul firewall and modifying configurations may allow unauthorized access. Threat actors may abuse this to establish persistence, exfiltrate data, or pivot in a AWS environment.", + "description": "Identifies a change to an AWS Security Group Configuration. A security group is like a virtual firewall, and modifying configurations may allow unauthorized access. Threat actors may abuse this to establish persistence, exfiltrate data, or pivot in an AWS environment.", "false_positives": [ "A security group may be created by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Security group creations from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." ], @@ -49,10 +49,23 @@ "name": "Defense Evasion", "reference": "https://attack.mitre.org/tactics/TA0005/" }, - "technique": [] + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.007", + "name": "Disable or Modify Cloud Firewall", + "reference": "https://attack.mitre.org/techniques/T1562/007/" + } + ] + } + ] } ], "timestamp_override": "event.ingested", "type": "query", - "version": 1 + "version": 2 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_evasion_hidden_local_account_creation.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_evasion_hidden_local_account_creation.json index 8edaef5dc72fd..24f0f3d4d95b1 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_evasion_hidden_local_account_creation.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_evasion_hidden_local_account_creation.json @@ -39,12 +39,19 @@ { "id": "T1136", "name": "Create Account", - "reference": "https://attack.mitre.org/techniques/T1136/" + "reference": "https://attack.mitre.org/techniques/T1136/", + "subtechnique": [ + { + "id": "T1136.001", + "name": "Local Account", + "reference": "https://attack.mitre.org/techniques/T1136/001/" + } + ] } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 1 + "version": 2 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_evasion_registry_startup_shell_folder_modified.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_evasion_registry_startup_shell_folder_modified.json index 947c1c748af69..21ad9c5161541 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_evasion_registry_startup_shell_folder_modified.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_evasion_registry_startup_shell_folder_modified.json @@ -12,7 +12,7 @@ "language": "eql", "license": "Elastic License v2", "name": "Suspicious Startup Shell Folder Modification", - "note": "## Triage and analysis\n\nVerify file creation events in the new Windows Startup folder location.", + "note": "## Triage and analysis\n\n### Investigating Suspicious Startup Shell Activity\n\nTechniques used within malware and by adversaries often leverage the Windows registry to store malicious programs for\npersistence. Startup shell folders are often targeted as they are not as prevalent as normal Startup folder paths so this\nbehavior may evade existing AV/EDR solutions. Another preference is that these programs might run with higher privileges\nwhich can be ideal for an attacker.\n\n#### Possible investigation steps:\n- Review the source process and related file tied to the Windows Registry entry\n- Validate the activity is not related to planned patches, updates, network administrator activity or legitimate software\ninstallations\n- Determine if activity is unique by validating if other machines in same organization have similar entry\n\n### False Positive Analysis\n- There is a high possibility of benign legitimate programs being added to Shell folders. This activity could be based\non new software installations, patches, or any kind of network administrator related activity. Before entering further\ninvestigation, this activity should be validated that is it not related to benign activity\n\n### Related Rules\n- Startup or Run Key Registry Modification\n- Persistent Scripts in the Startup Directory\n\n### Response and Remediation\n- Activity should first be validated as a true positive event if so then immediate response should be taken to review,\ninvestigate and potentially isolate activity to prevent further post-compromise behavior\n- The respective binary or program tied to this persistence method should be further analyzed and reviewed to understand\nit's behavior and capabilities\n- Since this activity is considered post-exploitation behavior, it's important to understand how the behavior was first\ninitialized such as through a macro-enabled document that was attached in a phishing email. By understanding the source\nof the attack, this information can then be used to search for similar indicators on other machines in the same environment.\n", "query": "registry where\n registry.path : (\n \"HKLM\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Explorer\\\\User Shell Folders\\\\Common Startup\",\n \"HKLM\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Explorer\\\\Shell Folders\\\\Common Startup\",\n \"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Explorer\\\\User Shell Folders\\\\Startup\",\n \"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Explorer\\\\Shell Folders\\\\Startup\"\n ) and\n registry.data.strings != null and\n /* Normal Startup Folder Paths */\n not registry.data.strings : (\n \"C:\\\\ProgramData\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\Startup\",\n \"%ProgramData%\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\Startup\",\n \"%USERPROFILE%\\\\AppData\\\\Roaming\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\Startup\",\n \"C:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\Startup\"\n )\n", "risk_score": 73, "rule_id": "c8b150f0-0164-475b-a75e-74b47800a9ff", @@ -50,5 +50,5 @@ ], "timestamp_override": "event.ingested", "type": "eql", - "version": 1 + "version": 2 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_exchange_suspicious_mailbox_right_delegation.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_exchange_suspicious_mailbox_right_delegation.json new file mode 100644 index 0000000000000..e950569f19878 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_exchange_suspicious_mailbox_right_delegation.json @@ -0,0 +1,57 @@ +{ + "author": [ + "Elastic", + "Austin Songer" + ], + "description": "Identifies the assignment of rights to accesss content from another mailbox. An adversary may use the compromised account to send messages to other accounts in the network of the target business while creating inbox rules, so messages can evade spam/phishing detection mechanisms.", + "false_positives": [ + "Assignment of rights to a service account." + ], + "index": [ + "filebeat-*", + "logs-o365*" + ], + "language": "kuery", + "license": "Elastic License v2", + "name": "O365 Exchange Suspicious Mailbox Right Delegation", + "note": "## Config\n\nThe Microsoft 365 Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "query": "event.dataset:o365.audit and event.provider:Exchange and event.action:Add-MailboxPermission and \no365.audit.Parameters.AccessRights:(FullAccess or SendAs or SendOnBehalf) and event.outcome:success\n", + "risk_score": 21, + "rule_id": "0ce6487d-8069-4888-9ddd-61b52490cebc", + "severity": "low", + "tags": [ + "Elastic", + "Cloud", + "Microsoft 365", + "Continuous Monitoring", + "SecOps", + "Configuration Audit" + ], + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/", + "subtechnique": [ + { + "id": "T1098.002", + "name": "Exchange Email Delegate Permissions", + "reference": "https://attack.mitre.org/techniques/T1098/002/" + } + ] + } + ] + } + ], + "timestamp_override": "event.ingested", + "type": "query", + "version": 1 +} diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_gpo_schtask_service_creation.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_gpo_schtask_service_creation.json index 86b1cd3e71eaf..ebbe2448c75df 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_gpo_schtask_service_creation.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_gpo_schtask_service_creation.json @@ -35,12 +35,19 @@ { "id": "T1053", "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/" + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.005", + "name": "Scheduled Task", + "reference": "https://attack.mitre.org/techniques/T1053/005/" + } + ] } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 5 + "version": 6 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_local_scheduled_job_creation.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_local_scheduled_job_creation.json index 6e656209fd055..60afcad90333c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_local_scheduled_job_creation.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_local_scheduled_job_creation.json @@ -38,12 +38,19 @@ { "id": "T1053", "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/" + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.005", + "name": "Scheduled Task", + "reference": "https://attack.mitre.org/techniques/T1053/005/" + } + ] } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 1 + "version": 2 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_local_scheduled_task_scripting.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_local_scheduled_task_scripting.json index 712e98d4ac941..128fdd9de5575 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_local_scheduled_task_scripting.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_local_scheduled_task_scripting.json @@ -39,11 +39,18 @@ { "id": "T1053", "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/" + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.005", + "name": "Scheduled Task", + "reference": "https://attack.mitre.org/techniques/T1053/005/" + } + ] } ] } ], "type": "eql", - "version": 3 + "version": 4 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/collection_persistence_powershell_exch_mailbox_activesync_add_device.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_powershell_exch_mailbox_activesync_add_device.json similarity index 72% rename from x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/collection_persistence_powershell_exch_mailbox_activesync_add_device.json rename to x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_powershell_exch_mailbox_activesync_add_device.json index 9a494a13fa297..75044e20ca5fd 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/collection_persistence_powershell_exch_mailbox_activesync_add_device.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_powershell_exch_mailbox_activesync_add_device.json @@ -28,31 +28,33 @@ "Host", "Windows", "Threat Detection", - "Collection" + "Persistence" ], "threat": [ { "framework": "MITRE ATT&CK", "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" }, "technique": [ { - "id": "T1114", - "name": "Email Collection", - "reference": "https://attack.mitre.org/techniques/T1114/" - }, - { - "id": "T1005", - "name": "Data from Local System", - "reference": "https://attack.mitre.org/techniques/T1005/" + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/", + "subtechnique": [ + { + "id": "T1098.002", + "name": "Exchange Email Delegate Permissions", + "reference": "https://attack.mitre.org/techniques/T1098/002/" + } + ] } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 4 + "version": 5 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_rds_instance_creation.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_rds_instance_creation.json index aa2c946d3a001..4ea6631025c11 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_rds_instance_creation.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_rds_instance_creation.json @@ -1,6 +1,7 @@ { "author": [ - "Elastic" + "Elastic", + "Austin Songer" ], "description": "Identifies the creation of an Amazon Relational Database Service (RDS) Aurora database instance.", "false_positives": [ @@ -44,5 +45,5 @@ ], "timestamp_override": "event.ingested", "type": "query", - "version": 1 + "version": 2 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_registry_uncommon.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_registry_uncommon.json index 7629ee4b821da..2b94ded55e7d4 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_registry_uncommon.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_registry_uncommon.json @@ -34,7 +34,20 @@ "name": "Persistence", "reference": "https://attack.mitre.org/tactics/TA0003/" }, - "technique": [] + "technique": [ + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/", + "subtechnique": [ + { + "id": "T1547.001", + "name": "Registry Run Keys / Startup Folder", + "reference": "https://attack.mitre.org/techniques/T1547/001/" + } + ] + } + ] }, { "framework": "MITRE ATT&CK", @@ -54,5 +67,5 @@ ], "timestamp_override": "event.ingested", "type": "eql", - "version": 3 + "version": 4 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_route_table_modified_or_deleted.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_route_table_modified_or_deleted.json new file mode 100644 index 0000000000000..54180a3a59a54 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_route_table_modified_or_deleted.json @@ -0,0 +1,55 @@ +{ + "author": [ + "Elastic", + "Austin Songer" + ], + "description": "Identifies when an AWS Route Table has been modified or deleted.", + "false_positives": [ + "Route Table could be modified or deleted by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Route Table being modified from unfamiliar users should be investigated. If known behavior is causing false positives, it can be exempted from the rule. Also automated processes that uses Terraform may lead to false positives." + ], + "from": "now-60m", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "interval": "10m", + "language": "kuery", + "license": "Elastic License v2", + "name": "AWS Route Table Modified or Deleted", + "note": "## Config\n\nThe AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "query": "event.dataset:aws.cloudtrail and event.provider:cloudtrail.amazonaws.com and event.action:(ReplaceRoute or ReplaceRouteTableAssociation or\nDeleteRouteTable or DeleteRoute or DisassociateRouteTable) and event.outcome:success\n", + "references": [ + "https://github.com/easttimor/aws-incident-response#network-routing", + "https://docs.datadoghq.com/security_platform/default_rules/cloudtrail-aws-route-table-modified", + "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ReplaceRoute.html", + "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ReplaceRouteTableAssociation", + "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeleteRouteTable.html", + "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeleteRoute.html", + "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DisassociateRouteTable.html" + ], + "risk_score": 21, + "rule_id": "e7cd5982-17c8-4959-874c-633acde7d426", + "severity": "low", + "tags": [ + "Elastic", + "Cloud", + "AWS", + "Continuous Monitoring", + "SecOps", + "Network Security" + ], + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [] + } + ], + "timestamp_override": "event.ingested", + "type": "query", + "version": 1 +} diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_screensaver_engine_unexpected_child_process.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_screensaver_engine_unexpected_child_process.json new file mode 100644 index 0000000000000..544049d2c2df1 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_screensaver_engine_unexpected_child_process.json @@ -0,0 +1,50 @@ +{ + "author": [ + "Elastic" + ], + "description": "Identifies when a child process is spawned by the screensaver engine process, which is consistent with an attacker's malicious payload being executed after the screensaver activated on the endpoint. An adversary can maintain persistence on a macOS endpoint by creating a malicious screensaver (.saver) file and configuring the screensaver plist file to execute code each time the screensaver is activated.", + "from": "now-9m", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "language": "eql", + "license": "Elastic License v2", + "name": "Unexpected Child Process of macOS Screensaver Engine", + "note": "## Triage and analysis\n\n- Analyze the descendant processes of the ScreenSaverEngine process for malicious code and suspicious behavior such\nas downloading a payload from a server\n- Review the installed and activated screensaver on the host. Triage the screensaver (.saver) file that was triggered to\nidentify whether the file is malicious or not.\n", + "query": "process where event.type == \"start\" and process.parent.name == \"ScreenSaverEngine\"\n", + "references": [ + "https://posts.specterops.io/saving-your-access-d562bf5bf90b", + "https://github.com/D00MFist/PersistentJXA" + ], + "risk_score": 47, + "rule_id": "48d7f54d-c29e-4430-93a9-9db6b5892270", + "severity": "medium", + "tags": [ + "Elastic", + "Host", + "macOS", + "Threat Detection", + "Persistence" + ], + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1546", + "name": "Event Triggered Execution", + "reference": "https://attack.mitre.org/techniques/T1546/" + } + ] + } + ], + "timestamp_override": "event.ingested", + "type": "eql", + "version": 1 +} diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_screensaver_plist_file_modification.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_screensaver_plist_file_modification.json new file mode 100644 index 0000000000000..dcd7427d7cbcd --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_screensaver_plist_file_modification.json @@ -0,0 +1,50 @@ +{ + "author": [ + "Elastic" + ], + "description": "Identifies when a screensaver plist file is modified by an unexpected process. An adversary can maintain persistence on a macOS endpoint by creating a malicious screensaver (.saver) file and configuring the screensaver plist file to execute code each time the screensaver is activated.", + "from": "now-9m", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "language": "eql", + "license": "Elastic License v2", + "name": "Screensaver Plist File Modified by Unexpected Process", + "note": "## Triage and analysis\n\n- Analyze the plist file modification event to identify whether the change was expected or not\n- Investigate the process that modified the plist file for malicious code or other suspicious behavior\n- Identify if any suspicious or known malicious screensaver (.saver) files were recently written to or modified on the host", + "query": "file where event.type != \"deletion\" and\n file.name: \"com.apple.screensaver.*.plist\" and\n file.path : (\n \"/Users/*/Library/Preferences/ByHost/*\",\n \"/Library/Managed Preferences/*\",\n \"/System/Library/Preferences/*\"\n ) and\n /* Filter OS processes modifying screensaver plist files */\n not process.executable : (\n \"/usr/sbin/cfprefsd\",\n \"/usr/libexec/xpcproxy\",\n \"/System/Library/CoreServices/ManagedClient.app/Contents/Resources/MCXCompositor\",\n \"/System/Library/CoreServices/ManagedClient.app/Contents/MacOS/ManagedClient\"\n )\n", + "references": [ + "https://posts.specterops.io/saving-your-access-d562bf5bf90b", + "https://github.com/D00MFist/PersistentJXA" + ], + "risk_score": 47, + "rule_id": "e6e8912f-283f-4d0d-8442-e0dcaf49944b", + "severity": "medium", + "tags": [ + "Elastic", + "Host", + "macOS", + "Threat Detection", + "Persistence" + ], + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1546", + "name": "Event Triggered Execution", + "reference": "https://attack.mitre.org/techniques/T1546/" + } + ] + } + ], + "timestamp_override": "event.ingested", + "type": "eql", + "version": 1 +} diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_suspicious_scheduled_task_runtime.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_suspicious_scheduled_task_runtime.json index ea5917a246afe..812c35350677f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_suspicious_scheduled_task_runtime.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_suspicious_scheduled_task_runtime.json @@ -38,12 +38,19 @@ { "id": "T1053", "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/" + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.005", + "name": "Scheduled Task", + "reference": "https://attack.mitre.org/techniques/T1053/005/" + } + ] } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 3 + "version": 4 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_user_account_added_to_privileged_group_ad.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_user_account_added_to_privileged_group_ad.json index c63d96b106a01..1e55f014806f3 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_user_account_added_to_privileged_group_ad.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_user_account_added_to_privileged_group_ad.json @@ -36,21 +36,14 @@ }, "technique": [ { - "id": "T1136", - "name": "Create Account", - "reference": "https://attack.mitre.org/techniques/T1136/", - "subtechnique": [ - { - "id": "T1136.001", - "name": "Local Account", - "reference": "https://attack.mitre.org/techniques/T1136/001/" - } - ] + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 2 + "version": 3 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_user_account_creation.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_user_account_creation.json index 0e2b01a1967d2..0777dfccab4bf 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_user_account_creation.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_user_account_creation.json @@ -35,12 +35,19 @@ { "id": "T1136", "name": "Create Account", - "reference": "https://attack.mitre.org/techniques/T1136/" + "reference": "https://attack.mitre.org/techniques/T1136/", + "subtechnique": [ + { + "id": "T1136.001", + "name": "Local Account", + "reference": "https://attack.mitre.org/techniques/T1136/001/" + } + ] } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 8 + "version": 9 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_via_telemetrycontroller_scheduledtask_hijack.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_via_telemetrycontroller_scheduledtask_hijack.json index dca20728b40fa..0d9cd0cb4020a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_via_telemetrycontroller_scheduledtask_hijack.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_via_telemetrycontroller_scheduledtask_hijack.json @@ -38,12 +38,19 @@ { "id": "T1053", "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/" + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.005", + "name": "Scheduled Task", + "reference": "https://attack.mitre.org/techniques/T1053/005/" + } + ] } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 5 + "version": 6 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_via_windows_management_instrumentation_event_subscription.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_via_windows_management_instrumentation_event_subscription.json index fc3d94498d0cb..79e887a548bcb 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_via_windows_management_instrumentation_event_subscription.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_via_windows_management_instrumentation_event_subscription.json @@ -35,12 +35,19 @@ { "id": "T1546", "name": "Event Triggered Execution", - "reference": "https://attack.mitre.org/techniques/T1546/" + "reference": "https://attack.mitre.org/techniques/T1546/", + "subtechnique": [ + { + "id": "T1546.003", + "name": "Windows Management Instrumentation Event Subscription", + "reference": "https://attack.mitre.org/techniques/T1546/003/" + } + ] } ] } ], "timestamp_override": "event.ingested", "type": "eql", - "version": 3 + "version": 4 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_webshell_detection.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_webshell_detection.json index 26248009f5a49..8da3be0b69d91 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_webshell_detection.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/persistence_webshell_detection.json @@ -4,7 +4,7 @@ ], "description": "Identifies suspicious commands executed via a web server, which may suggest a vulnerability and remote shell access.", "false_positives": [ - "Security audits, maintenance and network administrative scripts may trigger this alert when run under web processes." + "Security audits, maintenance, and network administrative scripts may trigger this alert when run under web processes." ], "from": "now-9m", "index": [ @@ -71,5 +71,5 @@ ], "timestamp_override": "event.ingested", "type": "eql", - "version": 1 + "version": 2 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/privilege_escalation_new_or_modified_federation_domain.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/privilege_escalation_new_or_modified_federation_domain.json new file mode 100644 index 0000000000000..2a1231e96d8a5 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/privilege_escalation_new_or_modified_federation_domain.json @@ -0,0 +1,61 @@ +{ + "author": [ + "Austin Songer" + ], + "description": "Identifies a new or modified federation domain, which can be used to create a trust between O365 and an external identity provider.", + "index": [ + "filebeat-*", + "logs-o365*" + ], + "language": "kuery", + "license": "Elastic License v2", + "name": "New or Modified Federation Domain", + "note": "## Config\n\nThe Microsoft 365 Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "query": "event.dataset:o365.audit and event.provider:Exchange and event.category:web and event.action:(\"Set-AcceptedDomain\" or \n\"Set-MsolDomainFederationSettings\" or \"Add-FederatedDomain\" or \"New-AcceptedDomain\" or \"Remove-AcceptedDomain\" or \"Remove-FederatedDomain\") and \nevent.outcome:success\n", + "references": [ + "https://docs.microsoft.com/en-us/powershell/module/exchange/remove-accepteddomain?view=exchange-ps", + "https://docs.microsoft.com/en-us/powershell/module/exchange/remove-federateddomain?view=exchange-ps", + "https://docs.microsoft.com/en-us/powershell/module/exchange/new-accepteddomain?view=exchange-ps", + "https://docs.microsoft.com/en-us/powershell/module/exchange/add-federateddomain?view=exchange-ps", + "https://docs.microsoft.com/en-us/powershell/module/exchange/set-accepteddomain?view=exchange-ps", + "https://docs.microsoft.com/en-us/powershell/module/msonline/set-msoldomainfederationsettings?view=azureadps-1.0" + ], + "risk_score": 21, + "rule_id": "684554fc-0777-47ce-8c9b-3d01f198d7f8", + "severity": "low", + "tags": [ + "Elastic", + "Cloud", + "Microsoft 365", + "Continuous Monitoring", + "SecOps", + "Identity and Access" + ], + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1484", + "name": "Domain Policy Modification", + "reference": "https://attack.mitre.org/techniques/T1484/", + "subtechnique": [ + { + "id": "T1484.002", + "name": "Domain Trust Modification", + "reference": "https://attack.mitre.org/techniques/T1484/002/" + } + ] + } + ] + } + ], + "timestamp_override": "event.ingested", + "type": "query", + "version": 1 +} diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/privilege_escalation_sts_getsessiontoken_abuse.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/privilege_escalation_sts_getsessiontoken_abuse.json new file mode 100644 index 0000000000000..c5e2669c1fade --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/privilege_escalation_sts_getsessiontoken_abuse.json @@ -0,0 +1,74 @@ +{ + "author": [ + "Austin Songer" + ], + "description": "Identifies the suspicious use of GetSessionToken. Tokens could be created and used by attackers to move laterally and escalate privileges.", + "false_positives": [ + "GetSessionToken may be done by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. GetSessionToken from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "index": [ + "filebeat-*", + "logs-aws*" + ], + "language": "kuery", + "license": "Elastic License v2", + "name": "AWS STS GetSessionToken Abuse", + "note": "## Config\n\nThe AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "query": "event.dataset:aws.cloudtrail and event.provider:sts.amazonaws.com and event.action:GetSessionToken and \naws.cloudtrail.user_identity.type:IAMUser and event.outcome:success\n", + "references": [ + "https://docs.aws.amazon.com/STS/latest/APIReference/API_GetSessionToken.html" + ], + "risk_score": 21, + "rule_id": "b45ab1d2-712f-4f01-a751-df3826969807", + "severity": "low", + "tags": [ + "Elastic", + "Cloud", + "AWS", + "Continuous Monitoring", + "SecOps", + "Identity and Access" + ], + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1550", + "name": "Use Alternate Authentication Material", + "reference": "https://attack.mitre.org/techniques/T1550/", + "subtechnique": [ + { + "id": "T1550.001", + "name": "Application Access Token", + "reference": "https://attack.mitre.org/techniques/T1550/001/" + } + ] + } + ] + } + ], + "timestamp_override": "event.ingested", + "type": "query", + "version": 1 +} diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/privilege_escalation_unusual_parentchild_relationship.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/privilege_escalation_unusual_parentchild_relationship.json index 9cdf474efb450..d9b7280392f38 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/privilege_escalation_unusual_parentchild_relationship.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/privilege_escalation_unusual_parentchild_relationship.json @@ -14,7 +14,7 @@ "name": "Unusual Parent-Child Relationship", "query": "process where event.type in (\"start\", \"process_started\") and\nprocess.parent.name != null and\n (\n /* suspicious parent processes */\n (process.name:\"autochk.exe\" and not process.parent.name:\"smss.exe\") or\n (process.name:(\"fontdrvhost.exe\", \"dwm.exe\") and not process.parent.name:(\"wininit.exe\", \"winlogon.exe\")) or\n (process.name:(\"consent.exe\", \"RuntimeBroker.exe\", \"TiWorker.exe\") and not process.parent.name:\"svchost.exe\") or\n (process.name:\"SearchIndexer.exe\" and not process.parent.name:\"services.exe\") or\n (process.name:\"SearchProtocolHost.exe\" and not process.parent.name:(\"SearchIndexer.exe\", \"dllhost.exe\")) or\n (process.name:\"dllhost.exe\" and not process.parent.name:(\"services.exe\", \"svchost.exe\")) or\n (process.name:\"smss.exe\" and not process.parent.name:(\"System\", \"smss.exe\")) or\n (process.name:\"csrss.exe\" and not process.parent.name:(\"smss.exe\", \"svchost.exe\")) or\n (process.name:\"wininit.exe\" and not process.parent.name:\"smss.exe\") or\n (process.name:\"winlogon.exe\" and not process.parent.name:\"smss.exe\") or\n (process.name:(\"lsass.exe\", \"LsaIso.exe\") and not process.parent.name:\"wininit.exe\") or\n (process.name:\"LogonUI.exe\" and not process.parent.name:(\"wininit.exe\", \"winlogon.exe\")) or\n (process.name:\"services.exe\" and not process.parent.name:\"wininit.exe\") or\n (process.name:\"svchost.exe\" and not process.parent.name:(\"MsMpEng.exe\", \"services.exe\")) or\n (process.name:\"spoolsv.exe\" and not process.parent.name:\"services.exe\") or\n (process.name:\"taskhost.exe\" and not process.parent.name:(\"services.exe\", \"svchost.exe\")) or\n (process.name:\"taskhostw.exe\" and not process.parent.name:(\"services.exe\", \"svchost.exe\")) or\n (process.name:\"userinit.exe\" and not process.parent.name:(\"dwm.exe\", \"winlogon.exe\")) or\n (process.name:(\"wmiprvse.exe\", \"wsmprovhost.exe\", \"winrshost.exe\") and not process.parent.name:\"svchost.exe\") or\n /* suspicious child processes */\n (process.parent.name:(\"SearchProtocolHost.exe\", \"taskhost.exe\", \"csrss.exe\") and not process.name:(\"werfault.exe\", \"wermgr.exe\", \"WerFaultSecure.exe\")) or\n (process.parent.name:\"autochk.exe\" and not process.name:(\"chkdsk.exe\", \"doskey.exe\", \"WerFault.exe\")) or\n (process.parent.name:\"smss.exe\" and not process.name:(\"autochk.exe\", \"smss.exe\", \"csrss.exe\", \"wininit.exe\", \"winlogon.exe\", \"setupcl.exe\", \"WerFault.exe\")) or\n (process.parent.name:\"wermgr.exe\" and not process.name:(\"WerFaultSecure.exe\", \"wermgr.exe\", \"WerFault.exe\")) or\n (process.parent.name:\"conhost.exe\" and not process.name:(\"mscorsvw.exe\", \"wermgr.exe\", \"WerFault.exe\", \"WerFaultSecure.exe\"))\n )\n", "references": [ - "https://github.com/sbousseaden/Slides/blob/master/Hunting MindMaps/PNG/Windows Processes%20TH.map.png", + "https://github.com/sbousseaden/Slides/blob/master/Hunting%20MindMaps/PNG/Windows%20Processes%20TH.map.png", "https://www.andreafortuna.org/2017/06/15/standard-windows-processes-a-brief-reference/" ], "risk_score": 47, @@ -53,5 +53,5 @@ ], "timestamp_override": "event.ingested", "type": "eql", - "version": 9 + "version": 10 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/threat_intel_module_match.json b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/threat_intel_module_match.json index f582eba053d64..e4b1309c42644 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/threat_intel_module_match.json +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/threat_intel_module_match.json @@ -16,7 +16,7 @@ "language": "kuery", "license": "Elastic License v2", "name": "Threat Intel Filebeat Module Indicator Match", - "note": "## Triage and Analysis\n\nIf an indicator matches a local observation, the following enriched fields will be generated to identify the indicator, field, and type matched.\n\n- `threatintel.indicator.matched.atomic` - this identifies the atomic indicator that matched the local observation\n- `threatintel.indicator.matched.field` - this identifies the indicator field that matched the local observation\n- `threatintel.indicator.matched.type` - this identifies the indicator type that matched the local observation\n", + "note": "## Triage and Analysis\n\n### Investigating Threat Intel Indicator Matches\n\nThreat Intel indicator match rules allow matching from a local observation such as an endpoint event that records a file\nhash with an entry of a file hash stored within the Threat Intel Filebeat module. Other examples of matches can occur on\nan IP address, registry path, URL and imphash.\n\nThe matches will be based on the incoming feed data so it's important to validate the data and review the results by\ninvestigating the associated activity to determine if it requires further investigation.\n\nIf an indicator matches a local observation, the following enriched fields will be generated to identify the indicator, field, and type matched.\n\n- `threatintel.indicator.matched.atomic` - this identifies the atomic indicator that matched the local observation\n- `threatintel.indicator.matched.field` - this identifies the indicator field that matched the local observation\n- `threatintel.indicator.matched.type` - this identifies the indicator type that matched the local observation\n\n#### Possible investigation steps:\n- Investigation should be validated and reviewed based on the data (file hash, registry path, URL, imphash) that was matched\nand viewing the source of that activity.\n- Consider the history of the indicator that was matched. Has it happened before? Is it happening on multiple machines?\nThese kinds of questions can help understand if the activity is related to legitimate behavior.\n- Consider the user and their role within the company, is this something related to their job or work function?\n\n### False Positive Analysis\n- For any matches found, it's important to consider the initial release date of that indicator. Threat intelligence can\nbe a great tool for augmenting existing security processes, while at the same time it should be understood that threat\nintelligence can represent a specific set of activity observed at a point in time. For example, an IP address\nmay have hosted malware observed in a Dridex campaign six months ago, but it's possible that IP has been remediated and\nno longer represents any threat.\n- Adversaries often use legitimate tools as network administrators such as `PsExec` or `AdFind`, these tools often find their\nway into indicator lists creating the potential for false positives.\n- It's possible after large and publicly written campaigns, curious employees might end up going directly to attacker infrastructure and generating these rules\n\n### Response and Remediation\n- If suspicious or malicious behavior is observed, immediate response should be taken to isolate activity to prevent further\npost-compromise behavior.\n- One example of a response if a machine matched a command and control IP address would be to add an entry to a network\ndevice such as a firewall or proxy appliance to prevent any outbound activity from leaving that machine.\n- Another example of a response with a malicious file hash match would involve validating if the file was properly quarantined,\nreview current running processes looking for any abnormal activity, and investigating for any other follow-up actions such as persistence or lateral movement\n", "query": "file.hash.*:* or file.pe.imphash:* or source.ip:* or destination.ip:* or url.full:* or registry.path:*\n", "references": [ "https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-threatintel.html" @@ -190,9 +190,9 @@ ] } ], - "threat_query": "event.module:threatintel and (threatintel.indicator.file.hash.*:* or threatintel.indicator.file.pe.imphash:* or threatintel.indicator.ip:* or threatintel.indicator.registry.path:* or threatintel.indicator.url.full:*)", + "threat_query": "@timestamp >= \"now-30d\" and event.module:threatintel and (threatintel.indicator.file.hash.*:* or threatintel.indicator.file.pe.imphash:* or threatintel.indicator.ip:* or threatintel.indicator.registry.path:* or threatintel.indicator.url.full:*)", "timeline_id": "495ad7a7-316e-4544-8a0f-9c098daee76e", "timeline_title": "Generic Threat Match Timeline", "type": "threat_match", - "version": 1 + "version": 2 } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/saved_object_mappings.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/saved_object_mappings.ts index 813e800f34ce2..d347fccf6b77b 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/saved_object_mappings.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/saved_object_mappings.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { SavedObjectsType } from '../../../../../../../src/core/server'; +import { SavedObjectsType, SavedObjectMigrationFn } from 'kibana/server'; +import { truncateMessage } from '../rule_execution_log'; export const ruleStatusSavedObjectType = 'siem-detection-engine-rule-status'; @@ -47,11 +48,28 @@ export const ruleStatusSavedObjectMappings: SavedObjectsType['mappings'] = { }, }; +const truncateMessageFields: SavedObjectMigrationFn> = (doc) => { + const { lastFailureMessage, lastSuccessMessage, ...restAttributes } = doc.attributes; + + return { + ...doc, + attributes: { + lastFailureMessage: truncateMessage(lastFailureMessage), + lastSuccessMessage: truncateMessage(lastSuccessMessage), + ...restAttributes, + }, + references: doc.references ?? [], + }; +}; + export const type: SavedObjectsType = { name: ruleStatusSavedObjectType, hidden: false, namespaceType: 'single', mappings: ruleStatusSavedObjectMappings, + migrations: { + '7.15.2': truncateMessageFields, + }, }; export const ruleAssetSavedObjectType = 'security-rule'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_event_type_signal.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_event_type_signal.ts index d22ca0d1f5090..0dd2acfb88ffe 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_event_type_signal.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_event_type_signal.ts @@ -8,8 +8,8 @@ import { BaseSignalHit, SimpleHit } from './types'; import { getField } from './utils'; export const buildEventTypeSignal = (doc: BaseSignalHit): object => { - if (doc._source?.event != null && doc._source?.event instanceof Object) { - return { ...doc._source!.event, kind: 'signal' }; + if (doc._source != null && doc._source.event instanceof Object) { + return { ...doc._source.event, kind: 'signal' }; } else { return { kind: 'signal' }; } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_rule.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_rule.test.ts index bd5444a325128..012977da2a00f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_rule.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_rule.test.ts @@ -108,7 +108,7 @@ describe('buildRuleWithOverrides', () => { test('it applies rule name override in buildRule', () => { const ruleSO = sampleRuleSO(getQueryRuleParams()); ruleSO.attributes.params.ruleNameOverride = 'someKey'; - const rule = buildRuleWithOverrides(ruleSO, sampleDocNoSortId()._source!); + const rule = buildRuleWithOverrides(ruleSO, sampleDocNoSortId()._source); const expected = { ...expectedRule(), name: 'someValue', @@ -135,7 +135,7 @@ describe('buildRuleWithOverrides', () => { ]; const doc = sampleDocNoSortId(); doc._source.new_risk_score = newRiskScore; - const rule = buildRuleWithOverrides(ruleSO, doc._source!); + const rule = buildRuleWithOverrides(ruleSO, doc._source); const expected = { ...expectedRule(), risk_score: newRiskScore, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/signal_rule_alert_type.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/signal_rule_alert_type.ts index 1e3a8a513c4a1..2094264cbf15f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/signal_rule_alert_type.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/signal_rule_alert_type.ts @@ -69,7 +69,7 @@ import { wrapSequencesFactory } from './wrap_sequences_factory'; import { ConfigType } from '../../../config'; import { ExperimentalFeatures } from '../../../../common/experimental_features'; import { injectReferences, extractReferences } from './saved_object_references'; -import { RuleExecutionLogClient } from '../rule_execution_log/rule_execution_log_client'; +import { RuleExecutionLogClient, truncateMessageList } from '../rule_execution_log'; import { RuleExecutionStatus } from '../../../../common/detection_engine/schemas/common/schemas'; import { scheduleThrottledNotificationActions } from '../notifications/schedule_throttle_notification_actions'; import { IEventLogService } from '../../../../../event_log/server'; @@ -384,7 +384,9 @@ export const signalRulesAlertType = ({ throw new Error(`unknown rule type ${type}`); } if (result.warningMessages.length) { - const warningMessage = buildRuleMessage(result.warningMessages.join()); + const warningMessage = buildRuleMessage( + truncateMessageList(result.warningMessages).join() + ); await ruleStatusClient.logStatusChange({ ...basicLogArguments, newStatus: RuleExecutionStatus['partial failure'], @@ -471,7 +473,7 @@ export const signalRulesAlertType = ({ } else { const errorMessage = buildRuleMessage( 'Bulk Indexing of signals failed:', - result.errors.join() + truncateMessageList(result.errors).join() ); logger.error(errorMessage); await ruleStatusClient.logStatusChange({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/enrich_signal_threat_matches.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/enrich_signal_threat_matches.ts index 9da5934489023..272c3f64fb105 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/enrich_signal_threat_matches.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/enrich_signal_threat_matches.ts @@ -107,7 +107,7 @@ export const enrichSignalThreatMatches = async ( return { ...signalHit, _source: { - ...signalHit._source!, + ...signalHit._source, threat: { ...threat, enrichments: [...existingEnrichments, ...enrichments[i]], diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/bulk_create_threshold_signals.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/bulk_create_threshold_signals.ts index 31bf7674b4f92..c202065176ff1 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/bulk_create_threshold_signals.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/bulk_create_threshold_signals.ts @@ -116,6 +116,7 @@ const getTransformedHits = ( ? [ { field: threshold.cardinality[0].field, + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion value: bucket.cardinality_count!.value, }, ] @@ -131,6 +132,7 @@ const getTransformedHits = ( }; return getCombinations( + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion (results.aggregations![aggParts.name] as { buckets: TermAggregationBucket[] }).buckets, 0, aggParts.field diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/get_threshold_bucket_filters.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/get_threshold_bucket_filters.ts index 5cafff24c544b..610be59deaa5f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/get_threshold_bucket_filters.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/get_threshold_bucket_filters.ts @@ -40,6 +40,7 @@ export const getThresholdBucketFilters = async ({ // Terms to filter events older than `lastSignalTimestamp`. bucket.terms.forEach((term) => { if (term.field != null) { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion (filter.bool!.filter as ESFilter[]).push({ term: { [term.field]: `${term.value}`, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.test.ts index 7d2eafa46d382..0e50db97d1256 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.test.ts @@ -1277,7 +1277,7 @@ describe('utils', () => { test('It returns timestampOverride date time if set', () => { const override = '2020-10-07T19:20:28.049Z'; const searchResult = sampleDocSearchResultsNoSortId(); - searchResult.hits.hits[0]._source!.different_timestamp = new Date(override).toISOString(); + searchResult.hits.hits[0]._source.different_timestamp = new Date(override).toISOString(); const date = lastValidDate({ searchResult, timestampOverride: 'different_timestamp' }); expect(date?.toISOString()).toEqual(override); }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.ts index 2aefc7ea0bd64..79b36cf62573a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.ts @@ -874,6 +874,7 @@ export const mergeSearchResults = (searchResults: SignalSearchResponse[]) => { aggregations: newAggregations, hits: { total: calculateTotal(prev.hits.total, next.hits.total), + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion max_score: Math.max(newHits.max_score!, existingHits.max_score!), hits: [...existingHits.hits, ...newHits.hits], }, diff --git a/x-pack/plugins/security_solution/server/lib/telemetry/sender.ts b/x-pack/plugins/security_solution/server/lib/telemetry/sender.ts index 2966fa3decc26..7c9906d0eae48 100644 --- a/x-pack/plugins/security_solution/server/lib/telemetry/sender.ts +++ b/x-pack/plugins/security_solution/server/lib/telemetry/sender.ts @@ -8,10 +8,11 @@ import { cloneDeep } from 'lodash'; import axios from 'axios'; import { URL } from 'url'; +import { transformDataToNdjson } from '@kbn/securitysolution-utils'; + import { Logger } from 'src/core/server'; import { TelemetryPluginStart, TelemetryPluginSetup } from 'src/plugins/telemetry/server'; import { UsageCounter } from 'src/plugins/usage_collection/server'; -import { transformDataToNdjson } from '../../utils/read_stream/create_stream_from_ndjson'; import { TaskManagerSetupContract, TaskManagerStartContract, diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/export_timelines/helpers.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/export_timelines/helpers.ts index a33b8be0c2f31..c857e7fa38a27 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/export_timelines/helpers.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/export_timelines/helpers.ts @@ -6,6 +6,7 @@ */ import { omit } from 'lodash/fp'; +import { transformDataToNdjson } from '@kbn/securitysolution-utils'; import { ExportedTimelines, @@ -15,8 +16,6 @@ import { import { NoteSavedObject } from '../../../../../../common/types/timeline/note'; import { PinnedEventSavedObject } from '../../../../../../common/types/timeline/pinned_event'; -import { transformDataToNdjson } from '../../../../../utils/read_stream/create_stream_from_ndjson'; - import { FrameworkRequest } from '../../../../framework'; import * as noteLib from '../../../saved_object/notes'; import * as pinnedEventLib from '../../../saved_object/pinned_events'; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/utils/check_timelines_status.ts b/x-pack/plugins/security_solution/server/lib/timeline/utils/check_timelines_status.ts index 560df1112ac58..f524d0c7ca3a6 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/utils/check_timelines_status.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/utils/check_timelines_status.ts @@ -40,6 +40,7 @@ export const getTimelinesToUpdate = ( installedTimelines.some((installedTimeline) => { return ( timeline.templateTimelineId === installedTimeline.templateTimelineId && + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion timeline.templateTimelineVersion! > installedTimeline.templateTimelineVersion! ); }) diff --git a/x-pack/plugins/security_solution/server/lib/timeline/utils/failure_cases.ts b/x-pack/plugins/security_solution/server/lib/timeline/utils/failure_cases.ts index 99365a55a1d61..44f16c57ad2b4 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/utils/failure_cases.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/utils/failure_cases.ts @@ -227,7 +227,7 @@ export const checkIsUpdateViaImportFailureCases = ( return { body: UPDAT_TIMELINE_VIA_IMPORT_NOT_ALLOWED_ERROR_MESSAGE, statusCode: 405 }; } else { return { - body: getImportExistingTimelineError(existTimeline!.savedObjectId), + body: getImportExistingTimelineError(existTimeline.savedObjectId), statusCode: 405, }; } diff --git a/x-pack/plugins/security_solution/server/plugin.ts b/x-pack/plugins/security_solution/server/plugin.ts index 714b7a460ed90..a6ccc0f5569fb 100644 --- a/x-pack/plugins/security_solution/server/plugin.ts +++ b/x-pack/plugins/security_solution/server/plugin.ts @@ -104,7 +104,7 @@ import { RuleExecutionLogClient } from './lib/detection_engine/rule_execution_lo import { getKibanaPrivilegesFeaturePrivileges } from './features'; import { EndpointMetadataService } from './endpoint/services/metadata'; import { CreateRuleOptions } from './lib/detection_engine/rule_types/types'; -import { ctiFieldMap } from './lib/detection_engine/rule_types/field_maps/cti'; +import { registerPrivilegeDeprecations } from './deprecation_privileges'; // eslint-disable-next-line no-restricted-imports import { legacyRulesNotificationAlertType } from './lib/detection_engine/notifications/legacy_rules_notification_alert_type'; // eslint-disable-next-line no-restricted-imports @@ -257,10 +257,7 @@ export class Plugin implements IPlugin { expect(buildIndicatorShouldClauses(eventFields)).toContainEqual({ match: { - 'threatintel.indicator.file.hash.md5': { + 'threat.indicator.file.hash.md5': { _name: 'file.hash.md5', query: '1eee2bf3f56d8abed72da2bc523e7431', }, @@ -44,8 +44,8 @@ describe('buildIndicatorShouldClauses', () => { const eventFields = { 'source.ip': '127.0.0.1', 'url.full': 'elastic.co' }; expect(buildIndicatorShouldClauses(eventFields)).toEqual( expect.arrayContaining([ - { match: { 'threatintel.indicator.ip': { _name: 'source.ip', query: '127.0.0.1' } } }, - { match: { 'threatintel.indicator.url.full': { _name: 'url.full', query: 'elastic.co' } } }, + { match: { 'threat.indicator.ip': { _name: 'source.ip', query: '127.0.0.1' } } }, + { match: { 'threat.indicator.url.full': { _name: 'url.full', query: 'elastic.co' } } }, ]) ); }); @@ -83,7 +83,7 @@ describe('buildIndicatorEnrichments', () => { _index: '_index', matched_queries: ['file.hash.md5'], fields: { - 'threatintel.indicator.file.hash.md5': ['indicator_value'], + 'threat.indicator.file.hash.md5': ['indicator_value'], }, }, ]; @@ -94,7 +94,7 @@ describe('buildIndicatorEnrichments', () => { 'matched.field': ['file.hash.md5'], 'matched.id': ['_id'], 'matched.index': ['_index'], - 'threatintel.indicator.file.hash.md5': ['indicator_value'], + 'threat.indicator.file.hash.md5': ['indicator_value'], }), ]); }); @@ -106,8 +106,8 @@ describe('buildIndicatorEnrichments', () => { _index: '_index', matched_queries: ['file.hash.md5', 'source.ip'], fields: { - 'threatintel.indicator.file.hash.md5': ['indicator_value'], - 'threatintel.indicator.ip': ['127.0.0.1'], + 'threat.indicator.file.hash.md5': ['indicator_value'], + 'threat.indicator.ip': ['127.0.0.1'], }, }, ]; @@ -118,16 +118,16 @@ describe('buildIndicatorEnrichments', () => { 'matched.field': ['file.hash.md5'], 'matched.id': ['_id'], 'matched.index': ['_index'], - 'threatintel.indicator.file.hash.md5': ['indicator_value'], - 'threatintel.indicator.ip': ['127.0.0.1'], + 'threat.indicator.file.hash.md5': ['indicator_value'], + 'threat.indicator.ip': ['127.0.0.1'], }), expect.objectContaining({ 'matched.atomic': ['127.0.0.1'], 'matched.field': ['source.ip'], 'matched.id': ['_id'], 'matched.index': ['_index'], - 'threatintel.indicator.file.hash.md5': ['indicator_value'], - 'threatintel.indicator.ip': ['127.0.0.1'], + 'threat.indicator.file.hash.md5': ['indicator_value'], + 'threat.indicator.ip': ['127.0.0.1'], }), ]); }); @@ -139,7 +139,7 @@ describe('buildIndicatorEnrichments', () => { _index: '_index', matched_queries: ['file.hash.md5'], fields: { - 'threatintel.indicator.file.hash.md5': ['indicator_value'], + 'threat.indicator.file.hash.md5': ['indicator_value'], }, }, { @@ -147,7 +147,7 @@ describe('buildIndicatorEnrichments', () => { _index: '_index2', matched_queries: ['source.ip'], fields: { - 'threatintel.indicator.ip': ['127.0.0.1'], + 'threat.indicator.ip': ['127.0.0.1'], }, }, ]; @@ -158,14 +158,14 @@ describe('buildIndicatorEnrichments', () => { 'matched.field': ['file.hash.md5'], 'matched.id': ['_id'], 'matched.index': ['_index'], - 'threatintel.indicator.file.hash.md5': ['indicator_value'], + 'threat.indicator.file.hash.md5': ['indicator_value'], }), expect.objectContaining({ 'matched.atomic': ['127.0.0.1'], 'matched.field': ['source.ip'], 'matched.id': ['_id2'], 'matched.index': ['_index2'], - 'threatintel.indicator.ip': ['127.0.0.1'], + 'threat.indicator.ip': ['127.0.0.1'], }), ]); }); diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/event_enrichment/query.test.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/event_enrichment/query.test.ts index bc96a387105c6..d953cb2979e5c 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/event_enrichment/query.test.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/event_enrichment/query.test.ts @@ -16,14 +16,14 @@ describe('buildEventEnrichmentQuery', () => { expect.arrayContaining([ { match: { - 'threatintel.indicator.file.hash.md5': { + 'threat.indicator.file.hash.md5': { _name: 'file.hash.md5', query: '1eee2bf3f56d8abed72da2bc523e7431', }, }, }, - { match: { 'threatintel.indicator.ip': { _name: 'source.ip', query: '127.0.0.1' } } }, - { match: { 'threatintel.indicator.url.full': { _name: 'url.full', query: 'elastic.co' } } }, + { match: { 'threat.indicator.ip': { _name: 'source.ip', query: '127.0.0.1' } } }, + { match: { 'threat.indicator.url.full': { _name: 'url.full', query: 'elastic.co' } } }, ]) ); }); diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/event_enrichment/response.test.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/event_enrichment/response.test.ts index 7ced866e0bb5b..137dd3b2c3d14 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/event_enrichment/response.test.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/event_enrichment/response.test.ts @@ -41,16 +41,16 @@ describe('parseEventEnrichmentResponse', () => { should: [ { match: { - 'threatintel.indicator.file.hash.md5': { + 'threat.indicator.file.hash.md5': { _name: 'file.hash.md5', query: '1eee2bf3f56d8abed72da2bc523e7431', }, }, }, - { match: { 'threatintel.indicator.ip': { _name: 'source.ip', query: '127.0.0.1' } } }, + { match: { 'threat.indicator.ip': { _name: 'source.ip', query: '127.0.0.1' } } }, { match: { - 'threatintel.indicator.url.full': { _name: 'url.full', query: 'elastic.co' }, + 'threat.indicator.url.full': { _name: 'url.full', query: 'elastic.co' }, }, }, ], @@ -60,7 +60,7 @@ describe('parseEventEnrichmentResponse', () => { ignoreUnavailable: true, index: ['filebeat-*'], }); - const parsedInspect = JSON.parse(parsedResponse.inspect!.dsl[0]); + const parsedInspect = JSON.parse(parsedResponse.inspect.dsl[0]); expect(parsedInspect).toEqual(expectedInspect); }); diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/helpers.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/helpers.ts index c96e0040fd23d..ae68d81d6b922 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/helpers.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/helpers.ts @@ -223,6 +223,7 @@ export const getHostEndpoint = async ( endpointPolicy: endpointData.Endpoint.policy.applied.name, policyStatus: endpointData.Endpoint.policy.applied.status, sensorVersion: endpointData.agent.version, + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion elasticAgentStatus: fleetAgentStatusToEndpointHostStatus(fleetAgentStatus!), isolation: endpointData.Endpoint.state?.isolation ?? false, pendingActions, diff --git a/x-pack/plugins/security_solution/server/utils/read_stream/create_stream_from_ndjson.test.ts b/x-pack/plugins/security_solution/server/utils/read_stream/create_stream_from_ndjson.test.ts deleted file mode 100644 index c3163da6ac949..0000000000000 --- a/x-pack/plugins/security_solution/server/utils/read_stream/create_stream_from_ndjson.test.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { transformDataToNdjson } from './create_stream_from_ndjson'; -import { ImportRulesSchemaDecoded } from '../../../common/detection_engine/schemas/request/import_rules_schema'; -import { getRulesSchemaMock } from '../../../common/detection_engine/schemas/response/rules_schema.mocks'; - -export const getOutputSample = (): Partial => ({ - rule_id: 'rule-1', - output_index: '.siem-signals', - risk_score: 50, - description: 'some description', - from: 'now-5m', - to: 'now', - index: ['index-1'], - name: 'some-name', - severity: 'low', - interval: '5m', - type: 'query', -}); - -export const getSampleAsNdjson = (sample: Partial): string => { - return `${JSON.stringify(sample)}\n`; -}; - -describe('create_rules_stream_from_ndjson', () => { - describe('transformDataToNdjson', () => { - test('if rules are empty it returns an empty string', () => { - const ruleNdjson = transformDataToNdjson([]); - expect(ruleNdjson).toEqual(''); - }); - - test('single rule will transform with new line ending character for ndjson', () => { - const rule = getRulesSchemaMock(); - const ruleNdjson = transformDataToNdjson([rule]); - expect(ruleNdjson.endsWith('\n')).toBe(true); - }); - - test('multiple rules will transform with two new line ending characters for ndjson', () => { - const result1 = getRulesSchemaMock(); - const result2 = getRulesSchemaMock(); - result2.id = 'some other id'; - result2.rule_id = 'some other id'; - result2.name = 'Some other rule'; - - const ruleNdjson = transformDataToNdjson([result1, result2]); - // this is how we count characters in JavaScript :-) - const count = ruleNdjson.split('\n').length - 1; - expect(count).toBe(2); - }); - - test('you can parse two rules back out without errors', () => { - const result1 = getRulesSchemaMock(); - const result2 = getRulesSchemaMock(); - result2.id = 'some other id'; - result2.rule_id = 'some other id'; - result2.name = 'Some other rule'; - - const ruleNdjson = transformDataToNdjson([result1, result2]); - const ruleStrings = ruleNdjson.split('\n'); - const reParsed1 = JSON.parse(ruleStrings[0]); - const reParsed2 = JSON.parse(ruleStrings[1]); - expect(reParsed1).toEqual(result1); - expect(reParsed2).toEqual(result2); - }); - }); -}); diff --git a/x-pack/plugins/security_solution/server/utils/read_stream/create_stream_from_ndjson.ts b/x-pack/plugins/security_solution/server/utils/read_stream/create_stream_from_ndjson.ts index 42f1b467ed4c2..eb5abaee8cd3b 100644 --- a/x-pack/plugins/security_solution/server/utils/read_stream/create_stream_from_ndjson.ts +++ b/x-pack/plugins/security_solution/server/utils/read_stream/create_stream_from_ndjson.ts @@ -48,12 +48,3 @@ export const createLimitStream = (limit: number): Transform => { }, }); }; - -export const transformDataToNdjson = (data: unknown[]): string => { - if (data.length !== 0) { - const dataString = data.map((rule) => JSON.stringify(rule)).join('\n'); - return `${dataString}\n`; - } else { - return ''; - } -}; diff --git a/x-pack/plugins/spaces/server/config.ts b/x-pack/plugins/spaces/server/config.ts index 4abaf4f0ca569..a8c3a1c6223da 100644 --- a/x-pack/plugins/spaces/server/config.ts +++ b/x-pack/plugins/spaces/server/config.ts @@ -28,6 +28,7 @@ export function createConfig$(context: PluginInitializerContext) { const disabledDeprecation: ConfigDeprecation = (config, fromPath, addDeprecation) => { if ('enabled' in (config?.xpack?.spaces || {})) { addDeprecation({ + configPath: 'xpack.spaces.enabled', title: i18n.translate('xpack.spaces.deprecations.enabledTitle', { defaultMessage: 'Setting "xpack.spaces.enabled" is deprecated', }), diff --git a/x-pack/plugins/stack_alerts/server/index.ts b/x-pack/plugins/stack_alerts/server/index.ts index 9491f3e646c70..1ac774a2d6c3f 100644 --- a/x-pack/plugins/stack_alerts/server/index.ts +++ b/x-pack/plugins/stack_alerts/server/index.ts @@ -18,6 +18,7 @@ export const config: PluginConfigDescriptor = { const stackAlerts = get(settings, fromPath); if (stackAlerts?.enabled === false || stackAlerts?.enabled === true) { addDeprecation({ + configPath: 'xpack.stack_alerts.enabled', message: `"xpack.stack_alerts.enabled" is deprecated. The ability to disable this plugin will be removed in 8.0.0.`, correctiveActions: { manualSteps: [`Remove "xpack.stack_alerts.enabled" from your kibana configs.`], diff --git a/x-pack/plugins/task_manager/server/index.ts b/x-pack/plugins/task_manager/server/index.ts index 84bee044c4de9..2a360fc1a1d90 100644 --- a/x-pack/plugins/task_manager/server/index.ts +++ b/x-pack/plugins/task_manager/server/index.ts @@ -49,6 +49,7 @@ export const config: PluginConfigDescriptor = { const taskManager = get(settings, fromPath); if (taskManager?.index) { addDeprecation({ + configPath: `${fromPath}.index`, documentationUrl: 'https://ela.st/kbn-remove-legacy-multitenancy', message: `"${fromPath}.index" is deprecated. Multitenancy by changing "kibana.index" will not be supported starting in 8.0. See https://ela.st/kbn-remove-legacy-multitenancy for more details`, correctiveActions: { @@ -61,6 +62,7 @@ export const config: PluginConfigDescriptor = { } if (taskManager?.max_workers > MAX_WORKERS_LIMIT) { addDeprecation({ + configPath: `${fromPath}.max_workers`, message: `setting "${fromPath}.max_workers" (${taskManager?.max_workers}) greater than ${MAX_WORKERS_LIMIT} is deprecated. Values greater than ${MAX_WORKERS_LIMIT} will not be supported starting in 8.0.`, correctiveActions: { manualSteps: [ @@ -75,6 +77,7 @@ export const config: PluginConfigDescriptor = { const taskManager = get(settings, fromPath); if (taskManager?.enabled === false || taskManager?.enabled === true) { addDeprecation({ + configPath: 'xpack.task_manager.enabled', message: `"xpack.task_manager.enabled" is deprecated. The ability to disable this plugin will be removed in 8.0.0.`, correctiveActions: { manualSteps: [`Remove "xpack.task_manager.enabled" from your kibana configs.`], diff --git a/x-pack/plugins/timelines/common/search_strategy/index_fields/index.ts b/x-pack/plugins/timelines/common/search_strategy/index_fields/index.ts index 8fbab31b49266..d207cf21fcb36 100644 --- a/x-pack/plugins/timelines/common/search_strategy/index_fields/index.ts +++ b/x-pack/plugins/timelines/common/search_strategy/index_fields/index.ts @@ -67,12 +67,7 @@ export interface BrowserField { name: string; searchable: boolean; type: string; - subType?: { - [key: string]: unknown; - nested?: { - path: string; - }; - }; + subType?: IFieldSubType; } export type BrowserFields = Readonly>>; diff --git a/x-pack/plugins/timelines/common/types/timeline/cells/index.ts b/x-pack/plugins/timelines/common/types/timeline/cells/index.ts index 354a8b45e914d..ce22d87c0a59a 100644 --- a/x-pack/plugins/timelines/common/types/timeline/cells/index.ts +++ b/x-pack/plugins/timelines/common/types/timeline/cells/index.ts @@ -7,21 +7,26 @@ import { EuiDataGridCellValueElementProps } from '@elastic/eui'; import { RowRenderer } from '../../..'; +// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import { Filter } from '../../../../../../../src/plugins/data/public'; import { Ecs } from '../../../ecs'; import { BrowserFields, TimelineNonEcsData } from '../../../search_strategy'; import { ColumnHeaderOptions } from '../columns'; /** The following props are provided to the function called by `renderCellValue` */ export type CellValueElementProps = EuiDataGridCellValueElementProps & { + asPlainText?: boolean; + browserFields?: BrowserFields; data: TimelineNonEcsData[]; + ecsData?: Ecs; eventId: string; // _id + globalFilters?: Filter[]; header: ColumnHeaderOptions; isDraggable: boolean; linkValues: string[] | undefined; - timelineId: string; + rowRenderers?: RowRenderer[]; // eslint-disable-next-line @typescript-eslint/no-explicit-any setFlyoutAlert?: (data: any) => void; - ecsData?: Ecs; - rowRenderers?: RowRenderer[]; - browserFields?: BrowserFields; + timelineId: string; + truncate?: boolean; }; diff --git a/x-pack/plugins/timelines/common/types/timeline/columns/index.tsx b/x-pack/plugins/timelines/common/types/timeline/columns/index.tsx index 644b38d551337..bd4cd2d7192df 100644 --- a/x-pack/plugins/timelines/common/types/timeline/columns/index.tsx +++ b/x-pack/plugins/timelines/common/types/timeline/columns/index.tsx @@ -8,9 +8,10 @@ import { ReactNode } from 'react'; import { EuiDataGridColumn, EuiDataGridColumnCellActionProps } from '@elastic/eui'; -import { Filter, IFieldSubType } from '../../../../../../../src/plugins/data/common'; +import { IFieldSubType } from '../../../../../../../src/plugins/data/common'; import { BrowserFields } from '../../../search_strategy/index_fields'; import { TimelineNonEcsData } from '../../../search_strategy/timeline'; +import { Ecs } from '../../../ecs'; export type ColumnHeaderType = 'not-filtered' | 'text-filter'; @@ -45,14 +46,16 @@ export type ColumnId = string; export type TGridCellAction = ({ browserFields, data, - globalFilters, + ecsData, + header, pageSize, timelineId, }: { browserFields: BrowserFields; /** each row of data is represented as one TimelineNonEcsData[] */ data: TimelineNonEcsData[][]; - globalFilters?: Filter[]; + ecsData: Ecs[]; + header?: ColumnHeaderOptions; pageSize: number; timelineId: string; }) => (props: EuiDataGridColumnCellActionProps) => ReactNode; diff --git a/x-pack/plugins/timelines/common/types/timeline/index.ts b/x-pack/plugins/timelines/common/types/timeline/index.ts index 5ceeebca878c7..c57f247493ffc 100644 --- a/x-pack/plugins/timelines/common/types/timeline/index.ts +++ b/x-pack/plugins/timelines/common/types/timeline/index.ts @@ -468,7 +468,7 @@ export enum TimelineTabs { } // eslint-disable-next-line @typescript-eslint/no-explicit-any -type EmptyObject = Record; +type EmptyObject = Partial>; export type TimelineExpandedEventType = | { @@ -512,9 +512,9 @@ export type TimelineExpandedDetailType = | TimelineExpandedHostType | TimelineExpandedNetworkType; -export type TimelineExpandedDetail = { - [tab in TimelineTabs]?: TimelineExpandedDetailType; -}; +export type TimelineExpandedDetail = Partial< + Record +>; export type ToggleDetailPanel = TimelineExpandedDetailType & { tabType?: TimelineTabs; diff --git a/x-pack/plugins/timelines/public/components/actions/timeline/cases/add_to_existing_case_button.tsx b/x-pack/plugins/timelines/public/components/actions/timeline/cases/add_to_existing_case_button.tsx index af19a6b7cdb74..30181a96aa70b 100644 --- a/x-pack/plugins/timelines/public/components/actions/timeline/cases/add_to_existing_case_button.tsx +++ b/x-pack/plugins/timelines/public/components/actions/timeline/cases/add_to_existing_case_button.tsx @@ -32,7 +32,7 @@ const AddToCaseActionComponent: React.FC = ({ {userCanCrud && ( = ({ {userCanCrud && ( = React.memo( onFilterAdded, ownFocus, onClick, + size, showTooltip = false, value, }) => { @@ -74,6 +75,7 @@ const FilterForValueButton: React.FC = React.memo( data-test-subj="filter-for-value" iconType="plusInCircle" onClick={filterForValueFn} + size={size} title={FILTER_FOR_VALUE} > {FILTER_FOR_VALUE} @@ -87,9 +89,10 @@ const FilterForValueButton: React.FC = React.memo( iconSize="s" iconType="plusInCircle" onClick={filterForValueFn} + size={size} /> ), - [Component, defaultFocusedButtonRef, filterForValueFn] + [Component, defaultFocusedButtonRef, filterForValueFn, size] ); return showTooltip ? ( diff --git a/x-pack/plugins/timelines/public/components/hover_actions/actions/filter_out_value.tsx b/x-pack/plugins/timelines/public/components/hover_actions/actions/filter_out_value.tsx index 51f2943ff051e..04fbbab76d850 100644 --- a/x-pack/plugins/timelines/public/components/hover_actions/actions/filter_out_value.tsx +++ b/x-pack/plugins/timelines/public/components/hover_actions/actions/filter_out_value.tsx @@ -14,8 +14,8 @@ import { TooltipWithKeyboardShortcut } from '../../tooltip_with_keyboard_shortcu import { createFilter, getAdditionalScreenReaderOnlyContext } from '../utils'; import { HoverActionComponentProps, FilterValueFnArgs } from './types'; -export const FILTER_OUT_VALUE = i18n.translate('xpack.timelines.hoverActions.filterOutValue', { - defaultMessage: 'Filter out value', +export const FILTER_OUT_VALUE = i18n.translate('xpack.timelines.hoverActions.filterOut', { + defaultMessage: 'Filter Out', }); export const FILTER_OUT_VALUE_KEYBOARD_SHORTCUT = 'o'; @@ -30,6 +30,7 @@ const FilterOutValueButton: React.FC { @@ -74,6 +75,7 @@ const FilterOutValueButton: React.FC {FILTER_OUT_VALUE} @@ -87,9 +89,10 @@ const FilterOutValueButton: React.FC ), - [Component, defaultFocusedButtonRef, filterOutValueFn] + [Component, defaultFocusedButtonRef, filterOutValueFn, size] ); return showTooltip ? ( diff --git a/x-pack/plugins/timelines/public/components/hover_actions/actions/types.ts b/x-pack/plugins/timelines/public/components/hover_actions/actions/types.ts index 5be8fd8904f1a..b6c9e794625e4 100644 --- a/x-pack/plugins/timelines/public/components/hover_actions/actions/types.ts +++ b/x-pack/plugins/timelines/public/components/hover_actions/actions/types.ts @@ -18,11 +18,13 @@ export interface FilterValueFnArgs { } export interface HoverActionComponentProps { + className?: string; defaultFocusedButtonRef?: EuiButtonIconPropsForButton['buttonRef']; field: string; keyboardEvent?: React.KeyboardEvent; ownFocus: boolean; onClick?: () => void; + size?: 'xs' | 's' | 'm'; showTooltip?: boolean; value?: string[] | string | null; } diff --git a/x-pack/plugins/timelines/public/components/hover_actions/index.tsx b/x-pack/plugins/timelines/public/components/hover_actions/index.tsx index 02ebcb8abe912..12aef1ad00a71 100644 --- a/x-pack/plugins/timelines/public/components/hover_actions/index.tsx +++ b/x-pack/plugins/timelines/public/components/hover_actions/index.tsx @@ -89,6 +89,7 @@ const getOverflowButtonLazy = (props: OverflowButtonProps) => { }; export const getHoverActions = (store?: Store): HoverActionsConfig => ({ + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion getAddToTimelineButton: getAddToTimelineButtonLazy.bind(null, store!), getColumnToggleButton: getColumnToggleButtonLazy, getCopyButton: getCopyButtonLazy, diff --git a/x-pack/plugins/timelines/public/components/index.tsx b/x-pack/plugins/timelines/public/components/index.tsx index 9959574464836..0ff8c9bf97e8b 100644 --- a/x-pack/plugins/timelines/public/components/index.tsx +++ b/x-pack/plugins/timelines/public/components/index.tsx @@ -41,6 +41,7 @@ export const TGrid = (props: TGridComponent) => { browserFields = (tGridProps as TGridIntegratedProps).browserFields; } return ( + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion diff --git a/x-pack/plugins/timelines/public/components/t_grid/body/column_headers/header_tooltip_content/index.tsx b/x-pack/plugins/timelines/public/components/t_grid/body/column_headers/header_tooltip_content/index.tsx index b973d99584d61..91dd64d8fed3a 100644 --- a/x-pack/plugins/timelines/public/components/t_grid/body/column_headers/header_tooltip_content/index.tsx +++ b/x-pack/plugins/timelines/public/components/t_grid/body/column_headers/header_tooltip_content/index.tsx @@ -61,7 +61,7 @@ export const HeaderToolTipContent = React.memo<{ header: ColumnHeaderOptions }>( {':'} - + {header.type}

diff --git a/x-pack/plugins/timelines/public/components/t_grid/body/events/stateful_event.tsx b/x-pack/plugins/timelines/public/components/t_grid/body/events/stateful_event.tsx index f448ba3831b14..d746368e389c8 100644 --- a/x-pack/plugins/timelines/public/components/t_grid/body/events/stateful_event.tsx +++ b/x-pack/plugins/timelines/public/components/t_grid/body/events/stateful_event.tsx @@ -122,6 +122,7 @@ const StatefulEventComponent: React.FC = ({ const handleOnEventDetailPanelOpened = useCallback(() => { const eventId = event._id; + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const indexName = event._index!; const updatedExpandedDetail: TimelineExpandedDetailType = { diff --git a/x-pack/plugins/timelines/public/components/t_grid/body/index.test.tsx b/x-pack/plugins/timelines/public/components/t_grid/body/index.test.tsx index 8fbb7f0e62b9c..50764af3c7f2f 100644 --- a/x-pack/plugins/timelines/public/components/t_grid/body/index.test.tsx +++ b/x-pack/plugins/timelines/public/components/t_grid/body/index.test.tsx @@ -15,6 +15,8 @@ import { defaultHeaders, mockBrowserFields, mockTimelineData, TestProviders } fr import { TimelineTabs } from '../../../../common/types/timeline'; import { TestCellRenderer } from '../../../mock/cell_renderer'; import { mockGlobalState } from '../../../mock/global_state'; +import { EuiDataGridColumn } from '@elastic/eui'; +import { defaultColumnHeaderType } from '../../../store/t_grid/defaults'; const mockSort: Sort[] = [ { @@ -151,5 +153,124 @@ describe('Body', () => { .text() ).toEqual(mockTimelineData[0].ecs.timestamp); }); + + test("timestamp column doesn't render cell actions", () => { + const headersJustTimestamp = defaultHeaders.filter((h) => h.id === '@timestamp'); + const testProps = { + ...props, + columnHeaders: headersJustTimestamp, + data: mockTimelineData.slice(0, 1), + }; + const wrapper = mount( + + + + ); + wrapper.update(); + + expect( + wrapper + .find('[data-test-subj="body-data-grid"]') + .first() + .prop('columns') + .find((c) => c.id === '@timestamp')?.cellActions + ).toBeUndefined(); + }); + + test("signal.rule.risk_score column doesn't render cell actions", () => { + const columnHeaders = [ + { + category: 'signal', + columnHeaderType: defaultColumnHeaderType, + id: 'signal.rule.risk_score', + type: 'number', + aggregatable: true, + initialWidth: 105, + }, + ]; + const testProps = { + ...props, + columnHeaders, + data: mockTimelineData.slice(0, 1), + }; + const wrapper = mount( + + + + ); + wrapper.update(); + + expect( + wrapper + .find('[data-test-subj="body-data-grid"]') + .first() + .prop('columns') + .find((c) => c.id === 'signal.rule.risk_score')?.cellActions + ).toBeUndefined(); + }); + + test("signal.reason column doesn't render cell actions", () => { + const columnHeaders = [ + { + category: 'signal', + columnHeaderType: defaultColumnHeaderType, + id: 'signal.reason', + type: 'string', + aggregatable: true, + initialWidth: 450, + }, + ]; + const testProps = { + ...props, + columnHeaders, + data: mockTimelineData.slice(0, 1), + }; + const wrapper = mount( + + + + ); + wrapper.update(); + + expect( + wrapper + .find('[data-test-subj="body-data-grid"]') + .first() + .prop('columns') + .find((c) => c.id === 'signal.reason')?.cellActions + ).toBeUndefined(); + }); + }); + + test("signal.rule.risk_score column doesn't render cell actions", () => { + const columnHeaders = [ + { + category: 'signal', + columnHeaderType: defaultColumnHeaderType, + id: 'signal.rule.risk_score', + type: 'number', + aggregatable: true, + initialWidth: 105, + }, + ]; + const testProps = { + ...props, + columnHeaders, + data: mockTimelineData.slice(0, 1), + }; + const wrapper = mount( + + + + ); + wrapper.update(); + + expect( + wrapper + .find('[data-test-subj="body-data-grid"]') + .first() + .prop('columns') + .find((c) => c.id === 'signal.rule.risk_score')?.cellActions + ).toBeUndefined(); }); }); diff --git a/x-pack/plugins/timelines/public/components/t_grid/body/index.tsx b/x-pack/plugins/timelines/public/components/t_grid/body/index.tsx index 83079e0cdc2fe..619571a0c8e81 100644 --- a/x-pack/plugins/timelines/public/components/t_grid/body/index.tsx +++ b/x-pack/plugins/timelines/public/components/t_grid/body/index.tsx @@ -145,6 +145,9 @@ const EuiDataGridContainer = styled.div<{ hideLastPage: boolean }>` } `; +const FIELDS_WITHOUT_CELL_ACTIONS = ['@timestamp', 'signal.rule.risk_score', 'signal.reason']; +const hasCellActions = (columnId?: string) => + columnId && FIELDS_WITHOUT_CELL_ACTIONS.indexOf(columnId) < 0; const transformControlColumns = ({ actionColumnsWidth, columnHeaders, @@ -636,7 +639,6 @@ export const BodyComponent = React.memo( setEventsDeleted, hasAlertsCrudPermissions, ]); - const columnsWithCellActions: EuiDataGridColumn[] = useMemo( () => columnHeaders.map((header) => { @@ -644,18 +646,24 @@ export const BodyComponent = React.memo( tGridCellAction({ browserFields, data: data.map((row) => row.data), - globalFilters: filters, + ecsData: data.map((row) => row.ecs), + header: columnHeaders.find((h) => h.id === header.id), pageSize, timelineId: id, }); return { ...header, - cellActions: - header.tGridCellActions?.map(buildAction) ?? defaultCellActions?.map(buildAction), + ...(hasCellActions(header.id) + ? { + cellActions: + header.tGridCellActions?.map(buildAction) ?? + defaultCellActions?.map(buildAction), + } + : {}), }; }), - [browserFields, columnHeaders, data, defaultCellActions, id, pageSize, filters] + [columnHeaders, defaultCellActions, browserFields, data, pageSize, id] ); const renderTGridCellValue = useMemo(() => { @@ -663,9 +671,9 @@ export const BodyComponent = React.memo( columnId, rowIndex, setCellProps, + isDetails, }): React.ReactElement | null => { const pageRowIndex = getPageRowIndex(rowIndex, pageSize); - const rowData = pageRowIndex < data.length ? data[pageRowIndex].data : null; const header = columnHeaders.find((h) => h.id === columnId); const eventId = pageRowIndex < data.length ? data[pageRowIndex]._id : null; @@ -687,34 +695,36 @@ export const BodyComponent = React.memo( } return renderCellValue({ + browserFields, columnId: header.id, - eventId, data: rowData, + ecsData: ecs, + eventId, + globalFilters: filters, header, + isDetails, isDraggable: false, isExpandable: true, isExpanded: false, - isDetails: false, linkValues: getOr([], header.linkField ?? '', ecs), rowIndex, - setCellProps, - timelineId: tabType != null ? `${id}-${tabType}` : id, - ecsData: ecs, - browserFields, rowRenderers, + setCellProps, + timelineId: id, + truncate: isDetails ? false : true, }) as React.ReactElement; }; return Cell; }, [ + browserFields, columnHeaders, data, + filters, id, + pageSize, renderCellValue, - tabType, - theme, - browserFields, rowRenderers, - pageSize, + theme, ]); const onChangeItemsPerPage = useCallback( diff --git a/x-pack/plugins/timelines/public/components/t_grid/event_rendered_view/index.tsx b/x-pack/plugins/timelines/public/components/t_grid/event_rendered_view/index.tsx index 6f69c54233858..91bb6ad1dac0b 100644 --- a/x-pack/plugins/timelines/public/components/t_grid/event_rendered_view/index.tsx +++ b/x-pack/plugins/timelines/public/components/t_grid/event_rendered_view/index.tsx @@ -180,19 +180,21 @@ const EventRenderedViewComponent = ({ rowRenderer.isInstance(ecsData) ); return ( - + {reason && {reason}} {rowRenderersValid.length > 0 && rowRenderersValid.map((rowRenderer) => ( <> - - {rowRenderer.renderRow({ - browserFields, - data: ecsData, - isDraggable: false, - timelineId: 'NONE', - })} + +
+ {rowRenderer.renderRow({ + browserFields, + data: ecsData, + isDraggable: false, + timelineId: 'NONE', + })} +
))} diff --git a/x-pack/plugins/timelines/public/components/t_grid/helpers.tsx b/x-pack/plugins/timelines/public/components/t_grid/helpers.tsx index 02c3d10a76058..e2eb1d4d04547 100644 --- a/x-pack/plugins/timelines/public/components/t_grid/helpers.tsx +++ b/x-pack/plugins/timelines/public/components/t_grid/helpers.tsx @@ -192,6 +192,7 @@ export const buildCombinedQuery = (combineQueriesParams: CombineQueries) => { const combinedQuery = combineQueries(combineQueriesParams); return combinedQuery ? { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion filterQuery: replaceStatusField(combinedQuery!.filterQuery), } : null; diff --git a/x-pack/plugins/timelines/public/components/t_grid/integrated/index.tsx b/x-pack/plugins/timelines/public/components/t_grid/integrated/index.tsx index b649dc36abe0a..e363297d04be5 100644 --- a/x-pack/plugins/timelines/public/components/t_grid/integrated/index.tsx +++ b/x-pack/plugins/timelines/public/components/t_grid/integrated/index.tsx @@ -237,7 +237,7 @@ const TGridIntegratedComponent: React.FC = ({ endDate: end, entityType, fields, - filterQuery: combinedQueries!.filterQuery, + filterQuery: combinedQueries?.filterQuery, id, indexNames, limit: itemsPerPage, diff --git a/x-pack/plugins/timelines/public/components/t_grid/standalone/index.tsx b/x-pack/plugins/timelines/public/components/t_grid/standalone/index.tsx index 1a374d0c6b87a..ae092d8634bb7 100644 --- a/x-pack/plugins/timelines/public/components/t_grid/standalone/index.tsx +++ b/x-pack/plugins/timelines/public/components/t_grid/standalone/index.tsx @@ -217,7 +217,7 @@ const TGridStandaloneComponent: React.FC = ({ entityType, excludeEcsData: true, fields, - filterQuery: combinedQueries!.filterQuery, + filterQuery: combinedQueries?.filterQuery, id: STANDALONE_ID, indexNames, limit: itemsPerPageStore, diff --git a/x-pack/plugins/timelines/public/components/t_grid/styles.tsx b/x-pack/plugins/timelines/public/components/t_grid/styles.tsx index 28e425f53824b..9f957e2c61910 100644 --- a/x-pack/plugins/timelines/public/components/t_grid/styles.tsx +++ b/x-pack/plugins/timelines/public/components/t_grid/styles.tsx @@ -270,13 +270,13 @@ export const EventsTrData = styled.div.attrs(({ className = '' }) => ({ const TIMELINE_EVENT_DETAILS_OFFSET = 40; interface WidthProp { - width?: number; + width: number; } export const EventsTrSupplementContainer = styled.div.attrs(({ width }) => ({ role: 'dialog', style: { - width: `${width! - TIMELINE_EVENT_DETAILS_OFFSET}px`, + width: `${width - TIMELINE_EVENT_DETAILS_OFFSET}px`, }, }))``; diff --git a/x-pack/plugins/timelines/public/components/t_grid/toolbar/fields_browser/field_browser.test.tsx b/x-pack/plugins/timelines/public/components/t_grid/toolbar/fields_browser/field_browser.test.tsx index e44ee1d45d19b..e19499628e8c1 100644 --- a/x-pack/plugins/timelines/public/components/t_grid/toolbar/fields_browser/field_browser.test.tsx +++ b/x-pack/plugins/timelines/public/components/t_grid/toolbar/fields_browser/field_browser.test.tsx @@ -235,7 +235,7 @@ describe('FieldsBrowser', () => { expect( wrapper.find('[data-test-subj="field-search"]').first().getDOMNode().id === - document.activeElement!.id + document.activeElement?.id ).toBe(true); }); @@ -266,7 +266,7 @@ describe('FieldsBrowser', () => { const changeEvent: any = { target: { value: inputText } }; const onChange = searchField.props().onChange; - onChange!(changeEvent); + onChange?.(changeEvent); searchField.simulate('change').update(); expect(onSearchInputChange).toBeCalledWith(inputText); diff --git a/x-pack/plugins/timelines/public/components/t_grid/toolbar/fields_browser/helpers.tsx b/x-pack/plugins/timelines/public/components/t_grid/toolbar/fields_browser/helpers.tsx index f4b608b456fed..552c228363e49 100644 --- a/x-pack/plugins/timelines/public/components/t_grid/toolbar/fields_browser/helpers.tsx +++ b/x-pack/plugins/timelines/public/components/t_grid/toolbar/fields_browser/helpers.tsx @@ -97,6 +97,7 @@ export const filterBrowserFieldsByFieldName = ({ fields: filter( (f) => f.name != null && f.name.includes(trimmedSubstring), browserFields[categoryId].fields + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion ).reduce((filtered, field) => ({ ...filtered, [field.name!]: field }), {}), }, }), diff --git a/x-pack/plugins/timelines/public/components/t_grid/toolbar/fields_browser/index.tsx b/x-pack/plugins/timelines/public/components/t_grid/toolbar/fields_browser/index.tsx index bdec76418dc8c..0b67f53cca76e 100644 --- a/x-pack/plugins/timelines/public/components/t_grid/toolbar/fields_browser/index.tsx +++ b/x-pack/plugins/timelines/public/components/t_grid/toolbar/fields_browser/index.tsx @@ -100,7 +100,9 @@ export const StatefulFieldsBrowserComponent: React.FC = ({ (selected, category) => newFilteredBrowserFields[category].fields != null && newFilteredBrowserFields[selected].fields != null && + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion Object.keys(newFilteredBrowserFields[category].fields!).length > + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion Object.keys(newFilteredBrowserFields[selected].fields!).length ? category : selected, diff --git a/x-pack/plugins/timelines/public/components/utils/helpers.ts b/x-pack/plugins/timelines/public/components/utils/helpers.ts index f02c86aecc108..23f92c119d574 100644 --- a/x-pack/plugins/timelines/public/components/utils/helpers.ts +++ b/x-pack/plugins/timelines/public/components/utils/helpers.ts @@ -53,7 +53,7 @@ export const getColumnsWithTimestamp = ({ : []; }; -export const getIconFromType = (type: string | null) => { +export const getIconFromType = (type: string | null | undefined) => { switch (type) { case 'string': // fall through case 'keyword': diff --git a/x-pack/plugins/timelines/public/container/use_update_alerts.ts b/x-pack/plugins/timelines/public/container/use_update_alerts.ts index b38c3b9a71fef..1b9e6218eecca 100644 --- a/x-pack/plugins/timelines/public/container/use_update_alerts.ts +++ b/x-pack/plugins/timelines/public/container/use_update_alerts.ts @@ -17,7 +17,7 @@ import { /** * Update alert status by query - * + * * @param useDetectionEngine logic flag for using the regular Detection Engine URL or the RAC URL * * @param status to update to('open' / 'closed' / 'acknowledged') @@ -40,7 +40,7 @@ export const useUpdateAlertsStatus = ( return { updateAlertStatus: async ({ status, index, query }) => { if (useDetectionEngine) { - return http!.fetch(DETECTION_ENGINE_SIGNALS_STATUS_URL, { + return http.fetch(DETECTION_ENGINE_SIGNALS_STATUS_URL, { method: 'POST', body: JSON.stringify({ status, query }), }); diff --git a/x-pack/plugins/timelines/public/plugin.ts b/x-pack/plugins/timelines/public/plugin.ts index 4b383ce392147..acb7b26d0cf84 100644 --- a/x-pack/plugins/timelines/public/plugin.ts +++ b/x-pack/plugins/timelines/public/plugin.ts @@ -45,7 +45,7 @@ export class TimelinesPlugin implements Plugin { } return { getHoverActions: () => { - return getHoverActions(this._store!); + return getHoverActions(this._store); }, getTGrid: (props: TGridProps) => { if (props.type === 'standalone' && this._store) { @@ -73,6 +73,7 @@ export class TimelinesPlugin implements Plugin { }, getFieldBrowser: (props: FieldBrowserProps) => { return getFieldsBrowserLazy(props, { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion store: this._store!, }); }, @@ -90,6 +91,7 @@ export class TimelinesPlugin implements Plugin { }, getAddToCaseAction: (props) => { return getAddToCaseLazy(props, { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion store: this._store!, storage: this._storage, setStore: this.setStore.bind(this), @@ -97,6 +99,7 @@ export class TimelinesPlugin implements Plugin { }, getAddToCasePopover: (props) => { return getAddToCasePopoverLazy(props, { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion store: this._store!, storage: this._storage, setStore: this.setStore.bind(this), @@ -104,6 +107,7 @@ export class TimelinesPlugin implements Plugin { }, getAddToExistingCaseButton: (props) => { return getAddToExistingCaseButtonLazy(props, { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion store: this._store!, storage: this._storage, setStore: this.setStore.bind(this), @@ -111,6 +115,7 @@ export class TimelinesPlugin implements Plugin { }, getAddToNewCaseButton: (props) => { return getAddToNewCaseButtonLazy(props, { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion store: this._store!, storage: this._storage, setStore: this.setStore.bind(this), diff --git a/x-pack/plugins/timelines/public/store/t_grid/helpers.ts b/x-pack/plugins/timelines/public/store/t_grid/helpers.ts index 730d127d16d98..f7b0d86f88621 100644 --- a/x-pack/plugins/timelines/public/store/t_grid/helpers.ts +++ b/x-pack/plugins/timelines/public/store/t_grid/helpers.ts @@ -16,6 +16,8 @@ import type { ColumnHeaderOptions, DataProvider, SortColumnTimeline, + TimelineExpandedDetail, + TimelineExpandedDetailType, } from '../../../common/types/timeline'; import { getTGridManageDefaults, tGridDefaults } from './defaults'; @@ -412,22 +414,20 @@ export const setSelectedTimelineEvents = ({ }; }; -export const updateTimelineDetailsPanel = (action: ToggleDetailPanel) => { - const { tabType } = action; +export const updateTimelineDetailsPanel = (action: ToggleDetailPanel): TimelineExpandedDetail => { + const { tabType, timelineId, ...expandedDetails } = action; const panelViewOptions = new Set(['eventDetail', 'hostDetail', 'networkDetail']); const expandedTabType = tabType ?? TimelineTabs.query; - - return action.panelView && panelViewOptions.has(action.panelView) - ? { - [expandedTabType]: { - params: action.params ? { ...action.params } : {}, - panelView: action.panelView, - }, - } - : { - [expandedTabType]: {}, - }; + const newExpandDetails = { + params: expandedDetails.params ? { ...expandedDetails.params } : {}, + panelView: expandedDetails.panelView, + } as TimelineExpandedDetailType; + return { + [expandedTabType]: panelViewOptions.has(expandedDetails.panelView ?? '') + ? newExpandDetails + : {}, + }; }; export const addProviderToTimelineHelper = ( diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index dc3e897b144b7..a563079a101c3 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -6446,7 +6446,6 @@ "xpack.apm.errorsTable.occurrencesColumnLabel": "オカレンス", "xpack.apm.errorsTable.typeColumnLabel": "型", "xpack.apm.errorsTable.unhandledLabel": "未対応", - "xpack.apm.exactTransactionRateLabel": "{value} { unit, select, minute {tpm} other {tps} }", "xpack.apm.failedTransactionsCorrelations.licenseCheckText": "失敗したトランザクションの相関関係機能を使用するには、Elastic Platinumライセンスのサブスクリプションが必要です。", "xpack.apm.featureRegistry.apmFeatureName": "APMおよびユーザーエクスペリエンス", "xpack.apm.feedbackMenu.appName": "APM", @@ -6756,9 +6755,7 @@ "xpack.apm.serviceOverview.mlNudgeMessage.learnMoreButton": "使ってみる", "xpack.apm.serviceOverview.throughtputChart.previousPeriodLabel": "前の期間", "xpack.apm.serviceOverview.throughtputChartTitle": "スループット", - "xpack.apm.serviceOverview.throughtputPerSecondChartTitle": " (秒単位)", "xpack.apm.serviceOverview.tpmHelp": "スループットは1分あたりのトランザクション数(tpm)で測定されます", - "xpack.apm.serviceOverview.tpsHelp": "スループットは1秒あたりのトランザクション数(tps)で測定されます", "xpack.apm.serviceOverview.transactionsTableColumnErrorRate": "失敗したトランザクション率", "xpack.apm.serviceOverview.transactionsTableColumnImpact": "インパクト", "xpack.apm.serviceOverview.transactionsTableColumnName": "名前", @@ -10846,7 +10843,6 @@ "xpack.fleet.epm.detailsTitle": "詳細", "xpack.fleet.epm.errorLoadingNotice": "NOTICE.txtの読み込みエラー", "xpack.fleet.epm.featuresLabel": "機能", - "xpack.fleet.epm.illustrationAltText": "統合の例", "xpack.fleet.epm.install.packageInstallError": "{pkgName} {pkgVersion}のインストールエラー", "xpack.fleet.epm.install.packageUpdateError": "{pkgName} {pkgVersion}の更新エラー", "xpack.fleet.epm.licenseLabel": "ライセンス", @@ -10869,7 +10865,6 @@ "xpack.fleet.epm.packageDetailsNav.packageCustomLinkText": "高度な設定", "xpack.fleet.epm.packageDetailsNav.packagePoliciesLinkText": "ポリシー", "xpack.fleet.epm.packageDetailsNav.settingsLinkText": "設定", - "xpack.fleet.epm.pageSubtitle": "Elasticエージェントを使用して一般的なアプリやサービスからデータを収集します", "xpack.fleet.epm.releaseBadge.betaDescription": "この統合は本番環境用ではありません。", "xpack.fleet.epm.releaseBadge.betaLabel": "ベータ", "xpack.fleet.epm.releaseBadge.experimentalDescription": "この統合は、急に変更されたり、将来のリリースで削除されたりする可能性があります。", @@ -10882,7 +10877,6 @@ "xpack.fleet.epm.usedByLabel": "エージェントポリシー", "xpack.fleet.epm.versionLabel": "バージョン", "xpack.fleet.epmList.allPackagesFilterLinkText": "すべて", - "xpack.fleet.epmList.allTitle": "カテゴリで参照", "xpack.fleet.epmList.installedTitle": "インストールされている統合", "xpack.fleet.epmList.missingIntegrationPlaceholder": "検索用語と一致する統合が見つかりませんでした。別のキーワードを試すか、左側のカテゴリを使用して参照してください。", "xpack.fleet.epmList.noPackagesFoundPlaceholder": "パッケージが見つかりません", @@ -10956,12 +10950,10 @@ "xpack.fleet.homeIntegration.tutorialModule.noticeText.notePrefix": "注:", "xpack.fleet.hostsInput.addRow": "行の追加", "xpack.fleet.initializationErrorMessageTitle": "Fleet を初期化できません", - "xpack.fleet.integrations.beatsModulesLink": "Beatsモジュール", "xpack.fleet.integrations.customInputsLink": "カスタム入力", "xpack.fleet.integrations.discussForumLink": "ディスカッションフォーラム", "xpack.fleet.integrations.installPackage.installingPackageButtonLabel": "{title} アセットをインストールしています", "xpack.fleet.integrations.installPackage.installPackageButtonLabel": "{title}アセットをインストール", - "xpack.fleet.integrations.missing": "統合が表示されない場合{customInputsLink}を使用してログまたはメトリックを収集するか、{beatsTutorialLink}を使用してデータを追加してください。{discussForumLink}を使用して新しい統合を要求してください。", "xpack.fleet.integrations.packageInstallErrorDescription": "このパッケージのインストール中に問題が発生しました。しばらくたってから再試行してください。", "xpack.fleet.integrations.packageInstallErrorTitle": "{title}パッケージをインストールできませんでした", "xpack.fleet.integrations.packageInstallSuccessDescription": "正常に{title}をインストールしました", @@ -11000,8 +10992,6 @@ "xpack.fleet.integrations.updatePackage.updatePackageButtonLabel": "最新バージョンに更新", "xpack.fleet.integrationsAppTitle": "統合", "xpack.fleet.integrationsHeaderTitle": "Elasticエージェント統合", - "xpack.fleet.integrationsPermissionDeniedErrorMessage": "統合にアクセスする権限がありません。統合には{roleName}権限が必要です。", - "xpack.fleet.integrationsSecurityRequiredErrorMessage": "統合を使用するには、KibanaとElasticsearchでセキュリティを有効にする必要があります。", "xpack.fleet.invalidLicenseDescription": "現在のライセンスは期限切れです。登録されたビートエージェントは引き続き動作しますが、Elastic Fleet インターフェイスにアクセスするには有効なライセンスが必要です。", "xpack.fleet.invalidLicenseTitle": "ライセンスの期限切れ", "xpack.fleet.multiTextInput.addRow": "行の追加", @@ -11073,7 +11063,6 @@ "xpack.fleet.preconfiguration.missingIDError": "{agentPolicyName}には「id」フィールドがありません。ポリシーのis_defaultまたはis_default_fleet_serverに設定されている場合をのぞき、「id」は必須です。", "xpack.fleet.preconfiguration.packageMissingError": "{agentPolicyName}を追加できませんでした。{pkgName}がインストールされていません。{pkgName}を`{packagesConfigValue}`に追加するか、{packagePolicyName}から削除してください。", "xpack.fleet.preconfiguration.policyDeleted": "構成済みのポリシー{id}が削除されました。作成をスキップしています", - "xpack.fleet.securityRequiredErrorTitle": "セキュリティが有効ではありません", "xpack.fleet.serverError.agentPolicyDoesNotExist": "エージェントポリシー{agentPolicyId}が存在しません", "xpack.fleet.serverError.enrollmentKeyDuplicate": "エージェントポリシーの{agentPolicyId}登録キー{providedKeyName}はすでに存在します", "xpack.fleet.serverError.returnedIncorrectKey": "find enrollmentKeyByIdで正しくないキーが返されました", @@ -18032,12 +18021,6 @@ "xpack.monitoring.healthCheck.unableToDisableWatches.action": "詳細情報", "xpack.monitoring.healthCheck.unableToDisableWatches.text": "レガシークラスターアラートを削除できませんでした。Kibanaサーバーログで詳細を確認するか、しばらくたってから再試行してください。", "xpack.monitoring.healthCheck.unableToDisableWatches.title": "レガシークラスターアラートはまだ有効です", - "xpack.monitoring.internalAndMetricbeatMonitoringToast.description": "スタック監視で、Metricbeatと「レガシー収集」の両方を使用している可能性があります。\n 8.0.0では、Metricbeatを使用して、監視データを収集する必要があります。\n セットアップモードの手順に従い、残りの監視をMetricbeatに移行してください。", - "xpack.monitoring.internalAndMetricbeatMonitoringToast.title": "一部のレガシー監視が検出されました", - "xpack.monitoring.internalMonitoringToast.description": "スタック監視で、「レガシー収集」の両方を使用している可能性があります。\n この監視方法は、次のメジャーリリース(8.0.0)ではサポートされていません。\n セットアップモードの手順に従い、Metricbeatで監視を開始してください。", - "xpack.monitoring.internalMonitoringToast.enterSetupMode": "設定モードにする", - "xpack.monitoring.internalMonitoringToast.learnMoreAction": "詳細", - "xpack.monitoring.internalMonitoringToast.title": "内部監視が検出されました", "xpack.monitoring.kibana.clusterStatus.connectionsLabel": "接続", "xpack.monitoring.kibana.clusterStatus.instancesLabel": "インスタンス", "xpack.monitoring.kibana.clusterStatus.maxResponseTimeLabel": "最高応答時間", @@ -22315,7 +22298,6 @@ "xpack.securitySolution.enpdoint.resolver.panelutils.invaliddate": "無効な日付", "xpack.securitySolution.enpdoint.resolver.panelutils.noTimestampRetrieved": "タイムスタンプが取得されていません", "xpack.securitySolution.event.module.linkToElasticEndpointSecurityDescription": "Endpoint Securityで開く", - "xpack.securitySolution.event.reason.eventRenderPopoverTitle": "イベントレンダラー:{eventRendererName} ", "xpack.securitySolution.eventDetails.blank": " ", "xpack.securitySolution.eventDetails.copyToClipboard": "クリップボードにコピー", "xpack.securitySolution.eventDetails.copyToClipboardTooltip": "クリップボードにコピー", @@ -24579,8 +24561,6 @@ "xpack.timelines.hoverActions.addToTimeline.addedFieldMessage": "{fieldOrValue}をタイムラインに追加しました", "xpack.timelines.hoverActions.columnToggleLabel": "表の{field}列を切り替える", "xpack.timelines.hoverActions.fieldLabel": "フィールド", - "xpack.timelines.hoverActions.filterForValue": "値でフィルター", - "xpack.timelines.hoverActions.filterOutValue": "値を除外", "xpack.timelines.hoverActions.moreActions": "さらにアクションを表示", "xpack.timelines.hoverActions.nestedColumnToggleLabel": "{field}フィールドはオブジェクトであり、列として追加できるネストされたフィールドに分解されます", "xpack.timelines.hoverActions.tooltipWithKeyboardShortcut.pressTooltipLabel": "プレス", @@ -25702,10 +25682,6 @@ "xpack.upgradeAssistant.checkupTab.reindexing.flyout.checklistStep.reindexingChecklist.readonlyStepTitle": "古いインデックスを読み込み専用に設定中", "xpack.upgradeAssistant.checkupTab.reindexing.flyout.checklistStep.reindexingChecklist.reindexingDocumentsStepTitle": "ドキュメントを再インデックス中", "xpack.upgradeAssistant.checkupTab.reindexing.flyout.checklistStep.reindexingChecklistTitle": "プロセスを再インデックス中", - "xpack.upgradeAssistant.checkupTab.reindexing.flyout.indexClosedCallout.calloutDetails": "このインデックスは現在閉じています。アップグレードアシスタントが開き、再インデックスを実行してからインデックスを閉じます。 {reindexingMayTakeLongerEmph}。詳細については {docs} をご覧ください。", - "xpack.upgradeAssistant.checkupTab.reindexing.flyout.indexClosedCallout.calloutDetails.reindexingTakesLongerEmphasis": "再インデックスには通常よりも時間がかかることがあります", - "xpack.upgradeAssistant.checkupTab.reindexing.flyout.indexClosedCallout.calloutTitle": "インデックスが閉じました", - "xpack.upgradeAssistant.checkupTab.reindexing.flyout.openAndCloseDocumentation": "ドキュメンテーション", "xpack.upgradeAssistant.checkupTab.reindexing.flyout.warningsStep.customTypeNameWarningDetail": "マッピングタイプは8.0ではサポートされていません。アプリケーションコードまたはスクリプトが{mappingType}に依存していないことを確認してください。", "xpack.upgradeAssistant.checkupTab.reindexing.flyout.warningsStep.customTypeNameWarningTitle": "マッピングタイプ{mappingType}を{defaultType}で置き換えます", "xpack.upgradeAssistant.checkupTab.reindexing.flyout.warningsStep.deprecatedIndexSettingsWarningDetail": "次の廃止予定のインデックス設定が検出されました。", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 9ec07da6986e3..4781e206cac20 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -6498,7 +6498,6 @@ "xpack.apm.errorsTable.occurrencesColumnLabel": "发生次数", "xpack.apm.errorsTable.typeColumnLabel": "类型", "xpack.apm.errorsTable.unhandledLabel": "未处理", - "xpack.apm.exactTransactionRateLabel": "{value} { unit, select, minute {tpm} other {tps} }", "xpack.apm.failedTransactionsCorrelations.licenseCheckText": "要使用失败事务相关性功能,必须订阅 Elastic 白金级许可证。", "xpack.apm.featureRegistry.apmFeatureName": "APM 和用户体验", "xpack.apm.feedbackMenu.appName": "APM", @@ -6811,9 +6810,7 @@ "xpack.apm.serviceOverview.mlNudgeMessage.learnMoreButton": "开始使用", "xpack.apm.serviceOverview.throughtputChart.previousPeriodLabel": "上一时段", "xpack.apm.serviceOverview.throughtputChartTitle": "吞吐量", - "xpack.apm.serviceOverview.throughtputPerSecondChartTitle": " (每秒)", "xpack.apm.serviceOverview.tpmHelp": "吞吐量按每分钟事务数 (tpm) 来度量", - "xpack.apm.serviceOverview.tpsHelp": "吞吐量按每秒事务数 (tps) 来度量", "xpack.apm.serviceOverview.transactionsTableColumnErrorRate": "失败事务率", "xpack.apm.serviceOverview.transactionsTableColumnImpact": "影响", "xpack.apm.serviceOverview.transactionsTableColumnName": "名称", @@ -10961,7 +10958,6 @@ "xpack.fleet.epm.detailsTitle": "详情", "xpack.fleet.epm.errorLoadingNotice": "加载 NOTICE.txt 时出错", "xpack.fleet.epm.featuresLabel": "功能", - "xpack.fleet.epm.illustrationAltText": "集成的图示", "xpack.fleet.epm.install.packageInstallError": "安装 {pkgName} {pkgVersion} 时出错", "xpack.fleet.epm.install.packageUpdateError": "将 {pkgName} 更新到 {pkgVersion} 时出错", "xpack.fleet.epm.licenseLabel": "许可证", @@ -10984,7 +10980,6 @@ "xpack.fleet.epm.packageDetailsNav.packageCustomLinkText": "高级", "xpack.fleet.epm.packageDetailsNav.packagePoliciesLinkText": "策略", "xpack.fleet.epm.packageDetailsNav.settingsLinkText": "设置", - "xpack.fleet.epm.pageSubtitle": "使用 Elastic 代理从热门应用和服务中收集数据", "xpack.fleet.epm.releaseBadge.betaDescription": "在生产环境中不推荐使用此集成。", "xpack.fleet.epm.releaseBadge.betaLabel": "公测版", "xpack.fleet.epm.releaseBadge.experimentalDescription": "此集成可能有重大更改或将在未来版本中移除。", @@ -10997,7 +10992,6 @@ "xpack.fleet.epm.usedByLabel": "代理策略", "xpack.fleet.epm.versionLabel": "版本", "xpack.fleet.epmList.allPackagesFilterLinkText": "全部", - "xpack.fleet.epmList.allTitle": "按类别浏览", "xpack.fleet.epmList.installedTitle": "已安装集成", "xpack.fleet.epmList.missingIntegrationPlaceholder": "我们未找到任何匹配搜索词的集成。请重试其他关键字,或使用左侧的类别浏览。", "xpack.fleet.epmList.noPackagesFoundPlaceholder": "未找到任何软件包", @@ -11071,12 +11065,10 @@ "xpack.fleet.homeIntegration.tutorialModule.noticeText.notePrefix": "注意:", "xpack.fleet.hostsInput.addRow": "添加行", "xpack.fleet.initializationErrorMessageTitle": "无法初始化 Fleet", - "xpack.fleet.integrations.beatsModulesLink": "Beats 模板", "xpack.fleet.integrations.customInputsLink": "定制输入", "xpack.fleet.integrations.discussForumLink": "讨论论坛", "xpack.fleet.integrations.installPackage.installingPackageButtonLabel": "正在安装 {title} 资产", "xpack.fleet.integrations.installPackage.installPackageButtonLabel": "安装 {title} 资产", - "xpack.fleet.integrations.missing": "未看到集成?使用我们的{customInputsLink}收集任何日志或指标或使用 {beatsTutorialLink} 添加数据。使用{discussForumLink}请求新的集成。", "xpack.fleet.integrations.packageInstallErrorDescription": "尝试安装此软件包时出现问题。请稍后重试。", "xpack.fleet.integrations.packageInstallErrorTitle": "无法安装 {title} 软件包", "xpack.fleet.integrations.packageInstallSuccessDescription": "已成功安装 {title}", @@ -11115,8 +11107,6 @@ "xpack.fleet.integrations.updatePackage.updatePackageButtonLabel": "更新到最新版本", "xpack.fleet.integrationsAppTitle": "集成", "xpack.fleet.integrationsHeaderTitle": "Elastic 代理集成", - "xpack.fleet.integrationsPermissionDeniedErrorMessage": "您无权访问“集成”。“集成”需要 {roleName} 权限。", - "xpack.fleet.integrationsSecurityRequiredErrorMessage": "必须在 Kibana 和 Elasticsearch 中启用安全性,才能使用“集成”。", "xpack.fleet.invalidLicenseDescription": "您当前的许可证已过期。已注册 Beats 代理将继续工作,但您需要有效的许可证,才能访问 Elastic Fleet 界面。", "xpack.fleet.invalidLicenseTitle": "已过期许可证", "xpack.fleet.multiTextInput.addRow": "添加行", @@ -11188,7 +11178,6 @@ "xpack.fleet.preconfiguration.missingIDError": "{agentPolicyName} 缺失 `id` 字段。`id` 是必需的,但标记为 is_default 或 is_default_fleet_server 的策略除外。", "xpack.fleet.preconfiguration.packageMissingError": "{agentPolicyName} 无法添加。{pkgName} 未安装,请将 {pkgName} 添加到 `{packagesConfigValue}` 或将其从 {packagePolicyName} 中移除。", "xpack.fleet.preconfiguration.policyDeleted": "预配置的策略 {id} 已删除;将跳过创建", - "xpack.fleet.securityRequiredErrorTitle": "安全性未启用", "xpack.fleet.serverError.agentPolicyDoesNotExist": "代理策略 {agentPolicyId} 不存在", "xpack.fleet.serverError.enrollmentKeyDuplicate": "称作 {providedKeyName} 的注册密钥对于代理策略 {agentPolicyId} 已存在", "xpack.fleet.serverError.returnedIncorrectKey": "find enrollmentKeyById 返回错误的密钥", @@ -18307,12 +18296,6 @@ "xpack.monitoring.healthCheck.unableToDisableWatches.action": "了解详情。", "xpack.monitoring.healthCheck.unableToDisableWatches.text": "我们移除旧版集群告警。请查看 Kibana 服务器日志以获取更多信息,或稍后重试。", "xpack.monitoring.healthCheck.unableToDisableWatches.title": "旧版集群告警仍有效", - "xpack.monitoring.internalAndMetricbeatMonitoringToast.description": "似乎您正在同时使用 Metricbeat 和“Legacy Collection”进行堆栈监测。\n 在 8.0.0 中,必须使用 Metricbeat 收集监测数据。\n 请在设置模式下按照相关步骤将监测的其余部分迁移到 Metricbeat。", - "xpack.monitoring.internalAndMetricbeatMonitoringToast.title": "检测到部分旧版监测", - "xpack.monitoring.internalMonitoringToast.description": "似乎您正在使用“Legacy Collection”进行堆栈监测。\n 下一主要版本 (8.0.0) 将不再支持这种监测方法。\n 请在设置模式下按照相关步骤使用 Metricbeat 开始监测。", - "xpack.monitoring.internalMonitoringToast.enterSetupMode": "进入设置模式", - "xpack.monitoring.internalMonitoringToast.learnMoreAction": "了解详情", - "xpack.monitoring.internalMonitoringToast.title": "检测到内部监测", "xpack.monitoring.kibana.clusterStatus.connectionsLabel": "连接", "xpack.monitoring.kibana.clusterStatus.instancesLabel": "实例", "xpack.monitoring.kibana.clusterStatus.maxResponseTimeLabel": "最大响应时间", @@ -22664,7 +22647,6 @@ "xpack.securitySolution.enpdoint.resolver.panelutils.invaliddate": "日期无效", "xpack.securitySolution.enpdoint.resolver.panelutils.noTimestampRetrieved": "未检索时间戳", "xpack.securitySolution.event.module.linkToElasticEndpointSecurityDescription": "在 Endpoint Security 中打开", - "xpack.securitySolution.event.reason.eventRenderPopoverTitle": "事件渲染器:{eventRendererName} ", "xpack.securitySolution.eventDetails.blank": " ", "xpack.securitySolution.eventDetails.copyToClipboard": "复制到剪贴板", "xpack.securitySolution.eventDetails.copyToClipboardTooltip": "复制到剪贴板", @@ -24993,8 +24975,6 @@ "xpack.timelines.hoverActions.addToTimeline.addedFieldMessage": "已将 {fieldOrValue} 添加到时间线", "xpack.timelines.hoverActions.columnToggleLabel": "在表中切换 {field} 列", "xpack.timelines.hoverActions.fieldLabel": "字段", - "xpack.timelines.hoverActions.filterForValue": "筛留值", - "xpack.timelines.hoverActions.filterOutValue": "筛除值", "xpack.timelines.hoverActions.moreActions": "更多操作", "xpack.timelines.hoverActions.nestedColumnToggleLabel": "{field} 字段是对象,并分解为可以添加为列的嵌套字段", "xpack.timelines.hoverActions.tooltipWithKeyboardShortcut.pressTooltipLabel": "按", @@ -26136,10 +26116,6 @@ "xpack.upgradeAssistant.checkupTab.reindexing.flyout.checklistStep.reindexingChecklist.readonlyStepTitle": "正在将旧索引设置为只读", "xpack.upgradeAssistant.checkupTab.reindexing.flyout.checklistStep.reindexingChecklist.reindexingDocumentsStepTitle": "正在重新索引文档", "xpack.upgradeAssistant.checkupTab.reindexing.flyout.checklistStep.reindexingChecklistTitle": "重新索引过程", - "xpack.upgradeAssistant.checkupTab.reindexing.flyout.indexClosedCallout.calloutDetails": "此索引当前已关闭。升级助手将打开索引,重新索引,然后关闭索引。{reindexingMayTakeLongerEmph}。请参阅文档{docs}以了解更多信息。", - "xpack.upgradeAssistant.checkupTab.reindexing.flyout.indexClosedCallout.calloutDetails.reindexingTakesLongerEmphasis": "重新索引可能比通常花费更多的时间", - "xpack.upgradeAssistant.checkupTab.reindexing.flyout.indexClosedCallout.calloutTitle": "索引已关闭", - "xpack.upgradeAssistant.checkupTab.reindexing.flyout.openAndCloseDocumentation": "文档", "xpack.upgradeAssistant.checkupTab.reindexing.flyout.warningsStep.customTypeNameWarningDetail": "映射类型在 8.0 中不再受支持。确保没有应用程序代码或脚本依赖 {mappingType}。", "xpack.upgradeAssistant.checkupTab.reindexing.flyout.warningsStep.customTypeNameWarningTitle": "将映射类型 {mappingType} 替换为 {defaultType}", "xpack.upgradeAssistant.checkupTab.reindexing.flyout.warningsStep.deprecatedIndexSettingsWarningDetail": "检测到以下弃用的索引设置:", diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/alert_api/alert_summary.test.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/alert_api/alert_summary.test.ts index c7b987f2b04bd..9f62e0ed0d50e 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/alert_api/alert_summary.test.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/alert_api/alert_summary.test.ts @@ -28,6 +28,10 @@ describe('loadAlertInstanceSummary', () => { statusStartDate: '2021-04-01T21:19:25.174Z', tags: [], throttle: null, + executionDuration: { + average: 0, + values: [], + }, }; http.get.mockResolvedValueOnce({ @@ -45,6 +49,10 @@ describe('loadAlertInstanceSummary', () => { status_start_date: '2021-04-01T21:19:25.174Z', tags: [], throttle: null, + execution_duration: { + average: 0, + values: [], + }, }); const result = await loadAlertInstanceSummary({ http, alertId: 'te/st' }); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/alert_api/alert_summary.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/alert_api/alert_summary.ts index cb924db74cea5..701c8f3a7beec 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/alert_api/alert_summary.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/alert_api/alert_summary.ts @@ -17,6 +17,7 @@ const rewriteBodyRes: RewriteRequestCase = ({ status_end_date: statusEndDate, error_messages: errorMessages, last_run: lastRun, + execution_duration: executionDuration, ...rest }: any) => ({ ...rest, @@ -27,6 +28,7 @@ const rewriteBodyRes: RewriteRequestCase = ({ errorMessages, lastRun, instances: alerts, + executionDuration, }); export async function loadAlertInstanceSummary({ diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/execution_duration_utils.test.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/execution_duration_utils.test.ts new file mode 100644 index 0000000000000..da102405c179d --- /dev/null +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/execution_duration_utils.test.ts @@ -0,0 +1,68 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { formatMillisForDisplay, shouldShowDurationWarning } from './execution_duration_utils'; +import { AlertType as RuleType } from '../../types'; + +describe('formatMillisForDisplay', () => { + it('should return 0 for undefined', () => { + expect(formatMillisForDisplay(undefined)).toEqual('00:00:00.000'); + }); + + it('should correctly format millisecond duration in milliseconds', () => { + expect(formatMillisForDisplay(845)).toEqual('00:00:00.845'); + }); + + it('should correctly format second duration in milliseconds', () => { + expect(formatMillisForDisplay(45200)).toEqual('00:00:45.200'); + }); + + it('should correctly format minute duration in milliseconds', () => { + expect(formatMillisForDisplay(122450)).toEqual('00:02:02.450'); + }); + + it('should correctly format hour duration in milliseconds', () => { + expect(formatMillisForDisplay(3634601)).toEqual('01:00:34.601'); + }); +}); + +describe('shouldShowDurationWarning', () => { + it('should return false if rule type or ruleTaskTimeout is undefined', () => { + expect(shouldShowDurationWarning(undefined, 1000)).toEqual(false); + expect(shouldShowDurationWarning(mockRuleType(), 1000)).toEqual(false); + }); + + it('should return false if average duration is less than rule task timeout', () => { + expect(shouldShowDurationWarning(mockRuleType({ ruleTaskTimeout: '1m' }), 1000)).toEqual(false); + }); + + it('should return true if average duration is greater than rule task timeout', () => { + expect(shouldShowDurationWarning(mockRuleType({ ruleTaskTimeout: '1m' }), 120000)).toEqual( + true + ); + }); +}); + +function mockRuleType(overwrites: Partial = {}): RuleType { + return { + id: 'test.testRuleType', + name: 'My Test Rule Type', + actionGroups: [{ id: 'default', name: 'Default Action Group' }], + actionVariables: { + context: [], + state: [], + params: [], + }, + defaultActionGroupId: 'default', + recoveryActionGroup: { id: 'recovered', name: 'Recovered' }, + authorizedConsumers: {}, + producer: 'alerts', + minimumLicenseRequired: 'basic', + enabledInLicense: true, + ...overwrites, + }; +} diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/execution_duration_utils.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/execution_duration_utils.ts new file mode 100644 index 0000000000000..ecad5475274ce --- /dev/null +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/execution_duration_utils.ts @@ -0,0 +1,38 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import moment from 'moment'; +import { padStart } from 'lodash'; +import { AlertType as RuleType } from '../../types'; +import { parseDuration } from '../../../../alerting/common'; + +export function formatMillisForDisplay(value: number | undefined) { + if (!value) { + return '00:00:00.000'; + } + + const duration = moment.duration(value); + const durationString = [duration.hours(), duration.minutes(), duration.seconds()] + .map((v: number) => padStart(`${v}`, 2, '0')) + .join(':'); + + // add millis + const millisString = padStart(`${duration.milliseconds()}`, 3, '0'); + return `${durationString}.${millisString}`; +} + +export function shouldShowDurationWarning( + ruleType: RuleType | undefined, + avgDurationMillis: number +) { + if (!ruleType || !ruleType.ruleTaskTimeout) { + return false; + } + const ruleTypeTimeout: string = ruleType.ruleTaskTimeout; + const ruleTypeTimeoutMillis: number = parseDuration(ruleTypeTimeout); + return avgDurationMillis > ruleTypeTimeoutMillis; +} diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details_route.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details_route.test.tsx index c07138990f88d..847c6c65464b2 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details_route.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details_route.test.tsx @@ -19,20 +19,6 @@ import { spacesPluginMock } from '../../../../../../spaces/public/mocks'; import { useKibana } from '../../../../common/lib/kibana'; jest.mock('../../../../common/lib/kibana'); -class NotFoundError extends Error { - public readonly body: { - statusCode: number; - name: string; - } = { - statusCode: 404, - name: 'Not found', - }; - - constructor(message: string | undefined) { - super(message); - } -} - describe('alert_details_route', () => { beforeEach(() => { jest.clearAllMocks(); @@ -58,11 +44,8 @@ describe('alert_details_route', () => { it('redirects to another page if fetched rule is an aliasMatch', async () => { await setup(); const rule = mockRule(); - const { loadAlert, resolveRule } = mockApis(); + const { resolveRule } = mockApis(); - loadAlert.mockImplementationOnce(async () => { - throw new NotFoundError('OMG'); - }); resolveRule.mockImplementationOnce(async () => ({ ...rule, id: 'new_id', @@ -70,17 +53,13 @@ describe('alert_details_route', () => { alias_target_id: rule.id, })); const wrapper = mountWithIntl( - + ); await act(async () => { await nextTick(); wrapper.update(); }); - expect(loadAlert).toHaveBeenCalledWith(rule.id); expect(resolveRule).toHaveBeenCalledWith(rule.id); expect((spacesMock as any).ui.redirectLegacyUrl).toHaveBeenCalledWith( `insightsAndAlerting/triggersActions/rule/new_id`, @@ -96,11 +75,8 @@ describe('alert_details_route', () => { name: 'type name', authorizedConsumers: ['consumer'], }; - const { loadAlert, loadAlertTypes, loadActionTypes, resolveRule } = mockApis(); + const { loadAlertTypes, loadActionTypes, resolveRule } = mockApis(); - loadAlert.mockImplementationOnce(async () => { - throw new NotFoundError('OMG'); - }); loadAlertTypes.mockImplementationOnce(async () => [ruleType]); loadActionTypes.mockImplementation(async () => []); resolveRule.mockImplementationOnce(async () => ({ @@ -112,7 +88,7 @@ describe('alert_details_route', () => { const wrapper = mountWithIntl( ); await act(async () => { @@ -120,7 +96,6 @@ describe('alert_details_route', () => { wrapper.update(); }); - expect(loadAlert).toHaveBeenCalledWith(rule.id); expect(resolveRule).toHaveBeenCalledWith(rule.id); expect((spacesMock as any).ui.components.getLegacyUrlConflict).toHaveBeenCalledWith({ currentObjectId: 'new_id', @@ -138,10 +113,10 @@ describe('getRuleData useEffect handler', () => { it('fetches rule', async () => { const rule = mockRule(); - const { loadAlert, loadAlertTypes, loadActionTypes, resolveRule } = mockApis(); + const { loadAlertTypes, loadActionTypes, resolveRule } = mockApis(); const { setAlert, setAlertType, setActionTypes } = mockStateSetter(); - loadAlert.mockImplementationOnce(async () => rule); + resolveRule.mockImplementationOnce(async () => rule); const toastNotifications = { addDanger: jest.fn(), @@ -149,7 +124,6 @@ describe('getRuleData useEffect handler', () => { await getRuleData( rule.id, - loadAlert, loadAlertTypes, resolveRule, loadActionTypes, @@ -159,8 +133,7 @@ describe('getRuleData useEffect handler', () => { toastNotifications ); - expect(loadAlert).toHaveBeenCalledWith(rule.id); - expect(resolveRule).not.toHaveBeenCalled(); + expect(resolveRule).toHaveBeenCalledWith(rule.id); expect(setAlert).toHaveBeenCalledWith(rule); }); @@ -184,10 +157,10 @@ describe('getRuleData useEffect handler', () => { id: rule.alertTypeId, name: 'type name', }; - const { loadAlert, loadAlertTypes, loadActionTypes, resolveRule } = mockApis(); + const { loadAlertTypes, loadActionTypes, resolveRule } = mockApis(); const { setAlert, setAlertType, setActionTypes } = mockStateSetter(); - loadAlert.mockImplementation(async () => rule); + resolveRule.mockImplementation(async () => rule); loadAlertTypes.mockImplementation(async () => [ruleType]); loadActionTypes.mockImplementation(async () => [connectorType]); @@ -197,7 +170,6 @@ describe('getRuleData useEffect handler', () => { await getRuleData( rule.id, - loadAlert, loadAlertTypes, resolveRule, loadActionTypes, @@ -209,58 +181,13 @@ describe('getRuleData useEffect handler', () => { expect(loadAlertTypes).toHaveBeenCalledTimes(1); expect(loadActionTypes).toHaveBeenCalledTimes(1); - expect(resolveRule).not.toHaveBeenCalled(); + expect(resolveRule).toHaveBeenCalled(); expect(setAlert).toHaveBeenCalledWith(rule); expect(setAlertType).toHaveBeenCalledWith(ruleType); expect(setActionTypes).toHaveBeenCalledWith([connectorType]); }); - it('fetches rule using resolve if initial GET results in a 404 error', async () => { - const connectorType = { - id: '.server-log', - name: 'Server log', - enabled: true, - }; - const rule = mockRule({ - actions: [ - { - group: '', - id: uuid.v4(), - actionTypeId: connectorType.id, - params: {}, - }, - ], - }); - - const { loadAlert, loadAlertTypes, loadActionTypes, resolveRule } = mockApis(); - const { setAlert, setAlertType, setActionTypes } = mockStateSetter(); - - loadAlert.mockImplementationOnce(async () => { - throw new NotFoundError('OMG'); - }); - resolveRule.mockImplementationOnce(async () => rule); - - const toastNotifications = { - addDanger: jest.fn(), - } as unknown as ToastsApi; - await getRuleData( - rule.id, - loadAlert, - loadAlertTypes, - resolveRule, - loadActionTypes, - setAlert, - setAlertType, - setActionTypes, - toastNotifications - ); - - expect(loadAlert).toHaveBeenCalledWith(rule.id); - expect(resolveRule).toHaveBeenCalledWith(rule.id); - expect(setAlert).toHaveBeenCalledWith(rule); - }); - it('displays an error if fetching the rule results in a non-404 error', async () => { const connectorType = { id: '.server-log', @@ -278,10 +205,10 @@ describe('getRuleData useEffect handler', () => { ], }); - const { loadAlert, loadAlertTypes, loadActionTypes, resolveRule } = mockApis(); + const { loadAlertTypes, loadActionTypes, resolveRule } = mockApis(); const { setAlert, setAlertType, setActionTypes } = mockStateSetter(); - loadAlert.mockImplementation(async () => { + resolveRule.mockImplementation(async () => { throw new Error('OMG'); }); @@ -290,7 +217,6 @@ describe('getRuleData useEffect handler', () => { } as unknown as ToastsApi; await getRuleData( rule.id, - loadAlert, loadAlertTypes, resolveRule, loadActionTypes, @@ -322,10 +248,10 @@ describe('getRuleData useEffect handler', () => { ], }); - const { loadAlert, loadAlertTypes, loadActionTypes, resolveRule } = mockApis(); + const { loadAlertTypes, loadActionTypes, resolveRule } = mockApis(); const { setAlert, setAlertType, setActionTypes } = mockStateSetter(); - loadAlert.mockImplementation(async () => rule); + resolveRule.mockImplementation(async () => rule); loadAlertTypes.mockImplementation(async () => { throw new Error('OMG no rule type'); @@ -337,7 +263,6 @@ describe('getRuleData useEffect handler', () => { } as unknown as ToastsApi; await getRuleData( rule.id, - loadAlert, loadAlertTypes, resolveRule, loadActionTypes, @@ -373,10 +298,10 @@ describe('getRuleData useEffect handler', () => { name: 'type name', }; - const { loadAlert, loadAlertTypes, loadActionTypes, resolveRule } = mockApis(); + const { loadAlertTypes, loadActionTypes, resolveRule } = mockApis(); const { setAlert, setAlertType, setActionTypes } = mockStateSetter(); - loadAlert.mockImplementation(async () => rule); + resolveRule.mockImplementation(async () => rule); loadAlertTypes.mockImplementation(async () => [ruleType]); loadActionTypes.mockImplementation(async () => { @@ -388,7 +313,6 @@ describe('getRuleData useEffect handler', () => { } as unknown as ToastsApi; await getRuleData( rule.id, - loadAlert, loadAlertTypes, resolveRule, loadActionTypes, @@ -425,10 +349,10 @@ describe('getRuleData useEffect handler', () => { name: 'type name', }; - const { loadAlert, loadAlertTypes, loadActionTypes, resolveRule } = mockApis(); + const { loadAlertTypes, loadActionTypes, resolveRule } = mockApis(); const { setAlert, setAlertType, setActionTypes } = mockStateSetter(); - loadAlert.mockImplementation(async () => rule); + resolveRule.mockImplementation(async () => rule); loadAlertTypes.mockImplementation(async () => [ruleType]); loadActionTypes.mockImplementation(async () => [connectorType]); @@ -437,7 +361,6 @@ describe('getRuleData useEffect handler', () => { } as unknown as ToastsApi; await getRuleData( rule.id, - loadAlert, loadAlertTypes, resolveRule, loadActionTypes, @@ -485,10 +408,10 @@ describe('getRuleData useEffect handler', () => { name: 'type name', }; - const { loadAlert, loadAlertTypes, loadActionTypes, resolveRule } = mockApis(); + const { loadAlertTypes, loadActionTypes, resolveRule } = mockApis(); const { setAlert, setAlertType, setActionTypes } = mockStateSetter(); - loadAlert.mockImplementation(async () => rule); + resolveRule.mockImplementation(async () => rule); loadAlertTypes.mockImplementation(async () => [ruleType]); loadActionTypes.mockImplementation(async () => [availableConnectorType]); @@ -497,7 +420,6 @@ describe('getRuleData useEffect handler', () => { } as unknown as ToastsApi; await getRuleData( rule.id, - loadAlert, loadAlertTypes, resolveRule, loadActionTypes, diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details_route.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details_route.tsx index 123d60bb9fea3..b530df986c277 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details_route.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details_route.tsx @@ -10,7 +10,7 @@ import React, { useState, useEffect } from 'react'; import { RouteComponentProps } from 'react-router-dom'; import { ToastsApi } from 'kibana/public'; import { EuiSpacer } from '@elastic/eui'; -import { Alert, AlertType, ActionType, ResolvedRule } from '../../../../types'; +import { AlertType, ActionType, ResolvedRule } from '../../../../types'; import { AlertDetailsWithApi as AlertDetails } from './alert_details'; import { throwIfAbsent, throwIfIsntContained } from '../../../lib/value_validators'; import { @@ -28,13 +28,12 @@ type AlertDetailsRouteProps = RouteComponentProps<{ ruleId: string; }> & Pick & - Pick; + Pick; export const AlertDetailsRoute: React.FunctionComponent = ({ match: { params: { ruleId }, }, - loadAlert, loadAlertTypes, loadActionTypes, resolveRule, @@ -47,14 +46,13 @@ export const AlertDetailsRoute: React.FunctionComponent const { basePath } = http; - const [alert, setAlert] = useState(null); + const [alert, setAlert] = useState(null); const [alertType, setAlertType] = useState(null); const [actionTypes, setActionTypes] = useState(null); const [refreshToken, requestRefresh] = React.useState(); useEffect(() => { getRuleData( ruleId, - loadAlert, loadAlertTypes, resolveRule, loadActionTypes, @@ -63,7 +61,7 @@ export const AlertDetailsRoute: React.FunctionComponent setActionTypes, toasts ); - }, [ruleId, http, loadActionTypes, loadAlert, loadAlertTypes, resolveRule, toasts, refreshToken]); + }, [ruleId, http, loadActionTypes, loadAlertTypes, resolveRule, toasts, refreshToken]); useEffect(() => { if (alert) { @@ -128,26 +126,16 @@ export const AlertDetailsRoute: React.FunctionComponent export async function getRuleData( ruleId: string, - loadAlert: AlertApis['loadAlert'], loadAlertTypes: AlertApis['loadAlertTypes'], resolveRule: AlertApis['resolveRule'], loadActionTypes: ActionApis['loadActionTypes'], - setAlert: React.Dispatch>, + setAlert: React.Dispatch>, setAlertType: React.Dispatch>, setActionTypes: React.Dispatch>, toasts: Pick ) { try { - let loadedRule: Alert | ResolvedRule; - try { - loadedRule = await loadAlert(ruleId); - } catch (err) { - // Try resolving this rule id if the error is a 404, otherwise re-throw - if (err?.body?.statusCode !== 404) { - throw err; - } - loadedRule = await resolveRule(ruleId); - } + const loadedRule: ResolvedRule = await resolveRule(ruleId); setAlert(loadedRule); const [loadedAlertType, loadedActionTypes] = await Promise.all([ diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_instances.scss b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_instances.scss index 76fd94fd4044b..454d6e20d9323 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_instances.scss +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_instances.scss @@ -9,3 +9,8 @@ width: 85%; } } + +.ruleDurationWarningIcon { + bottom: $euiSizeXS; + position: relative; +} \ No newline at end of file diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_instances.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_instances.test.tsx index cada7748062f1..a790427e36483 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_instances.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_instances.test.tsx @@ -8,9 +8,13 @@ import * as React from 'react'; import uuid from 'uuid'; import { shallow } from 'enzyme'; +import { mountWithIntl, nextTick } from '@kbn/test/jest'; +import { act } from 'react-dom/test-utils'; import { AlertInstances, AlertInstanceListItem, alertInstanceToListItem } from './alert_instances'; import { Alert, AlertInstanceSummary, AlertInstanceStatus, AlertType } from '../../../../types'; import { EuiBasicTable } from '@elastic/eui'; +import { ExecutionDurationChart } from '../../common/components/execution_duration_chart'; + jest.mock('../../../../common/lib/kibana'); const fakeNow = new Date('2020-02-09T23:15:41.941Z'); @@ -271,6 +275,118 @@ describe('alertInstanceToListItem', () => { }); }); +describe('execution duration overview', () => { + it('render last execution status', async () => { + const rule = mockAlert({ + executionStatus: { status: 'ok', lastExecutionDate: new Date('2020-08-20T19:23:38Z') }, + }); + const ruleType = mockAlertType(); + const alertSummary = mockAlertInstanceSummary(); + + const wrapper = mountWithIntl( + + ); + + await act(async () => { + await nextTick(); + wrapper.update(); + }); + + const ruleExecutionStatusStat = wrapper.find('[data-test-subj="ruleStatus-ok"]'); + expect(ruleExecutionStatusStat.exists()).toBeTruthy(); + expect(ruleExecutionStatusStat.first().prop('description')).toEqual('Last response'); + expect(wrapper.find('EuiHealth[data-test-subj="ruleStatus-ok"]').text()).toEqual('Ok'); + }); + + it('renders average execution duration', async () => { + const rule = mockAlert(); + const ruleType = mockAlertType({ ruleTaskTimeout: '10m' }); + const alertSummary = mockAlertInstanceSummary({ + executionDuration: { average: 60284, values: [] }, + }); + + const wrapper = mountWithIntl( + + ); + + await act(async () => { + await nextTick(); + wrapper.update(); + }); + + const avgExecutionDurationPanel = wrapper.find('[data-test-subj="avgExecutionDurationPanel"]'); + expect(avgExecutionDurationPanel.exists()).toBeTruthy(); + expect(avgExecutionDurationPanel.first().prop('color')).toEqual('subdued'); + expect(wrapper.find('EuiStat[data-test-subj="avgExecutionDurationStat"]').text()).toEqual( + 'Average duration00:01:00.284' + ); + expect(wrapper.find('[data-test-subj="ruleDurationWarning"]').exists()).toBeFalsy(); + }); + + it('renders warning when average execution duration exceeds rule timeout', async () => { + const rule = mockAlert(); + const ruleType = mockAlertType({ ruleTaskTimeout: '10m' }); + const alertSummary = mockAlertInstanceSummary({ + executionDuration: { average: 60284345, values: [] }, + }); + + const wrapper = mountWithIntl( + + ); + + await act(async () => { + await nextTick(); + wrapper.update(); + }); + + const avgExecutionDurationPanel = wrapper.find('[data-test-subj="avgExecutionDurationPanel"]'); + expect(avgExecutionDurationPanel.exists()).toBeTruthy(); + expect(avgExecutionDurationPanel.first().prop('color')).toEqual('warning'); + expect(wrapper.find('EuiStat[data-test-subj="avgExecutionDurationStat"]').text()).toEqual( + 'Average duration16:44:44.345' + ); + expect(wrapper.find('[data-test-subj="ruleDurationWarning"]').exists()).toBeTruthy(); + }); + + it('renders execution duration chart', () => { + const rule = mockAlert(); + const ruleType = mockAlertType(); + const alertSummary = mockAlertInstanceSummary(); + + expect( + shallow( + + ) + .find(ExecutionDurationChart) + .exists() + ).toBeTruthy(); + }); +}); + function mockAlert(overloads: Partial = {}): Alert { return { id: uuid.v4(), @@ -342,6 +458,10 @@ function mockAlertInstanceSummary( actionGroupId: 'testActionGroup', }, }, + executionDuration: { + average: 0, + values: [], + }, }; return { ...summary, ...overloads }; } diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_instances.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_instances.tsx index 1583cb188f1c1..9de70699edbdb 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_instances.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_instances.tsx @@ -8,11 +8,26 @@ import React, { useState } from 'react'; import moment, { Duration } from 'moment'; import { i18n } from '@kbn/i18n'; -import { EuiBasicTable, EuiHealth, EuiSpacer, EuiToolTip } from '@elastic/eui'; +import { + EuiBasicTable, + EuiHealth, + EuiSpacer, + EuiToolTip, + EuiFlexGroup, + EuiFlexItem, + EuiHorizontalRule, + EuiPanel, + EuiStat, + EuiIconTip, +} from '@elastic/eui'; // @ts-ignore import { RIGHT_ALIGNMENT, CENTER_ALIGNMENT } from '@elastic/eui/lib/services'; import { padStart, chunk } from 'lodash'; -import { ActionGroup, AlertInstanceStatusValues } from '../../../../../../alerting/common'; +import { + ActionGroup, + AlertExecutionStatusErrorReasons, + AlertInstanceStatusValues, +} from '../../../../../../alerting/common'; import { Alert, AlertInstanceSummary, @@ -27,6 +42,16 @@ import { import { DEFAULT_SEARCH_PAGE_SIZE } from '../../../constants'; import './alert_instances.scss'; import { RuleMutedSwitch } from './rule_muted_switch'; +import { getHealthColor } from '../../alerts_list/components/alert_status_filter'; +import { + alertsStatusesTranslationsMapping, + ALERT_STATUS_LICENSE_ERROR, +} from '../../alerts_list/translations'; +import { + formatMillisForDisplay, + shouldShowDurationWarning, +} from '../../../lib/execution_duration_utils'; +import { ExecutionDurationChart } from '../../common/components/execution_duration_chart'; type AlertInstancesProps = { alert: Alert; @@ -161,8 +186,91 @@ export function AlertInstances({ requestRefresh(); }; + const showDurationWarning = shouldShowDurationWarning( + alertType, + alertInstanceSummary.executionDuration.average + ); + + const healthColor = getHealthColor(alert.executionStatus.status); + const isLicenseError = + alert.executionStatus.error?.reason === AlertExecutionStatusErrorReasons.License; + const statusMessage = isLicenseError + ? ALERT_STATUS_LICENSE_ERROR + : alertsStatusesTranslationsMapping[alert.executionStatus.status]; + return ( <> + + + + + + {statusMessage} + + } + description={i18n.translate( + 'xpack.triggersActionsUI.sections.alertDetails.alertInstancesList.ruleLastExecutionDescription', + { + defaultMessage: `Last response`, + } + )} + /> + + + + + + {showDurationWarning && ( + + + + )} + + {formatMillisForDisplay(alertInstanceSummary.executionDuration.average)} + + + } + description={i18n.translate( + 'xpack.triggersActionsUI.sections.alertDetails.alertInstancesList.avgDurationDescription', + { + defaultMessage: `Average duration`, + } + )} + /> + + + + + +
= {}): any { muted: false, }, }, + executionDuration: { + average: 0, + values: [], + }, }; return summary; } diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.tsx index 91b1b14083ed2..a7d54a896d7ef 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.tsx @@ -8,7 +8,7 @@ /* eslint-disable react-hooks/exhaustive-deps */ import { i18n } from '@kbn/i18n'; -import { capitalize, padStart, sortBy } from 'lodash'; +import { capitalize, sortBy } from 'lodash'; import moment from 'moment'; import { FormattedMessage } from '@kbn/i18n/react'; import React, { useEffect, useState } from 'react'; @@ -72,7 +72,6 @@ import { ALERTS_FEATURE_ID, AlertExecutionStatusErrorReasons, formatDuration, - parseDuration, } from '../../../../../../alerting/common'; import { alertsStatusesTranslationsMapping, ALERT_STATUS_LICENSE_ERROR } from '../translations'; import { useKibana } from '../../../../common/lib/kibana'; @@ -82,6 +81,10 @@ import { CenterJustifiedSpinner } from '../../../components/center_justified_spi import { ManageLicenseModal } from './manage_license_modal'; import { checkAlertTypeEnabled } from '../../../lib/check_alert_type_enabled'; import { RuleEnabledSwitch } from './rule_enabled_switch'; +import { + formatMillisForDisplay, + shouldShowDurationWarning, +} from '../../../lib/execution_duration_utils'; const ENTER_KEY = 13; @@ -523,25 +526,14 @@ export const AlertsList: React.FunctionComponent = () => { truncateText: false, 'data-test-subj': 'alertsTableCell-duration', render: (value: number, item: AlertTableItem) => { - const ruleTypeTimeout: string | undefined = alertTypesState.data.get( - item.alertTypeId - )?.ruleTaskTimeout; - const ruleTypeTimeoutMillis: number | undefined = ruleTypeTimeout - ? parseDuration(ruleTypeTimeout) - : undefined; - const showDurationWarning: boolean = ruleTypeTimeoutMillis - ? value > ruleTypeTimeoutMillis - : false; - const duration = moment.duration(value); - const durationString = [duration.hours(), duration.minutes(), duration.seconds()] - .map((v: number) => padStart(`${v}`, 2, '0')) - .join(':'); + const showDurationWarning = shouldShowDurationWarning( + alertTypesState.data.get(item.alertTypeId), + value + ); - // add millis - const millisString = padStart(`${duration.milliseconds()}`, 3, '0'); return ( <> - {`${durationString}.${millisString}`} + {`${formatMillisForDisplay(value)}`} {showDurationWarning && ( { + it('renders empty state when no execution duration values are available', async () => { + const executionDuration = mockExecutionDuration(); + + const wrapper = mountWithIntl(); + + await act(async () => { + await nextTick(); + wrapper.update(); + }); + + expect(wrapper.find('[data-test-subj="executionDurationChartPanel"]').exists()).toBeTruthy(); + expect(wrapper.find('[data-test-subj="executionDurationChartEmpty"]').exists()).toBeTruthy(); + expect(wrapper.find('[data-test-subj="executionDurationChart"]').exists()).toBeFalsy(); + }); + + it('renders chart when execution duration values are available', async () => { + const executionDuration = mockExecutionDuration({ average: 10, values: [1, 2] }); + + const wrapper = mountWithIntl(); + + await act(async () => { + await nextTick(); + wrapper.update(); + }); + + expect(wrapper.find('[data-test-subj="executionDurationChartPanel"]').exists()).toBeTruthy(); + expect(wrapper.find('[data-test-subj="executionDurationChartEmpty"]').exists()).toBeFalsy(); + expect(wrapper.find('[data-test-subj="executionDurationChart"]').exists()).toBeTruthy(); + }); +}); + +describe('padOrTruncateDurations', () => { + it('does nothing when array is the correct length', () => { + expect(padOrTruncateDurations([1, 2, 3], 3)).toEqual([1, 2, 3]); + }); + + it('pads execution duration values when there are fewer than display desires', () => { + expect(padOrTruncateDurations([1, 2, 3], 10)).toEqual([1, 2, 3, 0, 0, 0, 0, 0, 0, 0]); + }); + + it('truncates execution duration values when there are more than display desires', () => { + expect(padOrTruncateDurations([1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13], 10)).toEqual([ + 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, + ]); + }); +}); + +function mockExecutionDuration( + overwrites: { + average?: number; + values?: number[]; + } = {} +) { + return { + average: 0, + values: [], + ...overwrites, + }; +} diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/common/components/execution_duration_chart.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/common/components/execution_duration_chart.tsx new file mode 100644 index 0000000000000..ca20af9cea0fd --- /dev/null +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/common/components/execution_duration_chart.tsx @@ -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 { i18n } from '@kbn/i18n'; +import React from 'react'; +import { FormattedMessage } from '@kbn/i18n/react'; +import { + EuiFlexGroup, + EuiFlexItem, + EuiPanel, + EuiEmptyPrompt, + EuiIconTip, + EuiTitle, +} from '@elastic/eui'; +import lightEuiTheme from '@elastic/eui/dist/eui_theme_light.json'; +import { Axis, BarSeries, Chart, CurveType, LineSeries, Settings } from '@elastic/charts'; +import { assign, fill } from 'lodash'; +import { formatMillisForDisplay } from '../../../lib/execution_duration_utils'; + +export interface ComponentOpts { + executionDuration: { + average: number; + values: number[]; + }; +} + +const DESIRED_NUM_EXECUTION_DURATIONS = 30; + +export const ExecutionDurationChart: React.FunctionComponent = ({ + executionDuration, +}: ComponentOpts) => { + const paddedExecutionDurations = padOrTruncateDurations( + executionDuration.values, + DESIRED_NUM_EXECUTION_DURATIONS + ); + + return ( + + + + +

+ +

+
+
+ + + +
+ + {executionDuration.values && executionDuration.values.length > 0 ? ( + <> + + + [ndx, val])} + /> + [ndx, executionDuration.average])} + curve={CurveType.CURVE_NATURAL} + /> + formatMillisForDisplay(d)} /> + + + ) : ( + <> + +

+ +

+ + } + /> + + )} +
+ ); +}; + +export function padOrTruncateDurations(values: number[], desiredSize: number) { + if (values.length === desiredSize) { + return values; + } else if (values.length < desiredSize) { + return assign(fill(new Array(desiredSize), 0), values); + } else { + // oldest durations are at the start of the array, so take the last {desiredSize} values + return values.slice(-desiredSize); + } +} diff --git a/x-pack/plugins/triggers_actions_ui/server/index.ts b/x-pack/plugins/triggers_actions_ui/server/index.ts index c7d363af45247..72ca584250d03 100644 --- a/x-pack/plugins/triggers_actions_ui/server/index.ts +++ b/x-pack/plugins/triggers_actions_ui/server/index.ts @@ -31,6 +31,7 @@ export const config: PluginConfigDescriptor = { const triggersActionsUi = get(settings, fromPath); if (triggersActionsUi?.enabled === false || triggersActionsUi?.enabled === true) { addDeprecation({ + configPath: 'xpack.trigger_actions_ui.enabled', message: `"xpack.trigger_actions_ui.enabled" is deprecated. The ability to disable this plugin will be removed in 8.0.0.`, correctiveActions: { manualSteps: [`Remove "xpack.trigger_actions_ui.enabled" from your kibana configs.`], diff --git a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/index.ts b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/index.ts index ce054fc8af84e..7eb530f441bc0 100644 --- a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/index.ts +++ b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/index.ts @@ -7,4 +7,3 @@ export { setupEnvironment, WithAppDependencies } from './setup_environment'; export { advanceTime } from './time_manipulation'; -export { kibanaDeprecationsServiceHelpers } from './kibana_deprecations_service.mock'; diff --git a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana_deprecations/deprecation_details_flyout.test.ts b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana_deprecations/deprecation_details_flyout/deprecation_details_flyout.test.ts similarity index 89% rename from x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana_deprecations/deprecation_details_flyout.test.ts rename to x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana_deprecations/deprecation_details_flyout/deprecation_details_flyout.test.ts index eb76e3c016a39..9677104a6e558 100644 --- a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana_deprecations/deprecation_details_flyout.test.ts +++ b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana_deprecations/deprecation_details_flyout/deprecation_details_flyout.test.ts @@ -8,10 +8,11 @@ import { act } from 'react-dom/test-utils'; import { deprecationsServiceMock } from 'src/core/public/mocks'; -import { setupEnvironment, kibanaDeprecationsServiceHelpers } from '../helpers'; -import { KibanaTestBed, setupKibanaPage } from './kibana_deprecations.helpers'; +import { setupEnvironment } from '../../helpers'; +import { kibanaDeprecationsServiceHelpers } from '../service.mock'; +import { KibanaTestBed, setupKibanaPage } from '../kibana_deprecations.helpers'; -describe('Kibana deprecation details flyout', () => { +describe('Kibana deprecations - Deprecation details flyout', () => { let testBed: KibanaTestBed; const { server } = setupEnvironment(); const { @@ -75,6 +76,17 @@ describe('Kibana deprecation details flyout', () => { }); }); + test('Shows documentationUrl when present', async () => { + const { find, actions } = testBed; + const deprecation = mockedKibanaDeprecations[1]; + + await actions.table.clickDeprecationAt(1); + + expect(find('kibanaDeprecationDetails.documentationLink').props().href).toBe( + deprecation.documentationUrl + ); + }); + describe('Deprecation with automatic resolution', () => { test('resolves deprecation successfully', async () => { const { find, exists, actions } = testBed; diff --git a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana_deprecations/deprecations_list.test.ts b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana_deprecations/deprecations_table/deprecations_table.test.ts similarity index 93% rename from x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana_deprecations/deprecations_list.test.ts rename to x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana_deprecations/deprecations_table/deprecations_table.test.ts index 9a3b1d1882cc7..a14d6e087b017 100644 --- a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana_deprecations/deprecations_list.test.ts +++ b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana_deprecations/deprecations_table/deprecations_table.test.ts @@ -9,10 +9,11 @@ import { act } from 'react-dom/test-utils'; import { deprecationsServiceMock } from 'src/core/public/mocks'; import type { DeprecationsServiceStart } from 'kibana/public'; -import { setupEnvironment, kibanaDeprecationsServiceHelpers } from '../helpers'; -import { KibanaTestBed, setupKibanaPage } from './kibana_deprecations.helpers'; +import { setupEnvironment } from '../../helpers'; +import { kibanaDeprecationsServiceHelpers } from '../service.mock'; +import { KibanaTestBed, setupKibanaPage } from '../kibana_deprecations.helpers'; -describe('Kibana deprecations table', () => { +describe('Kibana deprecations - Deprecations table', () => { let testBed: KibanaTestBed; let deprecationService: jest.Mocked; diff --git a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana_deprecations/error_handling.test.ts b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana_deprecations/deprecations_table/error_handling.test.ts similarity index 91% rename from x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana_deprecations/error_handling.test.ts rename to x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana_deprecations/deprecations_table/error_handling.test.ts index 650af2025ee2b..918ee759a0f45 100644 --- a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana_deprecations/error_handling.test.ts +++ b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana_deprecations/deprecations_table/error_handling.test.ts @@ -8,10 +8,11 @@ import { act } from 'react-dom/test-utils'; import { deprecationsServiceMock } from 'src/core/public/mocks'; -import { setupEnvironment, kibanaDeprecationsServiceHelpers } from '../helpers'; -import { KibanaTestBed, setupKibanaPage } from './kibana_deprecations.helpers'; +import { setupEnvironment } from '../../helpers'; +import { kibanaDeprecationsServiceHelpers } from '../service.mock'; +import { KibanaTestBed, setupKibanaPage } from '../kibana_deprecations.helpers'; -describe('Error handling', () => { +describe('Kibana deprecations - Deprecations table - Error handling', () => { let testBed: KibanaTestBed; const { server } = setupEnvironment(); const deprecationService = deprecationsServiceMock.createStartContract(); diff --git a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/kibana_deprecations_service.mock.ts b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana_deprecations/service.mock.ts similarity index 98% rename from x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/kibana_deprecations_service.mock.ts rename to x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana_deprecations/service.mock.ts index fb0edcdc875d1..6a3d376acecab 100644 --- a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/kibana_deprecations_service.mock.ts +++ b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana_deprecations/service.mock.ts @@ -22,6 +22,7 @@ const kibanaDeprecations: DomainDeprecationDetails[] = [ title: 'Test deprecation title 1', message: 'Test deprecation message 1', deprecationType: 'config', + configPath: 'test', }, { correctiveActions: { @@ -31,6 +32,7 @@ const kibanaDeprecations: DomainDeprecationDetails[] = [ domainId: 'test_domain_2', level: 'warning', title: 'Test deprecation title 1', + documentationUrl: 'https://', message: 'Test deprecation message 2', deprecationType: 'feature', }, diff --git a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/overview/fix_issues_step/elasticsearch_deprecation_issues.test.tsx b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/overview/fix_issues_step/elasticsearch_deprecation_issues.test.tsx index bbb8b049ec2b8..e1cef64dfb20c 100644 --- a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/overview/fix_issues_step/elasticsearch_deprecation_issues.test.tsx +++ b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/overview/fix_issues_step/elasticsearch_deprecation_issues.test.tsx @@ -8,7 +8,8 @@ import { act } from 'react-dom/test-utils'; import { deprecationsServiceMock } from 'src/core/public/mocks'; -import { setupEnvironment, kibanaDeprecationsServiceHelpers } from '../../helpers'; +import { setupEnvironment } from '../../helpers'; +import { kibanaDeprecationsServiceHelpers } from '../../kibana_deprecations/service.mock'; import { OverviewTestBed, setupOverviewPage } from '../overview.helpers'; import { esCriticalAndWarningDeprecations, diff --git a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/overview/fix_issues_step/fix_issues_step.test.tsx b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/overview/fix_issues_step/fix_issues_step.test.tsx index e9fa57b54ae0e..b7c417fbfcb8d 100644 --- a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/overview/fix_issues_step/fix_issues_step.test.tsx +++ b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/overview/fix_issues_step/fix_issues_step.test.tsx @@ -8,7 +8,8 @@ import { act } from 'react-dom/test-utils'; import { deprecationsServiceMock } from 'src/core/public/mocks'; -import { setupEnvironment, kibanaDeprecationsServiceHelpers } from '../../helpers'; +import { setupEnvironment } from '../../helpers'; +import { kibanaDeprecationsServiceHelpers } from '../../kibana_deprecations/service.mock'; import { OverviewTestBed, setupOverviewPage } from '../overview.helpers'; import { esCriticalAndWarningDeprecations, esNoDeprecations } from './mock_es_issues'; diff --git a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/overview/fix_issues_step/kibana_deprecation_issues.test.tsx b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/overview/fix_issues_step/kibana_deprecation_issues.test.tsx index 719e2f674fb2f..c11a1481b68b5 100644 --- a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/overview/fix_issues_step/kibana_deprecation_issues.test.tsx +++ b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/overview/fix_issues_step/kibana_deprecation_issues.test.tsx @@ -9,7 +9,8 @@ import { act } from 'react-dom/test-utils'; import { deprecationsServiceMock } from 'src/core/public/mocks'; import type { DomainDeprecationDetails } from 'kibana/public'; -import { setupEnvironment, kibanaDeprecationsServiceHelpers } from '../../helpers'; +import { setupEnvironment } from '../../helpers'; +import { kibanaDeprecationsServiceHelpers } from '../../kibana_deprecations/service.mock'; import { OverviewTestBed, setupOverviewPage } from '../overview.helpers'; import { esNoDeprecations } from './mock_es_issues'; diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/reindex/flyout/checklist_step.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/reindex/flyout/checklist_step.tsx index 3ba0428f8bb33..19d61b3a8afa9 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/reindex/flyout/checklist_step.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/reindex/flyout/checklist_step.tsx @@ -61,12 +61,11 @@ const buttonLabel = (status?: ReindexStatus) => { * Displays a flyout that shows the current reindexing status for a given index. */ export const ChecklistFlyoutStep: React.FunctionComponent<{ - renderGlobalCallouts: () => React.ReactNode; closeFlyout: () => void; reindexState: ReindexState; startReindex: () => void; cancelReindex: () => void; -}> = ({ closeFlyout, reindexState, startReindex, cancelReindex, renderGlobalCallouts }) => { +}> = ({ closeFlyout, reindexState, startReindex, cancelReindex }) => { const { loadingState, status, hasRequiredPrivileges } = reindexState; const loading = loadingState === LoadingState.Loading || status === ReindexStatus.inProgress; const isCompleted = status === ReindexStatus.completed; @@ -116,7 +115,6 @@ export const ChecklistFlyoutStep: React.FunctionComponent<{ )} - {renderGlobalCallouts()} void; } -const getOpenAndCloseIndexDocLink = (docLinks: DocLinksStart) => ( - - {i18n.translate( - 'xpack.upgradeAssistant.checkupTab.reindexing.flyout.openAndCloseDocumentation', - { defaultMessage: 'documentation' } - )} - -); - -const getIndexClosedCallout = (docLinks: DocLinksStart) => ( - <> - -

- - {i18n.translate( - 'xpack.upgradeAssistant.checkupTab.reindexing.flyout.indexClosedCallout.calloutDetails.reindexingTakesLongerEmphasis', - { defaultMessage: 'Reindexing may take longer than usual' } - )} - - ), - }} - /> -

-
- - -); - export const ReindexFlyout: React.FunctionComponent = ({ reindexState, startReindex, @@ -82,12 +34,8 @@ export const ReindexFlyout: React.FunctionComponent = ({ deprecation, }) => { const { status, reindexWarnings } = reindexState; - const { index, correctiveAction } = deprecation; - const { - services: { - core: { docLinks }, - }, - } = useAppContext(); + const { index } = deprecation; + // If there are any warnings and we haven't started reindexing, show the warnings step first. const [currentFlyoutStep, setCurrentFlyoutStep] = useState( reindexWarnings && reindexWarnings.length > 0 && status === undefined @@ -97,16 +45,10 @@ export const ReindexFlyout: React.FunctionComponent = ({ let flyoutContents: React.ReactNode; - const globalCallout = - (correctiveAction as ReindexAction).blockerForReindexing === 'index-closed' && - reindexState.status !== ReindexStatus.completed - ? getIndexClosedCallout(docLinks) - : undefined; switch (currentFlyoutStep) { case ReindexFlyoutStep.reindexWarnings: flyoutContents = ( globalCallout} closeFlyout={closeFlyout} warnings={reindexState.reindexWarnings!} advanceNextStep={() => setCurrentFlyoutStep(ReindexFlyoutStep.checklist)} @@ -116,7 +58,6 @@ export const ReindexFlyout: React.FunctionComponent = ({ case ReindexFlyoutStep.checklist: flyoutContents = ( globalCallout} closeFlyout={closeFlyout} reindexState={reindexState} startReindex={startReindex} diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/reindex/flyout/warnings_step.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/reindex/flyout/warnings_step.tsx index 8078d495c4009..0596c692a9f38 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/reindex/flyout/warnings_step.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/reindex/flyout/warnings_step.tsx @@ -41,7 +41,6 @@ const warningToComponentMap: { export const idForWarning = (id: number) => `reindexWarning-${id}`; interface WarningsConfirmationFlyoutProps { - renderGlobalCallouts: () => React.ReactNode; closeFlyout: () => void; warnings: ReindexWarning[]; advanceNextStep: () => void; @@ -53,7 +52,6 @@ interface WarningsConfirmationFlyoutProps { */ export const WarningsFlyoutStep: React.FunctionComponent = ({ warnings, - renderGlobalCallouts, closeFlyout, advanceNextStep, }) => { @@ -88,8 +86,6 @@ export const WarningsFlyoutStep: React.FunctionComponent - {renderGlobalCallouts()} - - + {i18nTexts.learnMoreLinkLabel}

diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/kibana_deprecations.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/kibana_deprecations.tsx index 23697b00923c8..013f59a7dcf56 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/kibana_deprecations.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/kibana_deprecations.tsx @@ -75,10 +75,10 @@ export interface DeprecationResolutionState { resolveDeprecationError?: string; } -export interface KibanaDeprecationDetails extends DomainDeprecationDetails { +export type KibanaDeprecationDetails = DomainDeprecationDetails & { id: string; filterType: DomainDeprecationDetails['deprecationType'] | 'uncategorized'; -} +}; const getDeprecationCountByLevel = (deprecations: KibanaDeprecationDetails[]) => { const criticalDeprecations: KibanaDeprecationDetails[] = []; diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_issues_step/fix_issues_step.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_issues_step/fix_issues_step.tsx index b061ab5ea2d4d..590bfac96770d 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_issues_step/fix_issues_step.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/overview/fix_issues_step/fix_issues_step.tsx @@ -70,7 +70,7 @@ export const getFixIssuesStep = ({

diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/shared/deprecation_count.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/shared/deprecation_count.tsx index 3312508a87073..32d214f0d80f2 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/shared/deprecation_count.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/shared/deprecation_count.tsx @@ -6,10 +6,11 @@ */ import React, { FunctionComponent } from 'react'; - import { EuiFlexGroup, EuiFlexItem, EuiHealth } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; +import { LevelInfoTip } from './level_info_tip'; + const i18nTexts = { getCriticalStatusLabel: (count: number) => i18n.translate('xpack.upgradeAssistant.deprecationCount.criticalStatusLabel', { @@ -39,14 +40,31 @@ export const DeprecationCount: FunctionComponent = ({ return ( - - {i18nTexts.getCriticalStatusLabel(totalCriticalDeprecations)} - + + + + {i18nTexts.getCriticalStatusLabel(totalCriticalDeprecations)} + + + + + + + + - - {i18nTexts.getWarningStatusLabel(totalWarningDeprecations)} - + + + + {i18nTexts.getWarningStatusLabel(totalWarningDeprecations)} + + + + + + + ); diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/shared/index.ts b/x-pack/plugins/upgrade_assistant/public/application/components/shared/index.ts index ef7916f6e8d17..0efc91035001a 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/shared/index.ts +++ b/x-pack/plugins/upgrade_assistant/public/application/components/shared/index.ts @@ -9,3 +9,4 @@ export { NoDeprecationsPrompt } from './no_deprecations'; export { DeprecationCount } from './deprecation_count'; export { DeprecationBadge } from './deprecation_badge'; export { DeprecationsPageLoadingError } from './deprecations_page_loading_error'; +export { LevelInfoTip } from './level_info_tip'; diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/shared/level_info_tip.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/shared/level_info_tip.tsx new file mode 100644 index 0000000000000..d3600a7290b4e --- /dev/null +++ b/x-pack/plugins/upgrade_assistant/public/application/components/shared/level_info_tip.tsx @@ -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 React, { FunctionComponent } from 'react'; +import { i18n } from '@kbn/i18n'; +import { EuiIconTip } from '@elastic/eui'; + +const i18nTexts = { + critical: i18n.translate('xpack.upgradeAssistant.levelInfoTip.criticalLabel', { + defaultMessage: 'Critical issues must be resolved before you upgrade', + }), + warning: i18n.translate('xpack.upgradeAssistant.levelInfoTip.warningLabel', { + defaultMessage: 'Warning issues can be ignored at your discretion', + }), +}; + +interface Props { + level: 'critical' | 'warning'; +} + +export const LevelInfoTip: FunctionComponent = ({ level }) => { + return ; +}; diff --git a/x-pack/plugins/upgrade_assistant/server/lib/kibana_status.test.ts b/x-pack/plugins/upgrade_assistant/server/lib/kibana_status.test.ts index 63532543a418b..296a313abef38 100644 --- a/x-pack/plugins/upgrade_assistant/server/lib/kibana_status.test.ts +++ b/x-pack/plugins/upgrade_assistant/server/lib/kibana_status.test.ts @@ -20,7 +20,7 @@ const mockKibanaDeprecations: DomainDeprecationDetails[] = [ 'Using Kibana role-mapping management, change all role-mappings which assing the kibana_user role to the kibana_admin role.', ], }, - deprecationType: 'config', + deprecationType: 'feature', documentationUrl: 'testDocUrl', level: 'critical', message: 'testMessage', diff --git a/x-pack/plugins/uptime/public/apps/uptime_overview_fetcher.ts b/x-pack/plugins/uptime/public/apps/uptime_overview_fetcher.ts index e1cab29abec4b..8f8cf16d1e383 100644 --- a/x-pack/plugins/uptime/public/apps/uptime_overview_fetcher.ts +++ b/x-pack/plugins/uptime/public/apps/uptime_overview_fetcher.ts @@ -13,7 +13,7 @@ import { kibanaService } from '../state/kibana_service'; async function fetchUptimeOverviewData({ absoluteTime, relativeTime, - bucketSize, + intervalString, }: FetchDataParams) { const start = new Date(absoluteTime.start).toISOString(); const end = new Date(absoluteTime.end).toISOString(); @@ -22,7 +22,11 @@ async function fetchUptimeOverviewData({ dateRangeEnd: end, }); - const pings = await fetchPingHistogram({ dateStart: start, dateEnd: end, bucketSize }); + const pings = await fetchPingHistogram({ + dateStart: start, + dateEnd: end, + bucketSize: intervalString, + }); const response: UptimeFetchDataResponse = { appLink: `/app/uptime?dateRangeStart=${relativeTime.start}&dateRangeEnd=${relativeTime.end}`, diff --git a/x-pack/plugins/uptime/public/components/fleet_package/browser/formatters.ts b/x-pack/plugins/uptime/public/components/fleet_package/browser/formatters.ts index 5bc44775ee2f5..640db94028bc6 100644 --- a/x-pack/plugins/uptime/public/components/fleet_package/browser/formatters.ts +++ b/x-pack/plugins/uptime/public/components/fleet_package/browser/formatters.ts @@ -11,20 +11,40 @@ import { commonFormatters, arrayToJsonFormatter, stringToJsonFormatter, + objectToJsonFormatter, } from '../common/formatters'; +import { + tlsValueToYamlFormatter, + tlsValueToStringFormatter, + tlsArrayToYamlFormatter, +} from '../tls/formatters'; export type BrowserFormatMap = Record; export const browserFormatters: BrowserFormatMap = { + [ConfigKeys.METADATA]: (fields) => objectToJsonFormatter(fields[ConfigKeys.METADATA]), [ConfigKeys.SOURCE_ZIP_URL]: null, [ConfigKeys.SOURCE_ZIP_USERNAME]: null, [ConfigKeys.SOURCE_ZIP_PASSWORD]: null, [ConfigKeys.SOURCE_ZIP_FOLDER]: null, + [ConfigKeys.SOURCE_ZIP_PROXY_URL]: null, [ConfigKeys.SOURCE_INLINE]: (fields) => stringToJsonFormatter(fields[ConfigKeys.SOURCE_INLINE]), [ConfigKeys.PARAMS]: null, [ConfigKeys.SCREENSHOTS]: null, [ConfigKeys.SYNTHETICS_ARGS]: (fields) => arrayToJsonFormatter(fields[ConfigKeys.SYNTHETICS_ARGS]), + [ConfigKeys.ZIP_URL_TLS_CERTIFICATE_AUTHORITIES]: (fields) => + tlsValueToYamlFormatter(fields[ConfigKeys.ZIP_URL_TLS_CERTIFICATE_AUTHORITIES]), + [ConfigKeys.ZIP_URL_TLS_CERTIFICATE]: (fields) => + tlsValueToYamlFormatter(fields[ConfigKeys.ZIP_URL_TLS_CERTIFICATE]), + [ConfigKeys.ZIP_URL_TLS_KEY]: (fields) => + tlsValueToYamlFormatter(fields[ConfigKeys.ZIP_URL_TLS_KEY]), + [ConfigKeys.ZIP_URL_TLS_KEY_PASSPHRASE]: (fields) => + tlsValueToStringFormatter(fields[ConfigKeys.ZIP_URL_TLS_KEY_PASSPHRASE]), + [ConfigKeys.ZIP_URL_TLS_VERIFICATION_MODE]: (fields) => + tlsValueToStringFormatter(fields[ConfigKeys.ZIP_URL_TLS_VERIFICATION_MODE]), + [ConfigKeys.ZIP_URL_TLS_VERSION]: (fields) => + tlsArrayToYamlFormatter(fields[ConfigKeys.ZIP_URL_TLS_VERSION]), [ConfigKeys.JOURNEY_FILTERS_MATCH]: (fields) => stringToJsonFormatter(fields[ConfigKeys.JOURNEY_FILTERS_MATCH]), [ConfigKeys.JOURNEY_FILTERS_TAGS]: (fields) => diff --git a/x-pack/plugins/uptime/public/components/fleet_package/browser/normalizers.ts b/x-pack/plugins/uptime/public/components/fleet_package/browser/normalizers.ts index 0107fb3884f41..34b937b80dad0 100644 --- a/x-pack/plugins/uptime/public/components/fleet_package/browser/normalizers.ts +++ b/x-pack/plugins/uptime/public/components/fleet_package/browser/normalizers.ts @@ -14,6 +14,7 @@ import { } from '../common/normalizers'; import { defaultBrowserSimpleFields, defaultBrowserAdvancedFields } from '../contexts'; +import { tlsJsonToObjectNormalizer, tlsStringToObjectNormalizer } from '../tls/normalizers'; export type BrowserNormalizerMap = Record; @@ -31,14 +32,43 @@ export const getBrowserJsonToJavascriptNormalizer = (key: ConfigKeys) => { }; export const browserNormalizers: BrowserNormalizerMap = { + [ConfigKeys.METADATA]: getBrowserJsonToJavascriptNormalizer(ConfigKeys.METADATA), [ConfigKeys.SOURCE_ZIP_URL]: getBrowserNormalizer(ConfigKeys.SOURCE_ZIP_URL), [ConfigKeys.SOURCE_ZIP_USERNAME]: getBrowserNormalizer(ConfigKeys.SOURCE_ZIP_USERNAME), [ConfigKeys.SOURCE_ZIP_PASSWORD]: getBrowserNormalizer(ConfigKeys.SOURCE_ZIP_PASSWORD), [ConfigKeys.SOURCE_ZIP_FOLDER]: getBrowserNormalizer(ConfigKeys.SOURCE_ZIP_FOLDER), [ConfigKeys.SOURCE_INLINE]: getBrowserJsonToJavascriptNormalizer(ConfigKeys.SOURCE_INLINE), + [ConfigKeys.SOURCE_ZIP_PROXY_URL]: getBrowserNormalizer(ConfigKeys.SOURCE_ZIP_PROXY_URL), [ConfigKeys.PARAMS]: getBrowserNormalizer(ConfigKeys.PARAMS), [ConfigKeys.SCREENSHOTS]: getBrowserNormalizer(ConfigKeys.SCREENSHOTS), [ConfigKeys.SYNTHETICS_ARGS]: getBrowserJsonToJavascriptNormalizer(ConfigKeys.SYNTHETICS_ARGS), + [ConfigKeys.ZIP_URL_TLS_CERTIFICATE_AUTHORITIES]: (fields) => + tlsJsonToObjectNormalizer( + fields?.[ConfigKeys.ZIP_URL_TLS_CERTIFICATE_AUTHORITIES]?.value, + ConfigKeys.TLS_CERTIFICATE_AUTHORITIES + ), + [ConfigKeys.ZIP_URL_TLS_CERTIFICATE]: (fields) => + tlsJsonToObjectNormalizer( + fields?.[ConfigKeys.ZIP_URL_TLS_CERTIFICATE]?.value, + ConfigKeys.TLS_CERTIFICATE + ), + [ConfigKeys.ZIP_URL_TLS_KEY]: (fields) => + tlsJsonToObjectNormalizer(fields?.[ConfigKeys.ZIP_URL_TLS_KEY]?.value, ConfigKeys.TLS_KEY), + [ConfigKeys.ZIP_URL_TLS_KEY_PASSPHRASE]: (fields) => + tlsStringToObjectNormalizer( + fields?.[ConfigKeys.ZIP_URL_TLS_KEY_PASSPHRASE]?.value, + ConfigKeys.TLS_KEY_PASSPHRASE + ), + [ConfigKeys.ZIP_URL_TLS_VERIFICATION_MODE]: (fields) => + tlsStringToObjectNormalizer( + fields?.[ConfigKeys.ZIP_URL_TLS_VERIFICATION_MODE]?.value, + ConfigKeys.TLS_VERIFICATION_MODE + ), + [ConfigKeys.ZIP_URL_TLS_VERSION]: (fields) => + tlsJsonToObjectNormalizer( + fields?.[ConfigKeys.ZIP_URL_TLS_VERSION]?.value, + ConfigKeys.TLS_VERSION + ), [ConfigKeys.JOURNEY_FILTERS_MATCH]: getBrowserJsonToJavascriptNormalizer( ConfigKeys.JOURNEY_FILTERS_MATCH ), diff --git a/x-pack/plugins/uptime/public/components/fleet_package/browser/simple_fields.tsx b/x-pack/plugins/uptime/public/components/fleet_package/browser/simple_fields.tsx index 7c7a6b199adcb..775778296fba8 100644 --- a/x-pack/plugins/uptime/public/components/fleet_package/browser/simple_fields.tsx +++ b/x-pack/plugins/uptime/public/components/fleet_package/browser/simple_fields.tsx @@ -24,10 +24,11 @@ export const BrowserSimpleFields = memo(({ validate }) => { setFields((prevFields) => ({ ...prevFields, [configKey]: value })); }; const onChangeSourceField = useCallback( - ({ zipUrl, folder, username, password, inlineScript, params }) => { + ({ zipUrl, folder, username, password, inlineScript, params, proxyUrl }) => { setFields((prevFields) => ({ ...prevFields, [ConfigKeys.SOURCE_ZIP_URL]: zipUrl, + [ConfigKeys.SOURCE_ZIP_PROXY_URL]: proxyUrl, [ConfigKeys.SOURCE_ZIP_FOLDER]: folder, [ConfigKeys.SOURCE_ZIP_USERNAME]: username, [ConfigKeys.SOURCE_ZIP_PASSWORD]: password, @@ -80,6 +81,7 @@ export const BrowserSimpleFields = memo(({ validate }) => { defaultConfig={useMemo( () => ({ zipUrl: defaultValues[ConfigKeys.SOURCE_ZIP_URL], + proxyUrl: defaultValues[ConfigKeys.SOURCE_ZIP_PROXY_URL], folder: defaultValues[ConfigKeys.SOURCE_ZIP_FOLDER], username: defaultValues[ConfigKeys.SOURCE_ZIP_USERNAME], password: defaultValues[ConfigKeys.SOURCE_ZIP_PASSWORD], diff --git a/x-pack/plugins/uptime/public/components/fleet_package/browser/source_field.test.tsx b/x-pack/plugins/uptime/public/components/fleet_package/browser/source_field.test.tsx new file mode 100644 index 0000000000000..6cf37aa2238f3 --- /dev/null +++ b/x-pack/plugins/uptime/public/components/fleet_package/browser/source_field.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 'jest-canvas-mock'; + +import React from 'react'; +import { fireEvent, screen, waitFor } from '@testing-library/react'; +import { render } from '../../../lib/helper/rtl_helpers'; +import { SourceField, defaultValues } from './source_field'; +import { BrowserSimpleFieldsContextProvider } from '../contexts'; + +jest.mock('@elastic/eui/lib/services/accessibility/html_id_generator', () => ({ + ...jest.requireActual('@elastic/eui/lib/services/accessibility/html_id_generator'), + htmlIdGenerator: () => () => `id-${Math.random()}`, +})); + +jest.mock('../../../../../../../src/plugins/kibana_react/public', () => { + const original = jest.requireActual('../../../../../../../src/plugins/kibana_react/public'); + return { + ...original, + // Mocking CodeEditor, which uses React Monaco under the hood + CodeEditor: (props: any) => ( + { + props.onChange(e.jsonContent); + }} + /> + ), + }; +}); + +const onChange = jest.fn(); + +describe('', () => { + const WrappedComponent = () => { + return ( + + + + ); + }; + + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('calls onChange', async () => { + render(); + const zipUrl = 'test.zip'; + + const zipUrlField = screen.getByTestId('syntheticsBrowserZipUrl'); + fireEvent.change(zipUrlField, { target: { value: zipUrl } }); + + await waitFor(() => { + expect(onChange).toBeCalledWith({ ...defaultValues, zipUrl }); + }); + }); +}); diff --git a/x-pack/plugins/uptime/public/components/fleet_package/browser/source_field.tsx b/x-pack/plugins/uptime/public/components/fleet_package/browser/source_field.tsx index 243d709d304ce..6f2a7c99ad0d5 100644 --- a/x-pack/plugins/uptime/public/components/fleet_package/browser/source_field.tsx +++ b/x-pack/plugins/uptime/public/components/fleet_package/browser/source_field.tsx @@ -17,6 +17,7 @@ import { } from '@elastic/eui'; import { OptionalLabel } from '../optional_label'; import { CodeEditor } from '../code_editor'; +import { ZipUrlTLSFields } from './zip_url_tls_fields'; import { MonacoEditorLangId } from '../types'; enum SourceType { @@ -26,6 +27,7 @@ enum SourceType { interface SourceConfig { zipUrl: string; + proxyUrl: string; folder: string; username: string; password: string; @@ -35,11 +37,12 @@ interface SourceConfig { interface Props { onChange: (sourceConfig: SourceConfig) => void; - defaultConfig: SourceConfig; + defaultConfig?: SourceConfig; } -const defaultValues = { +export const defaultValues = { zipUrl: '', + proxyUrl: '', folder: '', username: '', password: '', @@ -96,6 +99,30 @@ export const SourceField = ({ onChange, defaultConfig = defaultValues }: Props) data-test-subj="syntheticsBrowserZipUrl" />
+ + + } + labelAppend={} + helpText={ + + } + > + + setConfig((prevConfig) => ({ ...prevConfig, proxyUrl: value })) + } + value={config.proxyUrl} + data-test-subj="syntheticsBrowserZipUrlProxy" + /> + ({ + ...jest.requireActual('@elastic/eui/lib/services/accessibility/html_id_generator'), + htmlIdGenerator: () => () => `id-${Math.random()}`, +})); + +describe('', () => { + const WrappedComponent = ({ isEnabled = true }: { isEnabled?: boolean }) => { + return ( + + + + + + ); + }; + it('renders ZipUrlTLSFields', () => { + const { getByLabelText, getByText } = render(); + + const toggle = getByText('Enable TLS configuration for Zip URL'); + + fireEvent.click(toggle); + + expect(getByText('Certificate settings')).toBeInTheDocument(); + expect(getByText('Supported TLS protocols')).toBeInTheDocument(); + expect(getByLabelText('Client certificate')).toBeInTheDocument(); + expect(getByLabelText('Client key')).toBeInTheDocument(); + expect(getByLabelText('Certificate authorities')).toBeInTheDocument(); + expect(getByLabelText('Verification mode')).toBeInTheDocument(); + }); + + it('updates fields', async () => { + const { getByLabelText } = render(); + + const clientCertificate = getByLabelText('Client certificate') as HTMLInputElement; + const clientKey = getByLabelText('Client key') as HTMLInputElement; + const clientKeyPassphrase = getByLabelText('Client key passphrase') as HTMLInputElement; + const certificateAuthorities = getByLabelText('Certificate authorities') as HTMLInputElement; + const verificationMode = getByLabelText('Verification mode') as HTMLInputElement; + + const newValues = { + [ConfigKeys.TLS_CERTIFICATE]: 'sampleClientCertificate', + [ConfigKeys.TLS_KEY]: 'sampleClientKey', + [ConfigKeys.TLS_KEY_PASSPHRASE]: 'sampleClientKeyPassphrase', + [ConfigKeys.TLS_CERTIFICATE_AUTHORITIES]: 'sampleCertificateAuthorities', + [ConfigKeys.TLS_VERIFICATION_MODE]: VerificationMode.NONE, + }; + + fireEvent.change(clientCertificate, { + target: { value: newValues[ConfigKeys.TLS_CERTIFICATE] }, + }); + fireEvent.change(clientKey, { target: { value: newValues[ConfigKeys.TLS_KEY] } }); + fireEvent.change(clientKeyPassphrase, { + target: { value: newValues[ConfigKeys.TLS_KEY_PASSPHRASE] }, + }); + fireEvent.change(certificateAuthorities, { + target: { value: newValues[ConfigKeys.TLS_CERTIFICATE_AUTHORITIES] }, + }); + fireEvent.change(verificationMode, { + target: { value: newValues[ConfigKeys.TLS_VERIFICATION_MODE] }, + }); + + expect(clientCertificate.value).toEqual(newValues[ConfigKeys.TLS_CERTIFICATE]); + expect(clientKey.value).toEqual(newValues[ConfigKeys.TLS_KEY]); + expect(certificateAuthorities.value).toEqual(newValues[ConfigKeys.TLS_CERTIFICATE_AUTHORITIES]); + expect(verificationMode.value).toEqual(newValues[ConfigKeys.TLS_VERIFICATION_MODE]); + }); + + it('shows warning when verification mode is set to none', () => { + const { getByLabelText, getByText } = render(); + + const verificationMode = getByLabelText('Verification mode') as HTMLInputElement; + + fireEvent.change(verificationMode, { + target: { value: VerificationMode.NONE }, + }); + + expect(getByText('Disabling TLS')).toBeInTheDocument(); + }); + + it('does not show fields when isEnabled is false', async () => { + const { queryByLabelText } = render(); + + expect(queryByLabelText('Client certificate')).not.toBeInTheDocument(); + expect(queryByLabelText('Client key')).not.toBeInTheDocument(); + expect(queryByLabelText('Client key passphrase')).not.toBeInTheDocument(); + expect(queryByLabelText('Certificate authorities')).not.toBeInTheDocument(); + expect(queryByLabelText('verification mode')).not.toBeInTheDocument(); + }); +}); diff --git a/x-pack/plugins/uptime/public/components/fleet_package/browser/zip_url_tls_fields.tsx b/x-pack/plugins/uptime/public/components/fleet_package/browser/zip_url_tls_fields.tsx new file mode 100644 index 0000000000000..bd5d2f3e5d4a2 --- /dev/null +++ b/x-pack/plugins/uptime/public/components/fleet_package/browser/zip_url_tls_fields.tsx @@ -0,0 +1,84 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useCallback, useEffect } from 'react'; + +import { EuiSwitch, EuiFormRow } from '@elastic/eui'; + +import { FormattedMessage } from '@kbn/i18n/react'; + +import { TLSOptions, TLSConfig } from '../common/tls_options'; +import { useBrowserSimpleFieldsContext, usePolicyConfigContext } from '../contexts'; + +import { ConfigKeys } from '../types'; + +export const ZipUrlTLSFields = () => { + const { defaultValues, setFields } = useBrowserSimpleFieldsContext(); + const { isZipUrlTLSEnabled, setIsZipUrlTLSEnabled } = usePolicyConfigContext(); + + const handleOnChange = useCallback( + (tlsConfig: TLSConfig) => { + setFields((prevFields) => ({ + ...prevFields, + [ConfigKeys.ZIP_URL_TLS_CERTIFICATE_AUTHORITIES]: tlsConfig.certificateAuthorities, + [ConfigKeys.ZIP_URL_TLS_CERTIFICATE]: tlsConfig.certificate, + [ConfigKeys.ZIP_URL_TLS_KEY]: tlsConfig.key, + [ConfigKeys.ZIP_URL_TLS_KEY_PASSPHRASE]: tlsConfig.keyPassphrase, + [ConfigKeys.ZIP_URL_TLS_VERIFICATION_MODE]: tlsConfig.verificationMode, + [ConfigKeys.ZIP_URL_TLS_VERSION]: tlsConfig.version, + })); + }, + [setFields] + ); + + useEffect(() => { + if (!isZipUrlTLSEnabled) { + setFields((prevFields) => ({ + ...prevFields, + [ConfigKeys.ZIP_URL_TLS_CERTIFICATE_AUTHORITIES]: undefined, + [ConfigKeys.ZIP_URL_TLS_CERTIFICATE]: undefined, + [ConfigKeys.ZIP_URL_TLS_KEY]: undefined, + [ConfigKeys.ZIP_URL_TLS_KEY_PASSPHRASE]: undefined, + [ConfigKeys.ZIP_URL_TLS_VERIFICATION_MODE]: undefined, + [ConfigKeys.ZIP_URL_TLS_VERSION]: undefined, + })); + } + }, [setFields, isZipUrlTLSEnabled]); + + return ( + + <> + + } + onChange={(event) => setIsZipUrlTLSEnabled(event.target.checked)} + /> + {isZipUrlTLSEnabled ? ( + + ) : null} + + + ); +}; diff --git a/x-pack/plugins/uptime/public/components/fleet_package/common/formatters.ts b/x-pack/plugins/uptime/public/components/fleet_package/common/formatters.ts index 4b30f4b4f0484..278aa1b03bab1 100644 --- a/x-pack/plugins/uptime/public/components/fleet_package/common/formatters.ts +++ b/x-pack/plugins/uptime/public/components/fleet_package/common/formatters.ts @@ -28,7 +28,7 @@ export const arrayToJsonFormatter = (value: string[] = []) => export const secondsToCronFormatter = (value: string = '') => (value ? `${value}s` : null); -export const objectToJsonFormatter = (value: Record = {}) => +export const objectToJsonFormatter = (value: Record = {}) => Object.keys(value).length ? JSON.stringify(value) : null; export const stringToJsonFormatter = (value: string = '') => (value ? JSON.stringify(value) : null); diff --git a/x-pack/plugins/uptime/public/components/fleet_package/common/tls_options.tsx b/x-pack/plugins/uptime/public/components/fleet_package/common/tls_options.tsx new file mode 100644 index 0000000000000..44a948b24823b --- /dev/null +++ b/x-pack/plugins/uptime/public/components/fleet_package/common/tls_options.tsx @@ -0,0 +1,411 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useEffect, useState, memo } from 'react'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n/react'; +import { + EuiCallOut, + EuiComboBox, + EuiComboBoxOptionOption, + EuiFormRow, + EuiTextArea, + EuiFormFieldset, + EuiSelect, + EuiScreenReaderOnly, + EuiSpacer, + EuiFieldPassword, +} from '@elastic/eui'; + +import { VerificationMode, TLSVersion } from '../types'; + +import { OptionalLabel } from '../optional_label'; + +type TLSRole = 'client' | 'server'; + +export interface TLSConfig { + certificateAuthorities?: string; + certificate?: string; + key?: string; + keyPassphrase?: string; + verificationMode?: VerificationMode; + version?: TLSVersion[]; +} + +const defaultConfig = { + certificateAuthorities: '', + certificate: '', + key: '', + keyPassphrase: '', + verificationMode: VerificationMode.STRICT, + version: [], +}; + +interface Props { + onChange: (defaultConfig: TLSConfig) => void; + defaultValues: TLSConfig; + tlsRole: TLSRole; +} + +export const TLSOptions: React.FunctionComponent = memo( + ({ onChange, defaultValues = defaultConfig, tlsRole }) => { + const [verificationVersionInputRef, setVerificationVersionInputRef] = + useState(null); + const [hasVerificationVersionError, setHasVerificationVersionError] = useState< + string | undefined + >(undefined); + + const [config, setConfig] = useState(defaultValues); + + useEffect(() => { + onChange(config); + }, [config, onChange]); + + const onVerificationVersionChange = ( + selectedVersionOptions: Array> + ) => { + setConfig((prevConfig) => ({ + ...prevConfig, + version: selectedVersionOptions.map((option) => option.label as TLSVersion), + })); + setHasVerificationVersionError(undefined); + }; + + const onSearchChange = (value: string, hasMatchingOptions?: boolean) => { + setHasVerificationVersionError( + value.length === 0 || hasMatchingOptions ? undefined : `"${value}" is not a valid option` + ); + }; + + const onBlur = () => { + if (verificationVersionInputRef) { + const { value } = verificationVersionInputRef; + setHasVerificationVersionError( + value.length === 0 ? undefined : `"${value}" is not a valid option` + ); + } + }; + + return ( + + + + + + ), + }} + > + + } + helpText={ + config.verificationMode ? verificationModeHelpText[config.verificationMode] : '' + } + > + { + const verificationMode = event.target.value as VerificationMode; + setConfig((prevConfig) => ({ + ...prevConfig, + verificationMode, + })); + }} + data-test-subj="syntheticsTLSVerificationMode" + /> + + {config.verificationMode === VerificationMode.NONE && ( + <> + + + } + color="warning" + size="s" + > +

+ +

+
+ + + )} + + } + error={hasVerificationVersionError} + isInvalid={hasVerificationVersionError !== undefined} + > + ({ + label: version, + }))} + inputRef={setVerificationVersionInputRef} + onChange={onVerificationVersionChange} + onSearchChange={onSearchChange} + onBlur={onBlur} + /> + + + } + helpText={ + + } + labelAppend={} + > + { + const certificateAuthorities = event.target.value; + setConfig((prevConfig) => ({ + ...prevConfig, + certificateAuthorities, + })); + }} + onBlur={(event) => { + const certificateAuthorities = event.target.value; + setConfig((prevConfig) => ({ + ...prevConfig, + certificateAuthorities: certificateAuthorities.trim(), + })); + }} + data-test-subj="syntheticsTLSCA" + /> + + + {tlsRoleLabels[tlsRole]}{' '} + + + } + helpText={ + + } + labelAppend={} + > + { + const certificate = event.target.value; + setConfig((prevConfig) => ({ + ...prevConfig, + certificate, + })); + }} + onBlur={(event) => { + const certificate = event.target.value; + setConfig((prevConfig) => ({ + ...prevConfig, + certificate: certificate.trim(), + })); + }} + data-test-subj="syntheticsTLSCert" + /> + + + {tlsRoleLabels[tlsRole]}{' '} + + + } + helpText={ + + } + labelAppend={} + > + { + const key = event.target.value; + setConfig((prevConfig) => ({ + ...prevConfig, + key, + })); + }} + onBlur={(event) => { + const key = event.target.value; + setConfig((prevConfig) => ({ + ...prevConfig, + key: key.trim(), + })); + }} + data-test-subj="syntheticsTLSCertKey" + /> + + + {tlsRoleLabels[tlsRole]}{' '} + + + } + helpText={ + + } + labelAppend={} + > + { + const keyPassphrase = event.target.value; + setConfig((prevConfig) => ({ + ...prevConfig, + keyPassphrase, + })); + }} + data-test-subj="syntheticsTLSCertKeyPassphrase" + /> + +
+ ); + } +); + +const tlsRoleLabels = { + client: ( + + ), + server: ( + + ), +}; + +const verificationModeHelpText = { + [VerificationMode.CERTIFICATE]: i18n.translate( + 'xpack.uptime.createPackagePolicy.stepConfigure.certsField.verificationMode.certificate.description', + { + defaultMessage: + 'Verifies that the provided certificate is signed by a trusted authority (CA), but does not perform any hostname verification.', + } + ), + [VerificationMode.FULL]: i18n.translate( + 'xpack.uptime.createPackagePolicy.stepConfigure.certsField.verificationMode.full.description', + { + defaultMessage: + 'Verifies that the provided certificate is signed by a trusted authority (CA) and also verifies that the server’s hostname (or IP address) matches the names identified within the certificate.', + } + ), + [VerificationMode.NONE]: i18n.translate( + 'xpack.uptime.createPackagePolicy.stepConfigure.certsField.verificationMode.none.description', + { + defaultMessage: + 'Performs no verification of the server’s certificate. It is primarily intended as a temporary diagnostic mechanism when attempting to resolve TLS errors; its use in production environments is strongly discouraged.', + } + ), + [VerificationMode.STRICT]: i18n.translate( + 'xpack.uptime.createPackagePolicy.stepConfigure.certsField.verificationMode.strict.description', + { + defaultMessage: + 'Verifies that the provided certificate is signed by a trusted authority (CA) and also verifies that the server’s hostname (or IP address) matches the names identified within the certificate. If the Subject Alternative Name is empty, it returns an error.', + } + ), +}; + +const verificationModeLabels = { + [VerificationMode.CERTIFICATE]: i18n.translate( + 'xpack.uptime.createPackagePolicy.stepConfigure.certsField.verificationMode.certificate.label', + { + defaultMessage: 'Certificate', + } + ), + [VerificationMode.FULL]: i18n.translate( + 'xpack.uptime.createPackagePolicy.stepConfigure.certsField.verificationMode.full.label', + { + defaultMessage: 'Full', + } + ), + [VerificationMode.NONE]: i18n.translate( + 'xpack.uptime.createPackagePolicy.stepConfigure.certsField.verificationMode.none.label', + { + defaultMessage: 'None', + } + ), + [VerificationMode.STRICT]: i18n.translate( + 'xpack.uptime.createPackagePolicy.stepConfigure.certsField.verificationMode.strict.label', + { + defaultMessage: 'Strict', + } + ), +}; + +const verificationModeOptions = [ + { + value: VerificationMode.CERTIFICATE, + text: verificationModeLabels[VerificationMode.CERTIFICATE], + }, + { value: VerificationMode.FULL, text: verificationModeLabels[VerificationMode.FULL] }, + { value: VerificationMode.NONE, text: verificationModeLabels[VerificationMode.NONE] }, + { value: VerificationMode.STRICT, text: verificationModeLabels[VerificationMode.STRICT] }, +]; + +const tlsVersionOptions = Object.values(TLSVersion).map((method) => ({ + label: method, +})); diff --git a/x-pack/plugins/uptime/public/components/fleet_package/contexts/browser_context.tsx b/x-pack/plugins/uptime/public/components/fleet_package/contexts/browser_context.tsx index 1d1493178b944..1fb1291c42893 100644 --- a/x-pack/plugins/uptime/public/components/fleet_package/contexts/browser_context.tsx +++ b/x-pack/plugins/uptime/public/components/fleet_package/contexts/browser_context.tsx @@ -8,6 +8,7 @@ import React, { createContext, useContext, useMemo, useState } from 'react'; import { IBrowserSimpleFields, ConfigKeys, DataStream } from '../types'; import { defaultValues as commonDefaultValues } from '../common/default_values'; +import { defaultValues as tlsDefaultValues } from '../tls/default_values'; interface IBrowserSimpleFieldsContext { setFields: React.Dispatch>; @@ -22,13 +23,24 @@ interface IBrowserSimpleFieldsContextProvider { export const initialValues: IBrowserSimpleFields = { ...commonDefaultValues, + [ConfigKeys.METADATA]: { + is_zip_url_tls_enabled: false, + }, [ConfigKeys.MONITOR_TYPE]: DataStream.BROWSER, [ConfigKeys.SOURCE_ZIP_URL]: '', [ConfigKeys.SOURCE_ZIP_USERNAME]: '', [ConfigKeys.SOURCE_ZIP_PASSWORD]: '', [ConfigKeys.SOURCE_ZIP_FOLDER]: '', + [ConfigKeys.SOURCE_ZIP_PROXY_URL]: '', [ConfigKeys.SOURCE_INLINE]: '', [ConfigKeys.PARAMS]: '', + [ConfigKeys.ZIP_URL_TLS_CERTIFICATE_AUTHORITIES]: + tlsDefaultValues[ConfigKeys.TLS_CERTIFICATE_AUTHORITIES], + [ConfigKeys.ZIP_URL_TLS_CERTIFICATE]: tlsDefaultValues[ConfigKeys.TLS_CERTIFICATE], + [ConfigKeys.ZIP_URL_TLS_KEY]: tlsDefaultValues[ConfigKeys.TLS_KEY], + [ConfigKeys.ZIP_URL_TLS_KEY_PASSPHRASE]: tlsDefaultValues[ConfigKeys.TLS_KEY_PASSPHRASE], + [ConfigKeys.ZIP_URL_TLS_VERIFICATION_MODE]: tlsDefaultValues[ConfigKeys.TLS_VERIFICATION_MODE], + [ConfigKeys.ZIP_URL_TLS_VERSION]: tlsDefaultValues[ConfigKeys.TLS_VERSION], }; const defaultContext: IBrowserSimpleFieldsContext = { diff --git a/x-pack/plugins/uptime/public/components/fleet_package/contexts/http_context.tsx b/x-pack/plugins/uptime/public/components/fleet_package/contexts/http_context.tsx index d8b89a1dfc4d0..c29080cfcaf90 100644 --- a/x-pack/plugins/uptime/public/components/fleet_package/contexts/http_context.tsx +++ b/x-pack/plugins/uptime/public/components/fleet_package/contexts/http_context.tsx @@ -22,6 +22,9 @@ interface IHTTPSimpleFieldsContextProvider { export const initialValues: IHTTPSimpleFields = { ...commonDefaultValues, + [ConfigKeys.METADATA]: { + is_tls_enabled: false, + }, [ConfigKeys.URLS]: '', [ConfigKeys.MAX_REDIRECTS]: '0', [ConfigKeys.MONITOR_TYPE]: DataStream.HTTP, diff --git a/x-pack/plugins/uptime/public/components/fleet_package/contexts/index.ts b/x-pack/plugins/uptime/public/components/fleet_package/contexts/index.ts index 4d76a6d8f8d67..3d08dec46a4be 100644 --- a/x-pack/plugins/uptime/public/components/fleet_package/contexts/index.ts +++ b/x-pack/plugins/uptime/public/components/fleet_package/contexts/index.ts @@ -5,11 +5,11 @@ * 2.0. */ export { - MonitorTypeContext, - MonitorTypeContextProvider, + PolicyConfigContext, + PolicyConfigContextProvider, initialValue as defaultMonitorType, - useMonitorTypeContext, -} from './monitor_type_context'; + usePolicyConfigContext, +} from './policy_config_context'; export { HTTPSimpleFieldsContext, HTTPSimpleFieldsContextProvider, diff --git a/x-pack/plugins/uptime/public/components/fleet_package/contexts/monitor_type_context.tsx b/x-pack/plugins/uptime/public/components/fleet_package/contexts/monitor_type_context.tsx deleted file mode 100644 index 6e9a5de83c2fe..0000000000000 --- a/x-pack/plugins/uptime/public/components/fleet_package/contexts/monitor_type_context.tsx +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React, { createContext, useContext, useMemo, useState } from 'react'; -import { DataStream } from '../types'; - -interface IMonitorTypeFieldsContext { - setMonitorType: React.Dispatch>; - monitorType: DataStream; - defaultValue: DataStream; -} - -interface IMonitorTypeFieldsContextProvider { - children: React.ReactNode; - defaultValue?: DataStream; -} - -export const initialValue = DataStream.HTTP; - -const defaultContext: IMonitorTypeFieldsContext = { - setMonitorType: (_monitorType: React.SetStateAction) => { - throw new Error('setMonitorType was not initialized, set it when you invoke the context'); - }, - monitorType: initialValue, // mutable - defaultValue: initialValue, // immutable -}; - -export const MonitorTypeContext = createContext(defaultContext); - -export const MonitorTypeContextProvider = ({ - children, - defaultValue = initialValue, -}: IMonitorTypeFieldsContextProvider) => { - const [monitorType, setMonitorType] = useState(defaultValue); - - const value = useMemo(() => { - return { monitorType, setMonitorType, defaultValue }; - }, [monitorType, defaultValue]); - - return ; -}; - -export const useMonitorTypeContext = () => useContext(MonitorTypeContext); diff --git a/x-pack/plugins/uptime/public/components/fleet_package/contexts/policy_config_context.tsx b/x-pack/plugins/uptime/public/components/fleet_package/contexts/policy_config_context.tsx new file mode 100644 index 0000000000000..535a415c9a43d --- /dev/null +++ b/x-pack/plugins/uptime/public/components/fleet_package/contexts/policy_config_context.tsx @@ -0,0 +1,86 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { createContext, useContext, useMemo, useState } from 'react'; +import { DataStream } from '../types'; + +interface IPolicyConfigContext { + setMonitorType: React.Dispatch>; + setIsTLSEnabled: React.Dispatch>; + setIsZipUrlTLSEnabled: React.Dispatch>; + monitorType: DataStream; + defaultMonitorType: DataStream; + isTLSEnabled?: boolean; + isZipUrlTLSEnabled?: boolean; + defaultIsTLSEnabled?: boolean; + defaultIsZipUrlTLSEnabled?: boolean; +} + +interface IPolicyConfigContextProvider { + children: React.ReactNode; + defaultMonitorType?: DataStream; + defaultIsTLSEnabled?: boolean; + defaultIsZipUrlTLSEnabled?: boolean; +} + +export const initialValue = DataStream.HTTP; + +const defaultContext: IPolicyConfigContext = { + setMonitorType: (_monitorType: React.SetStateAction) => { + throw new Error('setMonitorType was not initialized, set it when you invoke the context'); + }, + setIsTLSEnabled: (_isTLSEnabled: React.SetStateAction) => { + throw new Error('setIsTLSEnabled was not initialized, set it when you invoke the context'); + }, + setIsZipUrlTLSEnabled: (_isZipUrlTLSEnabled: React.SetStateAction) => { + throw new Error( + 'setIsZipUrlTLSEnabled was not initialized, set it when you invoke the context' + ); + }, + monitorType: initialValue, // mutable + defaultMonitorType: initialValue, // immutable, + defaultIsTLSEnabled: false, + defaultIsZipUrlTLSEnabled: false, +}; + +export const PolicyConfigContext = createContext(defaultContext); + +export const PolicyConfigContextProvider = ({ + children, + defaultMonitorType = initialValue, + defaultIsTLSEnabled = false, + defaultIsZipUrlTLSEnabled = false, +}: IPolicyConfigContextProvider) => { + const [monitorType, setMonitorType] = useState(defaultMonitorType); + const [isTLSEnabled, setIsTLSEnabled] = useState(defaultIsTLSEnabled); + const [isZipUrlTLSEnabled, setIsZipUrlTLSEnabled] = useState(defaultIsZipUrlTLSEnabled); + + const value = useMemo(() => { + return { + monitorType, + setMonitorType, + defaultMonitorType, + isTLSEnabled, + isZipUrlTLSEnabled, + setIsTLSEnabled, + setIsZipUrlTLSEnabled, + defaultIsTLSEnabled, + defaultIsZipUrlTLSEnabled, + }; + }, [ + monitorType, + defaultMonitorType, + isTLSEnabled, + isZipUrlTLSEnabled, + defaultIsTLSEnabled, + defaultIsZipUrlTLSEnabled, + ]); + + return ; +}; + +export const usePolicyConfigContext = () => useContext(PolicyConfigContext); diff --git a/x-pack/plugins/uptime/public/components/fleet_package/contexts/tcp_context.tsx b/x-pack/plugins/uptime/public/components/fleet_package/contexts/tcp_context.tsx index a1e01cb7faab7..c084ea757035f 100644 --- a/x-pack/plugins/uptime/public/components/fleet_package/contexts/tcp_context.tsx +++ b/x-pack/plugins/uptime/public/components/fleet_package/contexts/tcp_context.tsx @@ -22,6 +22,9 @@ interface ITCPSimpleFieldsContextProvider { export const initialValues: ITCPSimpleFields = { ...commonDefaultValues, + [ConfigKeys.METADATA]: { + is_tls_enabled: false, + }, [ConfigKeys.HOSTS]: '', [ConfigKeys.MONITOR_TYPE]: DataStream.TCP, }; diff --git a/x-pack/plugins/uptime/public/components/fleet_package/contexts/tls_fields_context.tsx b/x-pack/plugins/uptime/public/components/fleet_package/contexts/tls_fields_context.tsx index 2a88b8c88e96c..e754d0ca03257 100644 --- a/x-pack/plugins/uptime/public/components/fleet_package/contexts/tls_fields_context.tsx +++ b/x-pack/plugins/uptime/public/components/fleet_package/contexts/tls_fields_context.tsx @@ -6,7 +6,8 @@ */ import React, { createContext, useContext, useMemo, useState } from 'react'; -import { ITLSFields, ConfigKeys, TLSVersion, VerificationMode } from '../types'; +import { ITLSFields } from '../types'; +import { defaultValues as tlsDefaultValues } from '../tls/default_values'; interface ITLSFieldsContext { setFields: React.Dispatch>; @@ -19,32 +20,7 @@ interface ITLSFieldsContextProvider { defaultValues?: ITLSFields; } -export const initialValues: ITLSFields = { - [ConfigKeys.TLS_CERTIFICATE_AUTHORITIES]: { - value: '', - isEnabled: false, - }, - [ConfigKeys.TLS_CERTIFICATE]: { - value: '', - isEnabled: false, - }, - [ConfigKeys.TLS_KEY]: { - value: '', - isEnabled: false, - }, - [ConfigKeys.TLS_KEY_PASSPHRASE]: { - value: '', - isEnabled: false, - }, - [ConfigKeys.TLS_VERIFICATION_MODE]: { - value: VerificationMode.FULL, - isEnabled: false, - }, - [ConfigKeys.TLS_VERSION]: { - value: [TLSVersion.ONE_ONE, TLSVersion.ONE_TWO, TLSVersion.ONE_THREE], - isEnabled: false, - }, -}; +export const initialValues: ITLSFields = tlsDefaultValues; const defaultContext: ITLSFieldsContext = { setFields: (_fields: React.SetStateAction) => { diff --git a/x-pack/plugins/uptime/public/components/fleet_package/custom_fields.test.tsx b/x-pack/plugins/uptime/public/components/fleet_package/custom_fields.test.tsx index 3a13be1aa3f68..f16e72837b343 100644 --- a/x-pack/plugins/uptime/public/components/fleet_package/custom_fields.test.tsx +++ b/x-pack/plugins/uptime/public/components/fleet_package/custom_fields.test.tsx @@ -14,7 +14,7 @@ import { HTTPContextProvider, BrowserContextProvider, ICMPSimpleFieldsContextProvider, - MonitorTypeContextProvider, + PolicyConfigContextProvider, TLSFieldsContextProvider, } from './contexts'; import { CustomFields } from './custom_fields'; @@ -24,9 +24,27 @@ import { defaultConfig } from './synthetics_policy_create_extension'; // ensures that fields appropriately match to their label jest.mock('@elastic/eui/lib/services/accessibility/html_id_generator', () => ({ + ...jest.requireActual('@elastic/eui/lib/services/accessibility/html_id_generator'), htmlIdGenerator: () => () => `id-${Math.random()}`, })); +jest.mock('../../../../../../src/plugins/kibana_react/public', () => { + const original = jest.requireActual('../../../../../../src/plugins/kibana_react/public'); + return { + ...original, + // Mocking CodeEditor, which uses React Monaco under the hood + CodeEditor: (props: any) => ( + { + props.onChange(e.jsonContent); + }} + /> + ), + }; +}); + const defaultValidation = centralValidation[DataStream.HTTP]; const defaultHTTPConfig = defaultConfig[DataStream.HTTP]; @@ -40,7 +58,7 @@ describe('', () => { }) => { return ( - + @@ -54,7 +72,7 @@ describe('', () => { - + ); }; @@ -124,15 +142,11 @@ describe('', () => { expect(verificationMode).toBeInTheDocument(); await waitFor(() => { - expect(ca.value).toEqual(defaultHTTPConfig[ConfigKeys.TLS_CERTIFICATE_AUTHORITIES].value); - expect(clientKey.value).toEqual(defaultHTTPConfig[ConfigKeys.TLS_KEY].value); - expect(clientKeyPassphrase.value).toEqual( - defaultHTTPConfig[ConfigKeys.TLS_KEY_PASSPHRASE].value - ); - expect(clientCertificate.value).toEqual(defaultHTTPConfig[ConfigKeys.TLS_CERTIFICATE].value); - expect(verificationMode.value).toEqual( - defaultHTTPConfig[ConfigKeys.TLS_VERIFICATION_MODE].value - ); + expect(ca.value).toEqual(defaultHTTPConfig[ConfigKeys.TLS_CERTIFICATE_AUTHORITIES]); + expect(clientKey.value).toEqual(defaultHTTPConfig[ConfigKeys.TLS_KEY]); + expect(clientKeyPassphrase.value).toEqual(defaultHTTPConfig[ConfigKeys.TLS_KEY_PASSPHRASE]); + expect(clientCertificate.value).toEqual(defaultHTTPConfig[ConfigKeys.TLS_CERTIFICATE]); + expect(verificationMode.value).toEqual(defaultHTTPConfig[ConfigKeys.TLS_VERIFICATION_MODE]); }); }); @@ -182,6 +196,9 @@ describe('', () => { expect(queryByLabelText('URL')).not.toBeInTheDocument(); expect(queryByLabelText('Max redirects')).not.toBeInTheDocument(); + // expect tls options to be available for TCP + expect(queryByLabelText('Enable TLS configuration')).toBeInTheDocument(); + // ensure at least one tcp advanced option is present let advancedOptionsButton = getByText('Advanced TCP options'); fireEvent.click(advancedOptionsButton); @@ -194,6 +211,9 @@ describe('', () => { // expect ICMP fields to be in the DOM expect(getByLabelText('Wait in seconds')).toBeInTheDocument(); + // expect tls options not be available for ICMP + expect(queryByLabelText('Enable TLS configuration')).not.toBeInTheDocument(); + // expect TCP fields not to be in the DOM expect(queryByLabelText('Proxy URL')).not.toBeInTheDocument(); @@ -209,6 +229,10 @@ describe('', () => { ) ).toBeInTheDocument(); + // expect tls options to be available for browser + expect(queryByLabelText('Zip Proxy URL')).toBeInTheDocument(); + expect(queryByLabelText('Enable TLS configuration for Zip URL')).toBeInTheDocument(); + // ensure at least one browser advanced option is present advancedOptionsButton = getByText('Advanced Browser options'); fireEvent.click(advancedOptionsButton); diff --git a/x-pack/plugins/uptime/public/components/fleet_package/custom_fields.tsx b/x-pack/plugins/uptime/public/components/fleet_package/custom_fields.tsx index d641df9c44c5f..7323464f3e9dd 100644 --- a/x-pack/plugins/uptime/public/components/fleet_package/custom_fields.tsx +++ b/x-pack/plugins/uptime/public/components/fleet_package/custom_fields.tsx @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import React, { useState, useMemo, memo } from 'react'; +import React, { useMemo, memo } from 'react'; import { FormattedMessage } from '@kbn/i18n/react'; import { EuiFlexGroup, @@ -14,13 +14,13 @@ import { EuiSelect, EuiSpacer, EuiDescribedFormGroup, - EuiCheckbox, + EuiSwitch, EuiCallOut, EuiLink, } from '@elastic/eui'; import { ConfigKeys, DataStream, Validation } from './types'; -import { useMonitorTypeContext } from './contexts'; -import { TLSFields, TLSRole } from './tls_fields'; +import { usePolicyConfigContext } from './contexts'; +import { TLSFields } from './tls_fields'; import { HTTPSimpleFields } from './http/simple_fields'; import { HTTPAdvancedFields } from './http/advanced_fields'; import { TCPSimpleFields } from './tcp/simple_fields'; @@ -31,168 +31,159 @@ import { BrowserAdvancedFields } from './browser/advanced_fields'; interface Props { typeEditable?: boolean; - isTLSEnabled?: boolean; validate: Validation; dataStreams?: DataStream[]; } -export const CustomFields = memo( - ({ - typeEditable = false, - isTLSEnabled: defaultIsTLSEnabled = false, - validate, - dataStreams = [], - }) => { - const [isTLSEnabled, setIsTLSEnabled] = useState(defaultIsTLSEnabled); - const { monitorType, setMonitorType } = useMonitorTypeContext(); +export const CustomFields = memo(({ typeEditable = false, validate, dataStreams = [] }) => { + const { monitorType, setMonitorType, isTLSEnabled, setIsTLSEnabled } = usePolicyConfigContext(); - const isHTTP = monitorType === DataStream.HTTP; - const isTCP = monitorType === DataStream.TCP; - const isBrowser = monitorType === DataStream.BROWSER; + const isHTTP = monitorType === DataStream.HTTP; + const isTCP = monitorType === DataStream.TCP; + const isBrowser = monitorType === DataStream.BROWSER; - const dataStreamOptions = useMemo(() => { - const dataStreamToString = [ - { value: DataStream.HTTP, text: 'HTTP' }, - { value: DataStream.TCP, text: 'TCP' }, - { value: DataStream.ICMP, text: 'ICMP' }, - { value: DataStream.BROWSER, text: 'Browser' }, - ]; - return dataStreamToString.filter((dataStream) => dataStreams.includes(dataStream.value)); - }, [dataStreams]); + const dataStreamOptions = useMemo(() => { + const dataStreamToString = [ + { value: DataStream.HTTP, text: 'HTTP' }, + { value: DataStream.TCP, text: 'TCP' }, + { value: DataStream.ICMP, text: 'ICMP' }, + { value: DataStream.BROWSER, text: 'Browser' }, + ]; + return dataStreamToString.filter((dataStream) => dataStreams.includes(dataStream.value)); + }, [dataStreams]); - const renderSimpleFields = (type: DataStream) => { - switch (type) { - case DataStream.HTTP: - return ; - case DataStream.ICMP: - return ; - case DataStream.TCP: - return ; - case DataStream.BROWSER: - return ; - default: - return null; - } - }; + const renderSimpleFields = (type: DataStream) => { + switch (type) { + case DataStream.HTTP: + return ; + case DataStream.ICMP: + return ; + case DataStream.TCP: + return ; + case DataStream.BROWSER: + return ; + default: + return null; + } + }; - return ( - + return ( + + + +

+ } + description={ + + } + data-test-subj="monitorSettingsSection" + > + + + {typeEditable && ( + + } + isInvalid={ + !!validate[ConfigKeys.MONITOR_TYPE]?.({ + [ConfigKeys.MONITOR_TYPE]: monitorType, + }) + } + error={ + + } + > + setMonitorType(event.target.value as DataStream)} + data-test-subj="syntheticsMonitorTypeField" + /> + + )} + + {isBrowser && ( + + + + ), + }} + /> + } + iconType="help" + size="s" + /> + )} + + {renderSimpleFields(monitorType)} + + + + {(isHTTP || isTCP) && ( } description={ } - data-test-subj="monitorSettingsSection" > - - - {typeEditable && ( - - } - isInvalid={ - !!validate[ConfigKeys.MONITOR_TYPE]?.({ - [ConfigKeys.MONITOR_TYPE]: monitorType, - }) - } - error={ - - } - > - setMonitorType(event.target.value as DataStream)} - data-test-subj="syntheticsMonitorTypeField" - /> - - )} - - {isBrowser && ( - - - - ), - }} - /> - } - iconType="help" - size="s" - /> - )} - - {renderSimpleFields(monitorType)} - - - - {(isHTTP || isTCP) && ( - - - - } - description={ + } - data-test-subj="syntheticsIsTLSEnabled" - > - - } - onChange={(event) => setIsTLSEnabled(event.target.checked)} - /> - - - )} - - {isHTTP && } - {isTCP && } - {isBrowser && } - - ); - } -); + onChange={(event) => setIsTLSEnabled(event.target.checked)} + /> + + + )} + + {isHTTP && } + {isTCP && } + {isBrowser && } + + ); +}); diff --git a/x-pack/plugins/uptime/public/components/fleet_package/http/advanced_fields.test.tsx b/x-pack/plugins/uptime/public/components/fleet_package/http/advanced_fields.test.tsx index 69c1d897f7847..0b434b6677353 100644 --- a/x-pack/plugins/uptime/public/components/fleet_package/http/advanced_fields.test.tsx +++ b/x-pack/plugins/uptime/public/components/fleet_package/http/advanced_fields.test.tsx @@ -20,6 +20,23 @@ jest.mock('@elastic/eui/lib/services/accessibility/html_id_generator', () => ({ htmlIdGenerator: () => () => `id-${Math.random()}`, })); +jest.mock('../../../../../../../src/plugins/kibana_react/public', () => { + const original = jest.requireActual('../../../../../../../src/plugins/kibana_react/public'); + return { + ...original, + // Mocking CodeEditor, which uses React Monaco under the hood + CodeEditor: (props: any) => ( + { + props.onChange(e.jsonContent); + }} + /> + ), + }; +}); + const defaultValidation = centralValidation[DataStream.HTTP]; describe('', () => { diff --git a/x-pack/plugins/uptime/public/components/fleet_package/http/formatters.ts b/x-pack/plugins/uptime/public/components/fleet_package/http/formatters.ts index 226874ec41442..0c27eb3be1a2d 100644 --- a/x-pack/plugins/uptime/public/components/fleet_package/http/formatters.ts +++ b/x-pack/plugins/uptime/public/components/fleet_package/http/formatters.ts @@ -17,6 +17,7 @@ import { tlsFormatters } from '../tls/formatters'; export type HTTPFormatMap = Record; export const httpFormatters: HTTPFormatMap = { + [ConfigKeys.METADATA]: (fields) => objectToJsonFormatter(fields[ConfigKeys.METADATA]), [ConfigKeys.URLS]: null, [ConfigKeys.MAX_REDIRECTS]: null, [ConfigKeys.USERNAME]: null, diff --git a/x-pack/plugins/uptime/public/components/fleet_package/http/normalizers.ts b/x-pack/plugins/uptime/public/components/fleet_package/http/normalizers.ts index ca86fd5bdc35b..e6e9b5121bf2c 100644 --- a/x-pack/plugins/uptime/public/components/fleet_package/http/normalizers.ts +++ b/x-pack/plugins/uptime/public/components/fleet_package/http/normalizers.ts @@ -31,6 +31,7 @@ export const getHTTPJsonToJavascriptNormalizer = (key: ConfigKeys) => { }; export const httpNormalizers: HTTPNormalizerMap = { + [ConfigKeys.METADATA]: getHTTPJsonToJavascriptNormalizer(ConfigKeys.METADATA), [ConfigKeys.URLS]: getHTTPNormalizer(ConfigKeys.URLS), [ConfigKeys.MAX_REDIRECTS]: getHTTPNormalizer(ConfigKeys.MAX_REDIRECTS), [ConfigKeys.USERNAME]: getHTTPNormalizer(ConfigKeys.USERNAME), diff --git a/x-pack/plugins/uptime/public/components/fleet_package/request_body_field.test.tsx b/x-pack/plugins/uptime/public/components/fleet_package/request_body_field.test.tsx index d6f25449a98c0..c3bc20076bc2f 100644 --- a/x-pack/plugins/uptime/public/components/fleet_package/request_body_field.test.tsx +++ b/x-pack/plugins/uptime/public/components/fleet_package/request_body_field.test.tsx @@ -17,6 +17,23 @@ jest.mock('@elastic/eui/lib/services/accessibility/html_id_generator', () => ({ htmlIdGenerator: () => () => `id-${Math.random()}`, })); +jest.mock('../../../../../../src/plugins/kibana_react/public', () => { + const original = jest.requireActual('../../../../../../src/plugins/kibana_react/public'); + return { + ...original, + // Mocking CodeEditor, which uses React Monaco under the hood + CodeEditor: (props: any) => ( + { + props.onChange(e.jsonContent); + }} + /> + ), + }; +}); + describe('', () => { const defaultMode = Mode.PLAINTEXT; const defaultValue = 'sample value'; diff --git a/x-pack/plugins/uptime/public/components/fleet_package/synthetics_policy_create_extension.tsx b/x-pack/plugins/uptime/public/components/fleet_package/synthetics_policy_create_extension.tsx index 60f8021b1bcb0..3db7ac424e651 100644 --- a/x-pack/plugins/uptime/public/components/fleet_package/synthetics_policy_create_extension.tsx +++ b/x-pack/plugins/uptime/public/components/fleet_package/synthetics_policy_create_extension.tsx @@ -18,7 +18,7 @@ import { BrowserFields, } from './types'; import { - useMonitorTypeContext, + usePolicyConfigContext, useTCPSimpleFieldsContext, useTCPAdvancedFieldsContext, useICMPSimpleFieldsContext, @@ -55,6 +55,7 @@ export const defaultConfig: PolicyConfig = { [DataStream.BROWSER]: { ...defaultBrowserSimpleFields, ...defaultBrowserAdvancedFields, + ...defaultTLSFields, }, }; @@ -64,7 +65,7 @@ export const defaultConfig: PolicyConfig = { */ export const SyntheticsPolicyCreateExtension = memo( ({ newPolicy, onChange }) => { - const { monitorType } = useMonitorTypeContext(); + const { monitorType, isTLSEnabled, isZipUrlTLSEnabled } = usePolicyConfigContext(); const { fields: httpSimpleFields } = useHTTPSimpleFieldsContext(); const { fields: tcpSimpleFields } = useTCPSimpleFieldsContext(); const { fields: icmpSimpleFields } = useICMPSimpleFieldsContext(); @@ -74,17 +75,27 @@ export const SyntheticsPolicyCreateExtension = memo ({ + is_tls_enabled: isTLSEnabled, + is_zip_url_tls_enabled: isZipUrlTLSEnabled, + }), + [isTLSEnabled, isZipUrlTLSEnabled] + ); + const policyConfig: PolicyConfig = { [DataStream.HTTP]: { ...httpSimpleFields, ...httpAdvancedFields, ...tlsFields, + [ConfigKeys.METADATA]: metaData, [ConfigKeys.NAME]: newPolicy.name, } as HTTPFields, [DataStream.TCP]: { ...tcpSimpleFields, ...tcpAdvancedFields, ...tlsFields, + [ConfigKeys.METADATA]: metaData, [ConfigKeys.NAME]: newPolicy.name, } as TCPFields, [DataStream.ICMP]: { @@ -94,6 +105,8 @@ export const SyntheticsPolicyCreateExtension = memo ({ + ...jest.requireActual('@elastic/eui/lib/services/accessibility/html_id_generator'), htmlIdGenerator: () => () => `id-${Math.random()}`, })); -jest.mock('./code_editor', () => ({ - CodeEditor: () =>
code editor mock
, -})); +jest.mock('../../../../../../src/plugins/kibana_react/public', () => { + const original = jest.requireActual('../../../../../../src/plugins/kibana_react/public'); + return { + ...original, + // Mocking CodeEditor, which uses React Monaco under the hood + CodeEditor: (props: any) => ( + { + props.onChange(e.jsonContent); + }} + /> + ), + }; +}); const defaultNewPolicy: NewPackagePolicy = { name: 'samplePolicyName', @@ -43,6 +57,10 @@ const defaultNewPolicy: NewPackagePolicy = { dataset: 'http', }, vars: { + __ui: { + value: JSON.stringify({ is_tls_enabled: true }), + type: 'yaml', + }, type: { value: 'http', type: 'text', @@ -736,51 +754,6 @@ describe('', () => { const { findByLabelText, queryByLabelText } = render(); const enableSSL = queryByLabelText('Enable TLS configuration') as HTMLInputElement; - await waitFor(() => { - expect(onChange).toBeCalledWith({ - isValid: false, - updatedPolicy: { - ...defaultNewPolicy, - inputs: [ - { - ...defaultNewPolicy.inputs[0], - streams: [ - { - ...defaultNewPolicy.inputs[0].streams[0], - vars: { - ...defaultNewPolicy.inputs[0].streams[0].vars, - [ConfigKeys.TLS_CERTIFICATE_AUTHORITIES]: { - value: null, - type: 'yaml', - }, - [ConfigKeys.TLS_CERTIFICATE]: { - value: null, - type: 'yaml', - }, - [ConfigKeys.TLS_KEY]: { - value: null, - type: 'yaml', - }, - [ConfigKeys.TLS_KEY_PASSPHRASE]: { - value: null, - type: 'text', - }, - [ConfigKeys.TLS_VERIFICATION_MODE]: { - value: null, - type: 'text', - }, - }, - }, - ], - }, - defaultNewPolicy.inputs[1], - defaultNewPolicy.inputs[2], - defaultNewPolicy.inputs[3], - ], - }, - }); - }); - // ensure at least one http advanced option is present fireEvent.click(enableSSL); @@ -794,27 +767,23 @@ describe('', () => { await waitFor(() => { fireEvent.change(ca, { target: { value: 'certificateAuthorities' } }); - expect(ca.value).toEqual(defaultHTTPConfig[ConfigKeys.TLS_CERTIFICATE_AUTHORITIES].value); + expect(ca.value).toEqual(defaultHTTPConfig[ConfigKeys.TLS_CERTIFICATE_AUTHORITIES]); }); await waitFor(() => { fireEvent.change(clientCertificate, { target: { value: 'clientCertificate' } }); - expect(clientCertificate.value).toEqual(defaultHTTPConfig[ConfigKeys.TLS_KEY].value); + expect(clientCertificate.value).toEqual(defaultHTTPConfig[ConfigKeys.TLS_KEY]); }); await waitFor(() => { fireEvent.change(clientKey, { target: { value: 'clientKey' } }); - expect(clientKey.value).toEqual(defaultHTTPConfig[ConfigKeys.TLS_KEY].value); + expect(clientKey.value).toEqual(defaultHTTPConfig[ConfigKeys.TLS_KEY]); }); await waitFor(() => { fireEvent.change(clientKeyPassphrase, { target: { value: 'clientKeyPassphrase' } }); - expect(clientKeyPassphrase.value).toEqual( - defaultHTTPConfig[ConfigKeys.TLS_KEY_PASSPHRASE].value - ); + expect(clientKeyPassphrase.value).toEqual(defaultHTTPConfig[ConfigKeys.TLS_KEY_PASSPHRASE]); }); await waitFor(() => { fireEvent.change(verificationMode, { target: { value: VerificationMode.NONE } }); - expect(verificationMode.value).toEqual( - defaultHTTPConfig[ConfigKeys.TLS_VERIFICATION_MODE].value - ); + expect(verificationMode.value).toEqual(defaultHTTPConfig[ConfigKeys.TLS_VERIFICATION_MODE]); }); await waitFor(() => { diff --git a/x-pack/plugins/uptime/public/components/fleet_package/synthetics_policy_create_extension_wrapper.tsx b/x-pack/plugins/uptime/public/components/fleet_package/synthetics_policy_create_extension_wrapper.tsx index c845abc3320c2..c3b2b632850be 100644 --- a/x-pack/plugins/uptime/public/components/fleet_package/synthetics_policy_create_extension_wrapper.tsx +++ b/x-pack/plugins/uptime/public/components/fleet_package/synthetics_policy_create_extension_wrapper.tsx @@ -9,7 +9,7 @@ import React, { memo } from 'react'; import { PackagePolicyCreateExtensionComponentProps } from '../../../../fleet/public'; import { SyntheticsPolicyCreateExtension } from './synthetics_policy_create_extension'; import { - MonitorTypeContextProvider, + PolicyConfigContextProvider, TCPContextProvider, ICMPSimpleFieldsContextProvider, HTTPContextProvider, @@ -24,7 +24,7 @@ import { export const SyntheticsPolicyCreateExtensionWrapper = memo(({ newPolicy, onChange }) => { return ( - + @@ -36,7 +36,7 @@ export const SyntheticsPolicyCreateExtensionWrapper = - + ); }); SyntheticsPolicyCreateExtensionWrapper.displayName = 'SyntheticsPolicyCreateExtensionWrapper'; diff --git a/x-pack/plugins/uptime/public/components/fleet_package/synthetics_policy_edit_extension.tsx b/x-pack/plugins/uptime/public/components/fleet_package/synthetics_policy_edit_extension.tsx index ec135e4e914a7..8e441d4eed6e3 100644 --- a/x-pack/plugins/uptime/public/components/fleet_package/synthetics_policy_edit_extension.tsx +++ b/x-pack/plugins/uptime/public/components/fleet_package/synthetics_policy_edit_extension.tsx @@ -5,11 +5,11 @@ * 2.0. */ -import React, { memo } from 'react'; +import React, { memo, useMemo } from 'react'; import { PackagePolicyEditExtensionComponentProps } from '../../../../fleet/public'; import { useTrackPageview } from '../../../../observability/public'; import { - useMonitorTypeContext, + usePolicyConfigContext, useTCPSimpleFieldsContext, useTCPAdvancedFieldsContext, useICMPSimpleFieldsContext, @@ -37,17 +37,17 @@ interface SyntheticsPolicyEditExtensionProps { newPolicy: PackagePolicyEditExtensionComponentProps['newPolicy']; onChange: PackagePolicyEditExtensionComponentProps['onChange']; defaultConfig: Partial; - isTLSEnabled: boolean; } + /** * Exports Synthetics-specific package policy instructions * for use in the Fleet app create / edit package policy */ export const SyntheticsPolicyEditExtension = memo( - ({ newPolicy, onChange, defaultConfig, isTLSEnabled }) => { + ({ newPolicy, onChange, defaultConfig }) => { useTrackPageview({ app: 'fleet', path: 'syntheticsEdit' }); useTrackPageview({ app: 'fleet', path: 'syntheticsEdit', delay: 15000 }); - const { monitorType } = useMonitorTypeContext(); + const { monitorType, isTLSEnabled, isZipUrlTLSEnabled } = usePolicyConfigContext(); const { fields: httpSimpleFields } = useHTTPSimpleFieldsContext(); const { fields: tcpSimpleFields } = useTCPSimpleFieldsContext(); const { fields: icmpSimpleFields } = useICMPSimpleFieldsContext(); @@ -57,17 +57,27 @@ export const SyntheticsPolicyEditExtension = memo ({ + is_tls_enabled: isTLSEnabled, + is_zip_url_tls_enabled: isZipUrlTLSEnabled, + }), + [isTLSEnabled, isZipUrlTLSEnabled] + ); + const policyConfig: PolicyConfig = { [DataStream.HTTP]: { ...httpSimpleFields, ...httpAdvancedFields, ...tlsFields, + [ConfigKeys.METADATA]: metadata, [ConfigKeys.NAME]: newPolicy.name, } as HTTPFields, [DataStream.TCP]: { ...tcpSimpleFields, ...tcpAdvancedFields, ...tlsFields, + [ConfigKeys.METADATA]: metadata, [ConfigKeys.NAME]: newPolicy.name, } as TCPFields, [DataStream.ICMP]: { @@ -77,6 +87,7 @@ export const SyntheticsPolicyEditExtension = memo; + return ; } ); SyntheticsPolicyEditExtension.displayName = 'SyntheticsPolicyEditExtension'; diff --git a/x-pack/plugins/uptime/public/components/fleet_package/synthetics_policy_edit_extension_wrapper.test.tsx b/x-pack/plugins/uptime/public/components/fleet_package/synthetics_policy_edit_extension_wrapper.test.tsx index d3c9030e85597..e874ca73d951b 100644 --- a/x-pack/plugins/uptime/public/components/fleet_package/synthetics_policy_edit_extension_wrapper.test.tsx +++ b/x-pack/plugins/uptime/public/components/fleet_package/synthetics_policy_edit_extension_wrapper.test.tsx @@ -17,12 +17,26 @@ import { defaultConfig } from './synthetics_policy_create_extension'; // ensures that fields appropriately match to their label jest.mock('@elastic/eui/lib/services/accessibility/html_id_generator', () => ({ + ...jest.requireActual('@elastic/eui/lib/services/accessibility/html_id_generator'), htmlIdGenerator: () => () => `id-${Math.random()}`, })); -jest.mock('./code_editor', () => ({ - CodeEditor: () =>
code editor mock
, -})); +jest.mock('../../../../../../src/plugins/kibana_react/public', () => { + const original = jest.requireActual('../../../../../../src/plugins/kibana_react/public'); + return { + ...original, + // Mocking CodeEditor, which uses React Monaco under the hood + CodeEditor: (props: any) => ( + { + props.onChange(e.jsonContent); + }} + /> + ), + }; +}); const defaultNewPolicy: NewPackagePolicy = { name: 'samplePolicyName', @@ -43,6 +57,10 @@ const defaultNewPolicy: NewPackagePolicy = { dataset: 'http', }, vars: { + __ui: { + value: JSON.stringify({ is_tls_enabled: true }), + type: 'yaml', + }, type: { value: 'http', type: 'text', @@ -366,10 +384,10 @@ describe('', () => { expect(timeout).toBeInTheDocument(); expect(timeout.value).toEqual(`${defaultHTTPConfig[ConfigKeys.TIMEOUT]}`); // expect TLS settings to be in the document when at least one tls key is populated - expect(enableTLSConfig.checked).toBe(true); + expect(enableTLSConfig.getAttribute('aria-checked')).toEqual('true'); expect(verificationMode).toBeInTheDocument(); expect(verificationMode.value).toEqual( - `${defaultHTTPConfig[ConfigKeys.TLS_VERIFICATION_MODE].value}` + `${defaultHTTPConfig[ConfigKeys.TLS_VERIFICATION_MODE]}` ); // ensure other monitor type options are not in the DOM @@ -555,6 +573,17 @@ describe('', () => { }); }); + it('shows tls fields when metadata.is_tls_enabled is true', async () => { + const { getByLabelText } = render(); + const verificationMode = getByLabelText('Verification mode') as HTMLInputElement; + const enableTLSConfig = getByLabelText('Enable TLS configuration') as HTMLInputElement; + expect(enableTLSConfig.getAttribute('aria-checked')).toEqual('true'); + expect(verificationMode).toBeInTheDocument(); + expect(verificationMode.value).toEqual( + `${defaultHTTPConfig[ConfigKeys.TLS_VERIFICATION_MODE]}` + ); + }); + it('handles browser validation', async () => { const currentPolicy = { ...defaultCurrentPolicy, @@ -825,7 +854,7 @@ describe('', () => { /* expect TLS settings not to be in the document when and Enable TLS settings not to be checked * when all TLS values are falsey */ - expect(enableTLSConfig.checked).toBe(false); + expect(enableTLSConfig.getAttribute('aria-checked')).toEqual('false'); expect(queryByText('Verification mode')).not.toBeInTheDocument(); // ensure other monitor type options are not in the DOM @@ -1045,4 +1074,30 @@ describe('', () => { expect(queryByLabelText('Proxy URL')).not.toBeInTheDocument(); expect(queryByLabelText('Host')).not.toBeInTheDocument(); }); + + it('hides tls fields when metadata.is_tls_enabled is false', async () => { + const { getByLabelText, queryByLabelText } = render( + + ); + const verificationMode = queryByLabelText('Verification mode'); + const enableTLSConfig = getByLabelText('Enable TLS configuration') as HTMLInputElement; + expect(enableTLSConfig.getAttribute('aria-checked')).toEqual('false'); + expect(verificationMode).not.toBeInTheDocument(); + }); }); diff --git a/x-pack/plugins/uptime/public/components/fleet_package/synthetics_policy_edit_extension_wrapper.tsx b/x-pack/plugins/uptime/public/components/fleet_package/synthetics_policy_edit_extension_wrapper.tsx index 219fa86958c34..25fce88e0c866 100644 --- a/x-pack/plugins/uptime/public/components/fleet_package/synthetics_policy_edit_extension_wrapper.tsx +++ b/x-pack/plugins/uptime/public/components/fleet_package/synthetics_policy_edit_extension_wrapper.tsx @@ -10,7 +10,7 @@ import { PackagePolicyEditExtensionComponentProps } from '../../../../fleet/publ import { PolicyConfig, ConfigKeys, DataStream, ITLSFields, ICustomFields } from './types'; import { SyntheticsPolicyEditExtension } from './synthetics_policy_edit_extension'; import { - MonitorTypeContextProvider, + PolicyConfigContextProvider, HTTPContextProvider, TCPContextProvider, ICMPSimpleFieldsContextProvider, @@ -27,12 +27,14 @@ export const SyntheticsPolicyEditExtensionWrapper = memo { const { enableTLS: isTLSEnabled, + enableZipUrlTLS: isZipUrlTLSEnabled, fullConfig: fullDefaultConfig, monitorTypeConfig: defaultConfig, monitorType, tlsConfig: defaultTLSConfig, } = useMemo(() => { let enableTLS = false; + let enableZipUrlTLS = false; const getDefaultConfig = () => { // find the enabled input to identify the current monitor type const currentInput = currentPolicy.inputs.find((input) => input.enabled === true); @@ -68,7 +70,10 @@ export const SyntheticsPolicyEditExtensionWrapper = memo value?.isEnabled); + enableTLS = + formattedDefaultConfigForMonitorType[ConfigKeys.METADATA].is_tls_enabled || false; + enableZipUrlTLS = + formattedDefaultConfigForMonitorType[ConfigKeys.METADATA].is_zip_url_tls_enabled || false; const formattedDefaultConfig: Partial = { [type]: formattedDefaultConfigForMonitorType, @@ -78,8 +83,9 @@ export const SyntheticsPolicyEditExtensionWrapper = memo + @@ -97,14 +107,13 @@ export const SyntheticsPolicyEditExtensionWrapper = memo - + ); } ); diff --git a/x-pack/plugins/uptime/public/components/fleet_package/tcp/formatters.ts b/x-pack/plugins/uptime/public/components/fleet_package/tcp/formatters.ts index 2f4a43ee6becf..ce65c2c23d0d9 100644 --- a/x-pack/plugins/uptime/public/components/fleet_package/tcp/formatters.ts +++ b/x-pack/plugins/uptime/public/components/fleet_package/tcp/formatters.ts @@ -6,12 +6,13 @@ */ import { TCPFields, ConfigKeys } from '../types'; -import { Formatter, commonFormatters } from '../common/formatters'; +import { Formatter, commonFormatters, objectToJsonFormatter } from '../common/formatters'; import { tlsFormatters } from '../tls/formatters'; export type TCPFormatMap = Record; export const tcpFormatters: TCPFormatMap = { + [ConfigKeys.METADATA]: (fields) => objectToJsonFormatter(fields[ConfigKeys.METADATA]), [ConfigKeys.HOSTS]: null, [ConfigKeys.PROXY_URL]: null, [ConfigKeys.PROXY_USE_LOCAL_RESOLVER]: null, diff --git a/x-pack/plugins/uptime/public/components/fleet_package/tcp/normalizers.ts b/x-pack/plugins/uptime/public/components/fleet_package/tcp/normalizers.ts index d19aea55addf2..962bb9cc9785e 100644 --- a/x-pack/plugins/uptime/public/components/fleet_package/tcp/normalizers.ts +++ b/x-pack/plugins/uptime/public/components/fleet_package/tcp/normalizers.ts @@ -6,7 +6,12 @@ */ import { TCPFields, ConfigKeys } from '../types'; -import { Normalizer, commonNormalizers, getNormalizer } from '../common/normalizers'; +import { + Normalizer, + commonNormalizers, + getNormalizer, + getJsonToJavascriptNormalizer, +} from '../common/normalizers'; import { tlsNormalizers } from '../tls/normalizers'; import { defaultTCPSimpleFields, defaultTCPAdvancedFields } from '../contexts'; @@ -21,7 +26,12 @@ export const getTCPNormalizer = (key: ConfigKeys) => { return getNormalizer(key, defaultTCPFields); }; +export const getTCPJsonToJavascriptNormalizer = (key: ConfigKeys) => { + return getJsonToJavascriptNormalizer(key, defaultTCPFields); +}; + export const tcpNormalizers: TCPNormalizerMap = { + [ConfigKeys.METADATA]: getTCPJsonToJavascriptNormalizer(ConfigKeys.METADATA), [ConfigKeys.HOSTS]: getTCPNormalizer(ConfigKeys.HOSTS), [ConfigKeys.PROXY_URL]: getTCPNormalizer(ConfigKeys.PROXY_URL), [ConfigKeys.PROXY_USE_LOCAL_RESOLVER]: getTCPNormalizer(ConfigKeys.PROXY_USE_LOCAL_RESOLVER), diff --git a/x-pack/plugins/uptime/public/components/fleet_package/tls/default_values.ts b/x-pack/plugins/uptime/public/components/fleet_package/tls/default_values.ts new file mode 100644 index 0000000000000..6f44e2c1c22b5 --- /dev/null +++ b/x-pack/plugins/uptime/public/components/fleet_package/tls/default_values.ts @@ -0,0 +1,17 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { ITLSFields, ConfigKeys, VerificationMode, TLSVersion } from '../types'; + +export const defaultValues: ITLSFields = { + [ConfigKeys.TLS_CERTIFICATE_AUTHORITIES]: '', + [ConfigKeys.TLS_CERTIFICATE]: '', + [ConfigKeys.TLS_KEY]: '', + [ConfigKeys.TLS_KEY_PASSPHRASE]: '', + [ConfigKeys.TLS_VERIFICATION_MODE]: VerificationMode.FULL, + [ConfigKeys.TLS_VERSION]: [TLSVersion.ONE_ONE, TLSVersion.ONE_TWO, TLSVersion.ONE_THREE], +}; diff --git a/x-pack/plugins/uptime/public/components/fleet_package/tls/formatters.ts b/x-pack/plugins/uptime/public/components/fleet_package/tls/formatters.ts index a3e9af9ac12b3..1191c7b018237 100644 --- a/x-pack/plugins/uptime/public/components/fleet_package/tls/formatters.ts +++ b/x-pack/plugins/uptime/public/components/fleet_package/tls/formatters.ts @@ -24,11 +24,10 @@ export const tlsFormatters: TLSFormatMap = { }; // only add tls settings if they are enabled by the user and isEnabled is true -export const tlsValueToYamlFormatter = (tlsValue: { value?: string; isEnabled?: boolean } = {}) => - tlsValue.isEnabled && tlsValue.value ? JSON.stringify(tlsValue.value) : null; +export const tlsValueToYamlFormatter = (tlsValue: string = '') => + tlsValue ? JSON.stringify(tlsValue) : null; -export const tlsValueToStringFormatter = (tlsValue: { value?: string; isEnabled?: boolean } = {}) => - tlsValue.isEnabled && tlsValue.value ? tlsValue.value : null; +export const tlsValueToStringFormatter = (tlsValue: string = '') => tlsValue || null; -export const tlsArrayToYamlFormatter = (tlsValue: { value?: string[]; isEnabled?: boolean } = {}) => - tlsValue.isEnabled && tlsValue.value?.length ? JSON.stringify(tlsValue.value) : null; +export const tlsArrayToYamlFormatter = (tlsValue: string[] = []) => + tlsValue.length ? JSON.stringify(tlsValue) : null; diff --git a/x-pack/plugins/uptime/public/components/fleet_package/tls/normalizers.ts b/x-pack/plugins/uptime/public/components/fleet_package/tls/normalizers.ts index 2344e599d6c01..6398362220de1 100644 --- a/x-pack/plugins/uptime/public/components/fleet_package/tls/normalizers.ts +++ b/x-pack/plugins/uptime/public/components/fleet_package/tls/normalizers.ts @@ -13,17 +13,17 @@ type TLSNormalizerMap = Record; export const tlsNormalizers: TLSNormalizerMap = { [ConfigKeys.TLS_CERTIFICATE_AUTHORITIES]: (fields) => - tlsYamlToObjectNormalizer( + tlsJsonToObjectNormalizer( fields?.[ConfigKeys.TLS_CERTIFICATE_AUTHORITIES]?.value, ConfigKeys.TLS_CERTIFICATE_AUTHORITIES ), [ConfigKeys.TLS_CERTIFICATE]: (fields) => - tlsYamlToObjectNormalizer( + tlsJsonToObjectNormalizer( fields?.[ConfigKeys.TLS_CERTIFICATE]?.value, ConfigKeys.TLS_CERTIFICATE ), [ConfigKeys.TLS_KEY]: (fields) => - tlsYamlToObjectNormalizer(fields?.[ConfigKeys.TLS_KEY]?.value, ConfigKeys.TLS_KEY), + tlsJsonToObjectNormalizer(fields?.[ConfigKeys.TLS_KEY]?.value, ConfigKeys.TLS_KEY), [ConfigKeys.TLS_KEY_PASSPHRASE]: (fields) => tlsStringToObjectNormalizer( fields?.[ConfigKeys.TLS_KEY_PASSPHRASE]?.value, @@ -35,15 +35,10 @@ export const tlsNormalizers: TLSNormalizerMap = { ConfigKeys.TLS_VERIFICATION_MODE ), [ConfigKeys.TLS_VERSION]: (fields) => - tlsYamlToObjectNormalizer(fields?.[ConfigKeys.TLS_VERSION]?.value, ConfigKeys.TLS_VERSION), + tlsJsonToObjectNormalizer(fields?.[ConfigKeys.TLS_VERSION]?.value, ConfigKeys.TLS_VERSION), }; -// only add tls settings if they are enabled by the user and isEnabled is true -export const tlsStringToObjectNormalizer = (value: string = '', key: keyof ITLSFields) => ({ - value: value ?? defaultTLSFields[key]?.value, - isEnabled: Boolean(value), -}); -export const tlsYamlToObjectNormalizer = (value: string = '', key: keyof ITLSFields) => ({ - value: value ? JSON.parse(value) : defaultTLSFields[key]?.value, - isEnabled: Boolean(value), -}); +export const tlsStringToObjectNormalizer = (value: string = '', key: keyof ITLSFields) => + value ?? defaultTLSFields[key]; +export const tlsJsonToObjectNormalizer = (value: string = '', key: keyof ITLSFields) => + value ? JSON.parse(value) : defaultTLSFields[key]; diff --git a/x-pack/plugins/uptime/public/components/fleet_package/tls_fields.test.tsx b/x-pack/plugins/uptime/public/components/fleet_package/tls_fields.test.tsx index 0528438650dc3..1c9c4f4e69f43 100644 --- a/x-pack/plugins/uptime/public/components/fleet_package/tls_fields.test.tsx +++ b/x-pack/plugins/uptime/public/components/fleet_package/tls_fields.test.tsx @@ -8,9 +8,13 @@ import React from 'react'; import { fireEvent } from '@testing-library/react'; import { render } from '../../lib/helper/rtl_helpers'; -import { TLSFields, TLSRole } from './tls_fields'; +import { TLSFields } from './tls_fields'; import { ConfigKeys, VerificationMode } from './types'; -import { TLSFieldsContextProvider, defaultTLSFields as defaultValues } from './contexts'; +import { + TLSFieldsContextProvider, + PolicyConfigContextProvider, + defaultTLSFields as defaultValues, +} from './contexts'; // ensures that fields appropriately match to their label jest.mock('@elastic/eui/lib/services/accessibility/html_id_generator', () => ({ @@ -18,17 +22,13 @@ jest.mock('@elastic/eui/lib/services/accessibility/html_id_generator', () => ({ })); describe('', () => { - const WrappedComponent = ({ - tlsRole = TLSRole.CLIENT, - isEnabled = true, - }: { - tlsRole?: TLSRole; - isEnabled?: boolean; - }) => { + const WrappedComponent = ({ isEnabled = true }: { isEnabled?: boolean }) => { return ( - - - + + + + + ); }; it('renders TLSFields', () => { @@ -42,15 +42,6 @@ describe('', () => { expect(getByLabelText('Verification mode')).toBeInTheDocument(); }); - it('handles role', () => { - const { getByLabelText, rerender } = render(); - - expect(getByLabelText('Server certificate')).toBeInTheDocument(); - expect(getByLabelText('Server key')).toBeInTheDocument(); - - rerender(); - }); - it('updates fields and calls onChange', async () => { const { getByLabelText } = render(); diff --git a/x-pack/plugins/uptime/public/components/fleet_package/tls_fields.tsx b/x-pack/plugins/uptime/public/components/fleet_package/tls_fields.tsx index d2cfd65c61c37..e33b4ef3fbb1b 100644 --- a/x-pack/plugins/uptime/public/components/fleet_package/tls_fields.tsx +++ b/x-pack/plugins/uptime/public/components/fleet_package/tls_fields.tsx @@ -5,438 +5,56 @@ * 2.0. */ -import React, { useEffect, useState, memo } from 'react'; -import { i18n } from '@kbn/i18n'; -import { FormattedMessage } from '@kbn/i18n/react'; -import { - EuiCallOut, - EuiComboBox, - EuiComboBoxOptionOption, - EuiFormRow, - EuiTextArea, - EuiFormFieldset, - EuiSelect, - EuiScreenReaderOnly, - EuiSpacer, - EuiFieldPassword, -} from '@elastic/eui'; - -import { useTLSFieldsContext } from './contexts'; - -import { VerificationMode, ConfigKeys, TLSVersion } from './types'; - -import { OptionalLabel } from './optional_label'; - -export enum TLSRole { - CLIENT = 'client', - SERVER = 'server', -} - -export const TLSFields: React.FunctionComponent<{ - isEnabled: boolean; - tlsRole: TLSRole; -}> = memo(({ isEnabled, tlsRole }) => { - const { fields, setFields } = useTLSFieldsContext(); - const [verificationVersionInputRef, setVerificationVersionInputRef] = - useState(null); - const [hasVerificationVersionError, setHasVerificationVersionError] = useState< - string | undefined - >(undefined); +import React, { useCallback, useEffect } from 'react'; + +import { TLSOptions, TLSConfig } from './common/tls_options'; +import { useTLSFieldsContext, usePolicyConfigContext } from './contexts'; + +import { ConfigKeys } from './types'; + +export const TLSFields = () => { + const { defaultValues, setFields } = useTLSFieldsContext(); + const { isTLSEnabled } = usePolicyConfigContext(); + + const handleOnChange = useCallback( + (tlsConfig: TLSConfig) => { + setFields({ + [ConfigKeys.TLS_CERTIFICATE_AUTHORITIES]: tlsConfig.certificateAuthorities, + [ConfigKeys.TLS_CERTIFICATE]: tlsConfig.certificate, + [ConfigKeys.TLS_KEY]: tlsConfig.key, + [ConfigKeys.TLS_KEY_PASSPHRASE]: tlsConfig.keyPassphrase, + [ConfigKeys.TLS_VERIFICATION_MODE]: tlsConfig.verificationMode, + [ConfigKeys.TLS_VERSION]: tlsConfig.version, + }); + }, + [setFields] + ); useEffect(() => { - setFields((prevFields) => ({ - [ConfigKeys.TLS_CERTIFICATE_AUTHORITIES]: { - value: prevFields[ConfigKeys.TLS_CERTIFICATE_AUTHORITIES].value, - isEnabled, - }, - [ConfigKeys.TLS_CERTIFICATE]: { - value: prevFields[ConfigKeys.TLS_CERTIFICATE].value, - isEnabled, - }, - [ConfigKeys.TLS_KEY]: { - value: prevFields[ConfigKeys.TLS_KEY].value, - isEnabled, - }, - [ConfigKeys.TLS_KEY_PASSPHRASE]: { - value: prevFields[ConfigKeys.TLS_KEY_PASSPHRASE].value, - isEnabled, - }, - [ConfigKeys.TLS_VERIFICATION_MODE]: { - value: prevFields[ConfigKeys.TLS_VERIFICATION_MODE].value, - isEnabled, - }, - [ConfigKeys.TLS_VERSION]: { - value: prevFields[ConfigKeys.TLS_VERSION].value, - isEnabled, - }, - })); - }, [isEnabled, setFields]); - - const onVerificationVersionChange = ( - selectedVersionOptions: Array> - ) => { - setFields((prevFields) => ({ - ...prevFields, - [ConfigKeys.TLS_VERSION]: { - value: selectedVersionOptions.map((option) => option.label as TLSVersion), - isEnabled: true, - }, - })); - setHasVerificationVersionError(undefined); - }; - - const onSearchChange = (value: string, hasMatchingOptions?: boolean) => { - setHasVerificationVersionError( - value.length === 0 || hasMatchingOptions ? undefined : `"${value}" is not a valid option` - ); - }; - - const onBlur = () => { - if (verificationVersionInputRef) { - const { value } = verificationVersionInputRef; - setHasVerificationVersionError( - value.length === 0 ? undefined : `"${value}" is not a valid option` - ); - } - }; - - return isEnabled ? ( - - - - - - ), + if (!isTLSEnabled) { + setFields({ + [ConfigKeys.TLS_CERTIFICATE_AUTHORITIES]: undefined, + [ConfigKeys.TLS_CERTIFICATE]: undefined, + [ConfigKeys.TLS_KEY]: undefined, + [ConfigKeys.TLS_KEY_PASSPHRASE]: undefined, + [ConfigKeys.TLS_VERIFICATION_MODE]: undefined, + [ConfigKeys.TLS_VERSION]: undefined, + }); + } + }, [setFields, isTLSEnabled]); + + return isTLSEnabled ? ( + - - } - helpText={verificationModeHelpText[fields[ConfigKeys.TLS_VERIFICATION_MODE].value]} - > - { - const value = event.target.value as VerificationMode; - setFields((prevFields) => ({ - ...prevFields, - [ConfigKeys.TLS_VERIFICATION_MODE]: { - value, - isEnabled: true, - }, - })); - }} - data-test-subj="syntheticsTLSVerificationMode" - /> - - {fields[ConfigKeys.TLS_VERIFICATION_MODE].value === VerificationMode.NONE && ( - <> - - - } - color="warning" - size="s" - > -

- -

-
- - - )} - - } - error={hasVerificationVersionError} - isInvalid={hasVerificationVersionError !== undefined} - > - ({ - label: version, - }))} - inputRef={setVerificationVersionInputRef} - onChange={onVerificationVersionChange} - onSearchChange={onSearchChange} - onBlur={onBlur} - /> - - - } - helpText={ - - } - labelAppend={} - > - { - const value = event.target.value; - setFields((prevFields) => ({ - ...prevFields, - [ConfigKeys.TLS_CERTIFICATE_AUTHORITIES]: { - value, - isEnabled: true, - }, - })); - }} - onBlur={(event) => { - const value = event.target.value; - setFields((prevFields) => ({ - ...prevFields, - [ConfigKeys.TLS_CERTIFICATE_AUTHORITIES]: { - value: value.trim(), - isEnabled: true, - }, - })); - }} - data-test-subj="syntheticsTLSCA" - /> - - - {tlsRoleLabels[tlsRole]}{' '} - - - } - helpText={ - - } - labelAppend={} - > - { - const value = event.target.value; - setFields((prevFields) => ({ - ...prevFields, - [ConfigKeys.TLS_CERTIFICATE]: { - value, - isEnabled: true, - }, - })); - }} - onBlur={(event) => { - const value = event.target.value; - setFields((prevFields) => ({ - ...prevFields, - [ConfigKeys.TLS_CERTIFICATE]: { - value: value.trim(), - isEnabled: true, - }, - })); - }} - data-test-subj="syntheticsTLSCert" - /> - - - {tlsRoleLabels[tlsRole]}{' '} - - - } - helpText={ - - } - labelAppend={} - > - { - const value = event.target.value; - setFields((prevFields) => ({ - ...prevFields, - [ConfigKeys.TLS_KEY]: { - value, - isEnabled: true, - }, - })); - }} - onBlur={(event) => { - const value = event.target.value; - setFields((prevFields) => ({ - ...prevFields, - [ConfigKeys.TLS_KEY]: { - value: value.trim(), - isEnabled: true, - }, - })); - }} - data-test-subj="syntheticsTLSCertKey" - /> - - - {tlsRoleLabels[tlsRole]}{' '} - - - } - helpText={ - - } - labelAppend={} - > - { - const value = event.target.value; - setFields((prevFields) => ({ - ...prevFields, - [ConfigKeys.TLS_KEY_PASSPHRASE]: { - value, - isEnabled: true, - }, - })); - }} - data-test-subj="syntheticsTLSCertKeyPassphrase" - /> - -
- ) : null; -}); - -const tlsRoleLabels = { - [TLSRole.CLIENT]: ( - - ), - [TLSRole.SERVER]: ( - - ), -}; - -const verificationModeHelpText = { - [VerificationMode.CERTIFICATE]: i18n.translate( - 'xpack.uptime.createPackagePolicy.stepConfigure.certsField.verificationMode.certificate.description', - { - defaultMessage: - 'Verifies that the provided certificate is signed by a trusted authority (CA), but does not perform any hostname verification.', - } - ), - [VerificationMode.FULL]: i18n.translate( - 'xpack.uptime.createPackagePolicy.stepConfigure.certsField.verificationMode.full.description', - { - defaultMessage: - 'Verifies that the provided certificate is signed by a trusted authority (CA) and also verifies that the server’s hostname (or IP address) matches the names identified within the certificate.', - } - ), - [VerificationMode.NONE]: i18n.translate( - 'xpack.uptime.createPackagePolicy.stepConfigure.certsField.verificationMode.none.description', - { - defaultMessage: - 'Performs no verification of the server’s certificate. It is primarily intended as a temporary diagnostic mechanism when attempting to resolve TLS errors; its use in production environments is strongly discouraged.', - } - ), - [VerificationMode.STRICT]: i18n.translate( - 'xpack.uptime.createPackagePolicy.stepConfigure.certsField.verificationMode.strict.description', - { - defaultMessage: - 'Verifies that the provided certificate is signed by a trusted authority (CA) and also verifies that the server’s hostname (or IP address) matches the names identified within the certificate. If the Subject Alternative Name is empty, it returns an error.', - } - ), -}; - -const verificationModeLabels = { - [VerificationMode.CERTIFICATE]: i18n.translate( - 'xpack.uptime.createPackagePolicy.stepConfigure.certsField.verificationMode.certificate.label', - { - defaultMessage: 'Certificate', - } - ), - [VerificationMode.FULL]: i18n.translate( - 'xpack.uptime.createPackagePolicy.stepConfigure.certsField.verificationMode.full.label', - { - defaultMessage: 'Full', - } - ), - [VerificationMode.NONE]: i18n.translate( - 'xpack.uptime.createPackagePolicy.stepConfigure.certsField.verificationMode.none.label', - { - defaultMessage: 'None', - } - ), - [VerificationMode.STRICT]: i18n.translate( - 'xpack.uptime.createPackagePolicy.stepConfigure.certsField.verificationMode.strict.label', - { - defaultMessage: 'Strict', - } - ), + ) : null; }; - -const verificationModeOptions = [ - { - value: VerificationMode.CERTIFICATE, - text: verificationModeLabels[VerificationMode.CERTIFICATE], - }, - { value: VerificationMode.FULL, text: verificationModeLabels[VerificationMode.FULL] }, - { value: VerificationMode.NONE, text: verificationModeLabels[VerificationMode.NONE] }, - { value: VerificationMode.STRICT, text: verificationModeLabels[VerificationMode.STRICT] }, -]; - -const tlsVersionOptions = Object.values(TLSVersion).map((method) => ({ - label: method, -})); diff --git a/x-pack/plugins/uptime/public/components/fleet_package/types.tsx b/x-pack/plugins/uptime/public/components/fleet_package/types.tsx index db736f1bae4d2..f391c6c271f69 100644 --- a/x-pack/plugins/uptime/public/components/fleet_package/types.tsx +++ b/x-pack/plugins/uptime/public/components/fleet_package/types.tsx @@ -80,6 +80,7 @@ export enum ConfigKeys { JOURNEY_FILTERS_MATCH = 'filter_journeys.match', JOURNEY_FILTERS_TAGS = 'filter_journeys.tags', MAX_REDIRECTS = 'max_redirects', + METADATA = '__ui', MONITOR_TYPE = 'type', NAME = 'name', PARAMS = 'params', @@ -104,6 +105,7 @@ export enum ConfigKeys { SOURCE_ZIP_USERNAME = 'source.zip_url.username', SOURCE_ZIP_PASSWORD = 'source.zip_url.password', SOURCE_ZIP_FOLDER = 'source.zip_url.folder', + SOURCE_ZIP_PROXY_URL = 'source.zip_url.proxy_url', SYNTHETICS_ARGS = 'synthetics_args', TLS_CERTIFICATE_AUTHORITIES = 'ssl.certificate_authorities', TLS_CERTIFICATE = 'ssl.certificate', @@ -116,6 +118,17 @@ export enum ConfigKeys { URLS = 'urls', USERNAME = 'username', WAIT = 'wait', + ZIP_URL_TLS_CERTIFICATE_AUTHORITIES = 'source.zip_url.ssl.certificate_authorities', + ZIP_URL_TLS_CERTIFICATE = 'source.zip_url.ssl.certificate', + ZIP_URL_TLS_KEY = 'source.zip_url.ssl.key', + ZIP_URL_TLS_KEY_PASSPHRASE = 'source.zip_url.ssl.key_passphrase', + ZIP_URL_TLS_VERIFICATION_MODE = 'source.zip_url.ssl.verification_mode', + ZIP_URL_TLS_VERSION = 'source.zip_url.ssl.supported_protocols', +} + +export interface Metadata { + is_tls_enabled?: boolean; + is_zip_url_tls_enabled?: boolean; } export interface ICommonFields { @@ -127,11 +140,13 @@ export interface ICommonFields { } export type IHTTPSimpleFields = { + [ConfigKeys.METADATA]: Metadata; [ConfigKeys.MAX_REDIRECTS]: string; [ConfigKeys.URLS]: string; } & ICommonFields; export type ITCPSimpleFields = { + [ConfigKeys.METADATA]: Metadata; [ConfigKeys.HOSTS]: string; } & ICommonFields; @@ -141,30 +156,21 @@ export type IICMPSimpleFields = { } & ICommonFields; export interface ITLSFields { - [ConfigKeys.TLS_CERTIFICATE_AUTHORITIES]: { - value: string; - isEnabled: boolean; - }; - [ConfigKeys.TLS_CERTIFICATE]: { - value: string; - isEnabled: boolean; - }; - [ConfigKeys.TLS_KEY]: { - value: string; - isEnabled: boolean; - }; - [ConfigKeys.TLS_KEY_PASSPHRASE]: { - value: string; - isEnabled: boolean; - }; - [ConfigKeys.TLS_VERIFICATION_MODE]: { - value: VerificationMode; - isEnabled: boolean; - }; - [ConfigKeys.TLS_VERSION]: { - value: TLSVersion[]; - isEnabled: boolean; - }; + [ConfigKeys.TLS_CERTIFICATE_AUTHORITIES]?: string; + [ConfigKeys.TLS_CERTIFICATE]?: string; + [ConfigKeys.TLS_KEY]?: string; + [ConfigKeys.TLS_KEY_PASSPHRASE]?: string; + [ConfigKeys.TLS_VERIFICATION_MODE]?: VerificationMode; + [ConfigKeys.TLS_VERSION]?: TLSVersion[]; +} + +export interface IZipUrlTLSFields { + [ConfigKeys.ZIP_URL_TLS_CERTIFICATE_AUTHORITIES]?: ITLSFields[ConfigKeys.TLS_CERTIFICATE_AUTHORITIES]; + [ConfigKeys.ZIP_URL_TLS_CERTIFICATE]?: ITLSFields[ConfigKeys.TLS_CERTIFICATE]; + [ConfigKeys.ZIP_URL_TLS_KEY]?: ITLSFields[ConfigKeys.TLS_KEY]; + [ConfigKeys.ZIP_URL_TLS_KEY_PASSPHRASE]?: ITLSFields[ConfigKeys.TLS_KEY_PASSPHRASE]; + [ConfigKeys.ZIP_URL_TLS_VERIFICATION_MODE]?: ITLSFields[ConfigKeys.TLS_VERIFICATION_MODE]; + [ConfigKeys.ZIP_URL_TLS_VERSION]?: ITLSFields[ConfigKeys.TLS_VERSION]; } export interface IHTTPAdvancedFields { @@ -190,13 +196,16 @@ export interface ITCPAdvancedFields { } export type IBrowserSimpleFields = { + [ConfigKeys.METADATA]: Metadata; [ConfigKeys.SOURCE_INLINE]: string; [ConfigKeys.SOURCE_ZIP_URL]: string; [ConfigKeys.SOURCE_ZIP_FOLDER]: string; [ConfigKeys.SOURCE_ZIP_USERNAME]: string; [ConfigKeys.SOURCE_ZIP_PASSWORD]: string; + [ConfigKeys.SOURCE_ZIP_PROXY_URL]: string; [ConfigKeys.PARAMS]: string; -} & ICommonFields; +} & ICommonFields & + IZipUrlTLSFields; export interface IBrowserAdvancedFields { [ConfigKeys.SYNTHETICS_ARGS]: string[]; diff --git a/x-pack/plugins/uptime/public/components/fleet_package/use_update_policy.test.tsx b/x-pack/plugins/uptime/public/components/fleet_package/use_update_policy.test.tsx index 05d45da8d38ac..3bffab33adb1e 100644 --- a/x-pack/plugins/uptime/public/components/fleet_package/use_update_policy.test.tsx +++ b/x-pack/plugins/uptime/public/components/fleet_package/use_update_policy.test.tsx @@ -332,22 +332,10 @@ describe('useBarChartsHooks', () => { }; const defaultTLSFields: Partial = { - [ConfigKeys.TLS_CERTIFICATE_AUTHORITIES]: { - isEnabled: true, - value: 'ca', - }, - [ConfigKeys.TLS_CERTIFICATE]: { - isEnabled: true, - value: 'cert', - }, - [ConfigKeys.TLS_KEY]: { - isEnabled: true, - value: 'key', - }, - [ConfigKeys.TLS_KEY_PASSPHRASE]: { - isEnabled: true, - value: 'password', - }, + [ConfigKeys.TLS_CERTIFICATE_AUTHORITIES]: 'ca', + [ConfigKeys.TLS_CERTIFICATE]: 'cert', + [ConfigKeys.TLS_KEY]: 'key', + [ConfigKeys.TLS_KEY_PASSPHRASE]: 'password', }; it('handles http data stream', async () => { @@ -436,10 +424,7 @@ describe('useBarChartsHooks', () => { [ConfigKeys.RESPONSE_BODY_CHECK_NEGATIVE]: ['test'], [ConfigKeys.RESPONSE_STATUS_CHECK]: ['test'], [ConfigKeys.TAGS]: ['test'], - [ConfigKeys.TLS_VERSION]: { - value: [TLSVersion.ONE_ONE], - isEnabled: true, - }, + [ConfigKeys.TLS_VERSION]: [TLSVersion.ONE_ONE], }, }); @@ -467,10 +452,7 @@ describe('useBarChartsHooks', () => { [ConfigKeys.RESPONSE_BODY_CHECK_NEGATIVE]: [], [ConfigKeys.RESPONSE_STATUS_CHECK]: [], [ConfigKeys.TAGS]: [], - [ConfigKeys.TLS_VERSION]: { - value: [], - isEnabled: true, - }, + [ConfigKeys.TLS_VERSION]: [], }, }); diff --git a/x-pack/plugins/uptime/public/hooks/__snapshots__/use_url_params.test.tsx.snap b/x-pack/plugins/uptime/public/hooks/__snapshots__/use_url_params.test.tsx.snap index d8b148675dc62..5bac7ff7caf76 100644 --- a/x-pack/plugins/uptime/public/hooks/__snapshots__/use_url_params.test.tsx.snap +++ b/x-pack/plugins/uptime/public/hooks/__snapshots__/use_url_params.test.tsx.snap @@ -197,7 +197,7 @@ exports[`useUrlParams deletes keys that do not have truthy values 1`] = ` }, ], }, - Symbol(observable): [MockFunction], + "undefined": [MockFunction], } } > @@ -427,7 +427,7 @@ exports[`useUrlParams gets the expected values using the context 1`] = ` }, ], }, - Symbol(observable): [MockFunction], + "undefined": [MockFunction], } } > diff --git a/x-pack/plugins/uptime/public/lib/helper/test_helpers.ts b/x-pack/plugins/uptime/public/lib/helper/test_helpers.ts index 500b147860528..6a1fe15c9a6de 100644 --- a/x-pack/plugins/uptime/public/lib/helper/test_helpers.ts +++ b/x-pack/plugins/uptime/public/lib/helper/test_helpers.ts @@ -5,8 +5,6 @@ * 2.0. */ -/* global jest */ - import moment from 'moment'; import { Moment } from 'moment-timezone'; import * as redux from 'react-redux'; diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/tests/alerting/get_alert_instance_summary.ts b/x-pack/test/alerting_api_integration/security_and_spaces/tests/alerting/get_alert_instance_summary.ts index d4ca6c2aa9cd8..181e6cc940c38 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/tests/alerting/get_alert_instance_summary.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/tests/alerting/get_alert_instance_summary.ts @@ -73,6 +73,7 @@ export default function createGetAlertInstanceSummaryTests({ getService }: FtrPr 'status_start_date', 'status_end_date', 'last_run', + 'execution_duration', ]); expect(stableBody).to.eql({ name: 'abc', diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/get_alert_instance_summary.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/get_alert_instance_summary.ts index 099502e375faa..ff55c376c04b2 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/get_alert_instance_summary.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/get_alert_instance_summary.ts @@ -58,7 +58,12 @@ export default function createGetAlertInstanceSummaryTests({ getService }: FtrPr const { status_start_date: statusStartDate, status_end_date: statusEndDate } = response.body; expect(Date.parse(statusStartDate)).to.be.lessThan(Date.parse(statusEndDate)); - const stableBody = omit(response.body, ['status_start_date', 'status_end_date', 'last_run']); + const stableBody = omit(response.body, [ + 'status_start_date', + 'status_end_date', + 'last_run', + 'execution_duration', + ]); expect(stableBody).to.eql({ id: createdAlert.id, name: 'abc', @@ -91,7 +96,12 @@ export default function createGetAlertInstanceSummaryTests({ getService }: FtrPr const { status_start_date: statusStartDate, status_end_date: statusEndDate } = response.body; expect(Date.parse(statusStartDate)).to.be.lessThan(Date.parse(statusEndDate)); - const stableBody = omit(response.body, ['status_start_date', 'status_end_date', 'last_run']); + const stableBody = omit(response.body, [ + 'status_start_date', + 'status_end_date', + 'last_run', + 'execution_duration', + ]); expect(stableBody).to.eql({ id: createdAlert.id, name: 'abc', diff --git a/x-pack/test/api_integration/apis/ml/modules/recognize_module.ts b/x-pack/test/api_integration/apis/ml/modules/recognize_module.ts index 00b820a025c8b..2742fbff294c0 100644 --- a/x-pack/test/api_integration/apis/ml/modules/recognize_module.ts +++ b/x-pack/test/api_integration/apis/ml/modules/recognize_module.ts @@ -44,7 +44,7 @@ export default ({ getService }: FtrProviderContext) => { user: USER.ML_POWERUSER, expected: { responseCode: 200, - moduleIds: ['apm_jsbase', 'apm_nodejs'], + moduleIds: ['apm_jsbase', 'apm_transaction', 'apm_nodejs'], }, }, { diff --git a/x-pack/test/api_integration/apis/ml/modules/setup_module.ts b/x-pack/test/api_integration/apis/ml/modules/setup_module.ts index 6ff6b8113cb1a..c4dd529ac14f5 100644 --- a/x-pack/test/api_integration/apis/ml/modules/setup_module.ts +++ b/x-pack/test/api_integration/apis/ml/modules/setup_module.ts @@ -187,11 +187,9 @@ export default ({ getService }: FtrProviderContext) => { dashboards: [] as string[], }, }, - // Set startDatafeed and estimateModelMemory to false for the APM transaction test - // until there is a new data set available with metric data. { testTitleSuffix: - 'for apm_transaction with prefix, startDatafeed false and estimateModelMemory false', + 'for apm_transaction with prefix, startDatafeed true and estimateModelMemory true', sourceDataArchive: 'x-pack/test/functional/es_archives/ml/module_apm', indexPattern: { name: 'ft_module_apm', timeField: '@timestamp' }, module: 'apm_transaction', @@ -199,14 +197,14 @@ export default ({ getService }: FtrProviderContext) => { requestBody: { prefix: 'pf5_', indexPatternName: 'ft_module_apm', - startDatafeed: false, - estimateModelMemory: false, + startDatafeed: true, + end: Date.now(), }, expected: { responseCode: 200, jobs: [ { - jobId: 'pf5_apm_metrics', + jobId: 'pf5_high_mean_transaction_duration', jobState: JOB_STATE.CLOSED, datafeedState: DATAFEED_STATE.STOPPED, }, diff --git a/x-pack/test/apm_api_integration/common/fixtures/es_archiver/archives_metadata.ts b/x-pack/test/apm_api_integration/common/fixtures/es_archiver/archives_metadata.ts index 3382f0f8ee460..bea2b54d05eeb 100644 --- a/x-pack/test/apm_api_integration/common/fixtures/es_archiver/archives_metadata.ts +++ b/x-pack/test/apm_api_integration/common/fixtures/es_archiver/archives_metadata.ts @@ -5,8 +5,7 @@ * 2.0. */ -/* eslint-disable-next-line*/ - export default { +export default { 'apm_8.0.0': { start: '2021-08-03T06:50:15.910Z', end: '2021-08-03T07:20:15.910Z', diff --git a/x-pack/test/apm_api_integration/common/trace_data.ts b/x-pack/test/apm_api_integration/common/trace_data.ts index 9c96d3fa1e0b0..84bbb4beea4f4 100644 --- a/x-pack/test/apm_api_integration/common/trace_data.ts +++ b/x-pack/test/apm_api_integration/common/trace_data.ts @@ -6,6 +6,7 @@ */ import { + getBreakdownMetrics, getSpanDestinationMetrics, getTransactionMetrics, toElasticsearchOutput, @@ -20,7 +21,12 @@ export async function traceData(context: InheritedFtrProviderContext) { return { index: (events: any[]) => { const esEvents = toElasticsearchOutput( - events.concat(getTransactionMetrics(events)).concat(getSpanDestinationMetrics(events)), + [ + ...events, + ...getTransactionMetrics(events), + ...getSpanDestinationMetrics(events), + ...getBreakdownMetrics(events), + ], '7.14.0' ); diff --git a/x-pack/test/apm_api_integration/tests/index.ts b/x-pack/test/apm_api_integration/tests/index.ts index 49f1ae91c6282..8caae0afe746e 100644 --- a/x-pack/test/apm_api_integration/tests/index.ts +++ b/x-pack/test/apm_api_integration/tests/index.ts @@ -96,6 +96,14 @@ export default function apmApiIntegrationTests(providerContext: FtrProviderConte loadTestFile(require.resolve('./services/throughput')); }); + describe('service apis throughput', function () { + loadTestFile(require.resolve('./throughput/service_apis')); + }); + + describe('dependencies throughput', function () { + loadTestFile(require.resolve('./throughput/dependencies_apis')); + }); + describe('services/top_services', function () { loadTestFile(require.resolve('./services/top_services')); }); diff --git a/x-pack/test/apm_api_integration/tests/inspect/inspect.ts b/x-pack/test/apm_api_integration/tests/inspect/inspect.ts index 75b5a02fff800..a010c150124f0 100644 --- a/x-pack/test/apm_api_integration/tests/inspect/inspect.ts +++ b/x-pack/test/apm_api_integration/tests/inspect/inspect.ts @@ -49,7 +49,7 @@ export default function customLinksTests({ getService }: FtrProviderContext) { }, }); expect(status).to.be(200); - expect(body._inspect?.length).to.be(2); + expect(body._inspect?.length).to.be(1); // @ts-expect-error expect(Object.keys(body._inspect[0])).to.eql([ diff --git a/x-pack/test/apm_api_integration/tests/observability_overview/observability_overview.ts b/x-pack/test/apm_api_integration/tests/observability_overview/observability_overview.ts index b463db81e6c99..458372196452a 100644 --- a/x-pack/test/apm_api_integration/tests/observability_overview/observability_overview.ts +++ b/x-pack/test/apm_api_integration/tests/observability_overview/observability_overview.ts @@ -4,22 +4,58 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - +import { service, timerange } from '@elastic/apm-generator'; import expect from '@kbn/expect'; -import archives_metadata from '../../common/fixtures/es_archiver/archives_metadata'; +import { meanBy, sumBy } from 'lodash'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { registry } from '../../common/registry'; +import { PromiseReturnType } from '../../../../plugins/observability/typings/common'; +import { roundNumber } from '../../utils'; export default function ApiTest({ getService }: FtrProviderContext) { - const supertest = getService('legacySupertestAsApmReadUser'); + const apmApiClient = getService('apmApiClient'); + + const traceData = getService('traceData'); - const archiveName = 'apm_8.0.0'; - const metadata = archives_metadata[archiveName]; + const start = new Date('2021-01-01T00:00:00.000Z').getTime(); + const end = new Date('2021-01-01T00:15:00.000Z').getTime() - 1; + const intervalString = '60s'; + const bucketSize = 60; - // url parameters - const start = encodeURIComponent(metadata.start); - const end = encodeURIComponent(metadata.end); - const bucketSize = '60s'; + async function getThroughputValues() { + const commonQuery = { start: new Date(start).toISOString(), end: new Date(end).toISOString() }; + const [serviceInventoryAPIResponse, observabilityOverviewAPIResponse] = await Promise.all([ + apmApiClient.readUser({ + endpoint: 'GET /internal/apm/services', + params: { + query: { + ...commonQuery, + environment: 'ENVIRONMENT_ALL', + kuery: '', + }, + }, + }), + apmApiClient.readUser({ + endpoint: `GET /internal/apm/observability_overview`, + params: { + query: { + ...commonQuery, + bucketSize, + intervalString, + }, + }, + }), + ]); + const serviceInventoryThroughputSum = roundNumber( + sumBy(serviceInventoryAPIResponse.body.items, 'throughput') + ); + + return { + serviceInventoryCount: serviceInventoryAPIResponse.body.items.length, + serviceInventoryThroughputSum, + observabilityOverview: observabilityOverviewAPIResponse.body, + }; + } registry.when( 'Observability overview when data is not loaded', @@ -27,9 +63,17 @@ export default function ApiTest({ getService }: FtrProviderContext) { () => { describe('when data is not loaded', () => { it('handles the empty state', async () => { - const response = await supertest.get( - `/internal/apm/observability_overview?start=${start}&end=${end}&bucketSize=${bucketSize}` - ); + const response = await apmApiClient.readUser({ + endpoint: `GET /internal/apm/observability_overview`, + params: { + query: { + start: new Date(start).toISOString(), + end: new Date(end).toISOString(), + bucketSize, + intervalString, + }, + }, + }); expect(response.status).to.be(200); expect(response.body.serviceCount).to.be(0); @@ -39,56 +83,89 @@ export default function ApiTest({ getService }: FtrProviderContext) { } ); - registry.when( - 'Observability overview when data is loaded', - { config: 'basic', archives: [archiveName] }, - () => { - it('returns the service count and transaction coordinates', async () => { - const response = await supertest.get( - `/internal/apm/observability_overview?start=${start}&end=${end}&bucketSize=${bucketSize}` + registry.when('data is loaded', { config: 'basic', archives: ['apm_8.0.0_empty'] }, () => { + describe('Observability overview api ', () => { + const GO_PROD_RATE = 50; + const GO_DEV_RATE = 5; + const JAVA_PROD_RATE = 45; + before(async () => { + const serviceGoProdInstance = service('synth-go', 'production', 'go').instance( + 'instance-a' + ); + const serviceGoDevInstance = service('synth-go', 'development', 'go').instance( + 'instance-b' + ); + const serviceJavaInstance = service('synth-java', 'production', 'java').instance( + 'instance-c' ); - expect(response.status).to.be(200); - expect(response.body.serviceCount).to.be.greaterThan(0); - expect(response.body.transactionPerMinute.timeseries.length).to.be.greaterThan(0); + await traceData.index([ + ...timerange(start, end) + .interval('1m') + .rate(GO_PROD_RATE) + .flatMap((timestamp) => + serviceGoProdInstance + .transaction('GET /api/product/list') + .duration(1000) + .timestamp(timestamp) + .serialize() + ), + ...timerange(start, end) + .interval('1m') + .rate(GO_DEV_RATE) + .flatMap((timestamp) => + serviceGoDevInstance + .transaction('GET /api/product/:id') + .duration(1000) + .timestamp(timestamp) + .serialize() + ), + ...timerange(start, end) + .interval('1m') + .rate(JAVA_PROD_RATE) + .flatMap((timestamp) => + serviceJavaInstance + .transaction('POST /api/product/buy') + .duration(1000) + .timestamp(timestamp) + .serialize() + ), + ]); + }); - expectSnapshot(response.body.serviceCount).toMatchInline(`8`); + after(() => traceData.clean()); - expectSnapshot(response.body.transactionPerMinute.value).toMatchInline(`58.9`); - expectSnapshot(response.body.transactionPerMinute.timeseries.length).toMatchInline(`30`); + describe('compare throughput values', () => { + let throughputValues: PromiseReturnType; + before(async () => { + throughputValues = await getThroughputValues(); + }); - expectSnapshot( - response.body.transactionPerMinute.timeseries - .slice(0, 5) - .map(({ x, y }: { x: number; y: number }) => ({ - x: new Date(x).toISOString(), - y, - })) - ).toMatchInline(` - Array [ - Object { - "x": "2021-08-03T06:50:00.000Z", - "y": 36, - }, - Object { - "x": "2021-08-03T06:51:00.000Z", - "y": 55, - }, - Object { - "x": "2021-08-03T06:52:00.000Z", - "y": 40, - }, - Object { - "x": "2021-08-03T06:53:00.000Z", - "y": 53, - }, - Object { - "x": "2021-08-03T06:54:00.000Z", - "y": 39, - }, - ] - `); + it('returns same number of service as shown on service inventory API', () => { + const { serviceInventoryCount, observabilityOverview } = throughputValues; + [serviceInventoryCount, observabilityOverview.serviceCount].forEach((value) => + expect(value).to.be.equal(2) + ); + }); + + it('returns same throughput value on service inventory and obs throughput count', () => { + const { serviceInventoryThroughputSum, observabilityOverview } = throughputValues; + const obsThroughputCount = roundNumber(observabilityOverview.transactionPerMinute.value); + [serviceInventoryThroughputSum, obsThroughputCount].forEach((value) => + expect(value).to.be.equal(roundNumber(GO_PROD_RATE + GO_DEV_RATE + JAVA_PROD_RATE)) + ); + }); + + it('returns same throughput value on service inventory and obs mean throughput timeseries', () => { + const { serviceInventoryThroughputSum, observabilityOverview } = throughputValues; + const obsThroughputMean = roundNumber( + meanBy(observabilityOverview.transactionPerMinute.timeseries, 'y') + ); + [serviceInventoryThroughputSum, obsThroughputMean].forEach((value) => + expect(value).to.be.equal(roundNumber(GO_PROD_RATE + GO_DEV_RATE + JAVA_PROD_RATE)) + ); + }); }); - } - ); + }); + }); } diff --git a/x-pack/test/apm_api_integration/tests/service_maps/service_maps.ts b/x-pack/test/apm_api_integration/tests/service_maps/service_maps.ts index 37fe340d75194..ab1be97e0fd8a 100644 --- a/x-pack/test/apm_api_integration/tests/service_maps/service_maps.ts +++ b/x-pack/test/apm_api_integration/tests/service_maps/service_maps.ts @@ -301,8 +301,8 @@ export default function serviceMapsApiTests({ getService }: FtrProviderContext) "avgErrorRate": 0, "avgMemoryUsage": 0.202572668763642, "transactionStats": Object { - "avgRequestsPerMinute": 5.2, - "avgTransactionDuration": 53906.6603773585, + "avgRequestsPerMinute": 7.13333333333333, + "avgTransactionDuration": 53147.5747663551, }, } `); diff --git a/x-pack/test/apm_api_integration/tests/service_overview/__snapshots__/instance_details.snap b/x-pack/test/apm_api_integration/tests/service_overview/__snapshots__/instance_details.snap index 5daadd8079baa..91b0b7f2da6e4 100644 --- a/x-pack/test/apm_api_integration/tests/service_overview/__snapshots__/instance_details.snap +++ b/x-pack/test/apm_api_integration/tests/service_overview/__snapshots__/instance_details.snap @@ -2,7 +2,7 @@ exports[`APM API tests basic apm_8.0.0 Instance details when data is loaded fetch instance details return the correct data 1`] = ` Object { - "@timestamp": "2021-08-03T06:50:50.204Z", + "@timestamp": "2021-08-03T06:50:20.205Z", "agent": Object { "ephemeral_id": "2745d454-f57f-4473-a09b-fe6bef295860", "name": "java", diff --git a/x-pack/test/apm_api_integration/tests/service_overview/__snapshots__/instances_detailed_statistics.snap b/x-pack/test/apm_api_integration/tests/service_overview/__snapshots__/instances_detailed_statistics.snap index 7ae3fa1da3380..971c14262f0b0 100644 --- a/x-pack/test/apm_api_integration/tests/service_overview/__snapshots__/instances_detailed_statistics.snap +++ b/x-pack/test/apm_api_integration/tests/service_overview/__snapshots__/instances_detailed_statistics.snap @@ -73,11 +73,11 @@ Object { "errorRate": Array [ Object { "x": 1627974300000, - "y": 0, + "y": null, }, Object { "x": 1627974360000, - "y": null, + "y": 0, }, Object { "x": 1627974420000, @@ -93,15 +93,15 @@ Object { }, Object { "x": 1627974600000, - "y": 0.0526315789473684, + "y": 0.5, }, Object { "x": 1627974660000, - "y": 0.142857142857143, + "y": 0.4, }, Object { "x": 1627974720000, - "y": 0.0416666666666667, + "y": 0, }, Object { "x": 1627974780000, @@ -109,11 +109,11 @@ Object { }, Object { "x": 1627974840000, - "y": 0, + "y": 0.166666666666667, }, Object { "x": 1627974900000, - "y": 0.024390243902439, + "y": 0, }, Object { "x": 1627974960000, @@ -125,11 +125,11 @@ Object { }, Object { "x": 1627975080000, - "y": 0, + "y": 0.142857142857143, }, Object { "x": 1627975140000, - "y": 0.0555555555555556, + "y": 0.2, }, Object { "x": 1627975200000, @@ -139,63 +139,63 @@ Object { "latency": Array [ Object { "x": 1627974300000, - "y": 34887.8888888889, + "y": null, }, Object { "x": 1627974360000, - "y": null, + "y": 5578, }, Object { "x": 1627974420000, - "y": 4983, + "y": 34851.1666666667, }, Object { "x": 1627974480000, - "y": 41285.4, + "y": 15896.4, }, Object { "x": 1627974540000, - "y": 13820.3333333333, + "y": 15174.1666666667, }, Object { "x": 1627974600000, - "y": 13782, + "y": 9185.16666666667, }, Object { "x": 1627974660000, - "y": 13392.6, + "y": 12363.2, }, Object { "x": 1627974720000, - "y": 6991, + "y": 6206.44444444444, }, Object { "x": 1627974780000, - "y": 6885.85714285714, + "y": 6707, }, Object { "x": 1627974840000, - "y": 7935, + "y": 12409.1666666667, }, Object { "x": 1627974900000, - "y": 10828.3333333333, + "y": 9188.36363636364, }, Object { "x": 1627974960000, - "y": 6079, + "y": 4279.6, }, Object { "x": 1627975020000, - "y": 5217, + "y": 6827.3, }, Object { "x": 1627975080000, - "y": 8477.76923076923, + "y": 7445.78571428571, }, Object { "x": 1627975140000, - "y": 5937.18181818182, + "y": 563288.6, }, Object { "x": 1627975200000, @@ -272,63 +272,63 @@ Object { "throughput": Array [ Object { "x": 1627974300000, - "y": 21, + "y": 0, }, Object { "x": 1627974360000, - "y": 0, + "y": 2, }, Object { "x": 1627974420000, - "y": 24, + "y": 6, }, Object { "x": 1627974480000, - "y": 17, + "y": 5, }, Object { "x": 1627974540000, - "y": 17, + "y": 6, }, Object { "x": 1627974600000, - "y": 19, + "y": 6, }, Object { "x": 1627974660000, - "y": 21, + "y": 5, }, Object { "x": 1627974720000, - "y": 24, + "y": 9, }, Object { "x": 1627974780000, - "y": 22, + "y": 3, }, Object { "x": 1627974840000, - "y": 19, + "y": 6, }, Object { "x": 1627974900000, - "y": 41, + "y": 11, }, Object { "x": 1627974960000, - "y": 11, + "y": 5, }, Object { "x": 1627975020000, - "y": 23, + "y": 10, }, Object { "x": 1627975080000, - "y": 47, + "y": 14, }, Object { "x": 1627975140000, - "y": 36, + "y": 10, }, Object { "x": 1627975200000, @@ -412,15 +412,15 @@ Object { }, Object { "x": 1627974360000, - "y": 0, + "y": 0.25, }, Object { "x": 1627974420000, - "y": 0.0434782608695652, + "y": 0.111111111111111, }, Object { "x": 1627974480000, - "y": 0.0833333333333333, + "y": 0.2, }, Object { "x": 1627974540000, @@ -428,15 +428,15 @@ Object { }, Object { "x": 1627974600000, - "y": 0, + "y": 0.142857142857143, }, Object { "x": 1627974660000, - "y": 0.03125, + "y": 0.1, }, Object { "x": 1627974720000, - "y": 0.0555555555555556, + "y": 0.125, }, Object { "x": 1627974780000, @@ -444,15 +444,15 @@ Object { }, Object { "x": 1627974840000, - "y": 0, + "y": 0.111111111111111, }, Object { "x": 1627974900000, - "y": 0.0232558139534884, + "y": 0, }, Object { "x": 1627974960000, - "y": 0.032258064516129, + "y": 0.333333333333333, }, Object { "x": 1627975020000, @@ -460,81 +460,81 @@ Object { }, Object { "x": 1627975080000, - "y": 0.027027027027027, + "y": 0.0833333333333333, }, Object { "x": 1627975140000, - "y": 0.0571428571428571, + "y": 0.1, }, Object { "x": 1627975200000, - "y": null, + "y": 0, }, ], "latency": Array [ Object { "x": 1627974300000, - "y": 11839, + "y": 5372.5, }, Object { "x": 1627974360000, - "y": 7407, + "y": 1441598.25, }, Object { "x": 1627974420000, - "y": 1925569.66666667, + "y": 9380.22222222222, }, Object { "x": 1627974480000, - "y": 9017.18181818182, + "y": 10949.4, }, Object { "x": 1627974540000, - "y": 63575, + "y": 77148.6666666667, }, Object { "x": 1627974600000, - "y": 7577.66666666667, + "y": 6461, }, Object { "x": 1627974660000, - "y": 6844.33333333333, + "y": 549308.4, }, Object { "x": 1627974720000, - "y": 503471, + "y": 10797.75, }, Object { "x": 1627974780000, - "y": 6247.8, + "y": 9758.53846153846, }, Object { "x": 1627974840000, - "y": 1137247, + "y": 1281052.66666667, }, Object { "x": 1627974900000, - "y": 27951.6666666667, + "y": 9511.0625, }, Object { "x": 1627974960000, - "y": 10248.8461538462, + "y": 11151203.3333333, }, Object { "x": 1627975020000, - "y": 13529, + "y": 8647.2, }, Object { "x": 1627975080000, - "y": 6691247.8, + "y": 9048.33333333333, }, Object { "x": 1627975140000, - "y": 12098.6923076923, + "y": 12671.6, }, Object { "x": 1627975200000, - "y": null, + "y": 57275.4, }, ], "memoryUsage": Array [ @@ -607,67 +607,67 @@ Object { "throughput": Array [ Object { "x": 1627974300000, - "y": 15, + "y": 2, }, Object { "x": 1627974360000, - "y": 13, + "y": 4, }, Object { "x": 1627974420000, - "y": 23, + "y": 9, }, Object { "x": 1627974480000, - "y": 24, + "y": 5, }, Object { "x": 1627974540000, - "y": 10, + "y": 3, }, Object { "x": 1627974600000, - "y": 18, + "y": 7, }, Object { "x": 1627974660000, - "y": 32, + "y": 10, }, Object { "x": 1627974720000, - "y": 36, + "y": 8, }, Object { "x": 1627974780000, - "y": 36, + "y": 13, }, Object { "x": 1627974840000, - "y": 22, + "y": 9, }, Object { "x": 1627974900000, - "y": 43, + "y": 16, }, Object { "x": 1627974960000, - "y": 31, + "y": 6, }, Object { "x": 1627975020000, - "y": 35, + "y": 10, }, Object { "x": 1627975080000, - "y": 37, + "y": 12, }, Object { "x": 1627975140000, - "y": 35, + "y": 10, }, Object { "x": 1627975200000, - "y": 0, + "y": 5, }, ], }, @@ -812,15 +812,15 @@ Object { }, Object { "x": 1627973460000, - "y": 0, + "y": 0.25, }, Object { "x": 1627973520000, - "y": 0.0434782608695652, + "y": 0.111111111111111, }, Object { "x": 1627973580000, - "y": 0.0833333333333333, + "y": 0.2, }, Object { "x": 1627973640000, @@ -828,15 +828,15 @@ Object { }, Object { "x": 1627973700000, - "y": 0, + "y": 0.142857142857143, }, Object { "x": 1627973760000, - "y": 0.03125, + "y": 0.1, }, Object { "x": 1627973820000, - "y": 0.0555555555555556, + "y": 0.125, }, Object { "x": 1627973880000, @@ -844,15 +844,15 @@ Object { }, Object { "x": 1627973940000, - "y": 0, + "y": 0.111111111111111, }, Object { "x": 1627974000000, - "y": 0.0232558139534884, + "y": 0, }, Object { "x": 1627974060000, - "y": 0.032258064516129, + "y": 0.333333333333333, }, Object { "x": 1627974120000, @@ -860,11 +860,11 @@ Object { }, Object { "x": 1627974180000, - "y": 0.027027027027027, + "y": 0.0833333333333333, }, Object { "x": 1627974240000, - "y": 0.0571428571428571, + "y": 0.1, }, Object { "x": 1627974300000, @@ -872,7 +872,7 @@ Object { }, Object { "x": 1627974360000, - "y": null, + "y": 0, }, Object { "x": 1627974420000, @@ -888,15 +888,15 @@ Object { }, Object { "x": 1627974600000, - "y": 0.0526315789473684, + "y": 0.5, }, Object { "x": 1627974660000, - "y": 0.142857142857143, + "y": 0.4, }, Object { "x": 1627974720000, - "y": 0.0416666666666667, + "y": 0, }, Object { "x": 1627974780000, @@ -904,11 +904,11 @@ Object { }, Object { "x": 1627974840000, - "y": 0, + "y": 0.166666666666667, }, Object { "x": 1627974900000, - "y": 0.024390243902439, + "y": 0, }, Object { "x": 1627974960000, @@ -920,11 +920,11 @@ Object { }, Object { "x": 1627975080000, - "y": 0, + "y": 0.142857142857143, }, Object { "x": 1627975140000, - "y": 0.0555555555555556, + "y": 0.2, }, Object { "x": 1627975200000, @@ -934,123 +934,123 @@ Object { "latency": Array [ Object { "x": 1627973400000, - "y": 11839, + "y": 5372.5, }, Object { "x": 1627973460000, - "y": 7407, + "y": 1441598.25, }, Object { "x": 1627973520000, - "y": 1925569.66666667, + "y": 9380.22222222222, }, Object { "x": 1627973580000, - "y": 9017.18181818182, + "y": 10949.4, }, Object { "x": 1627973640000, - "y": 63575, + "y": 77148.6666666667, }, Object { "x": 1627973700000, - "y": 7577.66666666667, + "y": 6461, }, Object { "x": 1627973760000, - "y": 6844.33333333333, + "y": 549308.4, }, Object { "x": 1627973820000, - "y": 503471, + "y": 10797.75, }, Object { "x": 1627973880000, - "y": 6247.8, + "y": 9758.53846153846, }, Object { "x": 1627973940000, - "y": 1137247, + "y": 1281052.66666667, }, Object { "x": 1627974000000, - "y": 27951.6666666667, + "y": 9511.0625, }, Object { "x": 1627974060000, - "y": 10248.8461538462, + "y": 11151203.3333333, }, Object { "x": 1627974120000, - "y": 13529, + "y": 8647.2, }, Object { "x": 1627974180000, - "y": 6691247.8, + "y": 9048.33333333333, }, Object { "x": 1627974240000, - "y": 12098.6923076923, + "y": 12671.6, }, Object { "x": 1627974300000, - "y": 34887.8888888889, + "y": 57275.4, }, Object { "x": 1627974360000, - "y": null, + "y": 5578, }, Object { "x": 1627974420000, - "y": 4983, + "y": 34851.1666666667, }, Object { "x": 1627974480000, - "y": 41285.4, + "y": 15896.4, }, Object { "x": 1627974540000, - "y": 13820.3333333333, + "y": 15174.1666666667, }, Object { "x": 1627974600000, - "y": 13782, + "y": 9185.16666666667, }, Object { "x": 1627974660000, - "y": 13392.6, + "y": 12363.2, }, Object { "x": 1627974720000, - "y": 6991, + "y": 6206.44444444444, }, Object { "x": 1627974780000, - "y": 6885.85714285714, + "y": 6707, }, Object { "x": 1627974840000, - "y": 7935, + "y": 12409.1666666667, }, Object { "x": 1627974900000, - "y": 10828.3333333333, + "y": 9188.36363636364, }, Object { "x": 1627974960000, - "y": 6079, + "y": 4279.6, }, Object { "x": 1627975020000, - "y": 5217, + "y": 6827.3, }, Object { "x": 1627975080000, - "y": 8477.76923076923, + "y": 7445.78571428571, }, Object { "x": 1627975140000, - "y": 5937.18181818182, + "y": 563288.6, }, Object { "x": 1627975200000, @@ -1187,123 +1187,123 @@ Object { "throughput": Array [ Object { "x": 1627973400000, - "y": 15, + "y": 2, }, Object { "x": 1627973460000, - "y": 13, + "y": 4, }, Object { "x": 1627973520000, - "y": 23, + "y": 9, }, Object { "x": 1627973580000, - "y": 24, + "y": 5, }, Object { "x": 1627973640000, - "y": 10, + "y": 3, }, Object { "x": 1627973700000, - "y": 18, + "y": 7, }, Object { "x": 1627973760000, - "y": 32, + "y": 10, }, Object { "x": 1627973820000, - "y": 36, + "y": 8, }, Object { "x": 1627973880000, - "y": 36, + "y": 13, }, Object { "x": 1627973940000, - "y": 22, + "y": 9, }, Object { "x": 1627974000000, - "y": 43, + "y": 16, }, Object { "x": 1627974060000, - "y": 31, + "y": 6, }, Object { "x": 1627974120000, - "y": 35, + "y": 10, }, Object { "x": 1627974180000, - "y": 37, + "y": 12, }, Object { "x": 1627974240000, - "y": 35, + "y": 10, }, Object { "x": 1627974300000, - "y": 21, + "y": 5, }, Object { "x": 1627974360000, - "y": 0, + "y": 2, }, Object { "x": 1627974420000, - "y": 24, + "y": 6, }, Object { "x": 1627974480000, - "y": 17, + "y": 5, }, Object { "x": 1627974540000, - "y": 17, + "y": 6, }, Object { "x": 1627974600000, - "y": 19, + "y": 6, }, Object { "x": 1627974660000, - "y": 21, + "y": 5, }, Object { "x": 1627974720000, - "y": 24, + "y": 9, }, Object { "x": 1627974780000, - "y": 22, + "y": 3, }, Object { "x": 1627974840000, - "y": 19, + "y": 6, }, Object { "x": 1627974900000, - "y": 41, + "y": 11, }, Object { "x": 1627974960000, - "y": 11, + "y": 5, }, Object { "x": 1627975020000, - "y": 23, + "y": 10, }, Object { "x": 1627975080000, - "y": 47, + "y": 14, }, Object { "x": 1627975140000, - "y": 36, + "y": 10, }, Object { "x": 1627975200000, diff --git a/x-pack/test/apm_api_integration/tests/service_overview/instances_main_statistics.ts b/x-pack/test/apm_api_integration/tests/service_overview/instances_main_statistics.ts index 2d165f4ceb902..5585a292d317e 100644 --- a/x-pack/test/apm_api_integration/tests/service_overview/instances_main_statistics.ts +++ b/x-pack/test/apm_api_integration/tests/service_overview/instances_main_statistics.ts @@ -8,6 +8,7 @@ import expect from '@kbn/expect'; import { pick, sortBy } from 'lodash'; import moment from 'moment'; +import { service, timerange } from '@elastic/apm-generator'; import { APIReturnType } from '../../../../plugins/apm/public/services/rest/createCallApmApi'; import { isFiniteNumber } from '../../../../plugins/apm/common/utils/is_finite_number'; import { FtrProviderContext } from '../../common/ftr_provider_context'; @@ -15,9 +16,12 @@ import archives from '../../common/fixtures/es_archiver/archives_metadata'; import { registry } from '../../common/registry'; import { LatencyAggregationType } from '../../../../plugins/apm/common/latency_aggregation_types'; +import { ENVIRONMENT_ALL } from '../../../../plugins/apm/common/environment_filter_values'; +import { SERVICE_NODE_NAME_MISSING } from '../../../../plugins/apm/common/service_nodes'; export default function ApiTest({ getService }: FtrProviderContext) { const apmApiClient = getService('apmApiClient'); + const traceData = getService('traceData'); const archiveName = 'apm_8.0.0'; const { start, end } = archives[archiveName]; @@ -118,10 +122,10 @@ export default function ApiTest({ getService }: FtrProviderContext) { expectSnapshot(values).toMatchInline(` Object { "cpuUsage": 0.002, - "errorRate": 0.0252659574468085, - "latency": 411589.785714286, + "errorRate": 0.092511013215859, + "latency": 430318.696035242, "memoryUsage": 0.786029688517253, - "throughput": 25.0666666666667, + "throughput": 7.56666666666667, } `); }); @@ -179,9 +183,9 @@ export default function ApiTest({ getService }: FtrProviderContext) { expectSnapshot(values).toMatchInline(` Object { "cpuUsage": 0.001, - "errorRate": 0.000907441016333938, - "latency": 40989.5802047782, - "throughput": 36.7333333333333, + "errorRate": 0.00343642611683849, + "latency": 21520.4776632302, + "throughput": 9.7, } `); @@ -268,14 +272,155 @@ export default function ApiTest({ getService }: FtrProviderContext) { expectSnapshot(values).toMatchInline(` Object { "cpuUsage": 0.00223333333333333, - "errorRate": 0.0268292682926829, - "latency": 739013.634146341, + "errorRate": 0.0852713178294574, + "latency": 706173.046511628, "memoryUsage": 0.783296203613281, - "throughput": 27.3333333333333, + "throughput": 8.6, } `); }); }); } ); + + registry.when( + 'Service overview instances main statistics when data is generated', + { config: 'basic', archives: ['apm_8.0.0_empty'] }, + () => { + describe('for two go instances and one java instance', () => { + const GO_A_INSTANCE_RATE_SUCCESS = 10; + const GO_A_INSTANCE_RATE_FAILURE = 5; + const GO_B_INSTANCE_RATE_SUCCESS = 15; + + const JAVA_INSTANCE_RATE = 20; + + const rangeStart = new Date('2021-01-01T12:00:00.000Z').getTime(); + const rangeEnd = new Date('2021-01-01T12:15:00.000Z').getTime() - 1; + + before(async () => { + const goService = service('opbeans-go', 'production', 'go'); + const javaService = service('opbeans-java', 'production', 'java'); + + const goInstanceA = goService.instance('go-instance-a'); + const goInstanceB = goService.instance('go-instance-b'); + const javaInstance = javaService.instance('java-instance'); + + const interval = timerange(rangeStart, rangeEnd).interval('1m'); + + // include exit spans to generate span_destination metrics + // that should not be included + function withSpans(timestamp: number) { + return new Array(3).fill(undefined).map(() => + goInstanceA + .span('GET apm-*/_search', 'db', 'elasticsearch') + .timestamp(timestamp + 100) + .duration(300) + .destination('elasticsearch') + .success() + ); + } + + return traceData.index([ + ...interval.rate(GO_A_INSTANCE_RATE_SUCCESS).flatMap((timestamp) => + goInstanceA + .transaction('GET /api/product/list') + .success() + .duration(500) + .timestamp(timestamp) + .children(...withSpans(timestamp)) + .serialize() + ), + ...interval.rate(GO_A_INSTANCE_RATE_FAILURE).flatMap((timestamp) => + goInstanceA + .transaction('GET /api/product/list') + .failure() + .duration(500) + .timestamp(timestamp) + .children(...withSpans(timestamp)) + .serialize() + ), + ...interval.rate(GO_B_INSTANCE_RATE_SUCCESS).flatMap((timestamp) => + goInstanceB + .transaction('GET /api/product/list') + .success() + .duration(500) + .timestamp(timestamp) + .children(...withSpans(timestamp)) + .serialize() + ), + ...interval.rate(JAVA_INSTANCE_RATE).flatMap((timestamp) => + javaInstance + .transaction('GET /api/product/list') + .success() + .duration(500) + .timestamp(timestamp) + .children(...withSpans(timestamp)) + .serialize() + ), + ]); + }); + + after(async () => { + return traceData.clean(); + }); + + describe('for the go service', () => { + let body: APIReturnType<'GET /internal/apm/services/{serviceName}/service_overview_instances/main_statistics'>; + + before(async () => { + body = ( + await apmApiClient.readUser({ + endpoint: + 'GET /internal/apm/services/{serviceName}/service_overview_instances/main_statistics', + params: { + path: { + serviceName: 'opbeans-go', + }, + query: { + start: new Date(rangeStart).toISOString(), + end: new Date(rangeEnd + 1).toISOString(), + environment: ENVIRONMENT_ALL.value, + kuery: '', + latencyAggregationType: LatencyAggregationType.avg, + transactionType: 'request', + }, + }, + }) + ).body; + }); + + it('returns statistics for the go instances', () => { + const goAStats = body.currentPeriod.find( + (stat) => stat.serviceNodeName === 'go-instance-a' + ); + const goBStats = body.currentPeriod.find( + (stat) => stat.serviceNodeName === 'go-instance-b' + ); + + expect(goAStats?.throughput).to.eql( + GO_A_INSTANCE_RATE_SUCCESS + GO_A_INSTANCE_RATE_FAILURE + ); + + expect(goBStats?.throughput).to.eql(GO_B_INSTANCE_RATE_SUCCESS); + }); + + it('does not return data for the java service', () => { + const javaStats = body.currentPeriod.find( + (stat) => stat.serviceNodeName === 'java-instance' + ); + + expect(javaStats).to.be(undefined); + }); + + it('does not return data for missing service node name', () => { + const missingNameStats = body.currentPeriod.find( + (stat) => stat.serviceNodeName === SERVICE_NODE_NAME_MISSING + ); + + expect(missingNameStats).to.be(undefined); + }); + }); + }); + } + ); } diff --git a/x-pack/test/apm_api_integration/tests/services/__snapshots__/throughput.snap b/x-pack/test/apm_api_integration/tests/services/__snapshots__/throughput.snap deleted file mode 100644 index a27f7047bb9b3..0000000000000 --- a/x-pack/test/apm_api_integration/tests/services/__snapshots__/throughput.snap +++ /dev/null @@ -1,139 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`APM API tests basic apm_8.0.0 Throughput when data is loaded with time comparison has the correct throughput in tpm 1`] = ` -Object { - "currentPeriod": Array [ - Object { - "x": 1627974300000, - "y": 6, - }, - Object { - "x": 1627974360000, - "y": 0, - }, - Object { - "x": 1627974420000, - "y": 4, - }, - Object { - "x": 1627974480000, - "y": 3, - }, - Object { - "x": 1627974540000, - "y": 5, - }, - Object { - "x": 1627974600000, - "y": 5, - }, - Object { - "x": 1627974660000, - "y": 5, - }, - Object { - "x": 1627974720000, - "y": 4, - }, - Object { - "x": 1627974780000, - "y": 7, - }, - Object { - "x": 1627974840000, - "y": 2, - }, - Object { - "x": 1627974900000, - "y": 14, - }, - Object { - "x": 1627974960000, - "y": 3, - }, - Object { - "x": 1627975020000, - "y": 6, - }, - Object { - "x": 1627975080000, - "y": 12, - }, - Object { - "x": 1627975140000, - "y": 8, - }, - Object { - "x": 1627975200000, - "y": 0, - }, - ], - "previousPeriod": Array [ - Object { - "x": 1627974300000, - "y": 4, - }, - Object { - "x": 1627974360000, - "y": 2, - }, - Object { - "x": 1627974420000, - "y": 3, - }, - Object { - "x": 1627974480000, - "y": 8, - }, - Object { - "x": 1627974540000, - "y": 4, - }, - Object { - "x": 1627974600000, - "y": 4, - }, - Object { - "x": 1627974660000, - "y": 6, - }, - Object { - "x": 1627974720000, - "y": 10, - }, - Object { - "x": 1627974780000, - "y": 8, - }, - Object { - "x": 1627974840000, - "y": 9, - }, - Object { - "x": 1627974900000, - "y": 10, - }, - Object { - "x": 1627974960000, - "y": 11, - }, - Object { - "x": 1627975020000, - "y": 7, - }, - Object { - "x": 1627975080000, - "y": 10, - }, - Object { - "x": 1627975140000, - "y": 12, - }, - Object { - "x": 1627975200000, - "y": 0, - }, - ], - "throughputUnit": "minute", -} -`; diff --git a/x-pack/test/apm_api_integration/tests/services/throughput.ts b/x-pack/test/apm_api_integration/tests/services/throughput.ts index d960cccc2877e..561680e2725cf 100644 --- a/x-pack/test/apm_api_integration/tests/services/throughput.ts +++ b/x-pack/test/apm_api_integration/tests/services/throughput.ts @@ -7,15 +7,17 @@ import { service, timerange } from '@elastic/apm-generator'; import expect from '@kbn/expect'; -import { first, last, mean, uniq } from 'lodash'; +import { first, last, meanBy } from 'lodash'; import moment from 'moment'; -import { ENVIRONMENT_ALL } from '../../../../plugins/apm/common/environment_filter_values'; import { isFiniteNumber } from '../../../../plugins/apm/common/utils/is_finite_number'; -import { APIReturnType } from '../../../../plugins/apm/public/services/rest/createCallApmApi'; -import { PromiseReturnType } from '../../../../plugins/observability/typings/common'; -import archives_metadata from '../../common/fixtures/es_archiver/archives_metadata'; +import { + APIClientRequestParamsOf, + APIReturnType, +} from '../../../../plugins/apm/public/services/rest/createCallApmApi'; +import { RecursivePartial } from '../../../../plugins/apm/typings/common'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { registry } from '../../common/registry'; +import { roundNumber } from '../../utils'; type ThroughputReturn = APIReturnType<'GET /internal/apm/services/{serviceName}/throughput'>; @@ -23,34 +25,65 @@ export default function ApiTest({ getService }: FtrProviderContext) { const apmApiClient = getService('apmApiClient'); const traceData = getService('traceData'); - const archiveName = 'apm_8.0.0'; - const metadata = archives_metadata[archiveName]; + const serviceName = 'synth-go'; + const start = new Date('2021-01-01T00:00:00.000Z').getTime(); + const end = new Date('2021-01-01T00:15:00.000Z').getTime() - 1; + + async function callApi( + overrides?: RecursivePartial< + APIClientRequestParamsOf<'GET /internal/apm/services/{serviceName}/throughput'>['params'] + > + ) { + const response = await apmApiClient.readUser({ + endpoint: 'GET /internal/apm/services/{serviceName}/throughput', + params: { + path: { + serviceName: 'synth-go', + ...overrides?.path, + }, + query: { + start: new Date(start).toISOString(), + end: new Date(end).toISOString(), + transactionType: 'request', + environment: 'ENVIRONMENT_ALL', + kuery: '', + ...overrides?.query, + }, + }, + }); + return response; + } - registry.when( - 'Throughput with statically generated data', - { config: 'basic', archives: ['apm_8.0.0_empty'] }, - () => { - const start = new Date('2021-01-01T00:00:00.000Z').getTime(); - const end = new Date('2021-01-01T00:15:00.000Z').getTime() - 1; + registry.when('Throughput when data is not loaded', { config: 'basic', archives: [] }, () => { + it('handles the empty state', async () => { + const response = await callApi(); + expect(response.status).to.be(200); + expect(response.body.currentPeriod.length).to.be(0); + expect(response.body.previousPeriod.length).to.be(0); + }); + }); - const GO_PROD_RATE = 10; + registry.when('data is loaded', { config: 'basic', archives: ['apm_8.0.0_empty'] }, () => { + describe('Throughput chart api', () => { + const GO_PROD_RATE = 50; const GO_DEV_RATE = 5; - const JAVA_PROD_RATE = 20; + const JAVA_PROD_RATE = 45; before(async () => { - const serviceGoProdInstance = service('synth-go', 'production', 'go').instance( + const serviceGoProdInstance = service(serviceName, 'production', 'go').instance( 'instance-a' ); - const serviceGoDevInstance = service('synth-go', 'development', 'go').instance( + const serviceGoDevInstance = service(serviceName, 'development', 'go').instance( 'instance-b' ); - const serviceJavaInstance = service('synth-java', 'production', 'java').instance( + + const serviceJavaInstance = service('synth-java', 'development', 'java').instance( 'instance-c' ); await traceData.index([ ...timerange(start, end) - .interval('1s') + .interval('1m') .rate(GO_PROD_RATE) .flatMap((timestamp) => serviceGoProdInstance @@ -60,7 +93,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { .serialize() ), ...timerange(start, end) - .interval('1s') + .interval('1m') .rate(GO_DEV_RATE) .flatMap((timestamp) => serviceGoDevInstance @@ -70,7 +103,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { .serialize() ), ...timerange(start, end) - .interval('1s') + .interval('1m') .rate(JAVA_PROD_RATE) .flatMap((timestamp) => serviceJavaInstance @@ -84,129 +117,104 @@ export default function ApiTest({ getService }: FtrProviderContext) { after(() => traceData.clean()); - async function callApi(overrides?: { - start?: string; - end?: string; - transactionType?: string; - environment?: string; - kuery?: string; - }) { - const response = await apmApiClient.readUser({ - endpoint: 'GET /internal/apm/services/{serviceName}/throughput', - params: { - path: { - serviceName: 'synth-go', - }, - query: { - start: new Date(start).toISOString(), - end: new Date(end).toISOString(), - transactionType: 'request', - environment: 'production', - kuery: 'processor.event:transaction', - ...overrides, - }, - }, + describe('compare transactions and metrics based throughput', () => { + let throughputMetrics: ThroughputReturn; + let throughputTransactions: ThroughputReturn; + + before(async () => { + const [throughputMetricsResponse, throughputTransactionsResponse] = await Promise.all([ + callApi({ query: { kuery: 'processor.event : "metric"' } }), + callApi({ query: { kuery: 'processor.event : "transaction"' } }), + ]); + throughputMetrics = throughputMetricsResponse.body; + throughputTransactions = throughputTransactionsResponse.body; }); - return response.body; - } + it('returns some transactions data', () => { + expect(throughputTransactions.currentPeriod.length).to.be.greaterThan(0); + const hasData = throughputTransactions.currentPeriod.some(({ y }) => isFiniteNumber(y)); + expect(hasData).to.equal(true); + }); - describe('when calling it with the default parameters', () => { - let body: PromiseReturnType; + it('returns some metrics data', () => { + expect(throughputMetrics.currentPeriod.length).to.be.greaterThan(0); + const hasData = throughputMetrics.currentPeriod.some(({ y }) => isFiniteNumber(y)); + expect(hasData).to.equal(true); + }); - before(async () => { - body = await callApi(); + it('has same mean value for metrics and transactions data', () => { + const transactionsMean = meanBy(throughputTransactions.currentPeriod, 'y'); + const metricsMean = meanBy(throughputMetrics.currentPeriod, 'y'); + [transactionsMean, metricsMean].forEach((value) => + expect(roundNumber(value)).to.be.equal(roundNumber(GO_PROD_RATE + GO_DEV_RATE)) + ); }); - it('returns the throughput in seconds', () => { - expect(body.throughputUnit).to.eql('second'); + it('has a bucket size of 10 seconds for transactions data', () => { + const firstTimerange = throughputTransactions.currentPeriod[0].x; + const secondTimerange = throughputTransactions.currentPeriod[1].x; + const timeIntervalAsSeconds = (secondTimerange - firstTimerange) / 1000; + expect(timeIntervalAsSeconds).to.equal(10); }); - it('returns the expected throughput', () => { - const throughputValues = uniq(body.currentPeriod.map((coord) => coord.y)); - expect(throughputValues).to.eql([GO_PROD_RATE]); + it('has a bucket size of 1 minute for metrics data', () => { + const firstTimerange = throughputMetrics.currentPeriod[0].x; + const secondTimerange = throughputMetrics.currentPeriod[1].x; + const timeIntervalAsMinutes = (secondTimerange - firstTimerange) / 1000 / 60; + expect(timeIntervalAsMinutes).to.equal(1); }); }); - describe('when setting environment to all', () => { - let body: PromiseReturnType; + describe('production environment', () => { + let throughput: ThroughputReturn; before(async () => { - body = await callApi({ - environment: ENVIRONMENT_ALL.value, - }); + const throughputResponse = await callApi({ query: { environment: 'production' } }); + throughput = throughputResponse.body; + }); + + it('returns some data', () => { + expect(throughput.currentPeriod.length).to.be.greaterThan(0); + const hasData = throughput.currentPeriod.some(({ y }) => isFiniteNumber(y)); + expect(hasData).to.equal(true); }); - it('returns data for all environments', () => { - const throughputValues = body.currentPeriod.map(({ y }) => y); - expect(uniq(throughputValues)).to.eql([GO_PROD_RATE + GO_DEV_RATE]); - expect(body.throughputUnit).to.eql('second'); + it('returns correct average throughput', () => { + const throughputMean = meanBy(throughput.currentPeriod, 'y'); + expect(roundNumber(throughputMean)).to.be.equal(roundNumber(GO_PROD_RATE)); }); }); - describe('when defining a kuery', () => { - let body: PromiseReturnType; + describe('when synth-java is selected', () => { + let throughput: ThroughputReturn; before(async () => { - body = await callApi({ - kuery: `processor.event:transaction and transaction.name:"GET /api/product/:id"`, - environment: ENVIRONMENT_ALL.value, - }); + const throughputResponse = await callApi({ path: { serviceName: 'synth-java' } }); + throughput = throughputResponse.body; }); - it('returns data that matches the kuery', () => { - const throughputValues = body.currentPeriod.map(({ y }) => y); - expect(uniq(throughputValues)).to.eql([GO_DEV_RATE]); - expect(body.throughputUnit).to.eql('second'); + it('returns some data', () => { + expect(throughput.currentPeriod.length).to.be.greaterThan(0); + const hasData = throughput.currentPeriod.some(({ y }) => isFiniteNumber(y)); + expect(hasData).to.equal(true); }); - }); - } - ); - registry.when('Throughput when data is not loaded', { config: 'basic', archives: [] }, () => { - it('handles the empty state', async () => { - const response = await apmApiClient.readUser({ - endpoint: 'GET /internal/apm/services/{serviceName}/throughput', - params: { - path: { - serviceName: 'opbeans-java', - }, - query: { - start: metadata.start, - end: metadata.end, - transactionType: 'request', - environment: 'ENVIRONMENT_ALL', - kuery: '', - }, - }, + it('returns throughput related to java agent', () => { + const throughputMean = meanBy(throughput.currentPeriod, 'y'); + expect(roundNumber(throughputMean)).to.be.equal(roundNumber(JAVA_PROD_RATE)); + }); }); - expect(response.status).to.be(200); - expect(response.body.currentPeriod.length).to.be(0); - expect(response.body.previousPeriod.length).to.be(0); - }); - }); + describe('time comparisons', () => { + let throughputResponse: ThroughputReturn; - let throughputResponse: ThroughputReturn; - registry.when( - 'Throughput when data is loaded', - { config: 'basic', archives: [archiveName] }, - () => { - describe('when querying without kql filter', () => { before(async () => { - const response = await apmApiClient.readUser({ - endpoint: 'GET /internal/apm/services/{serviceName}/throughput', - params: { - path: { - serviceName: 'opbeans-java', - }, - query: { - start: metadata.start, - end: metadata.end, - transactionType: 'request', - environment: 'ENVIRONMENT_ALL', - kuery: '', - }, + const response = await callApi({ + query: { + start: moment(end).subtract(7, 'minutes').toISOString(), + end: new Date(end).toISOString(), + comparisonStart: new Date(start).toISOString(), + comparisonEnd: moment(start).add(7, 'minutes').toISOString(), }, }); throughputResponse = response.body; @@ -214,141 +222,58 @@ export default function ApiTest({ getService }: FtrProviderContext) { it('returns some data', () => { expect(throughputResponse.currentPeriod.length).to.be.greaterThan(0); - expect(throughputResponse.previousPeriod.length).not.to.be.greaterThan(0); + expect(throughputResponse.previousPeriod.length).to.be.greaterThan(0); - const nonNullDataPoints = throughputResponse.currentPeriod.filter(({ y }) => + const hasCurrentPeriodData = throughputResponse.currentPeriod.some(({ y }) => + isFiniteNumber(y) + ); + const hasPreviousPeriodData = throughputResponse.previousPeriod.some(({ y }) => isFiniteNumber(y) ); - expect(nonNullDataPoints.length).to.be.greaterThan(0); - }); - - it('has the correct start date', () => { - expectSnapshot( - new Date(first(throughputResponse.currentPeriod)?.x ?? NaN).toISOString() - ).toMatchInline(`"2021-08-03T06:50:00.000Z"`); - }); - - it('has the correct end date', () => { - expectSnapshot( - new Date(last(throughputResponse.currentPeriod)?.x ?? NaN).toISOString() - ).toMatchInline(`"2021-08-03T07:20:00.000Z"`); + expect(hasCurrentPeriodData).to.equal(true); + expect(hasPreviousPeriodData).to.equal(true); }); - it('has the correct number of buckets', () => { - expectSnapshot(throughputResponse.currentPeriod.length).toMatchInline(`31`); + it('has same start time for both periods', () => { + expect(first(throughputResponse.currentPeriod)?.x).to.equal( + first(throughputResponse.previousPeriod)?.x + ); }); - it('has the correct throughput in tpm', () => { - const avg = mean(throughputResponse.currentPeriod.map((d) => d.y)); - expectSnapshot(avg).toMatchInline(`6.19354838709677`); - expectSnapshot(throughputResponse.throughputUnit).toMatchInline(`"minute"`); - }); - }); - - describe('with kql filter to force transaction-based UI', () => { - before(async () => { - const response = await apmApiClient.readUser({ - endpoint: 'GET /internal/apm/services/{serviceName}/throughput', - params: { - path: { - serviceName: 'opbeans-java', - }, - query: { - kuery: 'processor.event : "transaction"', - start: metadata.start, - end: metadata.end, - transactionType: 'request', - environment: 'ENVIRONMENT_ALL', - }, - }, - }); - throughputResponse = response.body; + it('has same end time for both periods', () => { + expect(last(throughputResponse.currentPeriod)?.x).to.equal( + last(throughputResponse.previousPeriod)?.x + ); }); - it('has the correct throughput in tps', async () => { - const avgTps = mean(throughputResponse.currentPeriod.map((d) => d.y)); - expectSnapshot(avgTps).toMatchInline(`0.124043715846995`); - expectSnapshot(throughputResponse.throughputUnit).toMatchInline(`"second"`); - - // this tpm value must be similar tp tpm value calculated in the previous spec where metric docs were used - const avgTpm = avgTps * 60; - expectSnapshot(avgTpm).toMatchInline(`7.44262295081967`); + it('returns same number of buckets for both periods', () => { + expect(throughputResponse.currentPeriod.length).to.be( + throughputResponse.previousPeriod.length + ); }); - }); - } - ); - registry.when( - 'Throughput when data is loaded with time comparison', - { config: 'basic', archives: [archiveName] }, - () => { - before(async () => { - const response = await apmApiClient.readUser({ - endpoint: 'GET /internal/apm/services/{serviceName}/throughput', - params: { - path: { - serviceName: 'opbeans-java', - }, - query: { - transactionType: 'request', - start: moment(metadata.end).subtract(15, 'minutes').toISOString(), - end: metadata.end, - comparisonStart: metadata.start, - comparisonEnd: moment(metadata.start).add(15, 'minutes').toISOString(), - environment: 'ENVIRONMENT_ALL', - kuery: '', - }, - }, + it('has same mean value for both periods', () => { + const currentPeriodMean = meanBy( + throughputResponse.currentPeriod.filter((item) => isFiniteNumber(item.y) && item.y > 0), + 'y' + ); + const previousPeriodMean = meanBy( + throughputResponse.previousPeriod.filter( + (item) => isFiniteNumber(item.y) && item.y > 0 + ), + 'y' + ); + const currentPeriod = throughputResponse.currentPeriod; + const bucketSize = currentPeriod[1].x - currentPeriod[0].x; + const durationAsMinutes = bucketSize / 1000 / 60; + [currentPeriodMean, previousPeriodMean].every((value) => + expect(roundNumber(value)).to.be.equal( + roundNumber((GO_PROD_RATE + GO_DEV_RATE) / durationAsMinutes) + ) + ); }); - - throughputResponse = response.body; }); - - it('returns some data', () => { - expect(throughputResponse.currentPeriod.length).to.be.greaterThan(0); - expect(throughputResponse.previousPeriod.length).to.be.greaterThan(0); - - const currentPeriodNonNullDataPoints = throughputResponse.currentPeriod.filter(({ y }) => - isFiniteNumber(y) - ); - const previousPeriodNonNullDataPoints = throughputResponse.previousPeriod.filter(({ y }) => - isFiniteNumber(y) - ); - - expect(currentPeriodNonNullDataPoints.length).to.be.greaterThan(0); - expect(previousPeriodNonNullDataPoints.length).to.be.greaterThan(0); - }); - - it('has the correct start date', () => { - expectSnapshot( - new Date(first(throughputResponse.currentPeriod)?.x ?? NaN).toISOString() - ).toMatchInline(`"2021-08-03T07:05:00.000Z"`); - - expectSnapshot( - new Date(first(throughputResponse.previousPeriod)?.x ?? NaN).toISOString() - ).toMatchInline(`"2021-08-03T07:05:00.000Z"`); - }); - - it('has the correct end date', () => { - expectSnapshot( - new Date(last(throughputResponse.currentPeriod)?.x ?? NaN).toISOString() - ).toMatchInline(`"2021-08-03T07:20:00.000Z"`); - - expectSnapshot( - new Date(last(throughputResponse.previousPeriod)?.x ?? NaN).toISOString() - ).toMatchInline(`"2021-08-03T07:20:00.000Z"`); - }); - - it('has the correct number of buckets', () => { - expectSnapshot(throughputResponse.currentPeriod.length).toMatchInline(`16`); - expectSnapshot(throughputResponse.previousPeriod.length).toMatchInline(`16`); - }); - - it('has the correct throughput in tpm', () => { - expectSnapshot(throughputResponse).toMatch(); - expectSnapshot(throughputResponse.throughputUnit).toMatchInline(`"minute"`); - }); - } - ); + }); + }); } diff --git a/x-pack/test/apm_api_integration/tests/services/top_services.ts b/x-pack/test/apm_api_integration/tests/services/top_services.ts index 18700fb041252..d85331b8be45d 100644 --- a/x-pack/test/apm_api_integration/tests/services/top_services.ts +++ b/x-pack/test/apm_api_integration/tests/services/top_services.ts @@ -91,37 +91,37 @@ export default function ApiTest({ getService }: FtrProviderContext) { Array [ Object {}, Object { - "latency": 520294.126436782, - "throughput": 11.6, - "transactionErrorRate": 0.0316091954022989, + "latency": 496794.054441261, + "throughput": 11.6333333333333, + "transactionErrorRate": 0.0315186246418338, }, Object { - "latency": 74805.1452830189, - "throughput": 17.6666666666667, - "transactionErrorRate": 0.00566037735849057, + "latency": 83395.638576779, + "throughput": 17.8, + "transactionErrorRate": 0.00936329588014981, }, Object { - "latency": 411589.785714286, - "throughput": 7.46666666666667, - "transactionErrorRate": 0.0848214285714286, + "latency": 430318.696035242, + "throughput": 7.56666666666667, + "transactionErrorRate": 0.092511013215859, }, Object { - "latency": 53906.6603773585, - "throughput": 7.06666666666667, + "latency": 53147.5747663551, + "throughput": 7.13333333333333, "transactionErrorRate": 0, }, Object { - "latency": 420634.9, + "latency": 419826.24375, "throughput": 5.33333333333333, "transactionErrorRate": 0.025, }, Object { - "latency": 40989.5802047782, - "throughput": 9.76666666666667, - "transactionErrorRate": 0.00341296928327645, + "latency": 21520.4776632302, + "throughput": 9.7, + "transactionErrorRate": 0.00343642611683849, }, Object { - "latency": 1040880.77777778, + "latency": 1040388.88888889, "throughput": 2.4, "transactionErrorRate": null, }, diff --git a/x-pack/test/apm_api_integration/tests/throughput/dependencies_apis.ts b/x-pack/test/apm_api_integration/tests/throughput/dependencies_apis.ts new file mode 100644 index 0000000000000..4b3820ee7f033 --- /dev/null +++ b/x-pack/test/apm_api_integration/tests/throughput/dependencies_apis.ts @@ -0,0 +1,236 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { service, timerange } from '@elastic/apm-generator'; +import expect from '@kbn/expect'; +import { meanBy, sumBy } from 'lodash'; +import { BackendNode, ServiceNode } from '../../../../plugins/apm/common/connections'; +import { PromiseReturnType } from '../../../../plugins/observability/typings/common'; +import { FtrProviderContext } from '../../common/ftr_provider_context'; +import { registry } from '../../common/registry'; +import { roundNumber } from '../../utils'; + +export default function ApiTest({ getService }: FtrProviderContext) { + const apmApiClient = getService('apmApiClient'); + const traceData = getService('traceData'); + + const start = new Date('2021-01-01T00:00:00.000Z').getTime(); + const end = new Date('2021-01-01T00:15:00.000Z').getTime() - 1; + + async function getThroughputValues(overrides?: { serviceName?: string; backendName?: string }) { + const commonQuery = { + start: new Date(start).toISOString(), + end: new Date(end).toISOString(), + environment: 'ENVIRONMENT_ALL', + }; + const [topBackendsAPIResponse, backendThroughputChartAPIResponse, upstreamServicesApiResponse] = + await Promise.all([ + apmApiClient.readUser({ + endpoint: `GET /internal/apm/backends/top_backends`, + params: { + query: { + ...commonQuery, + numBuckets: 20, + kuery: '', + }, + }, + }), + apmApiClient.readUser({ + endpoint: `GET /internal/apm/backends/{backendName}/charts/throughput`, + params: { + path: { backendName: overrides?.backendName || 'elasticsearch' }, + query: { + ...commonQuery, + kuery: '', + }, + }, + }), + apmApiClient.readUser({ + endpoint: `GET /internal/apm/backends/{backendName}/upstream_services`, + params: { + path: { backendName: overrides?.backendName || 'elasticsearch' }, + query: { + ...commonQuery, + numBuckets: 20, + offset: '1d', + kuery: '', + }, + }, + }), + ]); + const backendThroughputChartMean = roundNumber( + meanBy(backendThroughputChartAPIResponse.body.currentTimeseries, 'y') + ); + + const upstreamServicesThroughput = upstreamServicesApiResponse.body.services.map( + (upstreamService) => { + return { + serviceName: (upstreamService.location as ServiceNode).serviceName, + throughput: upstreamService.currentStats.throughput.value, + }; + } + ); + + return { + topBackends: topBackendsAPIResponse.body.backends.map((item) => [ + (item.location as BackendNode).backendName, + roundNumber(item.currentStats.throughput.value), + ]), + backendThroughputChartMean, + upstreamServicesThroughput, + }; + } + + let throughputValues: PromiseReturnType; + + registry.when( + 'Dependencies throughput value', + { config: 'basic', archives: ['apm_8.0.0_empty'] }, + () => { + describe('when data is loaded', () => { + const GO_PROD_RATE = 75; + const JAVA_PROD_RATE = 25; + before(async () => { + const serviceGoProdInstance = service('synth-go', 'production', 'go').instance( + 'instance-a' + ); + const serviceJavaInstance = service('synth-java', 'development', 'java').instance( + 'instance-c' + ); + + await traceData.index([ + ...timerange(start, end) + .interval('1m') + .rate(GO_PROD_RATE) + .flatMap((timestamp) => + serviceGoProdInstance + .transaction('GET /api/product/list') + .duration(1000) + .timestamp(timestamp) + .children( + serviceGoProdInstance + .span('GET apm-*/_search', 'db', 'elasticsearch') + .duration(1000) + .success() + .destination('elasticsearch') + .timestamp(timestamp), + serviceGoProdInstance + .span('custom_operation', 'app') + .duration(550) + .children( + serviceGoProdInstance + .span('SELECT FROM products', 'db', 'postgresql') + .duration(500) + .success() + .destination('postgresql') + .timestamp(timestamp) + ) + .success() + .timestamp(timestamp) + ) + .serialize() + ), + ...timerange(start, end) + .interval('1m') + .rate(JAVA_PROD_RATE) + .flatMap((timestamp) => + serviceJavaInstance + .transaction('POST /api/product/buy') + .duration(1000) + .timestamp(timestamp) + .children( + serviceJavaInstance + .span('GET apm-*/_search', 'db', 'elasticsearch') + .duration(1000) + .success() + .destination('elasticsearch') + .timestamp(timestamp), + serviceJavaInstance + .span('custom_operation', 'app') + .duration(50) + .success() + .timestamp(timestamp) + ) + .serialize() + ), + ]); + }); + + after(() => traceData.clean()); + + describe('verify top dependencies', () => { + before(async () => { + throughputValues = await getThroughputValues(); + }); + + it('returns elasticsearch and postgresql as dependencies', () => { + const { topBackends } = throughputValues; + const topBackendsAsObj = Object.fromEntries(topBackends); + expect(topBackendsAsObj.elasticsearch).to.equal( + roundNumber(JAVA_PROD_RATE + GO_PROD_RATE) + ); + expect(topBackendsAsObj.postgresql).to.equal(roundNumber(GO_PROD_RATE)); + }); + }); + + describe('compare throughput value between top backends, backend throughput chart and upstream services apis', () => { + describe('elasticsearch dependency', () => { + before(async () => { + throughputValues = await getThroughputValues({ backendName: 'elasticsearch' }); + }); + + it('matches throughput values between throughput chart and top dependency', () => { + const { topBackends, backendThroughputChartMean } = throughputValues; + const topBackendsAsObj = Object.fromEntries(topBackends); + const elasticsearchDependency = topBackendsAsObj.elasticsearch; + [elasticsearchDependency, backendThroughputChartMean].forEach((value) => + expect(value).to.be.equal(roundNumber(JAVA_PROD_RATE + GO_PROD_RATE)) + ); + }); + + it('matches throughput values between upstream services and top dependency', () => { + const { topBackends, upstreamServicesThroughput } = throughputValues; + const topBackendsAsObj = Object.fromEntries(topBackends); + const elasticsearchDependency = topBackendsAsObj.elasticsearch; + const upstreamServiceThroughputSum = roundNumber( + sumBy(upstreamServicesThroughput, 'throughput') + ); + [elasticsearchDependency, upstreamServiceThroughputSum].forEach((value) => + expect(value).to.be.equal(roundNumber(JAVA_PROD_RATE + GO_PROD_RATE)) + ); + }); + }); + describe('postgresql dependency', () => { + before(async () => { + throughputValues = await getThroughputValues({ backendName: 'postgresql' }); + }); + + it('matches throughput values between throughput chart and top dependency', () => { + const { topBackends, backendThroughputChartMean } = throughputValues; + const topBackendsAsObj = Object.fromEntries(topBackends); + const postgresqlDependency = topBackendsAsObj.postgresql; + [postgresqlDependency, backendThroughputChartMean].forEach((value) => + expect(value).to.be.equal(roundNumber(GO_PROD_RATE)) + ); + }); + + it('matches throughput values between upstream services and top dependency', () => { + const { topBackends, upstreamServicesThroughput } = throughputValues; + const topBackendsAsObj = Object.fromEntries(topBackends); + const postgresqlDependency = topBackendsAsObj.postgresql; + const upstreamServiceThroughputSum = roundNumber( + sumBy(upstreamServicesThroughput, 'throughput') + ); + [postgresqlDependency, upstreamServiceThroughputSum].forEach((value) => + expect(value).to.be.equal(roundNumber(GO_PROD_RATE)) + ); + }); + }); + }); + }); + } + ); +} diff --git a/x-pack/test/apm_api_integration/tests/throughput/service_apis.ts b/x-pack/test/apm_api_integration/tests/throughput/service_apis.ts new file mode 100644 index 0000000000000..6bf0e8c14fb23 --- /dev/null +++ b/x-pack/test/apm_api_integration/tests/throughput/service_apis.ts @@ -0,0 +1,163 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { service, timerange } from '@elastic/apm-generator'; +import expect from '@kbn/expect'; +import { meanBy, sumBy } from 'lodash'; +import { LatencyAggregationType } from '../../../../plugins/apm/common/latency_aggregation_types'; +import { PromiseReturnType } from '../../../../plugins/observability/typings/common'; +import { FtrProviderContext } from '../../common/ftr_provider_context'; +import { registry } from '../../common/registry'; +import { roundNumber } from '../../utils'; + +export default function ApiTest({ getService }: FtrProviderContext) { + const apmApiClient = getService('apmApiClient'); + const traceData = getService('traceData'); + + const serviceName = 'synth-go'; + const start = new Date('2021-01-01T00:00:00.000Z').getTime(); + const end = new Date('2021-01-01T00:15:00.000Z').getTime() - 1; + + async function getThroughputValues(processorEvent: 'transaction' | 'metric') { + const commonQuery = { + start: new Date(start).toISOString(), + end: new Date(end).toISOString(), + environment: 'ENVIRONMENT_ALL', + }; + const [ + serviceInventoryAPIResponse, + serviceThroughputAPIResponse, + transactionsGroupDetailsAPIResponse, + serviceInstancesAPIResponse, + ] = await Promise.all([ + apmApiClient.readUser({ + endpoint: 'GET /internal/apm/services', + params: { + query: { + ...commonQuery, + kuery: `service.name : "${serviceName}" and processor.event : "${processorEvent}"`, + }, + }, + }), + apmApiClient.readUser({ + endpoint: 'GET /internal/apm/services/{serviceName}/throughput', + params: { + path: { serviceName }, + query: { + ...commonQuery, + kuery: `processor.event : "${processorEvent}"`, + transactionType: 'request', + }, + }, + }), + apmApiClient.readUser({ + endpoint: `GET /internal/apm/services/{serviceName}/transactions/groups/main_statistics`, + params: { + path: { serviceName }, + query: { + ...commonQuery, + kuery: `processor.event : "${processorEvent}"`, + transactionType: 'request', + latencyAggregationType: 'avg' as LatencyAggregationType, + }, + }, + }), + apmApiClient.readUser({ + endpoint: `GET /internal/apm/services/{serviceName}/service_overview_instances/main_statistics`, + params: { + path: { serviceName }, + query: { + ...commonQuery, + kuery: `processor.event : "${processorEvent}"`, + transactionType: 'request', + latencyAggregationType: 'avg' as LatencyAggregationType, + }, + }, + }), + ]); + + const serviceInventoryThroughput = serviceInventoryAPIResponse.body.items[0].throughput; + + const throughputChartApiMean = meanBy(serviceThroughputAPIResponse.body.currentPeriod, 'y'); + + const transactionsGroupThroughputSum = sumBy( + transactionsGroupDetailsAPIResponse.body.transactionGroups, + 'throughput' + ); + + const serviceInstancesThroughputSum = sumBy( + serviceInstancesAPIResponse.body.currentPeriod, + 'throughput' + ); + + return { + serviceInventoryThroughput, + throughputChartApiMean, + transactionsGroupThroughputSum, + serviceInstancesThroughputSum, + }; + } + + let throughputMetricValues: PromiseReturnType; + let throughputTransactionValues: PromiseReturnType; + + registry.when('Services APIs', { config: 'basic', archives: ['apm_8.0.0_empty'] }, () => { + describe('when data is loaded ', () => { + const GO_PROD_RATE = 80; + const GO_DEV_RATE = 20; + before(async () => { + const serviceGoProdInstance = service(serviceName, 'production', 'go').instance( + 'instance-a' + ); + const serviceGoDevInstance = service(serviceName, 'development', 'go').instance( + 'instance-b' + ); + await traceData.index([ + ...timerange(start, end) + .interval('1m') + .rate(GO_PROD_RATE) + .flatMap((timestamp) => + serviceGoProdInstance + .transaction('GET /api/product/list') + .duration(1000) + .timestamp(timestamp) + .serialize() + ), + ...timerange(start, end) + .interval('1m') + .rate(GO_DEV_RATE) + .flatMap((timestamp) => + serviceGoDevInstance + .transaction('GET /api/product/:id') + .duration(1000) + .timestamp(timestamp) + .serialize() + ), + ]); + }); + + after(() => traceData.clean()); + + describe('compare throughput value between service inventory, throughput chart, service inventory and transactions apis', () => { + before(async () => { + [throughputTransactionValues, throughputMetricValues] = await Promise.all([ + getThroughputValues('transaction'), + getThroughputValues('metric'), + ]); + }); + + it('returns same throughput value for Transaction-based and Metric-based data', () => { + [ + ...Object.values(throughputTransactionValues), + ...Object.values(throughputMetricValues), + ].forEach((value) => + expect(roundNumber(value)).to.be.equal(roundNumber(GO_PROD_RATE + GO_DEV_RATE)) + ); + }); + }); + }); + }); +} diff --git a/x-pack/test/apm_api_integration/tests/traces/__snapshots__/top_traces.snap b/x-pack/test/apm_api_integration/tests/traces/__snapshots__/top_traces.snap index 604348355f38c..64e1754c9570f 100644 --- a/x-pack/test/apm_api_integration/tests/traces/__snapshots__/top_traces.snap +++ b/x-pack/test/apm_api_integration/tests/traces/__snapshots__/top_traces.snap @@ -3,7 +3,7 @@ exports[`APM API tests basic apm_8.0.0 Top traces when data is loaded returns the correct buckets 1`] = ` Array [ Object { - "averageResponseTime": 1639, + "averageResponseTime": 1638, "impact": 0, "key": Object { "service.name": "opbeans-java", @@ -15,8 +15,8 @@ Array [ "transactionsPerMinute": 0.0333333333333333, }, Object { - "averageResponseTime": 3279, - "impact": 0.00144735571024101, + "averageResponseTime": 3278, + "impact": 0.00153950779720334, "key": Object { "service.name": "opbeans-node", "transaction.name": "POST /api/orders", @@ -27,8 +27,8 @@ Array [ "transactionsPerMinute": 0.0333333333333333, }, Object { - "averageResponseTime": 6175, - "impact": 0.00400317408637392, + "averageResponseTime": 6169, + "impact": 0.00425335965190752, "key": Object { "service.name": "opbeans-node", "transaction.name": "GET /api/products/:id", @@ -39,8 +39,8 @@ Array [ "transactionsPerMinute": 0.0333333333333333, }, Object { - "averageResponseTime": 3495, - "impact": 0.00472243927164613, + "averageResponseTime": 3486, + "impact": 0.00500715523797721, "key": Object { "service.name": "opbeans-dotnet", "transaction.name": "POST Orders/Post", @@ -51,8 +51,8 @@ Array [ "transactionsPerMinute": 0.0666666666666667, }, Object { - "averageResponseTime": 7039, - "impact": 0.00476568343615943, + "averageResponseTime": 7022, + "impact": 0.00505409145130658, "key": Object { "service.name": "opbeans-python", "transaction.name": "GET opbeans.views.product", @@ -63,8 +63,8 @@ Array [ "transactionsPerMinute": 0.0333333333333333, }, Object { - "averageResponseTime": 6303, - "impact": 0.00967875004525193, + "averageResponseTime": 6279, + "impact": 0.0102508689911344, "key": Object { "service.name": "opbeans-ruby", "transaction.name": "Api::OrdersController#create", @@ -75,8 +75,8 @@ Array [ "transactionsPerMinute": 0.0666666666666667, }, Object { - "averageResponseTime": 7209.66666666667, - "impact": 0.0176418540534865, + "averageResponseTime": 7959, + "impact": 0.0134049825268681, "key": Object { "service.name": "opbeans-java", "transaction.name": "APIRestController#products", @@ -84,35 +84,47 @@ Array [ "serviceName": "opbeans-java", "transactionName": "APIRestController#products", "transactionType": "request", + "transactionsPerMinute": 0.0666666666666667, + }, + Object { + "averageResponseTime": 7411.33333333333, + "impact": 0.0193339649946342, + "key": Object { + "service.name": "opbeans-python", + "transaction.name": "GET opbeans.views.order", + }, + "serviceName": "opbeans-python", + "transactionName": "GET opbeans.views.order", + "transactionType": "request", "transactionsPerMinute": 0.1, }, Object { - "averageResponseTime": 4511, - "impact": 0.0224401912465233, + "averageResponseTime": 11729, + "impact": 0.0204829634969371, "key": Object { - "service.name": "opbeans-java", - "transaction.name": "APIRestController#orders", + "service.name": "opbeans-ruby", + "transaction.name": "Api::OrdersController#show", }, - "serviceName": "opbeans-java", - "transactionName": "APIRestController#orders", + "serviceName": "opbeans-ruby", + "transactionName": "Api::OrdersController#show", "transactionType": "request", - "transactionsPerMinute": 0.2, + "transactionsPerMinute": 0.0666666666666667, }, Object { - "averageResponseTime": 7607, - "impact": 0.0254072704525173, + "averageResponseTime": 4499.16666666667, + "impact": 0.0238032312278568, "key": Object { - "service.name": "opbeans-python", - "transaction.name": "GET opbeans.views.order", + "service.name": "opbeans-java", + "transaction.name": "APIRestController#orders", }, - "serviceName": "opbeans-python", - "transactionName": "GET opbeans.views.order", + "serviceName": "opbeans-java", + "transactionName": "APIRestController#orders", "transactionType": "request", - "transactionsPerMinute": 0.133333333333333, + "transactionsPerMinute": 0.2, }, Object { - "averageResponseTime": 10143, - "impact": 0.025408152986487, + "averageResponseTime": 10126.3333333333, + "impact": 0.0269798741459886, "key": Object { "service.name": "opbeans-node", "transaction.name": "GET /api/types", @@ -123,32 +135,32 @@ Array [ "transactionsPerMinute": 0.1, }, Object { - "averageResponseTime": 6105.66666666667, - "impact": 0.0308842762682221, + "averageResponseTime": 6089.83333333333, + "impact": 0.032762415628167, "key": Object { - "service.name": "opbeans-ruby", - "transaction.name": "Api::TypesController#index", + "service.name": "opbeans-java", + "transaction.name": "APIRestController#customerWhoBought", }, - "serviceName": "opbeans-ruby", - "transactionName": "Api::TypesController#index", + "serviceName": "opbeans-java", + "transactionName": "APIRestController#customerWhoBought", "transactionType": "request", "transactionsPerMinute": 0.2, }, Object { - "averageResponseTime": 6116.33333333333, - "impact": 0.0309407584422802, + "averageResponseTime": 6094.83333333333, + "impact": 0.0327905773561646, "key": Object { - "service.name": "opbeans-java", - "transaction.name": "APIRestController#customerWhoBought", + "service.name": "opbeans-ruby", + "transaction.name": "Api::TypesController#index", }, - "serviceName": "opbeans-java", - "transactionName": "APIRestController#customerWhoBought", + "serviceName": "opbeans-ruby", + "transactionName": "Api::TypesController#index", "transactionType": "request", "transactionsPerMinute": 0.2, }, Object { - "averageResponseTime": 12543, - "impact": 0.0317623975680329, + "averageResponseTime": 12527.3333333333, + "impact": 0.0337415050382176, "key": Object { "service.name": "opbeans-java", "transaction.name": "APIRestController#customers", @@ -159,8 +171,8 @@ Array [ "transactionsPerMinute": 0.1, }, Object { - "averageResponseTime": 5551, - "impact": 0.0328461492827744, + "averageResponseTime": 5534.85714285714, + "impact": 0.0348323026359922, "key": Object { "service.name": "opbeans-node", "transaction.name": "GET /api/orders/:id", @@ -171,8 +183,8 @@ Array [ "transactionsPerMinute": 0.233333333333333, }, Object { - "averageResponseTime": 13183, - "impact": 0.0334568627897785, + "averageResponseTime": 13149.3333333333, + "impact": 0.0354931645196697, "key": Object { "service.name": "opbeans-java", "transaction.name": "APIRestController#stats", @@ -183,8 +195,8 @@ Array [ "transactionsPerMinute": 0.1, }, Object { - "averageResponseTime": 8050.2, - "impact": 0.0340764016364792, + "averageResponseTime": 8025.8, + "impact": 0.0361324357452157, "key": Object { "service.name": "opbeans-go", "transaction.name": "POST /api/orders", @@ -195,20 +207,8 @@ Array [ "transactionsPerMinute": 0.166666666666667, }, Object { - "averageResponseTime": 10079, - "impact": 0.0341337663445071, - "key": Object { - "service.name": "opbeans-ruby", - "transaction.name": "Api::OrdersController#show", - }, - "serviceName": "opbeans-ruby", - "transactionName": "Api::OrdersController#show", - "transactionType": "request", - "transactionsPerMinute": 0.133333333333333, - }, - Object { - "averageResponseTime": 8463, - "impact": 0.0358979517498557, + "averageResponseTime": 8432.8, + "impact": 0.0380427396277211, "key": Object { "service.name": "opbeans-node", "transaction.name": "GET /api/products/:id/customers", @@ -219,32 +219,32 @@ Array [ "transactionsPerMinute": 0.166666666666667, }, Object { - "averageResponseTime": 10799, - "impact": 0.0366754641771254, + "averageResponseTime": 7408, + "impact": 0.0401867858526067, "key": Object { "service.name": "opbeans-ruby", - "transaction.name": "Api::ProductsController#show", + "transaction.name": "Api::TypesController#show", }, "serviceName": "opbeans-ruby", - "transactionName": "Api::ProductsController#show", + "transactionName": "Api::TypesController#show", "transactionType": "request", - "transactionsPerMinute": 0.133333333333333, + "transactionsPerMinute": 0.2, }, Object { - "averageResponseTime": 7428.33333333333, - "impact": 0.0378880658514371, + "averageResponseTime": 6869.42857142857, + "impact": 0.0436018647344517, "key": Object { - "service.name": "opbeans-ruby", - "transaction.name": "Api::TypesController#show", + "service.name": "opbeans-java", + "transaction.name": "APIRestController#order", }, - "serviceName": "opbeans-ruby", - "transactionName": "Api::TypesController#show", + "serviceName": "opbeans-java", + "transactionName": "APIRestController#order", "transactionType": "request", - "transactionsPerMinute": 0.2, + "transactionsPerMinute": 0.233333333333333, }, Object { - "averageResponseTime": 3105.13333333333, - "impact": 0.039659311528543, + "averageResponseTime": 3050, + "impact": 0.0442721138607951, "key": Object { "service.name": "opbeans-java", "transaction.name": "ResourceHttpRequestHandler", @@ -252,23 +252,23 @@ Array [ "serviceName": "opbeans-java", "transactionName": "ResourceHttpRequestHandler", "transactionType": "request", - "transactionsPerMinute": 0.5, + "transactionsPerMinute": 0.533333333333333, }, Object { - "averageResponseTime": 6883.57142857143, - "impact": 0.0410784261517549, + "averageResponseTime": 10786.2, + "impact": 0.0490887080726551, "key": Object { - "service.name": "opbeans-java", - "transaction.name": "APIRestController#order", + "service.name": "opbeans-ruby", + "transaction.name": "Api::ProductsController#show", }, - "serviceName": "opbeans-java", - "transactionName": "APIRestController#order", + "serviceName": "opbeans-ruby", + "transactionName": "Api::ProductsController#show", "transactionType": "request", - "transactionsPerMinute": 0.233333333333333, + "transactionsPerMinute": 0.166666666666667, }, Object { - "averageResponseTime": 3505, - "impact": 0.0480460318422139, + "averageResponseTime": 3497.6875, + "impact": 0.0509961957823607, "key": Object { "service.name": "opbeans-dotnet", "transaction.name": "GET Products/Get", @@ -279,8 +279,8 @@ Array [ "transactionsPerMinute": 0.533333333333333, }, Object { - "averageResponseTime": 5621.4, - "impact": 0.0481642913941483, + "averageResponseTime": 5604.9, + "impact": 0.0510769260692872, "key": Object { "service.name": "opbeans-java", "transaction.name": "APIRestController#topProducts", @@ -291,44 +291,44 @@ Array [ "transactionsPerMinute": 0.333333333333333, }, Object { - "averageResponseTime": 8428.71428571429, - "impact": 0.0506239135675883, + "averageResponseTime": 8500.57142857143, + "impact": 0.0543202184103467, "key": Object { "service.name": "opbeans-node", - "transaction.name": "GET /api/orders", + "transaction.name": "GET /api/customers/:id", }, "serviceName": "opbeans-node", - "transactionName": "GET /api/orders", + "transactionName": "GET /api/customers/:id", "transactionType": "request", "transactionsPerMinute": 0.233333333333333, }, Object { - "averageResponseTime": 8520.14285714286, - "impact": 0.0511887353081702, + "averageResponseTime": 6658.88888888889, + "impact": 0.0547201149479129, "key": Object { "service.name": "opbeans-node", - "transaction.name": "GET /api/customers/:id", + "transaction.name": "GET /api/products/top", }, "serviceName": "opbeans-node", - "transactionName": "GET /api/customers/:id", + "transactionName": "GET /api/products/top", "transactionType": "request", - "transactionsPerMinute": 0.233333333333333, + "transactionsPerMinute": 0.3, }, Object { - "averageResponseTime": 6683.44444444444, - "impact": 0.0516388276326964, + "averageResponseTime": 8141.125, + "impact": 0.0596005424099008, "key": Object { "service.name": "opbeans-node", - "transaction.name": "GET /api/products/top", + "transaction.name": "GET /api/orders", }, "serviceName": "opbeans-node", - "transactionName": "GET /api/products/top", + "transactionName": "GET /api/orders", "transactionType": "request", - "transactionsPerMinute": 0.3, + "transactionsPerMinute": 0.266666666666667, }, Object { - "averageResponseTime": 3482.78947368421, - "impact": 0.0569534471979838, + "averageResponseTime": 3473.52631578947, + "impact": 0.0604153550732987, "key": Object { "service.name": "opbeans-dotnet", "transaction.name": "GET Types/Get", @@ -339,20 +339,20 @@ Array [ "transactionsPerMinute": 0.633333333333333, }, Object { - "averageResponseTime": 16703, - "impact": 0.057517386404596, + "averageResponseTime": 7875, + "impact": 0.064994452045712, "key": Object { - "service.name": "opbeans-python", - "transaction.name": "GET opbeans.views.product_type", + "service.name": "opbeans-node", + "transaction.name": "GET /api/types/:id", }, - "serviceName": "opbeans-python", - "transactionName": "GET opbeans.views.product_type", + "serviceName": "opbeans-node", + "transactionName": "GET /api/types/:id", "transactionType": "request", - "transactionsPerMinute": 0.133333333333333, + "transactionsPerMinute": 0.3, }, Object { - "averageResponseTime": 4943, - "impact": 0.0596266425920813, + "averageResponseTime": 4889, + "impact": 0.0673037137415171, "key": Object { "service.name": "opbeans-dotnet", "transaction.name": "GET Products/Get {id}", @@ -360,23 +360,23 @@ Array [ "serviceName": "opbeans-dotnet", "transactionName": "GET Products/Get {id}", "transactionType": "request", - "transactionsPerMinute": 0.466666666666667, + "transactionsPerMinute": 0.5, }, Object { - "averageResponseTime": 7892.33333333333, - "impact": 0.0612407972225879, + "averageResponseTime": 14902.4, + "impact": 0.0684085922032904, "key": Object { - "service.name": "opbeans-node", - "transaction.name": "GET /api/types/:id", + "service.name": "opbeans-python", + "transaction.name": "GET opbeans.views.product_type", }, - "serviceName": "opbeans-node", - "transactionName": "GET /api/types/:id", + "serviceName": "opbeans-python", + "transactionName": "GET opbeans.views.product_type", "transactionType": "request", - "transactionsPerMinute": 0.3, + "transactionsPerMinute": 0.166666666666667, }, Object { - "averageResponseTime": 6346.42857142857, - "impact": 0.0769666700279444, + "averageResponseTime": 6329.35714285714, + "impact": 0.0816436656379062, "key": Object { "service.name": "opbeans-dotnet", "transaction.name": "GET Orders/Get {id}", @@ -387,8 +387,8 @@ Array [ "transactionsPerMinute": 0.466666666666667, }, Object { - "averageResponseTime": 7052.84615384615, - "impact": 0.0794704188998674, + "averageResponseTime": 6627.42857142857, + "impact": 0.0855609620023755, "key": Object { "service.name": "opbeans-go", "transaction.name": "GET /api/products", @@ -396,11 +396,11 @@ Array [ "serviceName": "opbeans-go", "transactionName": "GET /api/products", "transactionType": "request", - "transactionsPerMinute": 0.433333333333333, + "transactionsPerMinute": 0.466666666666667, }, Object { - "averageResponseTime": 10484.3333333333, - "impact": 0.0818285496667966, + "averageResponseTime": 10459, + "impact": 0.0868254235894687, "key": Object { "service.name": "opbeans-java", "transaction.name": "APIRestController#product", @@ -411,8 +411,8 @@ Array [ "transactionsPerMinute": 0.3, }, Object { - "averageResponseTime": 23711, - "impact": 0.0822565786420813, + "averageResponseTime": 23652.5, + "impact": 0.087275072513164, "key": Object { "service.name": "opbeans-node", "transaction.name": "GET /api/stats", @@ -423,8 +423,8 @@ Array [ "transactionsPerMinute": 0.133333333333333, }, Object { - "averageResponseTime": 4491.36363636364, - "impact": 0.0857567083657495, + "averageResponseTime": 4480.95454545455, + "impact": 0.0910027465757826, "key": Object { "service.name": "opbeans-dotnet", "transaction.name": "GET Types/Get {id}", @@ -435,8 +435,8 @@ Array [ "transactionsPerMinute": 0.733333333333333, }, Object { - "averageResponseTime": 20715.8, - "impact": 0.089965512867054, + "averageResponseTime": 20677.4, + "impact": 0.0955142554010017, "key": Object { "service.name": "opbeans-python", "transaction.name": "GET opbeans.views.stats", @@ -447,8 +447,8 @@ Array [ "transactionsPerMinute": 0.166666666666667, }, Object { - "averageResponseTime": 9036.33333333333, - "impact": 0.0942519803576885, + "averageResponseTime": 9015.33333333333, + "impact": 0.100017315707821, "key": Object { "service.name": "opbeans-node", "transaction.name": "GET /api/products", @@ -459,8 +459,20 @@ Array [ "transactionsPerMinute": 0.4, }, Object { - "averageResponseTime": 7504.06666666667, - "impact": 0.0978924329825326, + "averageResponseTime": 12096.8888888889, + "impact": 0.100663158003234, + "key": Object { + "service.name": "opbeans-go", + "transaction.name": "GET /api/customers", + }, + "serviceName": "opbeans-go", + "transactionName": "GET /api/customers", + "transactionType": "request", + "transactionsPerMinute": 0.3, + }, + Object { + "averageResponseTime": 7361.46666666667, + "impact": 0.102118180616444, "key": Object { "service.name": "opbeans-java", "transaction.name": "APIRestController#customer", @@ -471,8 +483,8 @@ Array [ "transactionsPerMinute": 0.5, }, Object { - "averageResponseTime": 4250.55555555556, - "impact": 0.0998375378516613, + "averageResponseTime": 4141.07142857143, + "impact": 0.107307448362139, "key": Object { "service.name": "opbeans-go", "transaction.name": "GET /api/types/:id", @@ -480,11 +492,11 @@ Array [ "serviceName": "opbeans-go", "transactionName": "GET /api/types/:id", "transactionType": "request", - "transactionsPerMinute": 0.9, + "transactionsPerMinute": 0.933333333333333, }, Object { - "averageResponseTime": 21343, - "impact": 0.11156906191034, + "averageResponseTime": 21277, + "impact": 0.118301786972411, "key": Object { "service.name": "opbeans-node", "transaction.name": "GET /api/customers", @@ -495,8 +507,8 @@ Array [ "transactionsPerMinute": 0.2, }, Object { - "averageResponseTime": 16655, - "impact": 0.116142352941114, + "averageResponseTime": 16602.25, + "impact": 0.123141849290936, "key": Object { "service.name": "opbeans-ruby", "transaction.name": "Api::ProductsController#top", @@ -507,20 +519,8 @@ Array [ "transactionsPerMinute": 0.266666666666667, }, Object { - "averageResponseTime": 5749, - "impact": 0.12032203382142, - "key": Object { - "service.name": "opbeans-go", - "transaction.name": "GET /api/types", - }, - "serviceName": "opbeans-go", - "transactionName": "GET /api/types", - "transactionType": "request", - "transactionsPerMinute": 0.8, - }, - Object { - "averageResponseTime": 9951, - "impact": 0.121502864272824, + "averageResponseTime": 9924.07142857143, + "impact": 0.128885903078184, "key": Object { "service.name": "opbeans-ruby", "transaction.name": "Api::StatsController#index", @@ -531,20 +531,20 @@ Array [ "transactionsPerMinute": 0.466666666666667, }, Object { - "averageResponseTime": 14040.6, - "impact": 0.122466591367692, + "averageResponseTime": 5444.5, + "impact": 0.131345360656643, "key": Object { "service.name": "opbeans-go", - "transaction.name": "GET /api/customers", + "transaction.name": "GET /api/types", }, "serviceName": "opbeans-go", - "transactionName": "GET /api/customers", + "transactionName": "GET /api/types", "transactionType": "request", - "transactionsPerMinute": 0.333333333333333, + "transactionsPerMinute": 0.866666666666667, }, Object { - "averageResponseTime": 20963.5714285714, - "impact": 0.128060974201361, + "averageResponseTime": 20932.4285714286, + "impact": 0.136010820261582, "key": Object { "service.name": "opbeans-ruby", "transaction.name": "Api::OrdersController#index", @@ -555,8 +555,20 @@ Array [ "transactionsPerMinute": 0.233333333333333, }, Object { - "averageResponseTime": 22874.4285714286, - "impact": 0.139865748579522, + "averageResponseTime": 12301.3333333333, + "impact": 0.137033090987896, + "key": Object { + "service.name": "opbeans-ruby", + "transaction.name": "Api::ProductsController#index", + }, + "serviceName": "opbeans-ruby", + "transactionName": "Api::ProductsController#index", + "transactionType": "request", + "transactionsPerMinute": 0.4, + }, + Object { + "averageResponseTime": 22818.7142857143, + "impact": 0.148405735477602, "key": Object { "service.name": "opbeans-python", "transaction.name": "GET opbeans.views.customer", @@ -567,8 +579,8 @@ Array [ "transactionsPerMinute": 0.233333333333333, }, Object { - "averageResponseTime": 32203.8, - "impact": 0.140658264084276, + "averageResponseTime": 32098.4, + "impact": 0.149120104644475, "key": Object { "service.name": "opbeans-python", "transaction.name": "GET opbeans.views.customers", @@ -579,8 +591,8 @@ Array [ "transactionsPerMinute": 0.166666666666667, }, Object { - "averageResponseTime": 4482.11111111111, - "impact": 0.140955678032051, + "averageResponseTime": 4585.91428571429, + "impact": 0.149134185508474, "key": Object { "service.name": "opbeans-go", "transaction.name": "GET /api/customers/:id", @@ -588,23 +600,23 @@ Array [ "serviceName": "opbeans-go", "transactionName": "GET /api/customers/:id", "transactionType": "request", - "transactionsPerMinute": 1.2, + "transactionsPerMinute": 1.16666666666667, }, Object { - "averageResponseTime": 12582.3846153846, - "impact": 0.142910490774846, + "averageResponseTime": 20449.3333333333, + "impact": 0.171228938571142, "key": Object { - "service.name": "opbeans-ruby", - "transaction.name": "Api::ProductsController#index", + "service.name": "opbeans-python", + "transaction.name": "GET opbeans.views.orders", }, - "serviceName": "opbeans-ruby", - "transactionName": "Api::ProductsController#index", + "serviceName": "opbeans-python", + "transactionName": "GET opbeans.views.orders", "transactionType": "request", - "transactionsPerMinute": 0.433333333333333, + "transactionsPerMinute": 0.3, }, Object { - "averageResponseTime": 10009.9473684211, - "impact": 0.166401779979233, + "averageResponseTime": 9981.1052631579, + "impact": 0.176482978291232, "key": Object { "service.name": "opbeans-ruby", "transaction.name": "Api::CustomersController#show", @@ -615,8 +627,8 @@ Array [ "transactionsPerMinute": 0.633333333333333, }, Object { - "averageResponseTime": 27825.2857142857, - "impact": 0.170450845832029, + "averageResponseTime": 27758.7142857143, + "impact": 0.180866820616195, "key": Object { "service.name": "opbeans-python", "transaction.name": "GET opbeans.views.product_types", @@ -627,20 +639,20 @@ Array [ "transactionsPerMinute": 0.233333333333333, }, Object { - "averageResponseTime": 20562.2, - "impact": 0.180021926732983, + "averageResponseTime": 8332.06896551724, + "impact": 0.225286314186844, "key": Object { - "service.name": "opbeans-python", - "transaction.name": "GET opbeans.views.orders", + "service.name": "opbeans-go", + "transaction.name": "GET /api/orders/:id", }, - "serviceName": "opbeans-python", - "transactionName": "GET opbeans.views.orders", + "serviceName": "opbeans-go", + "transactionName": "GET /api/orders/:id", "transactionType": "request", - "transactionsPerMinute": 0.333333333333333, + "transactionsPerMinute": 0.966666666666667, }, Object { - "averageResponseTime": 7106.76470588235, - "impact": 0.21180020991247, + "averageResponseTime": 6976.62857142857, + "impact": 0.227681938515175, "key": Object { "service.name": "opbeans-dotnet", "transaction.name": "GET Customers/Get {id}", @@ -648,23 +660,11 @@ Array [ "serviceName": "opbeans-dotnet", "transactionName": "GET Customers/Get {id}", "transactionType": "request", - "transactionsPerMinute": 1.13333333333333, - }, - Object { - "averageResponseTime": 8612.51724137931, - "impact": 0.218977858687708, - "key": Object { - "service.name": "opbeans-go", - "transaction.name": "GET /api/orders/:id", - }, - "serviceName": "opbeans-go", - "transactionName": "GET /api/orders/:id", - "transactionType": "request", - "transactionsPerMinute": 0.966666666666667, + "transactionsPerMinute": 1.16666666666667, }, Object { - "averageResponseTime": 11295, - "impact": 0.277663720068132, + "averageResponseTime": 11321.7777777778, + "impact": 0.2854191132559, "key": Object { "service.name": "opbeans-ruby", "transaction.name": "Api::CustomersController#index", @@ -672,11 +672,11 @@ Array [ "serviceName": "opbeans-ruby", "transactionName": "Api::CustomersController#index", "transactionType": "request", - "transactionsPerMinute": 0.933333333333333, + "transactionsPerMinute": 0.9, }, Object { - "averageResponseTime": 65035.8, - "impact": 0.285535040543522, + "averageResponseTime": 64824.2, + "impact": 0.302722617661906, "key": Object { "service.name": "opbeans-python", "transaction.name": "GET opbeans.views.product_customers", @@ -687,8 +687,8 @@ Array [ "transactionsPerMinute": 0.166666666666667, }, Object { - "averageResponseTime": 30999.4705882353, - "impact": 0.463640986028375, + "averageResponseTime": 32155.5625, + "impact": 0.481425678843616, "key": Object { "service.name": "opbeans-go", "transaction.name": "GET /api/stats", @@ -696,11 +696,23 @@ Array [ "serviceName": "opbeans-go", "transactionName": "GET /api/stats", "transactionType": "request", - "transactionsPerMinute": 0.566666666666667, + "transactionsPerMinute": 0.533333333333333, }, Object { - "averageResponseTime": 20197.4, - "impact": 0.622424732781511, + "averageResponseTime": 32890.5714285714, + "impact": 0.646841098031782, + "key": Object { + "service.name": "opbeans-dotnet", + "transaction.name": "GET Customers/Get", + }, + "serviceName": "opbeans-dotnet", + "transactionName": "GET Customers/Get", + "transactionType": "request", + "transactionsPerMinute": 0.7, + }, + Object { + "averageResponseTime": 20133.0571428571, + "impact": 0.65994099517201, "key": Object { "service.name": "opbeans-go", "transaction.name": "GET /api/products/:id/customers", @@ -711,8 +723,8 @@ Array [ "transactionsPerMinute": 1.16666666666667, }, Object { - "averageResponseTime": 64681.6666666667, - "impact": 0.68355874339377, + "averageResponseTime": 64534, + "impact": 0.725417951490748, "key": Object { "service.name": "opbeans-python", "transaction.name": "GET opbeans.views.top_products", @@ -723,20 +735,8 @@ Array [ "transactionsPerMinute": 0.4, }, Object { - "averageResponseTime": 41416.1428571429, - "impact": 0.766127739061111, - "key": Object { - "service.name": "opbeans-dotnet", - "transaction.name": "GET Customers/Get", - }, - "serviceName": "opbeans-dotnet", - "transactionName": "GET Customers/Get", - "transactionType": "request", - "transactionsPerMinute": 0.7, - }, - Object { - "averageResponseTime": 19429, - "impact": 0.821597646656097, + "averageResponseTime": 19259.8775510204, + "impact": 0.884368376654926, "key": Object { "service.name": "opbeans-go", "transaction.name": "GET /api/products/:id", @@ -744,11 +744,11 @@ Array [ "serviceName": "opbeans-go", "transactionName": "GET /api/products/:id", "transactionType": "request", - "transactionsPerMinute": 1.6, + "transactionsPerMinute": 1.63333333333333, }, Object { - "averageResponseTime": 62390.652173913, - "impact": 1.26497653527507, + "averageResponseTime": 62237.5652173913, + "impact": 1.3422123631976, "key": Object { "service.name": "opbeans-dotnet", "transaction.name": "GET Products/Customerwhobought {id}", @@ -759,8 +759,8 @@ Array [ "transactionsPerMinute": 0.766666666666667, }, Object { - "averageResponseTime": 33266.2, - "impact": 1.76006661931225, + "averageResponseTime": 33203.5666666667, + "impact": 1.86860199568649, "key": Object { "service.name": "opbeans-python", "transaction.name": "opbeans.tasks.sync_orders", @@ -771,8 +771,8 @@ Array [ "transactionsPerMinute": 2, }, Object { - "averageResponseTime": 38491.4444444444, - "impact": 1.83293391905112, + "averageResponseTime": 37042.1607142857, + "impact": 1.94571537801384, "key": Object { "service.name": "opbeans-node", "transaction.name": "GET /api", @@ -780,11 +780,11 @@ Array [ "serviceName": "opbeans-node", "transactionName": "GET /api", "transactionType": "request", - "transactionsPerMinute": 1.8, + "transactionsPerMinute": 1.86666666666667, }, Object { - "averageResponseTime": 118488.6, - "impact": 2.08995781717084, + "averageResponseTime": 116654.571428571, + "impact": 2.29809838682675, "key": Object { "service.name": "opbeans-dotnet", "transaction.name": "GET Stats/Get", @@ -792,47 +792,35 @@ Array [ "serviceName": "opbeans-dotnet", "transactionName": "GET Stats/Get", "transactionType": "request", - "transactionsPerMinute": 0.666666666666667, - }, - Object { - "averageResponseTime": 250440.142857143, - "impact": 4.64001412901584, - "key": Object { - "service.name": "opbeans-dotnet", - "transaction.name": "GET Products/Top", - }, - "serviceName": "opbeans-dotnet", - "transactionName": "GET Products/Top", - "transactionType": "request", "transactionsPerMinute": 0.7, }, Object { - "averageResponseTime": 312096.523809524, - "impact": 5.782704992387, + "averageResponseTime": 28741.0333333333, + "impact": 2.4266538589631, "key": Object { - "service.name": "opbeans-java", - "transaction.name": "DispatcherServlet#doGet", + "service.name": "opbeans-ruby", + "transaction.name": "Rack", }, - "serviceName": "opbeans-java", - "transactionName": "DispatcherServlet#doGet", + "serviceName": "opbeans-ruby", + "transactionName": "Rack", "transactionType": "request", - "transactionsPerMinute": 0.7, + "transactionsPerMinute": 3, }, Object { - "averageResponseTime": 91519.7032967033, - "impact": 7.34855500859826, + "averageResponseTime": 249714.952380952, + "impact": 4.9211455657754, "key": Object { - "service.name": "opbeans-ruby", - "transaction.name": "Rack", + "service.name": "opbeans-dotnet", + "transaction.name": "GET Products/Top", }, - "serviceName": "opbeans-ruby", - "transactionName": "Rack", + "serviceName": "opbeans-dotnet", + "transactionName": "GET Products/Top", "transactionType": "request", - "transactionsPerMinute": 3.03333333333333, + "transactionsPerMinute": 0.7, }, Object { - "averageResponseTime": 648269.769230769, - "impact": 7.43611473386403, + "averageResponseTime": 653461.538461538, + "impact": 7.97292501431132, "key": Object { "service.name": "opbeans-rum", "transaction.name": "/customers", @@ -843,8 +831,20 @@ Array [ "transactionsPerMinute": 0.433333333333333, }, Object { - "averageResponseTime": 1398919.72727273, - "impact": 13.5790895084132, + "averageResponseTime": 575328.095238095, + "impact": 11.340025698891, + "key": Object { + "service.name": "opbeans-java", + "transaction.name": "DispatcherServlet#doGet", + }, + "serviceName": "opbeans-java", + "transactionName": "DispatcherServlet#doGet", + "transactionType": "request", + "transactionsPerMinute": 0.7, + }, + Object { + "averageResponseTime": 1534606.6, + "impact": 14.4041869205032, "key": Object { "service.name": "opbeans-python", "transaction.name": "GET opbeans.views.products", @@ -852,11 +852,11 @@ Array [ "serviceName": "opbeans-python", "transactionName": "GET opbeans.views.products", "transactionType": "request", - "transactionsPerMinute": 0.366666666666667, + "transactionsPerMinute": 0.333333333333333, }, Object { - "averageResponseTime": 1199907.57142857, - "impact": 14.8239822181408, + "averageResponseTime": 1197500, + "impact": 15.7361746989891, "key": Object { "service.name": "opbeans-rum", "transaction.name": "/orders", @@ -867,8 +867,8 @@ Array [ "transactionsPerMinute": 0.466666666666667, }, Object { - "averageResponseTime": 955876.052631579, - "impact": 16.026822184214, + "averageResponseTime": 953684.210526316, + "impact": 17.0081460802151, "key": Object { "service.name": "opbeans-rum", "transaction.name": "/products", @@ -879,8 +879,8 @@ Array [ "transactionsPerMinute": 0.633333333333333, }, Object { - "averageResponseTime": 965009.526315789, - "impact": 16.1799735991728, + "averageResponseTime": 962252.473684211, + "impact": 17.1609675746427, "key": Object { "service.name": "opbeans-go", "transaction.name": "GET /api/orders", @@ -891,8 +891,8 @@ Array [ "transactionsPerMinute": 0.633333333333333, }, Object { - "averageResponseTime": 1213675.30769231, - "impact": 27.8474053933734, + "averageResponseTime": 1212615.38461538, + "impact": 29.594561046619, "key": Object { "service.name": "opbeans-rum", "transaction.name": "/dashboard", @@ -903,8 +903,8 @@ Array [ "transactionsPerMinute": 0.866666666666667, }, Object { - "averageResponseTime": 924019.363636364, - "impact": 35.8796065162284, + "averageResponseTime": 896783.309523809, + "impact": 35.3554170595149, "key": Object { "service.name": "opbeans-node", "transaction.name": "Update shipping status", @@ -912,23 +912,11 @@ Array [ "serviceName": "opbeans-node", "transactionName": "Update shipping status", "transactionType": "Worker", - "transactionsPerMinute": 1.46666666666667, - }, - Object { - "averageResponseTime": 1060469.15384615, - "impact": 36.498655556576, - "key": Object { - "service.name": "opbeans-node", - "transaction.name": "Process payment", - }, - "serviceName": "opbeans-node", - "transactionName": "Process payment", - "transactionType": "Worker", - "transactionsPerMinute": 1.3, + "transactionsPerMinute": 1.4, }, Object { - "averageResponseTime": 118686.822222222, - "impact": 37.7068083771466, + "averageResponseTime": 119062.672222222, + "impact": 40.2345894471584, "key": Object { "service.name": "opbeans-python", "transaction.name": "opbeans.tasks.update_stats", @@ -939,8 +927,20 @@ Array [ "transactionsPerMinute": 12, }, Object { - "averageResponseTime": 1039228.27659574, - "impact": 43.1048035741496, + "averageResponseTime": 1078328.675, + "impact": 40.488594152833, + "key": Object { + "service.name": "opbeans-node", + "transaction.name": "Process payment", + }, + "serviceName": "opbeans-node", + "transactionName": "Process payment", + "transactionType": "Worker", + "transactionsPerMinute": 1.33333333333333, + }, + Object { + "averageResponseTime": 1057995.65957447, + "impact": 46.6772737502262, "key": Object { "service.name": "opbeans-node", "transaction.name": "Process completed order", @@ -951,8 +951,8 @@ Array [ "transactionsPerMinute": 1.56666666666667, }, Object { - "averageResponseTime": 1949922.55555556, - "impact": 61.9499776921889, + "averageResponseTime": 1947354.08333333, + "impact": 65.8074895815218, "key": Object { "service.name": "opbeans-python", "transaction.name": "opbeans.tasks.sync_customers", @@ -963,7 +963,7 @@ Array [ "transactionsPerMinute": 1.2, }, Object { - "averageResponseTime": 5963775, + "averageResponseTime": 5918288.44444444, "impact": 100, "key": Object { "service.name": "opbeans-dotnet", @@ -972,7 +972,7 @@ Array [ "serviceName": "opbeans-dotnet", "transactionName": "GET Orders/Get", "transactionType": "request", - "transactionsPerMinute": 0.633333333333333, + "transactionsPerMinute": 0.6, }, ] `; diff --git a/x-pack/test/apm_api_integration/tests/traces/top_traces.ts b/x-pack/test/apm_api_integration/tests/traces/top_traces.ts index 4968732f82203..e67c2cb66df69 100644 --- a/x-pack/test/apm_api_integration/tests/traces/top_traces.ts +++ b/x-pack/test/apm_api_integration/tests/traces/top_traces.ts @@ -63,7 +63,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { expectSnapshot(firstItem).toMatchInline(` Object { - "averageResponseTime": 1639, + "averageResponseTime": 1638, "impact": 0, "key": Object { "service.name": "opbeans-java", @@ -78,7 +78,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { expectSnapshot(lastItem).toMatchInline(` Object { - "averageResponseTime": 5963775, + "averageResponseTime": 5918288.44444444, "impact": 100, "key": Object { "service.name": "opbeans-dotnet", @@ -87,7 +87,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { "serviceName": "opbeans-dotnet", "transactionName": "GET Orders/Get", "transactionType": "request", - "transactionsPerMinute": 0.633333333333333, + "transactionsPerMinute": 0.6, } `); diff --git a/x-pack/test/apm_api_integration/tests/transactions/__snapshots__/error_rate.snap b/x-pack/test/apm_api_integration/tests/transactions/__snapshots__/error_rate.snap index c4dfaf346d015..878e5775c4ef5 100644 --- a/x-pack/test/apm_api_integration/tests/transactions/__snapshots__/error_rate.snap +++ b/x-pack/test/apm_api_integration/tests/transactions/__snapshots__/error_rate.snap @@ -6,121 +6,241 @@ Array [ "x": 1627973400000, "y": 0, }, + Object { + "x": 1627973430000, + "y": 0, + }, Object { "x": 1627973460000, "y": 0, }, Object { - "x": 1627973520000, + "x": 1627973490000, "y": 0.333333333333333, }, + Object { + "x": 1627973520000, + "y": 0, + }, + Object { + "x": 1627973550000, + "y": 0.125, + }, Object { "x": 1627973580000, - "y": 0.181818181818182, + "y": 0.25, + }, + Object { + "x": 1627973610000, + "y": 0, }, Object { "x": 1627973640000, "y": 0, }, + Object { + "x": 1627973670000, + "y": 0, + }, Object { "x": 1627973700000, "y": 0, }, + Object { + "x": 1627973730000, + "y": 0.333333333333333, + }, Object { "x": 1627973760000, "y": 0.166666666666667, }, + Object { + "x": 1627973790000, + "y": 0, + }, Object { "x": 1627973820000, - "y": 0.181818181818182, + "y": 0.2, + }, + Object { + "x": 1627973850000, + "y": 0, }, Object { "x": 1627973880000, "y": 0, }, + Object { + "x": 1627973910000, + "y": 0, + }, Object { "x": 1627973940000, "y": 0, }, + Object { + "x": 1627973970000, + "y": 0.166666666666667, + }, Object { "x": 1627974000000, - "y": 0.0833333333333333, + "y": 0, + }, + Object { + "x": 1627974030000, + "y": 0, }, Object { "x": 1627974060000, - "y": 0.0769230769230769, + "y": 0.25, + }, + Object { + "x": 1627974090000, + "y": 0.5, }, Object { "x": 1627974120000, "y": 0, }, + Object { + "x": 1627974150000, + "y": 0, + }, Object { "x": 1627974180000, - "y": 0.1, + "y": 0, + }, + Object { + "x": 1627974210000, + "y": 0.2, }, Object { "x": 1627974240000, - "y": 0.153846153846154, + "y": 0.142857142857143, + }, + Object { + "x": 1627974270000, + "y": 0, }, Object { "x": 1627974300000, "y": 0, }, + Object { + "x": 1627974330000, + "y": null, + }, Object { "x": 1627974360000, "y": null, }, + Object { + "x": 1627974390000, + "y": 0, + }, Object { "x": 1627974420000, "y": 0, }, + Object { + "x": 1627974450000, + "y": 0, + }, Object { "x": 1627974480000, "y": 0, }, + Object { + "x": 1627974510000, + "y": 0, + }, Object { "x": 1627974540000, "y": 0, }, + Object { + "x": 1627974570000, + "y": 0, + }, Object { "x": 1627974600000, - "y": 0.125, + "y": 0.4, + }, + Object { + "x": 1627974630000, + "y": 1, }, Object { "x": 1627974660000, - "y": 0.6, + "y": 0.333333333333333, + }, + Object { + "x": 1627974690000, + "y": 0.5, }, Object { "x": 1627974720000, - "y": 0.2, + "y": 0, + }, + Object { + "x": 1627974750000, + "y": 0, }, Object { "x": 1627974780000, "y": 0, }, + Object { + "x": 1627974810000, + "y": 0, + }, Object { "x": 1627974840000, + "y": 0.333333333333333, + }, + Object { + "x": 1627974870000, "y": 0, }, Object { "x": 1627974900000, - "y": 0.0666666666666667, + "y": 0, + }, + Object { + "x": 1627974930000, + "y": 0, }, Object { "x": 1627974960000, "y": 0, }, + Object { + "x": 1627974990000, + "y": 0, + }, Object { "x": 1627975020000, "y": 0, }, + Object { + "x": 1627975050000, + "y": 0, + }, Object { "x": 1627975080000, "y": 0, }, + Object { + "x": 1627975110000, + "y": 0.4, + }, Object { "x": 1627975140000, - "y": 0.181818181818182, + "y": 0, + }, + Object { + "x": 1627975170000, + "y": 0.333333333333333, }, Object { "x": 1627975200000, @@ -132,136 +252,736 @@ Array [ exports[`APM API tests basic apm_8.0.0 Error rate when data is loaded returns the transaction error rate with comparison data has the correct error rate 1`] = ` Array [ Object { - "x": 1627974300000, - "y": 0, + "x": 1627974310000, + "y": null, + }, + Object { + "x": 1627974320000, + "y": null, + }, + Object { + "x": 1627974330000, + "y": null, + }, + Object { + "x": 1627974340000, + "y": null, + }, + Object { + "x": 1627974350000, + "y": null, }, Object { "x": 1627974360000, "y": null, }, + Object { + "x": 1627974370000, + "y": null, + }, + Object { + "x": 1627974380000, + "y": null, + }, + Object { + "x": 1627974390000, + "y": null, + }, + Object { + "x": 1627974400000, + "y": null, + }, + Object { + "x": 1627974410000, + "y": 0, + }, Object { "x": 1627974420000, "y": 0, }, Object { - "x": 1627974480000, + "x": 1627974430000, + "y": null, + }, + Object { + "x": 1627974440000, "y": 0, }, Object { - "x": 1627974540000, + "x": 1627974450000, "y": 0, }, Object { - "x": 1627974600000, - "y": 0.125, + "x": 1627974460000, + "y": 0, }, Object { - "x": 1627974660000, - "y": 0.6, + "x": 1627974470000, + "y": null, }, Object { - "x": 1627974720000, - "y": 0.2, + "x": 1627974480000, + "y": 0, }, Object { - "x": 1627974780000, + "x": 1627974490000, + "y": null, + }, + Object { + "x": 1627974500000, "y": 0, }, Object { - "x": 1627974840000, + "x": 1627974510000, + "y": null, + }, + Object { + "x": 1627974520000, "y": 0, }, Object { - "x": 1627974900000, - "y": 0.0666666666666667, + "x": 1627974530000, + "y": null, }, Object { - "x": 1627974960000, + "x": 1627974540000, "y": 0, }, Object { - "x": 1627975020000, + "x": 1627974550000, "y": 0, }, Object { - "x": 1627975080000, + "x": 1627974560000, + "y": null, + }, + Object { + "x": 1627974570000, "y": 0, }, Object { - "x": 1627975140000, - "y": 0.181818181818182, + "x": 1627974580000, + "y": null, }, Object { - "x": 1627975200000, + "x": 1627974590000, "y": null, }, -] -`; - -exports[`APM API tests basic apm_8.0.0 Error rate when data is loaded returns the transaction error rate with comparison data has the correct error rate 2`] = ` -Array [ Object { - "x": 1627974300000, + "x": 1627974600000, + "y": null, + }, + Object { + "x": 1627974610000, "y": 0, }, Object { - "x": 1627974360000, + "x": 1627974620000, + "y": 1, + }, + Object { + "x": 1627974630000, + "y": null, + }, + Object { + "x": 1627974640000, + "y": null, + }, + Object { + "x": 1627974650000, + "y": 1, + }, + Object { + "x": 1627974660000, "y": 0, }, Object { - "x": 1627974420000, - "y": 0.333333333333333, + "x": 1627974670000, + "y": 0.5, }, Object { - "x": 1627974480000, - "y": 0.181818181818182, + "x": 1627974680000, + "y": null, }, Object { - "x": 1627974540000, + "x": 1627974690000, + "y": 1, + }, + Object { + "x": 1627974700000, + "y": null, + }, + Object { + "x": 1627974710000, "y": 0, }, Object { - "x": 1627974600000, + "x": 1627974720000, + "y": null, + }, + Object { + "x": 1627974730000, "y": 0, }, Object { - "x": 1627974660000, - "y": 0.166666666666667, + "x": 1627974740000, + "y": 0, }, Object { - "x": 1627974720000, - "y": 0.181818181818182, + "x": 1627974750000, + "y": 0, + }, + Object { + "x": 1627974760000, + "y": null, + }, + Object { + "x": 1627974770000, + "y": 0, }, Object { "x": 1627974780000, "y": 0, }, + Object { + "x": 1627974790000, + "y": 0, + }, + Object { + "x": 1627974800000, + "y": null, + }, + Object { + "x": 1627974810000, + "y": 0, + }, + Object { + "x": 1627974820000, + "y": null, + }, + Object { + "x": 1627974830000, + "y": null, + }, Object { "x": 1627974840000, + "y": null, + }, + Object { + "x": 1627974850000, + "y": 0.5, + }, + Object { + "x": 1627974860000, + "y": 0, + }, + Object { + "x": 1627974870000, + "y": 0, + }, + Object { + "x": 1627974880000, + "y": null, + }, + Object { + "x": 1627974890000, "y": 0, }, Object { "x": 1627974900000, - "y": 0.0833333333333333, + "y": 0, }, Object { - "x": 1627974960000, - "y": 0.0769230769230769, + "x": 1627974910000, + "y": 0, }, Object { - "x": 1627975020000, + "x": 1627974920000, + "y": null, + }, + Object { + "x": 1627974930000, "y": 0, }, Object { - "x": 1627975080000, - "y": 0.1, + "x": 1627974940000, + "y": null, }, Object { - "x": 1627975140000, - "y": 0.153846153846154, + "x": 1627974950000, + "y": null, }, Object { - "x": 1627975200000, + "x": 1627974960000, + "y": null, + }, + Object { + "x": 1627974970000, + "y": 0, + }, + Object { + "x": 1627974980000, + "y": null, + }, + Object { + "x": 1627974990000, + "y": 0, + }, + Object { + "x": 1627975000000, + "y": null, + }, + Object { + "x": 1627975010000, + "y": 0, + }, + Object { + "x": 1627975020000, + "y": 0, + }, + Object { + "x": 1627975030000, + "y": 0, + }, + Object { + "x": 1627975040000, + "y": null, + }, + Object { + "x": 1627975050000, + "y": 0, + }, + Object { + "x": 1627975060000, + "y": 0, + }, + Object { + "x": 1627975070000, + "y": 0, + }, + Object { + "x": 1627975080000, + "y": 0, + }, + Object { + "x": 1627975090000, + "y": 0, + }, + Object { + "x": 1627975100000, + "y": 0, + }, + Object { + "x": 1627975110000, + "y": 0.333333333333333, + }, + Object { + "x": 1627975120000, + "y": 0, + }, + Object { + "x": 1627975130000, + "y": 1, + }, + Object { + "x": 1627975140000, + "y": 0, + }, + Object { + "x": 1627975150000, + "y": 0, + }, + Object { + "x": 1627975160000, + "y": null, + }, + Object { + "x": 1627975170000, + "y": 0, + }, + Object { + "x": 1627975180000, + "y": 0.25, + }, + Object { + "x": 1627975190000, + "y": 1, + }, + Object { + "x": 1627975200000, + "y": null, + }, + Object { + "x": 1627975210000, + "y": null, + }, +] +`; + +exports[`APM API tests basic apm_8.0.0 Error rate when data is loaded returns the transaction error rate with comparison data has the correct error rate 2`] = ` +Array [ + Object { + "x": 1627974310000, + "y": null, + }, + Object { + "x": 1627974320000, + "y": 0, + }, + Object { + "x": 1627974330000, + "y": null, + }, + Object { + "x": 1627974340000, + "y": null, + }, + Object { + "x": 1627974350000, + "y": 0, + }, + Object { + "x": 1627974360000, + "y": 0, + }, + Object { + "x": 1627974370000, + "y": null, + }, + Object { + "x": 1627974380000, + "y": null, + }, + Object { + "x": 1627974390000, + "y": 0.5, + }, + Object { + "x": 1627974400000, + "y": null, + }, + Object { + "x": 1627974410000, + "y": 0, + }, + Object { + "x": 1627974420000, + "y": null, + }, + Object { + "x": 1627974430000, + "y": 0, + }, + Object { + "x": 1627974440000, + "y": null, + }, + Object { + "x": 1627974450000, + "y": 0.142857142857143, + }, + Object { + "x": 1627974460000, + "y": 0, + }, + Object { + "x": 1627974470000, + "y": null, + }, + Object { + "x": 1627974480000, + "y": 0.5, + }, + Object { + "x": 1627974490000, + "y": 0, + }, + Object { + "x": 1627974500000, + "y": null, + }, + Object { + "x": 1627974510000, + "y": null, + }, + Object { + "x": 1627974520000, + "y": null, + }, + Object { + "x": 1627974530000, + "y": 0, + }, + Object { + "x": 1627974540000, + "y": null, + }, + Object { + "x": 1627974550000, + "y": 0, + }, + Object { + "x": 1627974560000, + "y": null, + }, + Object { + "x": 1627974570000, + "y": 0, + }, + Object { + "x": 1627974580000, + "y": null, + }, + Object { + "x": 1627974590000, + "y": 0, + }, + Object { + "x": 1627974600000, + "y": 0, + }, + Object { + "x": 1627974610000, + "y": 0, + }, + Object { + "x": 1627974620000, + "y": null, + }, + Object { + "x": 1627974630000, + "y": null, + }, + Object { + "x": 1627974640000, + "y": 0, + }, + Object { + "x": 1627974650000, + "y": 0.5, + }, + Object { + "x": 1627974660000, + "y": 0, + }, + Object { + "x": 1627974670000, + "y": 0.5, + }, + Object { + "x": 1627974680000, + "y": 0, + }, + Object { + "x": 1627974690000, + "y": 0, + }, + Object { + "x": 1627974700000, + "y": 0, + }, + Object { + "x": 1627974710000, + "y": 0, + }, + Object { + "x": 1627974720000, + "y": 0.25, + }, + Object { + "x": 1627974730000, + "y": null, + }, + Object { + "x": 1627974740000, + "y": 0, + }, + Object { + "x": 1627974750000, + "y": 0, + }, + Object { + "x": 1627974760000, + "y": 0, + }, + Object { + "x": 1627974770000, + "y": 0, + }, + Object { + "x": 1627974780000, + "y": 0, + }, + Object { + "x": 1627974790000, + "y": 0, + }, + Object { + "x": 1627974800000, + "y": 0, + }, + Object { + "x": 1627974810000, + "y": 0, + }, + Object { + "x": 1627974820000, + "y": 0, + }, + Object { + "x": 1627974830000, + "y": null, + }, + Object { + "x": 1627974840000, + "y": 0, + }, + Object { + "x": 1627974850000, + "y": 0, + }, + Object { + "x": 1627974860000, + "y": null, + }, + Object { + "x": 1627974870000, + "y": 0.5, + }, + Object { + "x": 1627974880000, + "y": null, + }, + Object { + "x": 1627974890000, + "y": 0, + }, + Object { + "x": 1627974900000, + "y": 0, + }, + Object { + "x": 1627974910000, + "y": 0, + }, + Object { + "x": 1627974920000, + "y": 0, + }, + Object { + "x": 1627974930000, + "y": 0, + }, + Object { + "x": 1627974940000, + "y": 0, + }, + Object { + "x": 1627974950000, + "y": 0, + }, + Object { + "x": 1627974960000, + "y": 0.333333333333333, + }, + Object { + "x": 1627974970000, + "y": 0, + }, + Object { + "x": 1627974980000, + "y": null, + }, + Object { + "x": 1627974990000, + "y": 0, + }, + Object { + "x": 1627975000000, + "y": 1, + }, + Object { + "x": 1627975010000, + "y": null, + }, + Object { + "x": 1627975020000, + "y": 0, + }, + Object { + "x": 1627975030000, + "y": 0, + }, + Object { + "x": 1627975040000, + "y": 0, + }, + Object { + "x": 1627975050000, + "y": 0, + }, + Object { + "x": 1627975060000, + "y": 0, + }, + Object { + "x": 1627975070000, + "y": null, + }, + Object { + "x": 1627975080000, + "y": 0, + }, + Object { + "x": 1627975090000, + "y": 0, + }, + Object { + "x": 1627975100000, + "y": 0, + }, + Object { + "x": 1627975110000, + "y": 0, + }, + Object { + "x": 1627975120000, + "y": 0, + }, + Object { + "x": 1627975130000, + "y": 0.333333333333333, + }, + Object { + "x": 1627975140000, + "y": 0.333333333333333, + }, + Object { + "x": 1627975150000, + "y": 0, + }, + Object { + "x": 1627975160000, + "y": null, + }, + Object { + "x": 1627975170000, + "y": null, + }, + Object { + "x": 1627975180000, + "y": 0, + }, + Object { + "x": 1627975190000, + "y": 0, + }, + Object { + "x": 1627975200000, + "y": 0, + }, + Object { + "x": 1627975210000, "y": null, }, ] diff --git a/x-pack/test/apm_api_integration/tests/transactions/__snapshots__/latency.snap b/x-pack/test/apm_api_integration/tests/transactions/__snapshots__/latency.snap index ff9e52b57aeaa..25b995acb87f1 100644 --- a/x-pack/test/apm_api_integration/tests/transactions/__snapshots__/latency.snap +++ b/x-pack/test/apm_api_integration/tests/transactions/__snapshots__/latency.snap @@ -3,64 +3,196 @@ exports[`APM API tests basic apm_8.0.0 Latency with a basic license when data is loaded time comparison returns some data 1`] = ` Array [ Object { - "x": 1627974300000, - "y": 22799, + "x": 1627974350000, + "y": 32153, }, Object { - "x": 1627974360000, - "y": 3227391, + "x": 1627974390000, + "y": 15341.3333333333, + }, + Object { + "x": 1627974410000, + "y": 15170.5, }, Object { "x": 1627974420000, - "y": 15565.2222222222, + "y": 17329, + }, + Object { + "x": 1627974460000, + "y": 50039, }, Object { "x": 1627974480000, - "y": 54307.5714285714, + "y": 55816.6, + }, + Object { + "x": 1627974490000, + "y": 17533, + }, + Object { + "x": 1627974510000, + "y": 14888, }, Object { "x": 1627974540000, - "y": 16655, + "y": 12191.5, + }, + Object { + "x": 1627974550000, + "y": 20445.5, + }, + Object { + "x": 1627974590000, + "y": 9859, }, Object { "x": 1627974600000, - "y": 9453, + "y": 11796, + }, + Object { + "x": 1627974610000, + "y": 8774.4, + }, + Object { + "x": 1627974620000, + "y": 42225.6666666667, + }, + Object { + "x": 1627974630000, + "y": 16168, + }, + Object { + "x": 1627974640000, + "y": 7851.33333333333, }, Object { "x": 1627974660000, - "y": 31119, + "y": 45852, }, Object { - "x": 1627974720000, - "y": 15282.2, + "x": 1627974700000, + "y": 21823, + }, + Object { + "x": 1627974710000, + "y": 4156, + }, + Object { + "x": 1627974730000, + "y": 14191.5, + }, + Object { + "x": 1627974740000, + "y": 3997, + }, + Object { + "x": 1627974750000, + "y": 21823.75, + }, + Object { + "x": 1627974760000, + "y": 58178.5, + }, + Object { + "x": 1627974770000, + "y": 24291.5, }, Object { "x": 1627974780000, - "y": 18709, + "y": 7527.75, }, Object { "x": 1627974840000, - "y": 12095, + "y": 12028, }, Object { - "x": 1627974900000, - "y": 16291, + "x": 1627974860000, + "y": 6773.8, }, Object { - "x": 1627974960000, - "y": 13444.3333333333, + "x": 1627974870000, + "y": 37030, }, Object { - "x": 1627975020000, - "y": 13241.6666666667, + "x": 1627974890000, + "y": 29564, + }, + Object { + "x": 1627974910000, + "y": 15606, + }, + Object { + "x": 1627974930000, + "y": 11747, + }, + Object { + "x": 1627974940000, + "y": 9425, + }, + Object { + "x": 1627974950000, + "y": 20220, + }, + Object { + "x": 1627975000000, + "y": 12995.5, + }, + Object { + "x": 1627975030000, + "y": 13606, + }, + Object { + "x": 1627975050000, + "y": 22030, + }, + Object { + "x": 1627975060000, + "y": 10819, + }, + Object { + "x": 1627975070000, + "y": 26343, }, Object { "x": 1627975080000, - "y": 25535, + "y": 33080.5, }, Object { - "x": 1627975140000, - "y": 11024.6, + "x": 1627975090000, + "y": 11899, + }, + Object { + "x": 1627975100000, + "y": 5253, + }, + Object { + "x": 1627975110000, + "y": 16502, + }, + Object { + "x": 1627975120000, + "y": 6945.5, + }, + Object { + "x": 1627975130000, + "y": 7244, + }, + Object { + "x": 1627975150000, + "y": 22631.5, + }, + Object { + "x": 1627975180000, + "y": 23489, + }, + Object { + "x": 1627975190000, + "y": 10133.3333333333, + }, + Object { + "x": 1627975210000, + "y": 52108, }, ] `; @@ -68,64 +200,200 @@ Array [ exports[`APM API tests basic apm_8.0.0 Latency with a basic license when data is loaded time comparison returns some data 2`] = ` Array [ Object { - "x": 1627974300000, - "y": 34866.2, + "x": 1627974310000, + "y": 107053.5, }, Object { - "x": 1627974360000, - "y": 104799, + "x": 1627974370000, + "y": 9857, }, Object { - "x": 1627974420000, - "y": 36247, + "x": 1627974380000, + "y": 266341, + }, + Object { + "x": 1627974390000, + "y": 11715.75, + }, + Object { + "x": 1627974410000, + "y": 7805.25, + }, + Object { + "x": 1627974430000, + "y": 15880, + }, + Object { + "x": 1627974460000, + "y": 21836, + }, + Object { + "x": 1627974470000, + "y": 23962, }, Object { "x": 1627974480000, - "y": 22207, + "y": 21352.5, }, Object { - "x": 1627974540000, - "y": 80191, + "x": 1627974490000, + "y": 21639, }, Object { - "x": 1627974600000, - "y": 11520.4545454545, + "x": 1627974530000, + "y": 13970, + }, + Object { + "x": 1627974550000, + "y": 58140, + }, + Object { + "x": 1627974570000, + "y": 9853.75, + }, + Object { + "x": 1627974580000, + "y": 6490, + }, + Object { + "x": 1627974590000, + "y": 18894, + }, + Object { + "x": 1627974610000, + "y": 14125, + }, + Object { + "x": 1627974640000, + "y": 86268.25, }, Object { "x": 1627974660000, - "y": 47031.8888888889, + "y": 14218, + }, + Object { + "x": 1627974670000, + "y": 19127, + }, + Object { + "x": 1627974680000, + "y": 31538, }, Object { "x": 1627974720000, - "y": 30249.6666666667, + "y": 29535, }, Object { - "x": 1627974780000, - "y": 14868.3333333333, + "x": 1627974740000, + "y": 11229, + }, + Object { + "x": 1627974750000, + "y": 23940, + }, + Object { + "x": 1627974760000, + "y": 9262, + }, + Object { + "x": 1627974790000, + "y": 15650, }, Object { "x": 1627974840000, - "y": 17199, + "y": 17656.3333333333, + }, + Object { + "x": 1627974880000, + "y": 8371.5, + }, + Object { + "x": 1627974890000, + "y": 11386.5, }, Object { "x": 1627974900000, - "y": 19837.2222222222, + "y": 28923.75, + }, + Object { + "x": 1627974910000, + "y": 22670, + }, + Object { + "x": 1627974920000, + "y": 13607.6666666667, + }, + Object { + "x": 1627974930000, + "y": 19640, + }, + Object { + "x": 1627974940000, + "y": 20511, }, Object { "x": 1627974960000, - "y": 19397.6666666667, + "y": 34862, + }, + Object { + "x": 1627974990000, + "y": 27929.2, }, Object { "x": 1627975020000, - "y": 22473.6666666667, + "y": 25569, + }, + Object { + "x": 1627975030000, + "y": 6817.33333333333, + }, + Object { + "x": 1627975040000, + "y": 10467.6666666667, + }, + Object { + "x": 1627975060000, + "y": 6754.33333333333, + }, + Object { + "x": 1627975070000, + "y": 22049, }, Object { "x": 1627975080000, - "y": 11362.2, + "y": 15029, + }, + Object { + "x": 1627975090000, + "y": 14744, + }, + Object { + "x": 1627975110000, + "y": 32192.3333333333, + }, + Object { + "x": 1627975130000, + "y": 8321, + }, + Object { + "x": 1627975160000, + "y": 11648, + }, + Object { + "x": 1627975170000, + "y": 13157, + }, + Object { + "x": 1627975190000, + "y": 12855, + }, + Object { + "x": 1627975200000, + "y": 1322026.8, }, Object { - "x": 1627975140000, - "y": 26319, + "x": 1627975210000, + "y": 4650.33333333333, }, ] `; diff --git a/x-pack/test/apm_api_integration/tests/transactions/__snapshots__/transactions_groups_detailed_statistics.snap b/x-pack/test/apm_api_integration/tests/transactions/__snapshots__/transactions_groups_detailed_statistics.snap deleted file mode 100644 index 0c9bbb378f74c..0000000000000 --- a/x-pack/test/apm_api_integration/tests/transactions/__snapshots__/transactions_groups_detailed_statistics.snap +++ /dev/null @@ -1,931 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`APM API tests basic apm_8.0.0 Transaction groups detailed statistics when data is loaded returns data with previous period returns correct error rate data 1`] = ` -Array [ - Object { - "x": 1627974300000, - "y": 0, - }, - Object { - "x": 1627974360000, - "y": null, - }, - Object { - "x": 1627974420000, - "y": null, - }, - Object { - "x": 1627974480000, - "y": 0, - }, - Object { - "x": 1627974540000, - "y": 0, - }, - Object { - "x": 1627974600000, - "y": 0, - }, - Object { - "x": 1627974660000, - "y": 0, - }, - Object { - "x": 1627974720000, - "y": null, - }, - Object { - "x": 1627974780000, - "y": 0, - }, - Object { - "x": 1627974840000, - "y": null, - }, - Object { - "x": 1627974900000, - "y": 0, - }, - Object { - "x": 1627974960000, - "y": null, - }, - Object { - "x": 1627975020000, - "y": null, - }, - Object { - "x": 1627975080000, - "y": 0, - }, - Object { - "x": 1627975140000, - "y": null, - }, - Object { - "x": 1627975200000, - "y": null, - }, -] -`; - -exports[`APM API tests basic apm_8.0.0 Transaction groups detailed statistics when data is loaded returns data with previous period returns correct error rate data 2`] = ` -Array [ - Object { - "x": 1627974300000, - "y": 0, - }, - Object { - "x": 1627974360000, - "y": null, - }, - Object { - "x": 1627974420000, - "y": 1, - }, - Object { - "x": 1627974480000, - "y": 0, - }, - Object { - "x": 1627974540000, - "y": 0, - }, - Object { - "x": 1627974600000, - "y": null, - }, - Object { - "x": 1627974660000, - "y": null, - }, - Object { - "x": 1627974720000, - "y": 0.25, - }, - Object { - "x": 1627974780000, - "y": null, - }, - Object { - "x": 1627974840000, - "y": 0, - }, - Object { - "x": 1627974900000, - "y": 0, - }, - Object { - "x": 1627974960000, - "y": 0, - }, - Object { - "x": 1627975020000, - "y": 0, - }, - Object { - "x": 1627975080000, - "y": 0.5, - }, - Object { - "x": 1627975140000, - "y": 0.25, - }, - Object { - "x": 1627975200000, - "y": null, - }, -] -`; - -exports[`APM API tests basic apm_8.0.0 Transaction groups detailed statistics when data is loaded returns data with previous period returns correct latency data 1`] = ` -Array [ - Object { - "x": 1627974300000, - "y": 72303, - }, - Object { - "x": 1627974360000, - "y": null, - }, - Object { - "x": 1627974420000, - "y": null, - }, - Object { - "x": 1627974480000, - "y": 173055, - }, - Object { - "x": 1627974540000, - "y": 26687, - }, - Object { - "x": 1627974600000, - "y": 17867.8, - }, - Object { - "x": 1627974660000, - "y": 24319, - }, - Object { - "x": 1627974720000, - "y": null, - }, - Object { - "x": 1627974780000, - "y": 15743, - }, - Object { - "x": 1627974840000, - "y": null, - }, - Object { - "x": 1627974900000, - "y": 31679, - }, - Object { - "x": 1627974960000, - "y": null, - }, - Object { - "x": 1627975020000, - "y": null, - }, - Object { - "x": 1627975080000, - "y": 14391, - }, - Object { - "x": 1627975140000, - "y": null, - }, - Object { - "x": 1627975200000, - "y": null, - }, -] -`; - -exports[`APM API tests basic apm_8.0.0 Transaction groups detailed statistics when data is loaded returns data with previous period returns correct latency data 2`] = ` -Array [ - Object { - "x": 1627974300000, - "y": 34047, - }, - Object { - "x": 1627974360000, - "y": null, - }, - Object { - "x": 1627974420000, - "y": 5767167, - }, - Object { - "x": 1627974480000, - "y": 10335, - }, - Object { - "x": 1627974540000, - "y": 118015, - }, - Object { - "x": 1627974600000, - "y": null, - }, - Object { - "x": 1627974660000, - "y": null, - }, - Object { - "x": 1627974720000, - "y": 1371695, - }, - Object { - "x": 1627974780000, - "y": null, - }, - Object { - "x": 1627974840000, - "y": 3769087, - }, - Object { - "x": 1627974900000, - "y": 19015, - }, - Object { - "x": 1627974960000, - "y": 22356.3333333333, - }, - Object { - "x": 1627975020000, - "y": 28447, - }, - Object { - "x": 1627975080000, - "y": 33434367, - }, - Object { - "x": 1627975140000, - "y": 23407, - }, - Object { - "x": 1627975200000, - "y": null, - }, -] -`; - -exports[`APM API tests basic apm_8.0.0 Transaction groups detailed statistics when data is loaded returns data with previous period returns correct throughput data 1`] = ` -Array [ - Object { - "x": 1627974300000, - "y": 2, - }, - Object { - "x": 1627974360000, - "y": 0, - }, - Object { - "x": 1627974420000, - "y": 0, - }, - Object { - "x": 1627974480000, - "y": 1, - }, - Object { - "x": 1627974540000, - "y": 1, - }, - Object { - "x": 1627974600000, - "y": 2, - }, - Object { - "x": 1627974660000, - "y": 1, - }, - Object { - "x": 1627974720000, - "y": 0, - }, - Object { - "x": 1627974780000, - "y": 1, - }, - Object { - "x": 1627974840000, - "y": 0, - }, - Object { - "x": 1627974900000, - "y": 2, - }, - Object { - "x": 1627974960000, - "y": 0, - }, - Object { - "x": 1627975020000, - "y": 0, - }, - Object { - "x": 1627975080000, - "y": 4, - }, - Object { - "x": 1627975140000, - "y": 0, - }, - Object { - "x": 1627975200000, - "y": 0, - }, -] -`; - -exports[`APM API tests basic apm_8.0.0 Transaction groups detailed statistics when data is loaded returns data with previous period returns correct throughput data 2`] = ` -Array [ - Object { - "x": 1627974300000, - "y": 1, - }, - Object { - "x": 1627974360000, - "y": 0, - }, - Object { - "x": 1627974420000, - "y": 1, - }, - Object { - "x": 1627974480000, - "y": 2, - }, - Object { - "x": 1627974540000, - "y": 2, - }, - Object { - "x": 1627974600000, - "y": 0, - }, - Object { - "x": 1627974660000, - "y": 0, - }, - Object { - "x": 1627974720000, - "y": 3, - }, - Object { - "x": 1627974780000, - "y": 0, - }, - Object { - "x": 1627974840000, - "y": 2, - }, - Object { - "x": 1627974900000, - "y": 3, - }, - Object { - "x": 1627974960000, - "y": 2, - }, - Object { - "x": 1627975020000, - "y": 1, - }, - Object { - "x": 1627975080000, - "y": 2, - }, - Object { - "x": 1627975140000, - "y": 3, - }, - Object { - "x": 1627975200000, - "y": 0, - }, -] -`; - -exports[`APM API tests basic apm_8.0.0 Transaction groups detailed statistics when data is loaded returns the correct data 1`] = ` -Array [ - Object { - "x": 1627973400000, - "y": 34047, - }, - Object { - "x": 1627973460000, - "y": null, - }, - Object { - "x": 1627973520000, - "y": 5767167, - }, - Object { - "x": 1627973580000, - "y": 10335, - }, - Object { - "x": 1627973640000, - "y": 118015, - }, - Object { - "x": 1627973700000, - "y": null, - }, - Object { - "x": 1627973760000, - "y": null, - }, - Object { - "x": 1627973820000, - "y": 1371695, - }, - Object { - "x": 1627973880000, - "y": null, - }, - Object { - "x": 1627973940000, - "y": 3769087, - }, - Object { - "x": 1627974000000, - "y": 19015, - }, - Object { - "x": 1627974060000, - "y": 22356.3333333333, - }, - Object { - "x": 1627974120000, - "y": 28447, - }, - Object { - "x": 1627974180000, - "y": 33434367, - }, - Object { - "x": 1627974240000, - "y": 23407, - }, - Object { - "x": 1627974300000, - "y": 72303, - }, - Object { - "x": 1627974360000, - "y": null, - }, - Object { - "x": 1627974420000, - "y": null, - }, - Object { - "x": 1627974480000, - "y": 173055, - }, - Object { - "x": 1627974540000, - "y": 26687, - }, - Object { - "x": 1627974600000, - "y": 17867.8, - }, - Object { - "x": 1627974660000, - "y": 24319, - }, - Object { - "x": 1627974720000, - "y": null, - }, - Object { - "x": 1627974780000, - "y": 15743, - }, - Object { - "x": 1627974840000, - "y": null, - }, - Object { - "x": 1627974900000, - "y": 31679, - }, - Object { - "x": 1627974960000, - "y": null, - }, - Object { - "x": 1627975020000, - "y": null, - }, - Object { - "x": 1627975080000, - "y": 14391, - }, - Object { - "x": 1627975140000, - "y": null, - }, - Object { - "x": 1627975200000, - "y": null, - }, -] -`; - -exports[`APM API tests basic apm_8.0.0 Transaction groups detailed statistics when data is loaded returns the correct data 2`] = ` -Array [ - Object { - "x": 1627973400000, - "y": 1, - }, - Object { - "x": 1627973460000, - "y": 0, - }, - Object { - "x": 1627973520000, - "y": 1, - }, - Object { - "x": 1627973580000, - "y": 2, - }, - Object { - "x": 1627973640000, - "y": 2, - }, - Object { - "x": 1627973700000, - "y": 0, - }, - Object { - "x": 1627973760000, - "y": 0, - }, - Object { - "x": 1627973820000, - "y": 3, - }, - Object { - "x": 1627973880000, - "y": 0, - }, - Object { - "x": 1627973940000, - "y": 2, - }, - Object { - "x": 1627974000000, - "y": 3, - }, - Object { - "x": 1627974060000, - "y": 2, - }, - Object { - "x": 1627974120000, - "y": 1, - }, - Object { - "x": 1627974180000, - "y": 2, - }, - Object { - "x": 1627974240000, - "y": 3, - }, - Object { - "x": 1627974300000, - "y": 2, - }, - Object { - "x": 1627974360000, - "y": 0, - }, - Object { - "x": 1627974420000, - "y": 0, - }, - Object { - "x": 1627974480000, - "y": 1, - }, - Object { - "x": 1627974540000, - "y": 1, - }, - Object { - "x": 1627974600000, - "y": 2, - }, - Object { - "x": 1627974660000, - "y": 1, - }, - Object { - "x": 1627974720000, - "y": 0, - }, - Object { - "x": 1627974780000, - "y": 1, - }, - Object { - "x": 1627974840000, - "y": 0, - }, - Object { - "x": 1627974900000, - "y": 2, - }, - Object { - "x": 1627974960000, - "y": 0, - }, - Object { - "x": 1627975020000, - "y": 0, - }, - Object { - "x": 1627975080000, - "y": 4, - }, - Object { - "x": 1627975140000, - "y": 0, - }, - Object { - "x": 1627975200000, - "y": 0, - }, -] -`; - -exports[`APM API tests basic apm_8.0.0 Transaction groups detailed statistics when data is loaded returns the correct data 3`] = ` -Array [ - Object { - "x": 1627973400000, - "y": 0, - }, - Object { - "x": 1627973460000, - "y": null, - }, - Object { - "x": 1627973520000, - "y": 1, - }, - Object { - "x": 1627973580000, - "y": 0, - }, - Object { - "x": 1627973640000, - "y": 0, - }, - Object { - "x": 1627973700000, - "y": null, - }, - Object { - "x": 1627973760000, - "y": null, - }, - Object { - "x": 1627973820000, - "y": 0.25, - }, - Object { - "x": 1627973880000, - "y": null, - }, - Object { - "x": 1627973940000, - "y": 0, - }, - Object { - "x": 1627974000000, - "y": 0, - }, - Object { - "x": 1627974060000, - "y": 0, - }, - Object { - "x": 1627974120000, - "y": 0, - }, - Object { - "x": 1627974180000, - "y": 0.5, - }, - Object { - "x": 1627974240000, - "y": 0.25, - }, - Object { - "x": 1627974300000, - "y": 0, - }, - Object { - "x": 1627974360000, - "y": null, - }, - Object { - "x": 1627974420000, - "y": null, - }, - Object { - "x": 1627974480000, - "y": 0, - }, - Object { - "x": 1627974540000, - "y": 0, - }, - Object { - "x": 1627974600000, - "y": 0, - }, - Object { - "x": 1627974660000, - "y": 0, - }, - Object { - "x": 1627974720000, - "y": null, - }, - Object { - "x": 1627974780000, - "y": 0, - }, - Object { - "x": 1627974840000, - "y": null, - }, - Object { - "x": 1627974900000, - "y": 0, - }, - Object { - "x": 1627974960000, - "y": null, - }, - Object { - "x": 1627975020000, - "y": null, - }, - Object { - "x": 1627975080000, - "y": 0, - }, - Object { - "x": 1627975140000, - "y": null, - }, - Object { - "x": 1627975200000, - "y": null, - }, -] -`; - -exports[`APM API tests basic apm_8.0.0 Transaction groups detailed statistics when data is loaded returns the correct data for latency aggregation 99th percentile 1`] = ` -Array [ - Object { - "x": 1627973400000, - "y": 34047, - }, - Object { - "x": 1627973460000, - "y": null, - }, - Object { - "x": 1627973520000, - "y": 5767167, - }, - Object { - "x": 1627973580000, - "y": 16127, - }, - Object { - "x": 1627973640000, - "y": 214015, - }, - Object { - "x": 1627973700000, - "y": null, - }, - Object { - "x": 1627973760000, - "y": null, - }, - Object { - "x": 1627973820000, - "y": 5439487, - }, - Object { - "x": 1627973880000, - "y": null, - }, - Object { - "x": 1627973940000, - "y": 5668863, - }, - Object { - "x": 1627974000000, - "y": 32255, - }, - Object { - "x": 1627974060000, - "y": 28159, - }, - Object { - "x": 1627974120000, - "y": 44287, - }, - Object { - "x": 1627974180000, - "y": 66846719, - }, - Object { - "x": 1627974240000, - "y": 42751, - }, - Object { - "x": 1627974300000, - "y": 140287, - }, - Object { - "x": 1627974360000, - "y": null, - }, - Object { - "x": 1627974420000, - "y": null, - }, - Object { - "x": 1627974480000, - "y": 173055, - }, - Object { - "x": 1627974540000, - "y": 28927, - }, - Object { - "x": 1627974600000, - "y": 39679, - }, - Object { - "x": 1627974660000, - "y": 24319, - }, - Object { - "x": 1627974720000, - "y": null, - }, - Object { - "x": 1627974780000, - "y": 15743, - }, - Object { - "x": 1627974840000, - "y": null, - }, - Object { - "x": 1627974900000, - "y": 33791, - }, - Object { - "x": 1627974960000, - "y": null, - }, - Object { - "x": 1627975020000, - "y": null, - }, - Object { - "x": 1627975080000, - "y": 23167, - }, - Object { - "x": 1627975140000, - "y": null, - }, - Object { - "x": 1627975200000, - "y": null, - }, -] -`; diff --git a/x-pack/test/apm_api_integration/tests/transactions/error_rate.ts b/x-pack/test/apm_api_integration/tests/transactions/error_rate.ts index 2ddaa4677394c..89f818f58e875 100644 --- a/x-pack/test/apm_api_integration/tests/transactions/error_rate.ts +++ b/x-pack/test/apm_api_integration/tests/transactions/error_rate.ts @@ -117,13 +117,13 @@ export default function ApiTest({ getService }: FtrProviderContext) { it('has the correct number of buckets', () => { expectSnapshot(errorRateResponse.currentPeriod.transactionErrorRate.length).toMatchInline( - `31` + `61` ); }); it('has the correct calculation for average', () => { expectSnapshot(errorRateResponse.currentPeriod.average).toMatchInline( - `0.0848214285714286` + `0.092511013215859` ); }); @@ -175,12 +175,12 @@ export default function ApiTest({ getService }: FtrProviderContext) { new Date( first(errorRateResponse.currentPeriod.transactionErrorRate)?.x ?? NaN ).toISOString() - ).toMatchInline(`"2021-08-03T07:05:00.000Z"`); + ).toMatchInline(`"2021-08-03T07:05:10.000Z"`); expectSnapshot( new Date( first(errorRateResponse.previousPeriod.transactionErrorRate)?.x ?? NaN ).toISOString() - ).toMatchInline(`"2021-08-03T07:05:00.000Z"`); + ).toMatchInline(`"2021-08-03T07:05:10.000Z"`); }); it('has the correct end date', () => { @@ -188,29 +188,29 @@ export default function ApiTest({ getService }: FtrProviderContext) { new Date( last(errorRateResponse.currentPeriod.transactionErrorRate)?.x ?? NaN ).toISOString() - ).toMatchInline(`"2021-08-03T07:20:00.000Z"`); + ).toMatchInline(`"2021-08-03T07:20:10.000Z"`); expectSnapshot( new Date( last(errorRateResponse.previousPeriod.transactionErrorRate)?.x ?? NaN ).toISOString() - ).toMatchInline(`"2021-08-03T07:20:00.000Z"`); + ).toMatchInline(`"2021-08-03T07:20:10.000Z"`); }); it('has the correct number of buckets', () => { expectSnapshot(errorRateResponse.currentPeriod.transactionErrorRate.length).toMatchInline( - `16` + `91` ); expectSnapshot( errorRateResponse.previousPeriod.transactionErrorRate.length - ).toMatchInline(`16`); + ).toMatchInline(`91`); }); it('has the correct calculation for average', () => { expectSnapshot(errorRateResponse.currentPeriod.average).toMatchInline( - `0.0792079207920792` + `0.102040816326531` ); expectSnapshot(errorRateResponse.previousPeriod.average).toMatchInline( - `0.0894308943089431` + `0.0852713178294574` ); }); diff --git a/x-pack/test/apm_api_integration/tests/transactions/latency.ts b/x-pack/test/apm_api_integration/tests/transactions/latency.ts index beaff7647868a..d021e59ecff6c 100644 --- a/x-pack/test/apm_api_integration/tests/transactions/latency.ts +++ b/x-pack/test/apm_api_integration/tests/transactions/latency.ts @@ -113,7 +113,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { expect(response.status).to.be(200); const latencyChartReturn = response.body as LatencyChartReturnType; expect(latencyChartReturn.currentPeriod.overallAvgDuration).not.to.be(null); - expect(latencyChartReturn.currentPeriod.latencyTimeseries.length).to.be.eql(31); + expect(latencyChartReturn.currentPeriod.latencyTimeseries.length).to.be.eql(61); }); }); @@ -138,7 +138,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { expect(response.status).to.be(200); const latencyChartReturn = response.body as LatencyChartReturnType; expect(latencyChartReturn.currentPeriod.overallAvgDuration).not.to.be(null); - expect(latencyChartReturn.currentPeriod.latencyTimeseries.length).to.be.eql(31); + expect(latencyChartReturn.currentPeriod.latencyTimeseries.length).to.be.eql(61); }); }); @@ -165,10 +165,10 @@ export default function ApiTest({ getService }: FtrProviderContext) { expect(latencyChartReturn.currentPeriod.overallAvgDuration).not.to.be(null); expectSnapshot(latencyChartReturn.currentPeriod.overallAvgDuration).toMatchInline( - `53906.6603773585` + `53147.5747663551` ); - expect(latencyChartReturn.currentPeriod.latencyTimeseries.length).to.be.eql(31); + expect(latencyChartReturn.currentPeriod.latencyTimeseries.length).to.be.eql(61); }); }); diff --git a/x-pack/test/apm_api_integration/tests/transactions/transactions_groups_detailed_statistics.ts b/x-pack/test/apm_api_integration/tests/transactions/transactions_groups_detailed_statistics.ts index add954f490db1..100d3c306b7de 100644 --- a/x-pack/test/apm_api_integration/tests/transactions/transactions_groups_detailed_statistics.ts +++ b/x-pack/test/apm_api_integration/tests/transactions/transactions_groups_detailed_statistics.ts @@ -4,293 +4,247 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - +import { service, timerange } from '@elastic/apm-generator'; import expect from '@kbn/expect'; -import url from 'url'; +import { first, isEmpty, last, meanBy } from 'lodash'; import moment from 'moment'; -import { pick } from 'lodash'; +import { LatencyAggregationType } from '../../../../plugins/apm/common/latency_aggregation_types'; +import { asPercent } from '../../../../plugins/apm/common/utils/formatters'; import { APIReturnType } from '../../../../plugins/apm/public/services/rest/createCallApmApi'; -import archives from '../../common/fixtures/es_archiver/archives_metadata'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { registry } from '../../common/registry'; -import { removeEmptyCoordinates, roundNumber } from '../../utils'; +import { roundNumber } from '../../utils'; type TransactionsGroupsDetailedStatistics = APIReturnType<'GET /internal/apm/services/{serviceName}/transactions/groups/detailed_statistics'>; export default function ApiTest({ getService }: FtrProviderContext) { - const supertest = getService('legacySupertestAsApmReadUser'); - - const archiveName = 'apm_8.0.0'; - const { start, end } = archives[archiveName]; - const transactionNames = ['DispatcherServlet#doGet', 'APIRestController#customers']; + const apmApiClient = getService('apmApiClient'); + const traceData = getService('traceData'); + + const serviceName = 'synth-go'; + const start = new Date('2021-01-01T00:00:00.000Z').getTime(); + const end = new Date('2021-01-01T00:15:59.999Z').getTime(); + const transactionNames = ['GET /api/product/list']; + + async function callApi(overrides?: { + path?: { + serviceName?: string; + }; + query?: { + start?: string; + end?: string; + transactionType?: string; + environment?: string; + kuery?: string; + comparisonStart?: string; + comparisonEnd?: string; + transactionNames?: string; + latencyAggregationType?: LatencyAggregationType; + numBuckets?: number; + }; + }) { + const response = await apmApiClient.readUser({ + endpoint: 'GET /internal/apm/services/{serviceName}/transactions/groups/detailed_statistics', + params: { + path: { serviceName, ...overrides?.path }, + query: { + start: new Date(start).toISOString(), + end: new Date(end).toISOString(), + numBuckets: 20, + transactionType: 'request', + latencyAggregationType: 'avg' as LatencyAggregationType, + transactionNames: JSON.stringify(transactionNames), + environment: 'ENVIRONMENT_ALL', + kuery: '', + ...overrides?.query, + }, + }, + }); + expect(response.status).to.be(200); + return response.body; + } registry.when( 'Transaction groups detailed statistics when data is not loaded', { config: 'basic', archives: [] }, () => { it('handles the empty state', async () => { - const response = await supertest.get( - url.format({ - pathname: `/internal/apm/services/opbeans-java/transactions/groups/detailed_statistics`, - query: { - start, - end, - numBuckets: 20, - latencyAggregationType: 'avg', - transactionType: 'request', - transactionNames: JSON.stringify(transactionNames), - environment: 'ENVIRONMENT_ALL', - kuery: '', - }, - }) - ); - - expect(response.status).to.be(200); - expect(response.body).to.be.eql({ currentPeriod: {}, previousPeriod: {} }); + const response = await callApi(); + expect(response).to.be.eql({ currentPeriod: {}, previousPeriod: {} }); }); } ); - registry.when( - 'Transaction groups detailed statistics when data is loaded', - { config: 'basic', archives: [archiveName] }, - () => { - it('returns the correct data', async () => { - const response = await supertest.get( - url.format({ - pathname: `/internal/apm/services/opbeans-java/transactions/groups/detailed_statistics`, - query: { - start, - end, - numBuckets: 20, - transactionType: 'request', - latencyAggregationType: 'avg', - transactionNames: JSON.stringify(transactionNames), - environment: 'ENVIRONMENT_ALL', - kuery: '', - }, - }) + registry.when('data is loaded', { config: 'basic', archives: ['apm_8.0.0_empty'] }, () => { + describe('transactions groups detailed stats', () => { + const GO_PROD_RATE = 75; + const GO_PROD_ERROR_RATE = 25; + before(async () => { + const serviceGoProdInstance = service(serviceName, 'production', 'go').instance( + 'instance-a' ); - expect(response.status).to.be(200); - - const { currentPeriod, previousPeriod } = - response.body as TransactionsGroupsDetailedStatistics; - - expect(Object.keys(currentPeriod).sort()).to.be.eql(transactionNames.sort()); - - const currentPeriodItems = Object.values(currentPeriod); - const previousPeriodItems = Object.values(previousPeriod); - - expect(previousPeriodItems.length).to.be.eql(0); - - transactionNames.forEach((transactionName) => { - expect(currentPeriod[transactionName]).not.to.be.empty(); - }); - - const firstItem = currentPeriodItems[0]; - const { latency, throughput, errorRate, impact } = pick( - firstItem, - 'latency', - 'throughput', - 'errorRate', - 'impact' - ); - - expect(removeEmptyCoordinates(latency).length).to.be.greaterThan(0); - expectSnapshot(latency).toMatch(); - - expect(removeEmptyCoordinates(throughput).length).to.be.greaterThan(0); - expectSnapshot(throughput).toMatch(); - - expect(removeEmptyCoordinates(errorRate).length).to.be.greaterThan(0); - expectSnapshot(errorRate).toMatch(); - - expectSnapshot(roundNumber(impact)).toMatchInline(`"98.49"`); + const transactionName = 'GET /api/product/list'; + + await traceData.index([ + ...timerange(start, end) + .interval('1m') + .rate(GO_PROD_RATE) + .flatMap((timestamp) => + serviceGoProdInstance + .transaction(transactionName) + .timestamp(timestamp) + .duration(1000) + .success() + .serialize() + ), + ...timerange(start, end) + .interval('1m') + .rate(GO_PROD_ERROR_RATE) + .flatMap((timestamp) => + serviceGoProdInstance + .transaction(transactionName) + .duration(1000) + .timestamp(timestamp) + .failure() + .serialize() + ), + ]); }); - it('returns the correct data for latency aggregation 99th percentile', async () => { - const response = await supertest.get( - url.format({ - pathname: `/internal/apm/services/opbeans-java/transactions/groups/detailed_statistics`, - query: { - start, - end, - numBuckets: 20, - transactionType: 'request', - latencyAggregationType: 'p99', - transactionNames: JSON.stringify(transactionNames), - environment: 'ENVIRONMENT_ALL', - kuery: '', - }, - }) - ); - - expect(response.status).to.be(200); - - const { currentPeriod, previousPeriod } = - response.body as TransactionsGroupsDetailedStatistics; + after(() => traceData.clean()); - expect(Object.keys(currentPeriod).sort()).to.be.eql(transactionNames.sort()); - - const currentPeriodItems = Object.values(currentPeriod); - const previousPeriodItems = Object.values(previousPeriod); - - expect(previousPeriodItems).to.be.empty(); - - transactionNames.forEach((transactionName) => { - expect(currentPeriod[transactionName]).not.to.be.empty(); + describe('without comparisons', () => { + let transactionsStatistics: TransactionsGroupsDetailedStatistics; + let metricsStatistics: TransactionsGroupsDetailedStatistics; + before(async () => { + [metricsStatistics, transactionsStatistics] = await Promise.all([ + callApi({ query: { kuery: 'processor.event : "metric"' } }), + callApi({ query: { kuery: 'processor.event : "transaction"' } }), + ]); }); - const firstItem = currentPeriodItems[0]; - const { latency, throughput, errorRate } = pick( - firstItem, - 'latency', - 'throughput', - 'errorRate' - ); - - expect(removeEmptyCoordinates(latency).length).to.be.greaterThan(0); - expectSnapshot(latency).toMatch(); - - expect(removeEmptyCoordinates(throughput).length).to.be.greaterThan(0); - expect(removeEmptyCoordinates(errorRate).length).to.be.greaterThan(0); - }); - - it('returns empty when transaction name is not found', async () => { - const response = await supertest.get( - url.format({ - pathname: `/internal/apm/services/opbeans-java/transactions/groups/detailed_statistics`, - query: { - start, - end, - numBuckets: 20, - transactionType: 'request', - latencyAggregationType: 'avg', - transactionNames: JSON.stringify(['foo']), - environment: 'ENVIRONMENT_ALL', - kuery: '', - }, - }) - ); + it('returns some transactions data', () => { + expect(isEmpty(transactionsStatistics.currentPeriod)).to.be.equal(false); + }); - expect(response.status).to.be(200); - expect(response.body).to.be.eql({ currentPeriod: {}, previousPeriod: {} }); - }); + it('returns some metrics data', () => { + expect(isEmpty(metricsStatistics.currentPeriod)).to.be.equal(false); + }); - describe('returns data with previous period', async () => { - let currentPeriod: TransactionsGroupsDetailedStatistics['currentPeriod']; - let previousPeriod: TransactionsGroupsDetailedStatistics['previousPeriod']; - before(async () => { - const response = await supertest.get( - url.format({ - pathname: `/internal/apm/services/opbeans-java/transactions/groups/detailed_statistics`, - query: { - numBuckets: 20, - transactionType: 'request', - latencyAggregationType: 'avg', - transactionNames: JSON.stringify(transactionNames), - start: moment(end).subtract(15, 'minutes').toISOString(), - end, - comparisonStart: start, - comparisonEnd: moment(start).add(15, 'minutes').toISOString(), - environment: 'ENVIRONMENT_ALL', - kuery: '', - }, - }) + it('has same latency mean value for metrics and transactions data', () => { + const transactionsCurrentPeriod = + transactionsStatistics.currentPeriod[transactionNames[0]]; + const metricsCurrentPeriod = metricsStatistics.currentPeriod[transactionNames[0]]; + const transactionsLatencyMean = meanBy(transactionsCurrentPeriod.latency, 'y'); + const metricsLatencyMean = meanBy(metricsCurrentPeriod.latency, 'y'); + [transactionsLatencyMean, metricsLatencyMean].forEach((value) => + expect(value).to.be.equal(1000000) ); - - expect(response.status).to.be(200); - currentPeriod = response.body.currentPeriod; - previousPeriod = response.body.previousPeriod; }); - it('returns correct number of items', () => { - expect(Object.keys(currentPeriod).sort()).to.be.eql(transactionNames.sort()); - expect(Object.keys(previousPeriod).sort()).to.be.eql(transactionNames.sort()); + it('has same error rate mean value for metrics and transactions data', () => { + const transactionsCurrentPeriod = + transactionsStatistics.currentPeriod[transactionNames[0]]; + const metricsCurrentPeriod = metricsStatistics.currentPeriod[transactionNames[0]]; - transactionNames.forEach((transactionName) => { - expect(currentPeriod[transactionName]).not.to.be.empty(); - expect(previousPeriod[transactionName]).not.to.be.empty(); - }); + const transactionsErrorRateMean = meanBy(transactionsCurrentPeriod.errorRate, 'y'); + const metricsErrorRateMean = meanBy(metricsCurrentPeriod.errorRate, 'y'); + [transactionsErrorRateMean, metricsErrorRateMean].forEach((value) => + expect(asPercent(value, 1)).to.be.equal(`${GO_PROD_ERROR_RATE}%`) + ); }); - it('returns correct latency data', () => { - const currentPeriodItems = Object.values(currentPeriod); - const previousPeriodItems = Object.values(previousPeriod); - - const currentPeriodFirstItem = currentPeriodItems[0]; - const previousPeriodFirstItem = previousPeriodItems[0]; - - expect(removeEmptyCoordinates(currentPeriodFirstItem.latency).length).to.be.greaterThan( - 0 + it('has same throughput mean value for metrics and transactions data', () => { + const transactionsCurrentPeriod = + transactionsStatistics.currentPeriod[transactionNames[0]]; + const metricsCurrentPeriod = metricsStatistics.currentPeriod[transactionNames[0]]; + const transactionsThroughputMean = roundNumber( + meanBy(transactionsCurrentPeriod.throughput, 'y') ); - expect(removeEmptyCoordinates(previousPeriodFirstItem.latency).length).to.be.greaterThan( - 0 + const metricsThroughputMean = roundNumber(meanBy(metricsCurrentPeriod.throughput, 'y')); + [transactionsThroughputMean, metricsThroughputMean].forEach((value) => + expect(value).to.be.equal(roundNumber(GO_PROD_RATE + GO_PROD_ERROR_RATE)) ); - expectSnapshot(currentPeriodFirstItem.latency).toMatch(); - expectSnapshot(previousPeriodFirstItem.latency).toMatch(); }); - it('returns correct throughput data', () => { - const currentPeriodItems = Object.values(currentPeriod); - const previousPeriodItems = Object.values(previousPeriod); + it('has same impact value for metrics and transactions data', () => { + const transactionsCurrentPeriod = + transactionsStatistics.currentPeriod[transactionNames[0]]; + const metricsCurrentPeriod = metricsStatistics.currentPeriod[transactionNames[0]]; - const currentPeriodFirstItem = currentPeriodItems[0]; - const previousPeriodFirstItem = previousPeriodItems[0]; - - expect( - removeEmptyCoordinates(currentPeriodFirstItem.throughput).length - ).to.be.greaterThan(0); - expect( - removeEmptyCoordinates(previousPeriodFirstItem.throughput).length - ).to.be.greaterThan(0); - expectSnapshot(currentPeriodFirstItem.throughput).toMatch(); - expectSnapshot(previousPeriodFirstItem.throughput).toMatch(); + const transactionsImpact = transactionsCurrentPeriod.impact; + const metricsImpact = metricsCurrentPeriod.impact; + [transactionsImpact, metricsImpact].forEach((value) => expect(value).to.be.equal(100)); }); + }); - it('returns correct error rate data', () => { - const currentPeriodItems = Object.values(currentPeriod); - const previousPeriodItems = Object.values(previousPeriod); - - const currentPeriodFirstItem = currentPeriodItems[0]; - const previousPeriodFirstItem = previousPeriodItems[0]; - - expect(removeEmptyCoordinates(currentPeriodFirstItem.errorRate).length).to.be.greaterThan( - 0 - ); - expect( - removeEmptyCoordinates(previousPeriodFirstItem.errorRate).length - ).to.be.greaterThan(0); - - expectSnapshot(currentPeriodFirstItem.errorRate).toMatch(); - expectSnapshot(previousPeriodFirstItem.errorRate).toMatch(); + describe('with comparisons', () => { + let transactionsStatistics: TransactionsGroupsDetailedStatistics; + before(async () => { + transactionsStatistics = await callApi({ + query: { + start: moment(end).subtract(7, 'minutes').toISOString(), + end: new Date(end).toISOString(), + comparisonStart: new Date(start).toISOString(), + comparisonEnd: moment(start).add(7, 'minutes').toISOString(), + }, + }); }); - it('matches x-axis on current period and previous period', () => { - const currentPeriodItems = Object.values(currentPeriod); - const previousPeriodItems = Object.values(previousPeriod); - - const currentPeriodFirstItem = currentPeriodItems[0]; - const previousPeriodFirstItem = previousPeriodItems[0]; - - expect(currentPeriodFirstItem.errorRate.map(({ x }) => x)).to.be.eql( - previousPeriodFirstItem.errorRate.map(({ x }) => x) - ); + it('returns some data for both periods', () => { + expect(isEmpty(transactionsStatistics.currentPeriod)).to.be.equal(false); + expect(isEmpty(transactionsStatistics.previousPeriod)).to.be.equal(false); }); - it('returns correct impact data', () => { - const currentPeriodItems = Object.values(currentPeriod); - const previousPeriodItems = Object.values(previousPeriod); - - const currentPeriodFirstItem = currentPeriodItems[0]; - const previousPeriodFirstItem = previousPeriodItems[0]; + it('has same start time for both periods', () => { + const currentPeriod = transactionsStatistics.currentPeriod[transactionNames[0]]; + const previousPeriod = transactionsStatistics.previousPeriod[transactionNames[0]]; + [ + [currentPeriod.latency, previousPeriod.latency], + [currentPeriod.errorRate, previousPeriod.errorRate], + [currentPeriod.throughput, previousPeriod.throughput], + ].forEach(([currentTimeseries, previousTimeseries]) => { + const firstCurrentPeriodDate = new Date( + first(currentTimeseries)?.x ?? NaN + ).toISOString(); + const firstPreviousPeriodDate = new Date( + first(previousPeriod.latency)?.x ?? NaN + ).toISOString(); + + expect(firstCurrentPeriodDate).to.equal(firstPreviousPeriodDate); + }); + }); + it('has same end time for both periods', () => { + const currentPeriod = transactionsStatistics.currentPeriod[transactionNames[0]]; + const previousPeriod = transactionsStatistics.previousPeriod[transactionNames[0]]; + [ + [currentPeriod.latency, previousPeriod.latency], + [currentPeriod.errorRate, previousPeriod.errorRate], + [currentPeriod.throughput, previousPeriod.throughput], + ].forEach(([currentTimeseries, previousTimeseries]) => { + const lastCurrentPeriodDate = new Date(last(currentTimeseries)?.x ?? NaN).toISOString(); + const lastPreviousPeriodDate = new Date( + last(previousPeriod.latency)?.x ?? NaN + ).toISOString(); + + expect(lastCurrentPeriodDate).to.equal(lastPreviousPeriodDate); + }); + }); - expectSnapshot(roundNumber(currentPeriodFirstItem.impact)).toMatchInline(`"59.04"`); - expectSnapshot(roundNumber(previousPeriodFirstItem.impact)).toMatchInline(`"99.05"`); + it('returns same number of buckets for both periods', () => { + const currentPeriod = transactionsStatistics.currentPeriod[transactionNames[0]]; + const previousPeriod = transactionsStatistics.previousPeriod[transactionNames[0]]; + [ + [currentPeriod.latency, previousPeriod.latency], + [currentPeriod.errorRate, previousPeriod.errorRate], + [currentPeriod.throughput, previousPeriod.throughput], + ].forEach(([currentTimeseries, previousTimeseries]) => { + expect(currentTimeseries.length).to.equal(previousTimeseries.length); + }); }); }); - } - ); + }); + }); } diff --git a/x-pack/test/apm_api_integration/tests/transactions/transactions_groups_main_statistics.ts b/x-pack/test/apm_api_integration/tests/transactions/transactions_groups_main_statistics.ts index 7664d28271e14..f95d153b1c96e 100644 --- a/x-pack/test/apm_api_integration/tests/transactions/transactions_groups_main_statistics.ts +++ b/x-pack/test/apm_api_integration/tests/transactions/transactions_groups_main_statistics.ts @@ -98,18 +98,18 @@ export default function ApiTest({ getService }: FtrProviderContext) { ); expectSnapshot(impacts).toMatchInline(` Array [ - 98.4867713293593, - 0.0910992862692518, - 0.217172932411727, - 0.197499651612207, - 0.117088451625813, - 0.203168003440319, - 0.0956764857936742, - 0.353287132108131, - 0.043688393280619, - 0.0754467823979389, - 0.115710953190738, - 0.00339059851027124, + 98.5616469236242, + 0.088146942911198, + 0.208815627929649, + 0.189536811278812, + 0.110293217369968, + 0.191163512620049, + 0.0899742946381385, + 0.341831477754056, + 0.0411384477014597, + 0.0652338973356331, + 0.109023796562458, + 0.00319505027438735, ] `); @@ -120,9 +120,9 @@ export default function ApiTest({ getService }: FtrProviderContext) { expectSnapshot(pick(firstItem, 'name', 'latency', 'throughput', 'errorRate', 'impact')) .toMatchInline(` Object { - "errorRate": 0.08, - "impact": 98.4867713293593, - "latency": 1816019.48, + "errorRate": 0.1, + "impact": 98.5616469236242, + "latency": 1925546.54, "name": "DispatcherServlet#doGet", "throughput": 1.66666666666667, } @@ -150,7 +150,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { response.body as TransactionsGroupsPrimaryStatistics; const firstItem = transctionsGroupsPrimaryStatistics.transactionGroups[0]; - expectSnapshot(firstItem.latency).toMatchInline(`66846719`); + expectSnapshot(firstItem.latency).toMatchInline(`66836803`); }); } ); diff --git a/x-pack/test/encrypted_saved_objects_api_integration/fixtures/es_archiver/encrypted_saved_objects/mappings.json b/x-pack/test/encrypted_saved_objects_api_integration/fixtures/es_archiver/encrypted_saved_objects/mappings.json index 54471972cd3d2..a1b6b65a02062 100644 --- a/x-pack/test/encrypted_saved_objects_api_integration/fixtures/es_archiver/encrypted_saved_objects/mappings.json +++ b/x-pack/test/encrypted_saved_objects_api_integration/fixtures/es_archiver/encrypted_saved_objects/mappings.json @@ -190,27 +190,23 @@ }, "apm-indices": { "properties": { - "apm_oss": { - "properties": { - "errorIndices": { - "type": "keyword" - }, - "metricsIndices": { - "type": "keyword" - }, - "onboardingIndices": { - "type": "keyword" - }, - "sourcemapIndices": { - "type": "keyword" - }, - "spanIndices": { - "type": "keyword" - }, - "transactionIndices": { - "type": "keyword" - } - } + "error": { + "type": "keyword" + }, + "metric": { + "type": "keyword" + }, + "onboarding": { + "type": "keyword" + }, + "sourcemap": { + "type": "keyword" + }, + "span": { + "type": "keyword" + }, + "transaction": { + "type": "keyword" } } }, diff --git a/x-pack/test/encrypted_saved_objects_api_integration/fixtures/es_archiver/encrypted_saved_objects_different_key/mappings.json b/x-pack/test/encrypted_saved_objects_api_integration/fixtures/es_archiver/encrypted_saved_objects_different_key/mappings.json index 22b79eb9bbd8e..dfcf3155b67ca 100644 --- a/x-pack/test/encrypted_saved_objects_api_integration/fixtures/es_archiver/encrypted_saved_objects_different_key/mappings.json +++ b/x-pack/test/encrypted_saved_objects_api_integration/fixtures/es_archiver/encrypted_saved_objects_different_key/mappings.json @@ -216,27 +216,23 @@ }, "apm-indices": { "properties": { - "apm_oss": { - "properties": { - "errorIndices": { - "type": "keyword" - }, - "metricsIndices": { - "type": "keyword" - }, - "onboardingIndices": { - "type": "keyword" - }, - "sourcemapIndices": { - "type": "keyword" - }, - "spanIndices": { - "type": "keyword" - }, - "transactionIndices": { - "type": "keyword" - } - } + "error": { + "type": "keyword" + }, + "metric": { + "type": "keyword" + }, + "onboarding": { + "type": "keyword" + }, + "sourcemap": { + "type": "keyword" + }, + "span": { + "type": "keyword" + }, + "transaction": { + "type": "keyword" } } }, diff --git a/x-pack/test/encrypted_saved_objects_api_integration/fixtures/es_archiver/key_rotation/mappings.json b/x-pack/test/encrypted_saved_objects_api_integration/fixtures/es_archiver/key_rotation/mappings.json index 74083cbfa949a..72f66db35cec6 100644 --- a/x-pack/test/encrypted_saved_objects_api_integration/fixtures/es_archiver/key_rotation/mappings.json +++ b/x-pack/test/encrypted_saved_objects_api_integration/fixtures/es_archiver/key_rotation/mappings.json @@ -214,27 +214,23 @@ }, "apm-indices": { "properties": { - "apm_oss": { - "properties": { - "errorIndices": { - "type": "keyword" - }, - "metricsIndices": { - "type": "keyword" - }, - "onboardingIndices": { - "type": "keyword" - }, - "sourcemapIndices": { - "type": "keyword" - }, - "spanIndices": { - "type": "keyword" - }, - "transactionIndices": { - "type": "keyword" - } - } + "error": { + "type": "keyword" + }, + "metric": { + "type": "keyword" + }, + "onboarding": { + "type": "keyword" + }, + "sourcemap": { + "type": "keyword" + }, + "span": { + "type": "keyword" + }, + "transaction": { + "type": "keyword" } } }, diff --git a/x-pack/test/fleet_api_integration/apis/agents/list.ts b/x-pack/test/fleet_api_integration/apis/agents/list.ts index a11f4d49fe0f1..3795734f60fe0 100644 --- a/x-pack/test/fleet_api_integration/apis/agents/list.ts +++ b/x-pack/test/fleet_api_integration/apis/agents/list.ts @@ -8,66 +8,15 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; +import { testUsers } from '../test_users'; export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const supertestWithoutAuth = getService('supertestWithoutAuth'); const supertest = getService('supertest'); - const security = getService('security'); - const users: { [rollName: string]: { username: string; password: string; permissions?: any } } = { - kibana_basic_user: { - permissions: { - feature: { - dashboards: ['read'], - }, - spaces: ['*'], - }, - username: 'kibana_basic_user', - password: 'changeme', - }, - fleet_user: { - permissions: { - feature: { - fleet: ['read'], - }, - spaces: ['*'], - }, - username: 'fleet_user', - password: 'changeme', - }, - fleet_admin: { - permissions: { - feature: { - fleet: ['all'], - }, - spaces: ['*'], - }, - username: 'fleet_admin', - password: 'changeme', - }, - }; describe('fleet_list_agent', () => { before(async () => { - for (const roleName in users) { - if (users.hasOwnProperty(roleName)) { - const user = users[roleName]; - - if (user.permissions) { - await security.role.create(roleName, { - kibana: [user.permissions], - }); - } - - // Import a repository first - await security.user.create(user.username, { - password: user.password, - roles: [roleName], - full_name: user.username, - }); - } - } - await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/fleet/agents'); }); after(async () => { @@ -77,13 +26,13 @@ export default function ({ getService }: FtrProviderContext) { it('should return a 403 if a user without the superuser role try to access the APU', async () => { await supertestWithoutAuth .get(`/api/fleet/agents`) - .auth(users.fleet_admin.username, users.fleet_admin.password) + .auth(testUsers.fleet_all.username, testUsers.fleet_all.password) .expect(403); }); it('should not return the list of agents when requesting as a user without fleet permissions', async () => { await supertestWithoutAuth .get(`/api/fleet/agents`) - .auth(users.kibana_basic_user.username, users.kibana_basic_user.password) + .auth(testUsers.fleet_no_access.username, testUsers.fleet_no_access.password) .expect(403); }); diff --git a/x-pack/test/fleet_api_integration/apis/epm/bulk_upgrade.ts b/x-pack/test/fleet_api_integration/apis/epm/bulk_upgrade.ts index bb75629e222a5..3b3ccb03e56f3 100644 --- a/x-pack/test/fleet_api_integration/apis/epm/bulk_upgrade.ts +++ b/x-pack/test/fleet_api_integration/apis/epm/bulk_upgrade.ts @@ -14,10 +14,12 @@ import { IBulkInstallPackageHTTPError, } from '../../../../plugins/fleet/common'; import { setupFleetAndAgents } from '../agents/services'; +import { testUsers } from '../test_users'; export default function (providerContext: FtrProviderContext) { const { getService } = providerContext; const supertest = getService('supertest'); + const supertestWithoutAuth = getService('supertestWithoutAuth'); const deletePackage = async (pkgkey: string) => { await supertest.delete(`/api/fleet/epm/packages/${pkgkey}`).set('kbn-xsrf', 'xxxx'); @@ -44,6 +46,13 @@ export default function (providerContext: FtrProviderContext) { it('should return 400 if no packages are requested for upgrade', async function () { await supertest.post(`/api/fleet/epm/packages/_bulk`).set('kbn-xsrf', 'xxxx').expect(400); }); + it('should return 403 if read only user requests upgrade', async function () { + await supertestWithoutAuth + .post(`/api/fleet/epm/packages/_bulk`) + .auth(testUsers.fleet_read_only.username, testUsers.fleet_read_only.password) + .set('kbn-xsrf', 'xxxx') + .expect(403); + }); it('should return 200 and an array for upgrading a package', async function () { const { body }: { body: BulkInstallPackagesResponse } = await supertest .post(`/api/fleet/epm/packages/_bulk`) diff --git a/x-pack/test/fleet_api_integration/apis/epm/delete.ts b/x-pack/test/fleet_api_integration/apis/epm/delete.ts index 40650c4c176f7..9980d85ac171e 100644 --- a/x-pack/test/fleet_api_integration/apis/epm/delete.ts +++ b/x-pack/test/fleet_api_integration/apis/epm/delete.ts @@ -8,10 +8,12 @@ import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; import { skipIfNoDockerRegistry } from '../../helpers'; import { setupFleetAndAgents } from '../agents/services'; +import { testUsers } from '../test_users'; export default function (providerContext: FtrProviderContext) { const { getService } = providerContext; const supertest = getService('supertest'); + const supertestWithoutAuth = getService('supertestWithoutAuth'); const requiredPackage = 'elastic_agent-0.0.7'; const installPackage = async (pkgkey: string) => { @@ -52,5 +54,13 @@ export default function (providerContext: FtrProviderContext) { .send({ force: true }) .expect(200); }); + + it('should return 403 for read-only users', async () => { + await supertestWithoutAuth + .delete(`/api/fleet/epm/packages/${requiredPackage}`) + .auth(testUsers.fleet_read_only.username, testUsers.fleet_read_only.password) + .set('kbn-xsrf', 'xxxx') + .expect(403); + }); }); } diff --git a/x-pack/test/fleet_api_integration/apis/epm/get.ts b/x-pack/test/fleet_api_integration/apis/epm/get.ts index 014fe0808d255..13533a9a82af0 100644 --- a/x-pack/test/fleet_api_integration/apis/epm/get.ts +++ b/x-pack/test/fleet_api_integration/apis/epm/get.ts @@ -11,11 +11,13 @@ import path from 'path'; import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; import { skipIfNoDockerRegistry } from '../../helpers'; import { setupFleetAndAgents } from '../agents/services'; +import { testUsers } from '../test_users'; export default function (providerContext: FtrProviderContext) { const { getService } = providerContext; const supertest = getService('supertest'); + const supertestWithoutAuth = getService('supertestWithoutAuth'); const testPkgKey = 'apache-0.1.4'; @@ -91,5 +93,12 @@ export default function (providerContext: FtrProviderContext) { it('returns a 400 for a package key without a proper semver version', async function () { await supertest.get('/api/fleet/epm/packages/endpoint-0.1.0.1.2.3').expect(400); }); + + it('allows user with only read permission to access', async () => { + await supertestWithoutAuth + .get(`/api/fleet/epm/packages/${testPkgKey}`) + .auth(testUsers.fleet_read_only.username, testUsers.fleet_read_only.password) + .expect(200); + }); }); } diff --git a/x-pack/test/fleet_api_integration/apis/epm/index.js b/x-pack/test/fleet_api_integration/apis/epm/index.js index b6a1fd5d7346d..3428b4c1ded08 100644 --- a/x-pack/test/fleet_api_integration/apis/epm/index.js +++ b/x-pack/test/fleet_api_integration/apis/epm/index.js @@ -15,6 +15,7 @@ export default function loadTests({ loadTestFile }) { loadTestFile(require.resolve('./template')); loadTestFile(require.resolve('./ilm')); loadTestFile(require.resolve('./install_by_upload')); + loadTestFile(require.resolve('./install_endpoint')); loadTestFile(require.resolve('./install_overrides')); loadTestFile(require.resolve('./install_prerelease')); loadTestFile(require.resolve('./install_remove_assets')); diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_by_upload.ts b/x-pack/test/fleet_api_integration/apis/epm/install_by_upload.ts index 23feacbcee374..86928874f8a34 100644 --- a/x-pack/test/fleet_api_integration/apis/epm/install_by_upload.ts +++ b/x-pack/test/fleet_api_integration/apis/epm/install_by_upload.ts @@ -12,10 +12,12 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; import { skipIfNoDockerRegistry } from '../../helpers'; import { setupFleetAndAgents } from '../agents/services'; +import { testUsers } from '../test_users'; export default function (providerContext: FtrProviderContext) { const { getService } = providerContext; const supertest = getService('supertest'); + const supertestWithoutAuth = getService('supertestWithoutAuth'); const dockerServers = getService('dockerServers'); const testPkgArchiveTgz = path.join( @@ -190,5 +192,16 @@ export default function (providerContext: FtrProviderContext) { '{"statusCode":400,"error":"Bad Request","message":"Name thisIsATypo and version 0.1.4 do not match top-level directory apache-0.1.4"}' ); }); + + it('should not allow users without all access', async () => { + const buf = fs.readFileSync(testPkgArchiveTgz); + await supertestWithoutAuth + .post(`/api/fleet/epm/packages`) + .auth(testUsers.fleet_read_only.username, testUsers.fleet_read_only.password) + .set('kbn-xsrf', 'xxxx') + .type('application/gzip') + .send(buf) + .expect(403); + }); }); } diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_endpoint.ts b/x-pack/test/fleet_api_integration/apis/epm/install_endpoint.ts new file mode 100644 index 0000000000000..ba9264e1d1999 --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/epm/install_endpoint.ts @@ -0,0 +1,108 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; +import { skipIfNoDockerRegistry } from '../../helpers'; +import { setupFleetAndAgents } from '../agents/services'; + +export default function (providerContext: FtrProviderContext) { + /** + * There are a few features that are only currently supported for the Endpoint + * package due to security concerns. + */ + describe('Install endpoint package', () => { + const { getService } = providerContext; + skipIfNoDockerRegistry(providerContext); + setupFleetAndAgents(providerContext); + + const supertest = getService('supertest'); + const dockerServers = getService('dockerServers'); + const server = dockerServers.get('registry'); + const es = getService('es'); + const pkgName = 'endpoint'; + let pkgVersion: string; + + const transforms = [ + { + id: 'endpoint.metadata_current-default', + dest: 'metrics-endpoint.metadata_current_default', + }, + { + id: 'endpoint.metadata_united-default', + dest: '.metrics-endpoint.metadata_united_default', + }, + ]; + + before(async () => { + if (!server.enabled) return; + // The latest endpoint package is already installed by default in our FTR config, + // just get the most recent version number. + const getResp = await supertest.get(`/api/fleet/epm/packages/${pkgName}`).expect(200); + pkgVersion = getResp.body.response.version; + }); + + describe('install', () => { + transforms.forEach((transform) => { + it(`should have installed the [${transform.id}] transform`, async function () { + const res = await es.transport.request({ + method: 'GET', + path: `/_transform/${transform.id}-${pkgVersion}`, + }); + expect(res.statusCode).equal(200); + }); + it(`should have created the destination index for the [${transform.id}] transform`, async function () { + // the index is defined in the transform file + const res = await es.transport.request({ + method: 'GET', + path: `/${transform.dest}`, + }); + expect(res.statusCode).equal(200); + }); + }); + }); + + const uninstallPackage = async (pkg: string) => + supertest.delete(`/api/fleet/epm/packages/${pkg}`).set('kbn-xsrf', 'xxxx'); + + // Endpoint doesn't currently support uninstalls + describe.skip('uninstall', () => { + before(async () => { + await uninstallPackage(`${pkgName}-${pkgVersion}`); + }); + + transforms.forEach((transform) => { + it(`should have uninstalled the [${transform.id}] transforms`, async function () { + const res = await es.transport.request( + { + method: 'GET', + path: `/_transform/${transform.id}`, + }, + { + ignore: [404], + } + ); + expect(res.statusCode).equal(404); + }); + + it(`should have deleted the index for the [${transform.id}] transform`, async function () { + // the index is defined in the transform file + const res = await es.transport.request( + { + method: 'GET', + path: `/${transform.dest}`, + }, + { + ignore: [404], + } + ); + expect(res.statusCode).equal(404); + }); + }); + }); + }); +} diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_remove_assets.ts b/x-pack/test/fleet_api_integration/apis/epm/install_remove_assets.ts index e57899531e939..7e48ed9d297c7 100644 --- a/x-pack/test/fleet_api_integration/apis/epm/install_remove_assets.ts +++ b/x-pack/test/fleet_api_integration/apis/epm/install_remove_assets.ts @@ -155,31 +155,6 @@ export default function (providerContext: FtrProviderContext) { ); expect(resPipeline2.statusCode).equal(404); }); - it('should have uninstalled the transforms', async function () { - const res = await es.transport.request( - { - method: 'GET', - path: `/_transform/${pkgName}-test-default-${pkgVersion}`, - }, - { - ignore: [404], - } - ); - expect(res.statusCode).equal(404); - }); - it('should have deleted the index for the transform', async function () { - // the index is defined in the transform file - const res = await es.transport.request( - { - method: 'GET', - path: `/logs-all_assets.test_log_current_default`, - }, - { - ignore: [404], - } - ); - expect(res.statusCode).equal(404); - }); it('should have uninstalled the kibana assets', async function () { let resDashboard; try { @@ -380,21 +355,6 @@ const expectAssetsInstalled = ({ }); expect(resUserSettings.statusCode).equal(200); }); - it('should have installed the transform components', async function () { - const res = await es.transport.request({ - method: 'GET', - path: `/_transform/${pkgName}.test-default-${pkgVersion}`, - }); - expect(res.statusCode).equal(200); - }); - it('should have created the index for the transform', async function () { - // the index is defined in the transform file - const res = await es.transport.request({ - method: 'GET', - path: `/logs-all_assets.test_log_current_default`, - }); - expect(res.statusCode).equal(200); - }); it('should have installed the kibana assets', async function () { // These are installed from Fleet along with every package const resIndexPatternLogs = await kibanaServer.savedObjects.get({ @@ -575,10 +535,6 @@ const expectAssetsInstalled = ({ id: 'logs-all_assets.test_logs-0.1.0-pipeline2', type: 'ingest_pipeline', }, - { - id: 'all_assets.test-default-0.1.0', - type: 'transform', - }, ], es_index_patterns: { test_logs: 'logs-all_assets.test_logs-*', @@ -597,7 +553,6 @@ const expectAssetsInstalled = ({ { id: 'f839c76e-d194-555a-90a1-3265a45789e4', type: 'epm-packages-assets' }, { id: '9af7bbb3-7d8a-50fa-acc9-9dde6f5efca2', type: 'epm-packages-assets' }, { id: '1e97a20f-9d1c-529b-8ff2-da4e8ba8bb71', type: 'epm-packages-assets' }, - { id: '8cfe0a2b-7016-5522-87e4-6d352360d1fc', type: 'epm-packages-assets' }, { id: 'bd5ff3c5-655e-5385-9918-b60ff3040aad', type: 'epm-packages-assets' }, { id: '0954ce3b-3165-5c1f-a4c0-56eb5f2fa487', type: 'epm-packages-assets' }, { id: '60d6d054-57e4-590f-a580-52bf3f5e7cca', type: 'epm-packages-assets' }, diff --git a/x-pack/test/fleet_api_integration/apis/epm/list.ts b/x-pack/test/fleet_api_integration/apis/epm/list.ts index 931e494798220..56f3e6ca1f2fa 100644 --- a/x-pack/test/fleet_api_integration/apis/epm/list.ts +++ b/x-pack/test/fleet_api_integration/apis/epm/list.ts @@ -9,10 +9,12 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; import { skipIfNoDockerRegistry } from '../../helpers'; import { setupFleetAndAgents } from '../agents/services'; +import { testUsers } from '../test_users'; export default function (providerContext: FtrProviderContext) { const { getService } = providerContext; const supertest = getService('supertest'); + const supertestWithoutAuth = getService('supertestWithoutAuth'); const esArchiver = getService('esArchiver'); // use function () {} and not () => {} here @@ -54,6 +56,13 @@ export default function (providerContext: FtrProviderContext) { expect(listResponse.response).to.eql(['endpoint']); }); + + it('allows user with only read permission to access', async () => { + await supertestWithoutAuth + .get('/api/fleet/epm/packages') + .auth(testUsers.fleet_read_only.username, testUsers.fleet_read_only.password) + .expect(200); + }); }); }); } diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/elasticsearch/transform/test/default.json b/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/elasticsearch/transform/test/default.json deleted file mode 100644 index eddc6bc0c304a..0000000000000 --- a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/elasticsearch/transform/test/default.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "source": { - "index": "logs-all_assets.test_log-default*" - }, - "dest": { - "index": "logs-all_assets.test_log_current_default" - }, - "pivot": { - "group_by": { - "agent.id": { - "terms": { - "field": "agent.id" - } - } - }, - "aggregations": { - "HostDetails": { - "scripted_metric": { - "init_script": "state.timestamp_latest = 0L; state.last_doc=''", - "map_script": "def current_date = doc['@timestamp'].getValue().toInstant().toEpochMilli(); if (current_date \u003e state.timestamp_latest) {state.timestamp_latest = current_date;state.last_doc = new HashMap(params['_source']);}", - "combine_script": "return state", - "reduce_script": "def last_doc = '';def timestamp_latest = 0L; for (s in states) {if (s.timestamp_latest \u003e (timestamp_latest)) {timestamp_latest = s.timestamp_latest; last_doc = s.last_doc;}} return last_doc" - } - } - } - }, - "description": "collapse and update the latest document for each host", - "frequency": "1m", - "sync": { - "time": { - "field": "event.ingested", - "delay": "60s" - } - } -} diff --git a/x-pack/test/fleet_api_integration/apis/index.js b/x-pack/test/fleet_api_integration/apis/index.js index 387433b787728..fd5ac05247fd2 100644 --- a/x-pack/test/fleet_api_integration/apis/index.js +++ b/x-pack/test/fleet_api_integration/apis/index.js @@ -5,10 +5,16 @@ * 2.0. */ -export default function ({ loadTestFile }) { +import { setupTestUsers } from './test_users'; + +export default function ({ loadTestFile, getService }) { describe('Fleet Endpoints', function () { + before(async () => { + await setupTestUsers(getService('security')); + }); + // EPM - loadTestFile(require.resolve('./epm/index')); + loadTestFile(require.resolve('./epm')); // Fleet setup loadTestFile(require.resolve('./fleet_setup')); diff --git a/x-pack/test/fleet_api_integration/apis/test_users.ts b/x-pack/test/fleet_api_integration/apis/test_users.ts new file mode 100644 index 0000000000000..a1df6d3a31b71 --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/test_users.ts @@ -0,0 +1,63 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { SecurityService } from '../../../../test/common/services/security/security'; + +export const testUsers: { + [rollName: string]: { username: string; password: string; permissions?: any }; +} = { + fleet_no_access: { + permissions: { + feature: { + dashboards: ['read'], + }, + spaces: ['*'], + }, + username: 'fleet_no_access', + password: 'changeme', + }, + fleet_read_only: { + permissions: { + feature: { + fleet: ['read'], + }, + spaces: ['*'], + }, + username: 'fleet_read_only', + password: 'changeme', + }, + fleet_all: { + permissions: { + feature: { + fleet: ['all'], + }, + spaces: ['*'], + }, + username: 'fleet_all', + password: 'changeme', + }, +}; + +export const setupTestUsers = async (security: SecurityService) => { + for (const roleName in testUsers) { + if (testUsers.hasOwnProperty(roleName)) { + const user = testUsers[roleName]; + + if (user.permissions) { + await security.role.create(roleName, { + kibana: [user.permissions], + }); + } + + await security.user.create(user.username, { + password: user.password, + roles: [roleName], + full_name: user.username, + }); + } + } +}; diff --git a/x-pack/test/functional/apps/lens/inspector.ts b/x-pack/test/functional/apps/lens/inspector.ts index 0783124079d4c..9db804d324936 100644 --- a/x-pack/test/functional/apps/lens/inspector.ts +++ b/x-pack/test/functional/apps/lens/inspector.ts @@ -11,6 +11,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const PageObjects = getPageObjects(['visualize', 'lens', 'common', 'header']); const elasticChart = getService('elasticChart'); const inspector = getService('inspector'); + const testSubjects = getService('testSubjects'); describe('lens inspector', () => { before(async () => { @@ -55,5 +56,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await inspector.openInspectorRequestsView(); expect(await inspector.getRequestNames()).to.be('Data,Other bucket'); }); + + it('should close the inspector when navigating away from Lens', async () => { + await PageObjects.visualize.navigateToNewVisualization(); + expect(await testSubjects.exists('inspectorPanel')).to.be(false); + }); }); } diff --git a/x-pack/test/functional/apps/monitoring/enable_monitoring/index.js b/x-pack/test/functional/apps/monitoring/enable_monitoring/index.js index 79bd479c45a17..cce6401453d21 100644 --- a/x-pack/test/functional/apps/monitoring/enable_monitoring/index.js +++ b/x-pack/test/functional/apps/monitoring/enable_monitoring/index.js @@ -11,7 +11,6 @@ export default function ({ getService, getPageObjects }) { const PageObjects = getPageObjects(['monitoring', 'common', 'header']); const esSupertest = getService('esSupertest'); const noData = getService('monitoringNoData'); - const testSubjects = getService('testSubjects'); const clusterOverview = getService('monitoringClusterOverview'); const retry = getService('retry'); const esDeleteAllIndices = getService('esDeleteAllIndices'); @@ -53,8 +52,6 @@ export default function ({ getService, getPageObjects }) { // Here we are checking that once Monitoring is enabled, // it moves on to the cluster overview page. await retry.tryForTime(20000, async () => { - // Click the refresh button - await testSubjects.click('querySubmitButton'); await clusterOverview.closeAlertsModal(); expect(await clusterOverview.isOnClusterOverview()).to.be(true); }); diff --git a/x-pack/test/functional/apps/monitoring/feature_controls/monitoring_security.ts b/x-pack/test/functional/apps/monitoring/feature_controls/monitoring_security.ts index 988bbdc621f5f..bf83892ce1934 100644 --- a/x-pack/test/functional/apps/monitoring/feature_controls/monitoring_security.ts +++ b/x-pack/test/functional/apps/monitoring/feature_controls/monitoring_security.ts @@ -13,6 +13,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const security = getService('security'); const appsMenu = getService('appsMenu'); const PageObjects = getPageObjects(['common', 'security']); + const noData = getService('monitoringNoData'); describe('security', () => { before(async () => { @@ -103,5 +104,32 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { expect(navLinks).to.contain('Stack Monitoring'); }); }); + + describe('monitoring_user and kibana_admin roles', function () { + this.tags(['skipCloud']); + before(async () => { + await security.user.create('monitoring_kibana_admin_user', { + password: 'monitoring_user-password', + roles: ['monitoring_user', 'kibana_admin'], + full_name: 'monitoring user', + }); + + await PageObjects.security.login( + 'monitoring_kibana_admin_user', + 'monitoring_user-password' + ); + }); + + after(async () => { + await security.user.delete('monitoring_kibana_admin_user'); + }); + + it('denies enabling monitoring without enough permissions', async () => { + await PageObjects.common.navigateToApp('monitoring'); + await noData.isOnNoDataPage(); + await noData.clickSetupWithSelfMonitoring(); + expect(await noData.isOnNoDataPageMonitoringEnablementDenied()).to.be(true); + }); + }); }); } diff --git a/x-pack/test/functional/apps/monitoring/feature_controls/monitoring_spaces.ts b/x-pack/test/functional/apps/monitoring/feature_controls/monitoring_spaces.ts index f2b872bccbaa7..71f100b49068f 100644 --- a/x-pack/test/functional/apps/monitoring/feature_controls/monitoring_spaces.ts +++ b/x-pack/test/functional/apps/monitoring/feature_controls/monitoring_spaces.ts @@ -52,7 +52,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { basePath: '/s/custom_space', }); - const exists = await find.existsByCssSelector('monitoring-main'); + const exists = await find.existsByCssSelector('[data-test-subj="monitoringAppContainer"]'); expect(exists).to.be(true); }); }); diff --git a/x-pack/test/functional/apps/monitoring/index.js b/x-pack/test/functional/apps/monitoring/index.js index 213007c7b71df..6a5b6ea813171 100644 --- a/x-pack/test/functional/apps/monitoring/index.js +++ b/x-pack/test/functional/apps/monitoring/index.js @@ -34,10 +34,6 @@ export default function ({ loadTestFile }) { loadTestFile(require.resolve('./kibana/instance')); loadTestFile(require.resolve('./kibana/instance_mb')); - // loadTestFile(require.resolve('./logstash/overview')); - // loadTestFile(require.resolve('./logstash/nodes')); - // loadTestFile(require.resolve('./logstash/node')); - loadTestFile(require.resolve('./logstash/pipelines')); loadTestFile(require.resolve('./logstash/pipelines_mb')); diff --git a/x-pack/test/functional/apps/reporting/README.md b/x-pack/test/functional/apps/reporting/README.md new file mode 100644 index 0000000000000..ec9bba8b88341 --- /dev/null +++ b/x-pack/test/functional/apps/reporting/README.md @@ -0,0 +1,18 @@ +## Reporting functional tests + +Functional tests on report generation are under the applications that use reporting. + +**PDF/PNG Report testing:** + - `x-pack/test/functional/apps/canvas/reports.ts` + - `x-pack/test/functional/apps/dashboard/reporting/screenshots.ts` + - `x-pack/test/functional/apps/lens/lens_reporting.ts` + - `x-pack/test/functional/apps/visualize/reporting.ts` + +**CSV Report testing:** + - `x-pack/test/functional/apps/dashboard/reporting/download_csv.ts` + - `x-pack/test/functional/apps/discover/reporting.ts` + +Reporting Management app tests are in `functional/apps/reporting_management`. + +**Manage reports testing:** + - `x-pack/test/functional/apps/reporting_management` diff --git a/x-pack/test/functional/apps/reporting/reporting.ts b/x-pack/test/functional/apps/reporting/reporting.ts deleted file mode 100644 index 0d8034f046e02..0000000000000 --- a/x-pack/test/functional/apps/reporting/reporting.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import expect from '@kbn/expect'; -import { FtrProviderContext } from '../../ftr_provider_context'; - -export default function ({ getService, getPageObjects }: FtrProviderContext) { - const pageObjects = getPageObjects(['dashboard', 'common', 'reporting']); - const es = getService('es'); - const kibanaServer = getService('kibanaServer'); - - const retry = getService('retry'); - - describe('Reporting', function () { - this.tags(['smoke', 'ciGroup2']); - before(async () => { - await kibanaServer.importExport.load( - 'x-pack/test/functional/fixtures/kbn_archiver/packaging' - ); - }); - - after(async () => { - await kibanaServer.importExport.unload( - 'x-pack/test/functional/fixtures/kbn_archiver/packaging' - ); - await es.deleteByQuery({ - index: '.reporting-*', - refresh: true, - body: { query: { match_all: {} } }, - }); - }); - - it('downloaded PDF has OK status', async function () { - this.timeout(180000); - - await pageObjects.common.navigateToApp('dashboards'); - await retry.waitFor('dashboard landing page', async () => { - return await pageObjects.dashboard.onDashboardLandingPage(); - }); - await pageObjects.dashboard.loadSavedDashboard('dashboard'); - await pageObjects.reporting.openPdfReportingPanel(); - await pageObjects.reporting.clickGenerateReportButton(); - - const url = await pageObjects.reporting.getReportURL(60000); - const res = await pageObjects.reporting.getResponse(url); - - expect(res.status).to.equal(200); - expect(res.get('content-type')).to.equal('application/pdf'); - }); - }); -} diff --git a/x-pack/test/functional/apps/transform/creation_runtime_mappings.ts b/x-pack/test/functional/apps/transform/creation_runtime_mappings.ts index 5fe9d02c58dc7..e244c907a76d6 100644 --- a/x-pack/test/functional/apps/transform/creation_runtime_mappings.ts +++ b/x-pack/test/functional/apps/transform/creation_runtime_mappings.ts @@ -33,7 +33,9 @@ export default function ({ getService }: FtrProviderContext) { script: "emit(doc['responsetime'].value * 2.0)", }, }; - describe('creation with runtime mappings', function () { + + // FLAKY https://github.com/elastic/kibana/issues/113890 + describe.skip('creation with runtime mappings', function () { before(async () => { await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/ml/farequote'); await transform.testResources.createIndexPatternIfNeeded('ft_farequote', '@timestamp'); diff --git a/x-pack/test/functional/config.js b/x-pack/test/functional/config.js index 57d8ad4081f82..d1db8ab3ecf36 100644 --- a/x-pack/test/functional/config.js +++ b/x-pack/test/functional/config.js @@ -57,7 +57,6 @@ export default async function ({ readConfigFile }) { resolve(__dirname, './apps/transform'), resolve(__dirname, './apps/reporting_management'), resolve(__dirname, './apps/management'), - resolve(__dirname, './apps/reporting'), //This upgrade assistant file needs to be run after the rest of the jobs because of //it being destructive. diff --git a/x-pack/test/functional/es_archives/action_task_params/mappings.json b/x-pack/test/functional/es_archives/action_task_params/mappings.json index 2bb6be179d890..d28c1504d3eed 100644 --- a/x-pack/test/functional/es_archives/action_task_params/mappings.json +++ b/x-pack/test/functional/es_archives/action_task_params/mappings.json @@ -206,27 +206,23 @@ }, "apm-indices": { "properties": { - "apm_oss": { - "properties": { - "errorIndices": { - "type": "keyword" - }, - "metricsIndices": { - "type": "keyword" - }, - "onboardingIndices": { - "type": "keyword" - }, - "sourcemapIndices": { - "type": "keyword" - }, - "spanIndices": { - "type": "keyword" - }, - "transactionIndices": { - "type": "keyword" - } - } + "error": { + "type": "keyword" + }, + "metric": { + "type": "keyword" + }, + "onboarding": { + "type": "keyword" + }, + "sourcemap": { + "type": "keyword" + }, + "span": { + "type": "keyword" + }, + "transaction": { + "type": "keyword" } } }, diff --git a/x-pack/test/functional/es_archives/actions/mappings.json b/x-pack/test/functional/es_archives/actions/mappings.json index eeb9d09d3b0a2..a0da38c85f724 100644 --- a/x-pack/test/functional/es_archives/actions/mappings.json +++ b/x-pack/test/functional/es_archives/actions/mappings.json @@ -202,27 +202,23 @@ }, "apm-indices": { "properties": { - "apm_oss": { - "properties": { - "errorIndices": { - "type": "keyword" - }, - "metricsIndices": { - "type": "keyword" - }, - "onboardingIndices": { - "type": "keyword" - }, - "sourcemapIndices": { - "type": "keyword" - }, - "spanIndices": { - "type": "keyword" - }, - "transactionIndices": { - "type": "keyword" - } - } + "error": { + "type": "keyword" + }, + "metric": { + "type": "keyword" + }, + "onboarding": { + "type": "keyword" + }, + "sourcemap": { + "type": "keyword" + }, + "span": { + "type": "keyword" + }, + "transaction": { + "type": "keyword" } } }, diff --git a/x-pack/test/functional/es_archives/alerts_legacy/mappings.json b/x-pack/test/functional/es_archives/alerts_legacy/mappings.json index 69edf30c1ffd0..6e40f811e1af4 100644 --- a/x-pack/test/functional/es_archives/alerts_legacy/mappings.json +++ b/x-pack/test/functional/es_archives/alerts_legacy/mappings.json @@ -198,27 +198,23 @@ }, "apm-indices": { "properties": { - "apm_oss": { - "properties": { - "errorIndices": { - "type": "keyword" - }, - "metricsIndices": { - "type": "keyword" - }, - "onboardingIndices": { - "type": "keyword" - }, - "sourcemapIndices": { - "type": "keyword" - }, - "spanIndices": { - "type": "keyword" - }, - "transactionIndices": { - "type": "keyword" - } - } + "error": { + "type": "keyword" + }, + "metric": { + "type": "keyword" + }, + "onboarding": { + "type": "keyword" + }, + "sourcemap": { + "type": "keyword" + }, + "span": { + "type": "keyword" + }, + "transaction": { + "type": "keyword" } } }, diff --git a/x-pack/test/functional/es_archives/canvas/reports/mappings.json b/x-pack/test/functional/es_archives/canvas/reports/mappings.json index 047a52aaa1f98..d6c3f1b26a430 100644 --- a/x-pack/test/functional/es_archives/canvas/reports/mappings.json +++ b/x-pack/test/functional/es_archives/canvas/reports/mappings.json @@ -229,27 +229,23 @@ }, "apm-indices": { "properties": { - "apm_oss": { - "properties": { - "errorIndices": { - "type": "keyword" - }, - "metricsIndices": { - "type": "keyword" - }, - "onboardingIndices": { - "type": "keyword" - }, - "sourcemapIndices": { - "type": "keyword" - }, - "spanIndices": { - "type": "keyword" - }, - "transactionIndices": { - "type": "keyword" - } - } + "error": { + "type": "keyword" + }, + "metric": { + "type": "keyword" + }, + "onboarding": { + "type": "keyword" + }, + "sourcemap": { + "type": "keyword" + }, + "span": { + "type": "keyword" + }, + "transaction": { + "type": "keyword" } } }, diff --git a/x-pack/test/functional/es_archives/cases/migrations/7.10.0/mappings.json b/x-pack/test/functional/es_archives/cases/migrations/7.10.0/mappings.json index c7e1a180e6c54..b1b6c468c3945 100644 --- a/x-pack/test/functional/es_archives/cases/migrations/7.10.0/mappings.json +++ b/x-pack/test/functional/es_archives/cases/migrations/7.10.0/mappings.json @@ -199,27 +199,23 @@ }, "apm-indices": { "properties": { - "apm_oss": { - "properties": { - "errorIndices": { - "type": "keyword" - }, - "metricsIndices": { - "type": "keyword" - }, - "onboardingIndices": { - "type": "keyword" - }, - "sourcemapIndices": { - "type": "keyword" - }, - "spanIndices": { - "type": "keyword" - }, - "transactionIndices": { - "type": "keyword" - } - } + "error": { + "type": "keyword" + }, + "metric": { + "type": "keyword" + }, + "onboarding": { + "type": "keyword" + }, + "sourcemap": { + "type": "keyword" + }, + "span": { + "type": "keyword" + }, + "transaction": { + "type": "keyword" } } }, diff --git a/x-pack/test/functional/es_archives/cases/migrations/7.11.1/mappings.json b/x-pack/test/functional/es_archives/cases/migrations/7.11.1/mappings.json index bc719ab40aebd..94648d407a89b 100644 --- a/x-pack/test/functional/es_archives/cases/migrations/7.11.1/mappings.json +++ b/x-pack/test/functional/es_archives/cases/migrations/7.11.1/mappings.json @@ -254,27 +254,23 @@ }, "apm-indices": { "properties": { - "apm_oss": { - "properties": { - "errorIndices": { - "type": "keyword" - }, - "metricsIndices": { - "type": "keyword" - }, - "onboardingIndices": { - "type": "keyword" - }, - "sourcemapIndices": { - "type": "keyword" - }, - "spanIndices": { - "type": "keyword" - }, - "transactionIndices": { - "type": "keyword" - } - } + "error": { + "type": "keyword" + }, + "metric": { + "type": "keyword" + }, + "onboarding": { + "type": "keyword" + }, + "sourcemap": { + "type": "keyword" + }, + "span": { + "type": "keyword" + }, + "transaction": { + "type": "keyword" } } }, @@ -2720,4 +2716,4 @@ } } } -} \ No newline at end of file +} diff --git a/x-pack/test/functional/es_archives/cases/migrations/7.13.2/mappings.json b/x-pack/test/functional/es_archives/cases/migrations/7.13.2/mappings.json index 88f3e5d78cb16..6f4a2df3a7543 100644 --- a/x-pack/test/functional/es_archives/cases/migrations/7.13.2/mappings.json +++ b/x-pack/test/functional/es_archives/cases/migrations/7.13.2/mappings.json @@ -260,27 +260,23 @@ }, "apm-indices": { "properties": { - "apm_oss": { - "properties": { - "errorIndices": { - "type": "keyword" - }, - "metricsIndices": { - "type": "keyword" - }, - "onboardingIndices": { - "type": "keyword" - }, - "sourcemapIndices": { - "type": "keyword" - }, - "spanIndices": { - "type": "keyword" - }, - "transactionIndices": { - "type": "keyword" - } - } + "error": { + "type": "keyword" + }, + "metric": { + "type": "keyword" + }, + "onboarding": { + "type": "keyword" + }, + "sourcemap": { + "type": "keyword" + }, + "span": { + "type": "keyword" + }, + "transaction": { + "type": "keyword" } } }, @@ -2864,4 +2860,4 @@ } } } -} \ No newline at end of file +} diff --git a/x-pack/test/functional/es_archives/cases/migrations/7.13_user_actions/mappings.json b/x-pack/test/functional/es_archives/cases/migrations/7.13_user_actions/mappings.json index c6b71a2613859..7026e50cdb658 100644 --- a/x-pack/test/functional/es_archives/cases/migrations/7.13_user_actions/mappings.json +++ b/x-pack/test/functional/es_archives/cases/migrations/7.13_user_actions/mappings.json @@ -261,27 +261,23 @@ }, "apm-indices": { "properties": { - "apm_oss": { - "properties": { - "errorIndices": { - "type": "keyword" - }, - "metricsIndices": { - "type": "keyword" - }, - "onboardingIndices": { - "type": "keyword" - }, - "sourcemapIndices": { - "type": "keyword" - }, - "spanIndices": { - "type": "keyword" - }, - "transactionIndices": { - "type": "keyword" - } - } + "error": { + "type": "keyword" + }, + "metric": { + "type": "keyword" + }, + "onboarding": { + "type": "keyword" + }, + "sourcemap": { + "type": "keyword" + }, + "span": { + "type": "keyword" + }, + "transaction": { + "type": "keyword" } } }, @@ -2951,4 +2947,4 @@ } } } -} \ No newline at end of file +} diff --git a/x-pack/test/functional/es_archives/data/search_sessions/mappings.json b/x-pack/test/functional/es_archives/data/search_sessions/mappings.json index a3eab7787c3eb..07c2c88b9f38f 100644 --- a/x-pack/test/functional/es_archives/data/search_sessions/mappings.json +++ b/x-pack/test/functional/es_archives/data/search_sessions/mappings.json @@ -169,27 +169,23 @@ }, "apm-indices": { "properties": { - "apm_oss": { - "properties": { - "errorIndices": { - "type": "keyword" - }, - "metricsIndices": { - "type": "keyword" - }, - "onboardingIndices": { - "type": "keyword" - }, - "sourcemapIndices": { - "type": "keyword" - }, - "spanIndices": { - "type": "keyword" - }, - "transactionIndices": { - "type": "keyword" - } - } + "error": { + "type": "keyword" + }, + "metric": { + "type": "keyword" + }, + "onboarding": { + "type": "keyword" + }, + "sourcemap": { + "type": "keyword" + }, + "span": { + "type": "keyword" + }, + "transaction": { + "type": "keyword" } } }, diff --git a/x-pack/test/functional/es_archives/endpoint/telemetry/agent_only/mappings.json b/x-pack/test/functional/es_archives/endpoint/telemetry/agent_only/mappings.json index 4dcb8f905b197..dd65c3977e1b7 100644 --- a/x-pack/test/functional/es_archives/endpoint/telemetry/agent_only/mappings.json +++ b/x-pack/test/functional/es_archives/endpoint/telemetry/agent_only/mappings.json @@ -198,27 +198,23 @@ }, "apm-indices": { "properties": { - "apm_oss": { - "properties": { - "errorIndices": { - "type": "keyword" - }, - "metricsIndices": { - "type": "keyword" - }, - "onboardingIndices": { - "type": "keyword" - }, - "sourcemapIndices": { - "type": "keyword" - }, - "spanIndices": { - "type": "keyword" - }, - "transactionIndices": { - "type": "keyword" - } - } + "error": { + "type": "keyword" + }, + "metric": { + "type": "keyword" + }, + "onboarding": { + "type": "keyword" + }, + "sourcemap": { + "type": "keyword" + }, + "span": { + "type": "keyword" + }, + "transaction": { + "type": "keyword" } } }, diff --git a/x-pack/test/functional/es_archives/endpoint/telemetry/cloned_endpoint_different_states/mappings.json b/x-pack/test/functional/es_archives/endpoint/telemetry/cloned_endpoint_different_states/mappings.json index d6d91281151aa..eecc8ee5d8870 100644 --- a/x-pack/test/functional/es_archives/endpoint/telemetry/cloned_endpoint_different_states/mappings.json +++ b/x-pack/test/functional/es_archives/endpoint/telemetry/cloned_endpoint_different_states/mappings.json @@ -199,27 +199,23 @@ }, "apm-indices": { "properties": { - "apm_oss": { - "properties": { - "errorIndices": { - "type": "keyword" - }, - "metricsIndices": { - "type": "keyword" - }, - "onboardingIndices": { - "type": "keyword" - }, - "sourcemapIndices": { - "type": "keyword" - }, - "spanIndices": { - "type": "keyword" - }, - "transactionIndices": { - "type": "keyword" - } - } + "error": { + "type": "keyword" + }, + "metric": { + "type": "keyword" + }, + "onboarding": { + "type": "keyword" + }, + "sourcemap": { + "type": "keyword" + }, + "span": { + "type": "keyword" + }, + "transaction": { + "type": "keyword" } } }, diff --git a/x-pack/test/functional/es_archives/endpoint/telemetry/cloned_endpoint_installed/mappings.json b/x-pack/test/functional/es_archives/endpoint/telemetry/cloned_endpoint_installed/mappings.json index d6d91281151aa..eecc8ee5d8870 100644 --- a/x-pack/test/functional/es_archives/endpoint/telemetry/cloned_endpoint_installed/mappings.json +++ b/x-pack/test/functional/es_archives/endpoint/telemetry/cloned_endpoint_installed/mappings.json @@ -199,27 +199,23 @@ }, "apm-indices": { "properties": { - "apm_oss": { - "properties": { - "errorIndices": { - "type": "keyword" - }, - "metricsIndices": { - "type": "keyword" - }, - "onboardingIndices": { - "type": "keyword" - }, - "sourcemapIndices": { - "type": "keyword" - }, - "spanIndices": { - "type": "keyword" - }, - "transactionIndices": { - "type": "keyword" - } - } + "error": { + "type": "keyword" + }, + "metric": { + "type": "keyword" + }, + "onboarding": { + "type": "keyword" + }, + "sourcemap": { + "type": "keyword" + }, + "span": { + "type": "keyword" + }, + "transaction": { + "type": "keyword" } } }, diff --git a/x-pack/test/functional/es_archives/endpoint/telemetry/cloned_endpoint_uninstalled/mappings.json b/x-pack/test/functional/es_archives/endpoint/telemetry/cloned_endpoint_uninstalled/mappings.json index d6d91281151aa..eecc8ee5d8870 100644 --- a/x-pack/test/functional/es_archives/endpoint/telemetry/cloned_endpoint_uninstalled/mappings.json +++ b/x-pack/test/functional/es_archives/endpoint/telemetry/cloned_endpoint_uninstalled/mappings.json @@ -199,27 +199,23 @@ }, "apm-indices": { "properties": { - "apm_oss": { - "properties": { - "errorIndices": { - "type": "keyword" - }, - "metricsIndices": { - "type": "keyword" - }, - "onboardingIndices": { - "type": "keyword" - }, - "sourcemapIndices": { - "type": "keyword" - }, - "spanIndices": { - "type": "keyword" - }, - "transactionIndices": { - "type": "keyword" - } - } + "error": { + "type": "keyword" + }, + "metric": { + "type": "keyword" + }, + "onboarding": { + "type": "keyword" + }, + "sourcemap": { + "type": "keyword" + }, + "span": { + "type": "keyword" + }, + "transaction": { + "type": "keyword" } } }, diff --git a/x-pack/test/functional/es_archives/endpoint/telemetry/endpoint_malware_disabled/mappings.json b/x-pack/test/functional/es_archives/endpoint/telemetry/endpoint_malware_disabled/mappings.json index 4dcb8f905b197..dd65c3977e1b7 100644 --- a/x-pack/test/functional/es_archives/endpoint/telemetry/endpoint_malware_disabled/mappings.json +++ b/x-pack/test/functional/es_archives/endpoint/telemetry/endpoint_malware_disabled/mappings.json @@ -198,27 +198,23 @@ }, "apm-indices": { "properties": { - "apm_oss": { - "properties": { - "errorIndices": { - "type": "keyword" - }, - "metricsIndices": { - "type": "keyword" - }, - "onboardingIndices": { - "type": "keyword" - }, - "sourcemapIndices": { - "type": "keyword" - }, - "spanIndices": { - "type": "keyword" - }, - "transactionIndices": { - "type": "keyword" - } - } + "error": { + "type": "keyword" + }, + "metric": { + "type": "keyword" + }, + "onboarding": { + "type": "keyword" + }, + "sourcemap": { + "type": "keyword" + }, + "span": { + "type": "keyword" + }, + "transaction": { + "type": "keyword" } } }, diff --git a/x-pack/test/functional/es_archives/endpoint/telemetry/endpoint_malware_enabled/mappings.json b/x-pack/test/functional/es_archives/endpoint/telemetry/endpoint_malware_enabled/mappings.json index 4dcb8f905b197..dd65c3977e1b7 100644 --- a/x-pack/test/functional/es_archives/endpoint/telemetry/endpoint_malware_enabled/mappings.json +++ b/x-pack/test/functional/es_archives/endpoint/telemetry/endpoint_malware_enabled/mappings.json @@ -198,27 +198,23 @@ }, "apm-indices": { "properties": { - "apm_oss": { - "properties": { - "errorIndices": { - "type": "keyword" - }, - "metricsIndices": { - "type": "keyword" - }, - "onboardingIndices": { - "type": "keyword" - }, - "sourcemapIndices": { - "type": "keyword" - }, - "spanIndices": { - "type": "keyword" - }, - "transactionIndices": { - "type": "keyword" - } - } + "error": { + "type": "keyword" + }, + "metric": { + "type": "keyword" + }, + "onboarding": { + "type": "keyword" + }, + "sourcemap": { + "type": "keyword" + }, + "span": { + "type": "keyword" + }, + "transaction": { + "type": "keyword" } } }, diff --git a/x-pack/test/functional/es_archives/endpoint/telemetry/endpoint_uninstalled/mappings.json b/x-pack/test/functional/es_archives/endpoint/telemetry/endpoint_uninstalled/mappings.json index 4dcb8f905b197..dd65c3977e1b7 100644 --- a/x-pack/test/functional/es_archives/endpoint/telemetry/endpoint_uninstalled/mappings.json +++ b/x-pack/test/functional/es_archives/endpoint/telemetry/endpoint_uninstalled/mappings.json @@ -198,27 +198,23 @@ }, "apm-indices": { "properties": { - "apm_oss": { - "properties": { - "errorIndices": { - "type": "keyword" - }, - "metricsIndices": { - "type": "keyword" - }, - "onboardingIndices": { - "type": "keyword" - }, - "sourcemapIndices": { - "type": "keyword" - }, - "spanIndices": { - "type": "keyword" - }, - "transactionIndices": { - "type": "keyword" - } - } + "error": { + "type": "keyword" + }, + "metric": { + "type": "keyword" + }, + "onboarding": { + "type": "keyword" + }, + "sourcemap": { + "type": "keyword" + }, + "span": { + "type": "keyword" + }, + "transaction": { + "type": "keyword" } } }, diff --git a/x-pack/test/functional/es_archives/filebeat/threat_intel/data.json b/x-pack/test/functional/es_archives/filebeat/threat_intel/data.json index 0cbc7f37bd519..f426ffae33e1c 100644 --- a/x-pack/test/functional/es_archives/filebeat/threat_intel/data.json +++ b/x-pack/test/functional/es_archives/filebeat/threat_intel/data.json @@ -18,7 +18,7 @@ "event": { "category": "threat", "created": "2021-01-26T11:09:05.529Z", - "dataset": "threatintel.abuseurl", + "dataset": "ti_abusech.malware", "ingested": "2021-01-26T11:09:06.595350Z", "kind": "enrichment", "module": "threatintel", @@ -87,7 +87,7 @@ "event": { "category": "threat", "created": "2021-01-26T11:09:05.529Z", - "dataset": "threatintel.abuseurl", + "dataset": "ti_abusech.malware", "ingested": "2021-01-26T11:09:06.616763Z", "kind": "enrichment", "module": "threatintel", @@ -156,7 +156,7 @@ "event": { "category": "threat", "created": "2021-01-26T11:09:05.529Z", - "dataset": "threatintel.abuseurl", + "dataset": "ti_abusech.malware", "ingested": "2021-01-26T11:09:06.616763Z", "kind": "enrichment", "module": "threatintel", @@ -226,7 +226,7 @@ "event": { "category": "threat", "created": "2021-01-26T11:09:05.529Z", - "dataset": "threatintel.abuseurl", + "dataset": "ti_abusech.malware", "ingested": "2021-01-26T11:09:06.616763Z", "kind": "enrichment", "module": "threatintel", diff --git a/x-pack/test/functional/es_archives/fleet/agents/mappings.json b/x-pack/test/functional/es_archives/fleet/agents/mappings.json index bbd02e6f4263a..fc5f1dd05500f 100644 --- a/x-pack/test/functional/es_archives/fleet/agents/mappings.json +++ b/x-pack/test/functional/es_archives/fleet/agents/mappings.json @@ -190,27 +190,23 @@ }, "apm-indices": { "properties": { - "apm_oss": { - "properties": { - "errorIndices": { - "type": "keyword" - }, - "metricsIndices": { - "type": "keyword" - }, - "onboardingIndices": { - "type": "keyword" - }, - "sourcemapIndices": { - "type": "keyword" - }, - "spanIndices": { - "type": "keyword" - }, - "transactionIndices": { - "type": "keyword" - } - } + "error": { + "type": "keyword" + }, + "metric": { + "type": "keyword" + }, + "onboarding": { + "type": "keyword" + }, + "sourcemap": { + "type": "keyword" + }, + "span": { + "type": "keyword" + }, + "transaction": { + "type": "keyword" } } }, diff --git a/x-pack/test/functional/es_archives/kibana_scripted_fields_on_logstash/mappings.json b/x-pack/test/functional/es_archives/kibana_scripted_fields_on_logstash/mappings.json index a70cb9014c781..528630bcd7467 100644 --- a/x-pack/test/functional/es_archives/kibana_scripted_fields_on_logstash/mappings.json +++ b/x-pack/test/functional/es_archives/kibana_scripted_fields_on_logstash/mappings.json @@ -182,27 +182,23 @@ }, "apm-indices": { "properties": { - "apm_oss": { - "properties": { - "errorIndices": { - "type": "keyword" - }, - "metricsIndices": { - "type": "keyword" - }, - "onboardingIndices": { - "type": "keyword" - }, - "sourcemapIndices": { - "type": "keyword" - }, - "spanIndices": { - "type": "keyword" - }, - "transactionIndices": { - "type": "keyword" - } - } + "error": { + "type": "keyword" + }, + "metric": { + "type": "keyword" + }, + "onboarding": { + "type": "keyword" + }, + "sourcemap": { + "type": "keyword" + }, + "span": { + "type": "keyword" + }, + "transaction": { + "type": "keyword" } } }, diff --git a/x-pack/test/functional/es_archives/lists/mappings.json b/x-pack/test/functional/es_archives/lists/mappings.json index 134ed28bac2e7..e687285f91b29 100644 --- a/x-pack/test/functional/es_archives/lists/mappings.json +++ b/x-pack/test/functional/es_archives/lists/mappings.json @@ -196,27 +196,23 @@ }, "apm-indices": { "properties": { - "apm_oss": { - "properties": { - "errorIndices": { - "type": "keyword" - }, - "metricsIndices": { - "type": "keyword" - }, - "onboardingIndices": { - "type": "keyword" - }, - "sourcemapIndices": { - "type": "keyword" - }, - "spanIndices": { - "type": "keyword" - }, - "transactionIndices": { - "type": "keyword" - } - } + "error": { + "type": "keyword" + }, + "metric": { + "type": "keyword" + }, + "onboarding": { + "type": "keyword" + }, + "sourcemap": { + "type": "keyword" + }, + "span": { + "type": "keyword" + }, + "transaction": { + "type": "keyword" } } }, diff --git a/x-pack/test/functional/es_archives/reporting/canvas_disallowed_url/mappings.json b/x-pack/test/functional/es_archives/reporting/canvas_disallowed_url/mappings.json index 5bffb9540e983..e67abaf2032c7 100644 --- a/x-pack/test/functional/es_archives/reporting/canvas_disallowed_url/mappings.json +++ b/x-pack/test/functional/es_archives/reporting/canvas_disallowed_url/mappings.json @@ -193,27 +193,23 @@ }, "apm-indices": { "properties": { - "apm_oss": { - "properties": { - "errorIndices": { - "type": "keyword" - }, - "metricsIndices": { - "type": "keyword" - }, - "onboardingIndices": { - "type": "keyword" - }, - "sourcemapIndices": { - "type": "keyword" - }, - "spanIndices": { - "type": "keyword" - }, - "transactionIndices": { - "type": "keyword" - } - } + "error": { + "type": "keyword" + }, + "metric": { + "type": "keyword" + }, + "onboarding": { + "type": "keyword" + }, + "sourcemap": { + "type": "keyword" + }, + "span": { + "type": "keyword" + }, + "transaction": { + "type": "keyword" } } }, diff --git a/x-pack/test/functional/es_archives/reporting/ecommerce_kibana_spaces/mappings.json b/x-pack/test/functional/es_archives/reporting/ecommerce_kibana_spaces/mappings.json index 254184cbef584..0fe9a18ce2201 100644 --- a/x-pack/test/functional/es_archives/reporting/ecommerce_kibana_spaces/mappings.json +++ b/x-pack/test/functional/es_archives/reporting/ecommerce_kibana_spaces/mappings.json @@ -214,27 +214,23 @@ }, "apm-indices": { "properties": { - "apm_oss": { - "properties": { - "errorIndices": { - "type": "keyword" - }, - "metricsIndices": { - "type": "keyword" - }, - "onboardingIndices": { - "type": "keyword" - }, - "sourcemapIndices": { - "type": "keyword" - }, - "spanIndices": { - "type": "keyword" - }, - "transactionIndices": { - "type": "keyword" - } - } + "error": { + "type": "keyword" + }, + "metric": { + "type": "keyword" + }, + "onboarding": { + "type": "keyword" + }, + "sourcemap": { + "type": "keyword" + }, + "span": { + "type": "keyword" + }, + "transaction": { + "type": "keyword" } } }, diff --git a/x-pack/test/functional/es_archives/reporting/hugedata/mappings.json b/x-pack/test/functional/es_archives/reporting/hugedata/mappings.json index 1fdde9d9d208b..d1cb75c1f5150 100644 --- a/x-pack/test/functional/es_archives/reporting/hugedata/mappings.json +++ b/x-pack/test/functional/es_archives/reporting/hugedata/mappings.json @@ -170,27 +170,23 @@ }, "apm-indices": { "properties": { - "apm_oss": { - "properties": { - "errorIndices": { - "type": "keyword" - }, - "metricsIndices": { - "type": "keyword" - }, - "onboardingIndices": { - "type": "keyword" - }, - "sourcemapIndices": { - "type": "keyword" - }, - "spanIndices": { - "type": "keyword" - }, - "transactionIndices": { - "type": "keyword" - } - } + "error": { + "type": "keyword" + }, + "metric": { + "type": "keyword" + }, + "onboarding": { + "type": "keyword" + }, + "sourcemap": { + "type": "keyword" + }, + "span": { + "type": "keyword" + }, + "transaction": { + "type": "keyword" } } }, diff --git a/x-pack/test/functional/es_archives/reporting/multi_index_kibana/mappings.json b/x-pack/test/functional/es_archives/reporting/multi_index_kibana/mappings.json index f950877aea332..69c6cbc3b46b5 100644 --- a/x-pack/test/functional/es_archives/reporting/multi_index_kibana/mappings.json +++ b/x-pack/test/functional/es_archives/reporting/multi_index_kibana/mappings.json @@ -172,27 +172,23 @@ }, "apm-indices": { "properties": { - "apm_oss": { - "properties": { - "errorIndices": { - "type": "keyword" - }, - "metricsIndices": { - "type": "keyword" - }, - "onboardingIndices": { - "type": "keyword" - }, - "sourcemapIndices": { - "type": "keyword" - }, - "spanIndices": { - "type": "keyword" - }, - "transactionIndices": { - "type": "keyword" - } - } + "error": { + "type": "keyword" + }, + "metric": { + "type": "keyword" + }, + "onboarding": { + "type": "keyword" + }, + "sourcemap": { + "type": "keyword" + }, + "span": { + "type": "keyword" + }, + "transaction": { + "type": "keyword" } } }, @@ -2028,4 +2024,4 @@ } } } -} \ No newline at end of file +} diff --git a/x-pack/test/functional/es_archives/security_solution/legacy_cti_signals/data.json b/x-pack/test/functional/es_archives/security_solution/legacy_cti_signals/data.json index bcc8d5f86e1d3..56fa5ea6af329 100644 --- a/x-pack/test/functional/es_archives/security_solution/legacy_cti_signals/data.json +++ b/x-pack/test/functional/es_archives/security_solution/legacy_cti_signals/data.json @@ -168,12 +168,12 @@ { "field": "host.name", "type": "mapping", - "value": "threatintel.indicator.domain" + "value": "threat.indicator.domain" } ] } ], - "threat_query": "threatintel.indicator.type : \"url\"", + "threat_query": "threat.indicator.type : \"url\"", "throttle": null, "to": "now", "type": "threat_match", @@ -190,7 +190,7 @@ "event": { "category": "threat", "created": "2021-08-04T03:53:30.761Z", - "dataset": "threatintel.abuseurl", + "dataset": "ti_abusech.malware", "ingested": "2021-08-04T03:53:37.514040Z", "kind": "enrichment", "module": "threatintel", @@ -412,12 +412,12 @@ { "field": "host.name", "type": "mapping", - "value": "threatintel.indicator.domain" + "value": "threat.indicator.domain" } ] } ], - "threat_query": "threatintel.indicator.type : \"url\"", + "threat_query": "threat.indicator.type : \"url\"", "throttle": null, "to": "now", "type": "threat_match", @@ -434,7 +434,7 @@ "event": { "category": "threat", "created": "2021-08-04T03:53:30.761Z", - "dataset": "threatintel.abuseurl", + "dataset": "ti_abusech.malware", "ingested": "2021-08-04T03:53:37.514040Z", "kind": "enrichment", "module": "threatintel", diff --git a/x-pack/test/functional/es_archives/security_solution/migrations/mappings.json b/x-pack/test/functional/es_archives/security_solution/migrations/mappings.json index 5a602322b3017..8728ec4ad74a1 100644 --- a/x-pack/test/functional/es_archives/security_solution/migrations/mappings.json +++ b/x-pack/test/functional/es_archives/security_solution/migrations/mappings.json @@ -272,27 +272,23 @@ }, "apm-indices": { "properties": { - "apm_oss": { - "properties": { - "errorIndices": { - "type": "keyword" - }, - "metricsIndices": { - "type": "keyword" - }, - "onboardingIndices": { - "type": "keyword" - }, - "sourcemapIndices": { - "type": "keyword" - }, - "spanIndices": { - "type": "keyword" - }, - "transactionIndices": { - "type": "keyword" - } - } + "error": { + "type": "keyword" + }, + "metric": { + "type": "keyword" + }, + "onboarding": { + "type": "keyword" + }, + "sourcemap": { + "type": "keyword" + }, + "span": { + "type": "keyword" + }, + "transaction": { + "type": "keyword" } } }, diff --git a/x-pack/test/functional/es_archives/security_solution/timelines/7.15.0/mappings.json b/x-pack/test/functional/es_archives/security_solution/timelines/7.15.0/mappings.json index 7561dbb8dc6d2..7292878908cab 100644 --- a/x-pack/test/functional/es_archives/security_solution/timelines/7.15.0/mappings.json +++ b/x-pack/test/functional/es_archives/security_solution/timelines/7.15.0/mappings.json @@ -276,27 +276,23 @@ }, "apm-indices": { "properties": { - "apm_oss": { - "properties": { - "errorIndices": { - "type": "keyword" - }, - "metricsIndices": { - "type": "keyword" - }, - "onboardingIndices": { - "type": "keyword" - }, - "sourcemapIndices": { - "type": "keyword" - }, - "spanIndices": { - "type": "keyword" - }, - "transactionIndices": { - "type": "keyword" - } - } + "error": { + "type": "keyword" + }, + "metric": { + "type": "keyword" + }, + "onboarding": { + "type": "keyword" + }, + "sourcemap": { + "type": "keyword" + }, + "span": { + "type": "keyword" + }, + "transaction": { + "type": "keyword" } } }, diff --git a/x-pack/test/functional/es_archives/visualize/default/mappings.json b/x-pack/test/functional/es_archives/visualize/default/mappings.json index 00dddbcafdd1c..abf6bcfa04c80 100644 --- a/x-pack/test/functional/es_archives/visualize/default/mappings.json +++ b/x-pack/test/functional/es_archives/visualize/default/mappings.json @@ -254,27 +254,23 @@ }, "apm-indices": { "properties": { - "apm_oss": { - "properties": { - "errorIndices": { - "type": "keyword" - }, - "metricsIndices": { - "type": "keyword" - }, - "onboardingIndices": { - "type": "keyword" - }, - "sourcemapIndices": { - "type": "keyword" - }, - "spanIndices": { - "type": "keyword" - }, - "transactionIndices": { - "type": "keyword" - } - } + "error": { + "type": "keyword" + }, + "metric": { + "type": "keyword" + }, + "onboarding": { + "type": "keyword" + }, + "sourcemap": { + "type": "keyword" + }, + "span": { + "type": "keyword" + }, + "transaction": { + "type": "keyword" } } }, diff --git a/x-pack/test/functional/page_objects/reporting_page.ts b/x-pack/test/functional/page_objects/reporting_page.ts index 552d2c9c831bd..039f4ff0fbc57 100644 --- a/x-pack/test/functional/page_objects/reporting_page.ts +++ b/x-pack/test/functional/page_objects/reporting_page.ts @@ -19,6 +19,7 @@ export class ReportingPageObject extends FtrService { private readonly retry = this.ctx.getService('retry'); private readonly security = this.ctx.getService('security'); private readonly testSubjects = this.ctx.getService('testSubjects'); + private readonly find = this.ctx.getService('find'); private readonly share = this.ctx.getPageObject('share'); private readonly timePicker = this.ctx.getPageObject('timePicker'); @@ -33,15 +34,21 @@ export class ReportingPageObject extends FtrService { async getReportURL(timeout: number) { this.log.debug('getReportURL'); - const url = await this.testSubjects.getAttribute( - 'downloadCompletedReportButton', - 'href', - timeout - ); - - this.log.debug(`getReportURL got url: ${url}`); - - return url; + try { + const url = await this.testSubjects.getAttribute( + 'downloadCompletedReportButton', + 'href', + timeout + ); + this.log.debug(`getReportURL got url: ${url}`); + + return url; + } catch (err) { + const errorTextEl = await this.find.byCssSelector('[data-test-errorText]'); + const errorText = await errorTextEl.getAttribute('data-test-errorText'); + const newError = new Error(`Test report failed: ${errorText}: ${err}`); + throw newError; + } } async removeForceSharedItemsContainerSize() { diff --git a/x-pack/test/functional/page_objects/synthetics_integration_page.ts b/x-pack/test/functional/page_objects/synthetics_integration_page.ts index cfb6e1dac980e..5551ea2c3bcd0 100644 --- a/x-pack/test/functional/page_objects/synthetics_integration_page.ts +++ b/x-pack/test/functional/page_objects/synthetics_integration_page.ts @@ -117,10 +117,9 @@ export function SyntheticsIntegrationPageProvider({ /** * Finds and returns the enable TLS checkbox */ - async findEnableTLSCheckbox() { + async findEnableTLSSwitch() { await this.ensureIsOnPackagePage(); - const tlsCheckboxContainer = await testSubjects.find('syntheticsIsTLSEnabled'); - return await tlsCheckboxContainer.findByCssSelector('label'); + return await testSubjects.find('syntheticsIsTLSEnabled'); }, /** @@ -321,8 +320,8 @@ export function SyntheticsIntegrationPageProvider({ * Enables TLS */ async enableTLS() { - const tlsCheckbox = await this.findEnableTLSCheckbox(); - await tlsCheckbox.click(); + const tlsSwitch = await this.findEnableTLSSwitch(); + await tlsSwitch.click(); }, /** diff --git a/x-pack/test/functional/services/monitoring/cluster_overview.js b/x-pack/test/functional/services/monitoring/cluster_overview.js index 7e888d6233ff7..215e92fa055be 100644 --- a/x-pack/test/functional/services/monitoring/cluster_overview.js +++ b/x-pack/test/functional/services/monitoring/cluster_overview.js @@ -12,8 +12,7 @@ export function MonitoringClusterOverviewProvider({ getService }) { const retry = getService('retry'); const SUBJ_CLUSTER_ALERTS = `clusterAlertsContainer`; - const SUBJ_CLUSTER_OVERVIEW = 'clusterOverviewContainer'; - const SUBJ_CLUSTER_NAME = `${SUBJ_CLUSTER_OVERVIEW} > clusterName`; + const SUBJ_CLUSTER_NAME = `overviewTabsclusterName`; const SUBJ_ES_PANEL = `clusterItemContainerElasticsearch`; const SUBJ_ES_STATUS = `${SUBJ_ES_PANEL} > statusIcon`; diff --git a/x-pack/test/functional/services/monitoring/no_data.js b/x-pack/test/functional/services/monitoring/no_data.js index 7b4410425dcfe..bd34c45c2d293 100644 --- a/x-pack/test/functional/services/monitoring/no_data.js +++ b/x-pack/test/functional/services/monitoring/no_data.js @@ -30,5 +30,13 @@ export function MonitoringNoDataProvider({ getService }) { const pageId = await retry.try(() => testSubjects.find('noDataContainer')); return pageId !== null; } + + async isOnNoDataPageMonitoringEnablementDenied() { + return testSubjects.exists('weTriedContainer'); + } + + async clickSetupWithSelfMonitoring() { + await testSubjects.click('useInternalCollection'); + } })(); } diff --git a/x-pack/test/functional/services/observability/alerts/add_to_case.ts b/x-pack/test/functional/services/observability/alerts/add_to_case.ts new file mode 100644 index 0000000000000..1669fc69a683c --- /dev/null +++ b/x-pack/test/functional/services/observability/alerts/add_to_case.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 { FtrProviderContext } from '../../../ftr_provider_context'; + +const ADD_TO_EXISTING_CASE_SELECTOR = 'add-existing-case-menu-item'; +const ADD_TO_NEW_CASE_SELECTOR = 'add-new-case-item'; +const CREATE_CASE_FLYOUT = 'create-case-flyout'; +const SELECT_CASE_MODAL = 'all-cases-modal'; + +export function ObservabilityAlertsAddToCaseProvider({ getService }: FtrProviderContext) { + const testSubjects = getService('testSubjects'); + + const getAddToExistingCaseSelector = async () => { + return await testSubjects.find(ADD_TO_EXISTING_CASE_SELECTOR); + }; + + const getAddToExistingCaseSelectorOrFail = async () => { + return await testSubjects.existOrFail(ADD_TO_EXISTING_CASE_SELECTOR); + }; + + const missingAddToExistingCaseSelectorOrFail = async () => { + return await testSubjects.missingOrFail(ADD_TO_EXISTING_CASE_SELECTOR); + }; + + const getAddToNewCaseSelector = async () => { + return await testSubjects.find(ADD_TO_NEW_CASE_SELECTOR); + }; + + const getAddToNewCaseSelectorOrFail = async () => { + return await testSubjects.existOrFail(ADD_TO_NEW_CASE_SELECTOR); + }; + + const missingAddToNewCaseSelectorOrFail = async () => { + return await testSubjects.missingOrFail(ADD_TO_NEW_CASE_SELECTOR); + }; + + const addToNewCaseButtonClick = async () => { + return await (await getAddToNewCaseSelector()).click(); + }; + + const addToExistingCaseButtonClick = async () => { + return await (await getAddToExistingCaseSelector()).click(); + }; + + const getCreateCaseFlyoutOrFail = async () => { + return await testSubjects.existOrFail(CREATE_CASE_FLYOUT); + }; + + const closeFlyout = async () => { + return await (await testSubjects.find('euiFlyoutCloseButton')).click(); + }; + + const getAddtoExistingCaseModalOrFail = async () => { + return await testSubjects.existOrFail(SELECT_CASE_MODAL); + }; + + return { + getAddToExistingCaseSelector, + getAddToExistingCaseSelectorOrFail, + missingAddToExistingCaseSelectorOrFail, + getAddToNewCaseSelector, + getAddToNewCaseSelectorOrFail, + missingAddToNewCaseSelectorOrFail, + getCreateCaseFlyoutOrFail, + closeFlyout, + addToNewCaseButtonClick, + addToExistingCaseButtonClick, + getAddtoExistingCaseModalOrFail, + }; +} diff --git a/x-pack/test/functional/services/observability/alerts/common.ts b/x-pack/test/functional/services/observability/alerts/common.ts index 7098fdec2a9d4..d5a2ce2a18c41 100644 --- a/x-pack/test/functional/services/observability/alerts/common.ts +++ b/x-pack/test/functional/services/observability/alerts/common.ts @@ -204,5 +204,6 @@ export function ObservabilityAlertsCommonProvider({ setWorkflowStatusFilter, submitQuery, typeInQueryBar, + openActionsMenuForRow, }; } diff --git a/x-pack/test/functional/services/observability/alerts/index.ts b/x-pack/test/functional/services/observability/alerts/index.ts index f373b0d75c543..f2b5173dfe5b0 100644 --- a/x-pack/test/functional/services/observability/alerts/index.ts +++ b/x-pack/test/functional/services/observability/alerts/index.ts @@ -7,15 +7,17 @@ import { ObservabilityAlertsPaginationProvider } from './pagination'; import { ObservabilityAlertsCommonProvider } from './common'; +import { ObservabilityAlertsAddToCaseProvider } from './add_to_case'; import { FtrProviderContext } from '../../../ftr_provider_context'; export function ObservabilityAlertsProvider(context: FtrProviderContext) { const common = ObservabilityAlertsCommonProvider(context); const pagination = ObservabilityAlertsPaginationProvider(context); - + const addToCase = ObservabilityAlertsAddToCaseProvider(context); return { common, pagination, + addToCase, }; } diff --git a/x-pack/test/lists_api_integration/security_and_spaces/tests/export_exception_list.ts b/x-pack/test/lists_api_integration/security_and_spaces/tests/export_exception_list.ts new file mode 100644 index 0000000000000..d35d34fde5bcc --- /dev/null +++ b/x-pack/test/lists_api_integration/security_and_spaces/tests/export_exception_list.ts @@ -0,0 +1,155 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import expect from '@kbn/expect'; +import type { CreateExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import { EXCEPTION_LIST_URL, EXCEPTION_LIST_ITEM_URL } from '@kbn/securitysolution-list-constants'; + +import { FtrProviderContext } from '../../common/ftr_provider_context'; +import { + removeExceptionListServerGeneratedProperties, + removeExceptionListItemServerGeneratedProperties, + binaryToString, + deleteAllExceptions, +} from '../../utils'; +import { getCreateExceptionListMinimalSchemaMock } from '../../../../plugins/lists/common/schemas/request/create_exception_list_schema.mock'; +import { getCreateExceptionListItemMinimalSchemaMock } from '../../../../plugins/lists/common/schemas/request/create_exception_list_item_schema.mock'; + +// eslint-disable-next-line import/no-default-export +export default ({ getService }: FtrProviderContext): void => { + const supertest = getService('supertest'); + const es = getService('es'); + + describe('export_exception_list_route', () => { + describe('exporting exception lists', () => { + afterEach(async () => { + await deleteAllExceptions(es); + }); + + it('should set the response content types to be expected', async () => { + // create an exception list + const { body } = await supertest + .post(EXCEPTION_LIST_URL) + .set('kbn-xsrf', 'true') + .send(getCreateExceptionListMinimalSchemaMock()) + .expect(200); + + // create an exception list item + await supertest + .post(EXCEPTION_LIST_ITEM_URL) + .set('kbn-xsrf', 'true') + .send(getCreateExceptionListItemMinimalSchemaMock()) + .expect(200); + + await supertest + .post( + `${EXCEPTION_LIST_URL}/_export?id=${body.id}&list_id=${body.list_id}&namespace_type=single` + ) + .set('kbn-xsrf', 'true') + .expect('Content-Disposition', `attachment; filename="${body.list_id}"`) + .expect(200); + }); + + it('should return 404 if given ids that do not exist', async () => { + // create an exception list + await supertest + .post(EXCEPTION_LIST_URL) + .set('kbn-xsrf', 'true') + .send(getCreateExceptionListMinimalSchemaMock()) + .expect(200); + + // create an exception list item + await supertest + .post(EXCEPTION_LIST_ITEM_URL) + .set('kbn-xsrf', 'true') + .send(getCreateExceptionListItemMinimalSchemaMock()) + .expect(200); + + const { body: exportBody } = await supertest + .post( + `${EXCEPTION_LIST_URL}/_export?id=not_exist&list_id=not_exist&namespace_type=single` + ) + .set('kbn-xsrf', 'true') + .expect(400); + + expect(exportBody).to.eql({ + message: 'exception list with list_id: not_exist does not exist', + status_code: 400, + }); + }); + + it('should export a single list with a list id', async () => { + const { body } = await supertest + .post(EXCEPTION_LIST_URL) + .set('kbn-xsrf', 'true') + .send(getCreateExceptionListMinimalSchemaMock()) + .expect(200); + + const { body: itemBody } = await supertest + .post(EXCEPTION_LIST_ITEM_URL) + .set('kbn-xsrf', 'true') + .send(getCreateExceptionListItemMinimalSchemaMock()) + .expect(200); + + const { body: exportResult } = await supertest + .post( + `${EXCEPTION_LIST_URL}/_export?id=${body.id}&list_id=${body.list_id}&namespace_type=single` + ) + .set('kbn-xsrf', 'true') + .expect(200) + .parse(binaryToString); + + const exportedItemsToArray = exportResult.toString().split('\n'); + const list = JSON.parse(exportedItemsToArray[0]); + const item = JSON.parse(exportedItemsToArray[1]); + + expect(removeExceptionListServerGeneratedProperties(list)).to.eql( + removeExceptionListServerGeneratedProperties(body) + ); + expect(removeExceptionListItemServerGeneratedProperties(item)).to.eql( + removeExceptionListItemServerGeneratedProperties(itemBody) + ); + }); + + it('should export two list items with a list id', async () => { + const { body } = await supertest + .post(EXCEPTION_LIST_URL) + .set('kbn-xsrf', 'true') + .send(getCreateExceptionListMinimalSchemaMock()) + .expect(200); + + await supertest + .post(EXCEPTION_LIST_ITEM_URL) + .set('kbn-xsrf', 'true') + .send(getCreateExceptionListItemMinimalSchemaMock()) + .expect(200); + + const secondExceptionListItem: CreateExceptionListItemSchema = { + ...getCreateExceptionListItemMinimalSchemaMock(), + item_id: 'some-list-item-id-2', + }; + await supertest + .post(EXCEPTION_LIST_ITEM_URL) + .set('kbn-xsrf', 'true') + .send(secondExceptionListItem) + .expect(200); + + const { body: exportResult } = await supertest + .post( + `${EXCEPTION_LIST_URL}/_export?id=${body.id}&list_id=${body.list_id}&namespace_type=single` + ) + .set('kbn-xsrf', 'true') + .expect(200) + .parse(binaryToString); + + const bodyString = exportResult.toString(); + expect(bodyString.includes('some-list-item-id-2')).to.be(true); + expect(bodyString.includes('some-list-item-id')).to.be(true); + }); + }); + }); +}; diff --git a/x-pack/test/lists_api_integration/security_and_spaces/tests/index.ts b/x-pack/test/lists_api_integration/security_and_spaces/tests/index.ts index 89a1183da6790..afb6057dedfff 100644 --- a/x-pack/test/lists_api_integration/security_and_spaces/tests/index.ts +++ b/x-pack/test/lists_api_integration/security_and_spaces/tests/index.ts @@ -24,6 +24,7 @@ export default ({ loadTestFile }: FtrProviderContext): void => { loadTestFile(require.resolve('./find_list_items')); loadTestFile(require.resolve('./import_list_items')); loadTestFile(require.resolve('./export_list_items')); + loadTestFile(require.resolve('./export_exception_list')); loadTestFile(require.resolve('./create_exception_lists')); loadTestFile(require.resolve('./create_exception_list_items')); loadTestFile(require.resolve('./read_exception_lists')); diff --git a/x-pack/test/observability_functional/apps/observability/alerts/add_to_case.ts b/x-pack/test/observability_functional/apps/observability/alerts/add_to_case.ts new file mode 100644 index 0000000000000..f29111f2cb66b --- /dev/null +++ b/x-pack/test/observability_functional/apps/observability/alerts/add_to_case.ts @@ -0,0 +1,92 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { FtrProviderContext } from '../../../ftr_provider_context'; + +export default ({ getService, getPageObjects }: FtrProviderContext) => { + const esArchiver = getService('esArchiver'); + const observability = getService('observability'); + const retry = getService('retry'); + + describe('Observability alerts / Add to case', function () { + this.tags('includeFirefox'); + + before(async () => { + await esArchiver.load('x-pack/test/functional/es_archives/observability/alerts'); + }); + + after(async () => { + await esArchiver.unload('x-pack/test/functional/es_archives/observability/alerts'); + }); + + describe('When user has all priviledges for cases', () => { + before(async () => { + await observability.users.setTestUserRole( + observability.users.defineBasicObservabilityRole({ + observabilityCases: ['all'], + logs: ['all'], + }) + ); + await observability.alerts.common.navigateToTimeWithData(); + }); + + after(async () => { + await observability.users.restoreDefaultTestUserRole(); + }); + + it('renders case options in the overflow menu', async () => { + await observability.alerts.common.openActionsMenuForRow(0); + await retry.try(async () => { + await observability.alerts.addToCase.getAddToExistingCaseSelectorOrFail(); + await observability.alerts.addToCase.getAddToNewCaseSelectorOrFail(); + }); + }); + + it('opens a flyout when Add to new case is clicked', async () => { + await observability.alerts.addToCase.addToNewCaseButtonClick(); + + await retry.try(async () => { + await observability.alerts.addToCase.getCreateCaseFlyoutOrFail(); + await observability.alerts.addToCase.closeFlyout(); + }); + }); + + it('opens a modal when Add to existing case is clicked', async () => { + await observability.alerts.common.openActionsMenuForRow(0); + + await retry.try(async () => { + await observability.alerts.addToCase.addToExistingCaseButtonClick(); + await observability.alerts.addToCase.getAddtoExistingCaseModalOrFail(); + }); + }); + }); + + describe('When user has read permissions for cases', () => { + before(async () => { + await observability.users.setTestUserRole( + observability.users.defineBasicObservabilityRole({ + observabilityCases: ['read'], + logs: ['all'], + }) + ); + await observability.alerts.common.navigateToTimeWithData(); + }); + + after(async () => { + await observability.users.restoreDefaultTestUserRole(); + }); + + it('does not render case options in the overflow menu', async () => { + await observability.alerts.common.openActionsMenuForRow(0); + await retry.try(async () => { + await observability.alerts.addToCase.missingAddToExistingCaseSelectorOrFail(); + await observability.alerts.addToCase.missingAddToNewCaseSelectorOrFail(); + }); + }); + }); + }); +}; diff --git a/x-pack/test/observability_functional/apps/observability/index.ts b/x-pack/test/observability_functional/apps/observability/index.ts index b163d4d6bb8d5..43e056bae65c0 100644 --- a/x-pack/test/observability_functional/apps/observability/index.ts +++ b/x-pack/test/observability_functional/apps/observability/index.ts @@ -15,5 +15,6 @@ export default function ({ loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./alerts')); loadTestFile(require.resolve('./alerts/workflow_status')); loadTestFile(require.resolve('./alerts/pagination')); + loadTestFile(require.resolve('./alerts/add_to_case')); }); } diff --git a/x-pack/test/security_solution_cypress/es_archives/threat_indicator/data.json b/x-pack/test/security_solution_cypress/es_archives/threat_indicator/data.json index c5d382194027f..a2e0c2d2921dc 100644 --- a/x-pack/test/security_solution_cypress/es_archives/threat_indicator/data.json +++ b/x-pack/test/security_solution_cypress/es_archives/threat_indicator/data.json @@ -2,7 +2,7 @@ "type": "doc", "value": { "id": "84cf452c1e0375c3d4412cb550bd1783358468a3b3b777da4829d72c7d6fb74f", - "index": "filebeat-7.12.0-2021.03.10-000001", + "index": "logs-ti_abusech.malware", "source": { "@timestamp": "2021-03-10T14:51:05.766Z", "agent": { @@ -16,7 +16,7 @@ "fileset": { "name": "abusemalware" }, - "threatintel": { + "threat": { "indicator": { "first_seen": "2021-03-10T08:02:14.000Z", "file": { @@ -31,13 +31,13 @@ } }, "type": "file" - }, - "abusemalware": { - "virustotal": { - "result": "38 / 61", - "link": "https://www.virustotal.com/gui/file/a04ac6d98ad989312783d4fe3456c53730b212c79a426fb215708b6c6daa3de3/detection/f-a04ac6d", - "percent": "62.30" - } + } + }, + "abusemalware": { + "virustotal": { + "result": "38 / 61", + "link": "https://www.virustotal.com/gui/file/a04ac6d98ad989312783d4fe3456c53730b212c79a426fb215708b6c6daa3de3/detection/f-a04ac6d", + "percent": "62.30" } }, "tags": [ @@ -68,7 +68,7 @@ "module": "threatintel", "category": "threat", "type": "indicator", - "dataset": "threatintel.abusemalware" + "dataset": "ti_abusech.malware" } } } diff --git a/x-pack/test/security_solution_cypress/es_archives/threat_indicator/mappings.json b/x-pack/test/security_solution_cypress/es_archives/threat_indicator/mappings.json index efd23c5a6bba4..8840cd4bee0dd 100644 --- a/x-pack/test/security_solution_cypress/es_archives/threat_indicator/mappings.json +++ b/x-pack/test/security_solution_cypress/es_archives/threat_indicator/mappings.json @@ -6,7 +6,7 @@ "is_write_index": true } }, - "index": "filebeat-7.12.0-2021.03.10-000001", + "index": "logs-ti_abusech.malware", "mappings": { "_meta": { "beat": "filebeat", @@ -194,7 +194,7 @@ } } }, - "threatintel": { + "threat": { "properties": { "abusemalware": { "properties": { diff --git a/x-pack/test/security_solution_cypress/es_archives/threat_indicator2/data.json b/x-pack/test/security_solution_cypress/es_archives/threat_indicator2/data.json index 0598fd7ba7c86..1a8d3ff5a309a 100644 --- a/x-pack/test/security_solution_cypress/es_archives/threat_indicator2/data.json +++ b/x-pack/test/security_solution_cypress/es_archives/threat_indicator2/data.json @@ -2,7 +2,7 @@ "type": "doc", "value": { "id": "a04ac6d98ad989312783d4fe3456c53730b212c79a426fb215708b6c6daa3de3", - "index": "filebeat-7.12.0-2021.03.11-000001", + "index": "logs-ti_abusech.malware", "source": { "@timestamp": "2021-06-27T14:51:05.766Z", "agent": { @@ -16,7 +16,7 @@ "fileset": { "name": "abusemalware" }, - "threatintel": { + "threat": { "indicator": { "first_seen": "2021-03-11T08:02:14.000Z", "ip": "192.168.1.1", @@ -56,7 +56,7 @@ "module": "threatintel", "category": "threat", "type": "indicator", - "dataset": "threatintel.abusemalware" + "dataset": "ti_abusech.malware" } } } diff --git a/x-pack/test/security_solution_cypress/es_archives/threat_indicator2/mappings.json b/x-pack/test/security_solution_cypress/es_archives/threat_indicator2/mappings.json index 072318f7f4fc4..cba4263f32b69 100644 --- a/x-pack/test/security_solution_cypress/es_archives/threat_indicator2/mappings.json +++ b/x-pack/test/security_solution_cypress/es_archives/threat_indicator2/mappings.json @@ -2,11 +2,11 @@ "type": "index", "value": { "aliases": { - "filebeat-7.12.0": { + "logs-ti": { "is_write_index": false } }, - "index": "filebeat-7.12.0-2021.03.11-000001", + "index": "logs-ti_abusech.malware", "mappings": { "_meta": { "beat": "filebeat", @@ -194,7 +194,7 @@ } } }, - "threatintel": { + "threat": { "properties": { "abusemalware": { "properties": { diff --git a/x-pack/test/security_solution_endpoint/apps/endpoint/endpoint_list.ts b/x-pack/test/security_solution_endpoint/apps/endpoint/endpoint_list.ts index 8f5177fe14f43..3a49278bd21a8 100644 --- a/x-pack/test/security_solution_endpoint/apps/endpoint/endpoint_list.ts +++ b/x-pack/test/security_solution_endpoint/apps/endpoint/endpoint_list.ts @@ -72,10 +72,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { return tableData; }; - // FLAKY - // https://github.com/elastic/kibana/issues/114249 - // https://github.com/elastic/kibana/issues/114250 - describe.skip('endpoint list', function () { + describe('endpoint list', function () { const sleep = (ms = 100) => new Promise((resolve) => setTimeout(resolve, ms)); let indexedData: IndexedHostsAndAlertsResponse; describe('when initially navigating to page', () => { diff --git a/x-pack/test/security_solution_endpoint/apps/endpoint/index.ts b/x-pack/test/security_solution_endpoint/apps/endpoint/index.ts index 5ff206b8ad676..70d60ba5c1b67 100644 --- a/x-pack/test/security_solution_endpoint/apps/endpoint/index.ts +++ b/x-pack/test/security_solution_endpoint/apps/endpoint/index.ts @@ -15,7 +15,7 @@ import { export default function (providerContext: FtrProviderContext) { const { loadTestFile, getService } = providerContext; - describe.skip('endpoint', function () { + describe('endpoint', function () { const ingestManager = getService('ingestManager'); const log = getService('log'); const endpointTestResources = getService('endpointTestResources'); diff --git a/x-pack/test/security_solution_endpoint/apps/endpoint/trusted_apps_list.ts b/x-pack/test/security_solution_endpoint/apps/endpoint/trusted_apps_list.ts index 042a685d19ef8..52fb9b8fc8599 100644 --- a/x-pack/test/security_solution_endpoint/apps/endpoint/trusted_apps_list.ts +++ b/x-pack/test/security_solution_endpoint/apps/endpoint/trusted_apps_list.ts @@ -16,10 +16,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const endpointTestResources = getService('endpointTestResources'); const policyTestResources = getService('policyTestResources'); - // FLAKY - // https://github.com/elastic/kibana/issues/114308 - // https://github.com/elastic/kibana/issues/114309 - describe.skip('When on the Trusted Apps list', function () { + describe('When on the Trusted Apps list', function () { let indexedData: IndexedHostsAndAlertsResponse; before(async () => { const endpointPackage = await policyTestResources.getEndpointPackage(); diff --git a/yarn.lock b/yarn.lock index 8ad96ce711ae6..b2d03018a0e0c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2389,10 +2389,10 @@ ms "^2.1.3" secure-json-parse "^2.4.0" -"@elastic/ems-client@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@elastic/ems-client/-/ems-client-7.15.0.tgz#c101d7f83aa56463bcc385fd4eb883c6ea3ae9fc" - integrity sha512-BAAAVPhoaH6SGrfuO6U0MVRg4lvblhJ9VqYlMf3dZN9uDBB+12CUtb6t6Kavn5Tr3nS6X3tU/KKsuomo5RrEeQ== +"@elastic/ems-client@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@elastic/ems-client/-/ems-client-7.16.0.tgz#92db94126bac0b95fbf156fe609f68979e7af4b6" + integrity sha512-NgMB5vqj6I7lxVsysrz6eB1EW6gsZj7SWWs79WSiiKQeNuRg82tJhvbHQnWezjIS4UKOtoGxZsg475EHVZB46g== dependencies: "@types/geojson" "^7946.0.7" "@types/lru-cache" "^5.1.0" @@ -2400,7 +2400,7 @@ "@types/topojson-specification" "^1.0.1" lodash "^4.17.15" lru-cache "^6.0.0" - semver "7.3.2" + semver "^7.3.2" topojson-client "^3.1.0" "@elastic/eslint-config-kibana@link:bazel-bin/packages/elastic-eslint-config-kibana": @@ -4757,13 +4757,13 @@ resolved "https://registry.yarnpkg.com/@redux-saga/types/-/types-1.1.0.tgz#0e81ce56b4883b4b2a3001ebe1ab298b84237204" integrity sha512-afmTuJrylUU/0OtqzaRkbyYFFNgCF73Bvel/sw90pvGrWIZ+vyoIJqA6eMSoA6+nb443kTmulmBtC9NerXboNg== -"@reduxjs/toolkit@^1.5.1": - version "1.5.1" - resolved "https://registry.yarnpkg.com/@reduxjs/toolkit/-/toolkit-1.5.1.tgz#05daa2f6eebc70dc18cd98a90421fab7fa565dc5" - integrity sha512-PngZKuwVZsd+mimnmhiOQzoD0FiMjqVks6ituO1//Ft5UEX5Ca9of13NEjo//pU22Jk7z/mdXVsmDfgsig1osA== +"@reduxjs/toolkit@^1.6.1": + version "1.6.1" + resolved "https://registry.yarnpkg.com/@reduxjs/toolkit/-/toolkit-1.6.1.tgz#7bc83b47352a663bf28db01e79d17ba54b98ade9" + integrity sha512-pa3nqclCJaZPAyBhruQtiRwtTjottRrVJqziVZcWzI73i6L3miLTtUyWfauwv08HWtiXLx1xGyGt+yLFfW/d0A== dependencies: - immer "^8.0.1" - redux "^4.0.0" + immer "^9.0.1" + redux "^4.1.0" redux-thunk "^2.3.0" reselect "^4.0.0" @@ -16858,11 +16858,16 @@ immediate@~3.0.5: resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" integrity sha1-nbHb0Pr43m++D13V5Wu2BigN5ps= -immer@8.0.1, immer@^8.0.1: +immer@8.0.1: version "8.0.1" resolved "https://registry.yarnpkg.com/immer/-/immer-8.0.1.tgz#9c73db683e2b3975c424fb0572af5889877ae656" integrity sha512-aqXhGP7//Gui2+UrEtvxZxSquQVXTpZ7KDxfCcKAF3Vysvw0CViVaW9RZ1j1xlIYqaaaipBoqdqeibkc18PNvA== +immer@^9.0.1, immer@^9.0.6: + version "9.0.6" + resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.6.tgz#7a96bf2674d06c8143e327cbf73539388ddf1a73" + integrity sha512-G95ivKpy+EvVAnAab4fVa4YGYn24J1SpEktnJX7JJ45Bd7xqME/SCplFzYFmTbrkwZbQ4xJK1xMTUYBkN6pWsQ== + import-cwd@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/import-cwd/-/import-cwd-2.1.0.tgz#aa6cf36e722761285cb371ec6519f53e2435b0a9" @@ -24905,13 +24910,12 @@ redux-thunks@^1.0.0: resolved "https://registry.yarnpkg.com/redux-thunks/-/redux-thunks-1.0.0.tgz#56e03b86d281a2664c884ab05c543d9ab1673658" integrity sha1-VuA7htKBomZMiEqwXFQ9mrFnNlg= -redux@^4.0.0, redux@^4.0.4, redux@^4.0.5: - version "4.0.5" - resolved "https://registry.yarnpkg.com/redux/-/redux-4.0.5.tgz#4db5de5816e17891de8a80c424232d06f051d93f" - integrity sha512-VSz1uMAH24DM6MF72vcojpYPtrTUu3ByVWfPL1nPfVRb5mZVTve5GnNCUV53QM/BZ66xfWrm0CTWoM+Xlz8V1w== +redux@^4.0.0, redux@^4.0.4, redux@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/redux/-/redux-4.1.1.tgz#76f1c439bb42043f985fbd9bf21990e60bd67f47" + integrity sha512-hZQZdDEM25UY2P493kPYuKqviVwZ58lEmGQNeQ+gXa+U0gYPUBf7NKYazbe3m+bs/DzM/ahN12DbF+NG8i0CWw== dependencies: - loose-envify "^1.4.0" - symbol-observable "^1.2.0" + "@babel/runtime" "^7.9.2" reflect.ownkeys@^0.2.0: version "0.2.0" @@ -26006,16 +26010,16 @@ semver@7.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== -semver@7.3.2, semver@^7.2.1, semver@^7.3.2, semver@~7.3.2: - version "7.3.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" - integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== - semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +semver@^7.2.1, semver@^7.3.2, semver@~7.3.2: + version "7.3.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" + integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== + semver@^7.3.4, semver@^7.3.5: version "7.3.5" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7"