diff --git a/.bazelrc b/.bazelrc index 5fa6ef245fcea..2505bbfdf44f0 100644 --- a/.bazelrc +++ b/.bazelrc @@ -16,3 +16,12 @@ build --workspace_status_command="node ./src/dev/bazel_workspace_status.js" # build --build_metadata=VISIBILITY=PUBLIC build --build_metadata=TEST_GROUPS=//packages +############################### +# Offline Support # +# Turn on these settings with # +# --config=offline # +############################### + +## Reset remote cache and backend support +build:offline --bes_backend="" --remote_cache="" +run:offline --bes_backend="" --remote_cache="" diff --git a/.bazelrc.common b/.bazelrc.common index 491b2eb8ef821..fb8e8e86b9ef5 100644 --- a/.bazelrc.common +++ b/.bazelrc.common @@ -7,7 +7,9 @@ # Local Cache Settings ## Avoid cache results from being corrupt when changing source during build -common --experimental_guard_against_concurrent_changes +build --experimental_guard_against_concurrent_changes +run --experimental_guard_against_concurrent_changes +test --experimental_guard_against_concurrent_changes ## Cache action outputs on disk so they persist across output_base and bazel shutdown (eg. changing branches) build --disk_cache=~/.bazel-cache/disk-cache diff --git a/.ci/Jenkinsfile_baseline_capture b/.ci/Jenkinsfile_baseline_capture index 672f5127a9796..7fefbbb26fd12 100644 --- a/.ci/Jenkinsfile_baseline_capture +++ b/.ci/Jenkinsfile_baseline_capture @@ -25,7 +25,7 @@ kibanaPipeline(timeoutMinutes: 210) { withEnv([ 'BUILD_TS_REFS_CACHE_ENABLE=true', 'BUILD_TS_REFS_CACHE_CAPTURE=true', - 'DISABLE_BOOTSTRAP_VALIDATIONS=true', + 'DISABLE_BOOTSTRAP_VALIDATION=true', ]) { kibanaPipeline.doSetup() } diff --git a/.eslintrc.js b/.eslintrc.js index 9cc7985b8bce2..f92ffbe056153 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -789,6 +789,22 @@ module.exports = { }, }, + /** + * Fleet overrides + */ + { + files: ['x-pack/plugins/fleet/**/*.{js,mjs,ts,tsx}'], + rules: { + 'import/order': [ + 'warn', + { + groups: ['builtin', 'external', 'internal', 'parent'], + 'newlines-between': 'always-and-inside-groups', + }, + ], + }, + }, + /** * Security Solution overrides */ @@ -1314,6 +1330,55 @@ module.exports = { }, }, + /** + * Platform Security Team overrides + */ + { + files: [ + 'src/plugins/security_oss/**/*.{js,mjs,ts,tsx}', + 'src/plugins/spaces_oss/**/*.{js,mjs,ts,tsx}', + 'x-pack/plugins/encrypted_saved_objects/**/*.{js,mjs,ts,tsx}', + 'x-pack/plugins/security/**/*.{js,mjs,ts,tsx}', + 'x-pack/plugins/spaces/**/*.{js,mjs,ts,tsx}', + ], + rules: { + '@typescript-eslint/consistent-type-imports': 1, + 'import/order': [ + // This rule sorts import declarations + 'error', + { + groups: [ + 'unknown', + ['builtin', 'external'], + 'internal', + ['parent', 'sibling', 'index'], + ], + pathGroups: [ + { + pattern: '{@kbn/**,src/**,kibana{,/**}}', + group: 'internal', + }, + ], + pathGroupsExcludedImportTypes: [], + alphabetize: { + order: 'asc', + caseInsensitive: true, + }, + 'newlines-between': 'always', + }, + ], + 'import/no-duplicates': ['error'], + 'sort-imports': [ + // This rule sorts imports of multiple members (destructured imports) + 'error', + { + ignoreCase: true, + ignoreDeclarationSort: true, + }, + ], + }, + }, + { files: [ // core-team owned code @@ -1348,7 +1413,7 @@ module.exports = { 'no-restricted-imports': [ 'error', { - patterns: ['lodash/*', '!lodash/fp'], + patterns: ['lodash/*', '!lodash/fp', 'rxjs/internal-compatibility'], }, ], }, diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7a21d792e7270..041ae25f1d7f4 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -57,6 +57,7 @@ /x-pack/plugins/data_enhanced/ @elastic/kibana-app-services /x-pack/plugins/embeddable_enhanced/ @elastic/kibana-app-services /x-pack/plugins/ui_actions_enhanced/ @elastic/kibana-app-services +/x-pack/plugins/runtime_fields @elastic/kibana-app-services #CC# /src/plugins/bfetch/ @elastic/kibana-app-services #CC# /src/plugins/index_pattern_management/ @elastic/kibana-app-services #CC# /src/plugins/inspector/ @elastic/kibana-app-services @@ -207,6 +208,7 @@ #CC# /src/legacy/server/http/ @elastic/kibana-core #CC# /src/legacy/ui/public/documentation_links @elastic/kibana-core #CC# /src/plugins/legacy_export/ @elastic/kibana-core +#CC# /src/plugins/xpack_legacy/ @elastic/kibana-core #CC# /src/plugins/saved_objects/ @elastic/kibana-core #CC# /src/plugins/status_page/ @elastic/kibana-core #CC# /x-pack/plugins/cloud/ @elastic/kibana-core diff --git a/.yarnrc b/.yarnrc index eceec9ca34a22..33e6f2cd548a2 100644 --- a/.yarnrc +++ b/.yarnrc @@ -3,3 +3,9 @@ yarn-offline-mirror ".yarn-local-mirror" # Always look into the cache first before fetching online --install.prefer-offline true + +# Disable interactive and progress logs as yarn install is now +# managed by Bazel and we are piping the logs from the underlying +# process running bazel into the parent one running kbn +--install.non-interactive true +--install.no-progress true diff --git a/BUILD.bazel b/BUILD.bazel index f3aae22347a19..38a478565a4af 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,3 +1,5 @@ +# Expose those targets as they are required as part of +# other packages builds and need to be included as inputs exports_files( [ "tsconfig.json", diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index 0828157524fa1..7c5b59aa15b16 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -1,3 +1,68 @@ +# Define the workspace base name and a managed directory by bazel +# that will hold the node_modules called @npm workspace( - name = "kibana", + name = "kibana", + managed_directories = {"@npm": ["node_modules"]}, +) + +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + +# Fetch Node.js rules +http_archive( + name = "build_bazel_rules_nodejs", + sha256 = "bfacf15161d96a6a39510e7b3d3b522cf61cb8b82a31e79400a84c5abcab5347", + urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.2.1/rules_nodejs-3.2.1.tar.gz"], +) + +# Now that we have the rules let's import from them to complete the work +load("@build_bazel_rules_nodejs//:index.bzl", "check_rules_nodejs_version", "node_repositories", "yarn_install") + +# Assure we have at least a given rules_nodejs version +check_rules_nodejs_version(minimum_version_string = "3.2.1") + +# Setup the Node.js toolchain for the architectures we want to support +# +# NOTE: darwin-arm64 is not being installed because bazel is not yet available on that architecture. +# The PR for it was merged and should be available in the next release of bazel and bazelisk. As soon as they have it +# we can update that rule. +node_repositories( + node_repositories = { + "14.16.0-darwin_amd64": ("node-v14.16.0-darwin-x64.tar.gz", "node-v14.16.0-darwin-x64", "14ec767e376d1e2e668f997065926c5c0086ec46516d1d45918af8ae05bd4583"), + "14.16.0-linux_arm64": ("node-v14.16.0-linux-arm64.tar.xz", "node-v14.16.0-linux-arm64", "440489a08bfd020e814c9e65017f58d692299ac3f150c8e78d01abb1104c878a"), + "14.16.0-linux_s390x": ("node-v14.16.0-linux-s390x.tar.xz", "node-v14.16.0-linux-s390x", "335348e46f45284b6356416ef58f85602d2dee99094588b65900f6c8839df77e"), + "14.16.0-linux_amd64": ("node-v14.16.0-linux-x64.tar.xz", "node-v14.16.0-linux-x64", "2e079cf638766fedd720d30ec8ffef5d6ceada4e8b441fc2a093cb9a865f4087"), + "14.16.0-windows_amd64": ("node-v14.16.0-win-x64.zip", "node-v14.16.0-win-x64", "716045c2f16ea10ca97bd04cf2e5ef865f9c4d6d677a9bc25e2ea522b594af4f"), + }, + node_version = "14.16.0", + node_urls = [ + "https://nodejs.org/dist/v{version}/{filename}", + ], + yarn_repositories = { + "1.21.1": ("yarn-v1.21.1.tar.gz", "yarn-v1.21.1", "d1d9f4a0f16f5ed484e814afeb98f39b82d4728c6c8beaafb5abc99c02db6674"), + }, + yarn_version = "1.21.1", + yarn_urls = [ + "https://github.com/yarnpkg/yarn/releases/download/v{version}/{filename}", + ], + package_json = ["//:package.json"], +) + +# Run yarn_install rule to take care of dependencies +# +# NOTE: FORCE_COLOR env var forces colors on non tty mode +yarn_install( + name = "npm", + environment = { + "FORCE_COLOR": "True", + }, + package_json = "//:package.json", + yarn_lock = "//:yarn.lock", + data = [ + "//:.yarnrc", + "//:preinstall_check.js", + "//:node_modules/.yarn-integrity", + ], + symlink_node_modules = True, + quiet = False, + frozen_lockfile = False, ) diff --git a/api_docs/actions.json b/api_docs/actions.json index 5d630dec25cbb..f4287abb1f470 100644 --- a/api_docs/actions.json +++ b/api_docs/actions.json @@ -647,7 +647,9 @@ "section": "def-server.ActionResult", "text": "ActionResult" }, - ">>; delete: ({ id }: { id: string; }) => Promise<{}>; create: ({ action: { actionTypeId, name, config, secrets }, }: CreateOptions) => Promise<", + ">>; delete: ({ id }: { id: string; }) => Promise<{}>; create: ({ action: { actionTypeId, name, config, secrets }, }: ", + "CreateOptions", + ") => Promise<", { "pluginId": "actions", "scope": "server", @@ -655,23 +657,15 @@ "section": "def-server.ActionResult", "text": "ActionResult" }, - ">>; update: ({ id, action }: UpdateOptions) => Promise<", + ">>; update: ({ id, action }: ", + "UpdateOptions", + ") => Promise<", { "pluginId": "actions", "scope": "server", "docId": "kibActionsPluginApi", "section": "def-server.ActionResult", "text": "ActionResult" - }, - ">>; execute: ({ actionId, params, source, }: Pick<", - "ExecuteOptions", - ", \"source\" | \"params\" | \"actionId\">) => Promise<", - { - "pluginId": "actions", - "scope": "common", - "docId": "kibActionsPluginApi", - "section": "def-common.ActionTypeExecutorResult", - "text": "ActionTypeExecutorResult" } ], "initialIsOpen": false @@ -1071,8 +1065,8 @@ "description": [], "source": { "path": "x-pack/plugins/actions/server/plugin.ts", - "lineNumber": 94, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L94" + "lineNumber": 86, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L86" } } ], @@ -1080,15 +1074,15 @@ "returnComment": [], "source": { "path": "x-pack/plugins/actions/server/plugin.ts", - "lineNumber": 88, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L88" + "lineNumber": 80, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L80" } } ], "source": { "path": "x-pack/plugins/actions/server/plugin.ts", - "lineNumber": 87, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L87" + "lineNumber": 79, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L79" }, "lifecycle": "setup", "initialIsOpen": true @@ -1119,8 +1113,8 @@ "description": [], "source": { "path": "x-pack/plugins/actions/server/plugin.ts", - "lineNumber": 99, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L99" + "lineNumber": 91, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L91" } }, { @@ -1138,15 +1132,15 @@ "description": [], "source": { "path": "x-pack/plugins/actions/server/plugin.ts", - "lineNumber": 99, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L99" + "lineNumber": 91, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L91" } } ], "source": { "path": "x-pack/plugins/actions/server/plugin.ts", - "lineNumber": 99, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L99" + "lineNumber": 91, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L91" } } ], @@ -1154,8 +1148,8 @@ "returnComment": [], "source": { "path": "x-pack/plugins/actions/server/plugin.ts", - "lineNumber": 99, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L99" + "lineNumber": 91, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L91" } }, { @@ -1177,8 +1171,8 @@ "description": [], "source": { "path": "x-pack/plugins/actions/server/plugin.ts", - "lineNumber": 101, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L101" + "lineNumber": 93, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L93" } }, { @@ -1191,8 +1185,8 @@ "description": [], "source": { "path": "x-pack/plugins/actions/server/plugin.ts", - "lineNumber": 102, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L102" + "lineNumber": 94, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L94" } }, { @@ -1210,15 +1204,15 @@ "description": [], "source": { "path": "x-pack/plugins/actions/server/plugin.ts", - "lineNumber": 103, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L103" + "lineNumber": 95, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L95" } } ], "source": { "path": "x-pack/plugins/actions/server/plugin.ts", - "lineNumber": 103, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L103" + "lineNumber": 95, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L95" } } ], @@ -1226,8 +1220,8 @@ "returnComment": [], "source": { "path": "x-pack/plugins/actions/server/plugin.ts", - "lineNumber": 100, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L100" + "lineNumber": 92, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L92" } }, { @@ -1272,8 +1266,8 @@ "description": [], "source": { "path": "x-pack/plugins/actions/server/plugin.ts", - "lineNumber": 105, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L105" + "lineNumber": 97, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L97" } } ], @@ -1281,8 +1275,8 @@ "returnComment": [], "source": { "path": "x-pack/plugins/actions/server/plugin.ts", - "lineNumber": 105, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L105" + "lineNumber": 97, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L97" } }, { @@ -1327,8 +1321,8 @@ "description": [], "source": { "path": "x-pack/plugins/actions/server/plugin.ts", - "lineNumber": 106, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L106" + "lineNumber": 98, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L98" } } ], @@ -1336,8 +1330,8 @@ "returnComment": [], "source": { "path": "x-pack/plugins/actions/server/plugin.ts", - "lineNumber": 106, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L106" + "lineNumber": 98, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L98" } }, { @@ -1348,8 +1342,8 @@ "description": [], "source": { "path": "x-pack/plugins/actions/server/plugin.ts", - "lineNumber": 107, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L107" + "lineNumber": 99, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L99" }, "signature": [ { @@ -1381,8 +1375,8 @@ "description": [], "source": { "path": "x-pack/plugins/actions/server/plugin.ts", - "lineNumber": 109, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L109" + "lineNumber": 101, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L101" } }, { @@ -1395,8 +1389,8 @@ "description": [], "source": { "path": "x-pack/plugins/actions/server/plugin.ts", - "lineNumber": 110, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L110" + "lineNumber": 102, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L102" } }, { @@ -1409,8 +1403,8 @@ "description": [], "source": { "path": "x-pack/plugins/actions/server/plugin.ts", - "lineNumber": 111, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L111" + "lineNumber": 103, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L103" } } ], @@ -1418,15 +1412,15 @@ "returnComment": [], "source": { "path": "x-pack/plugins/actions/server/plugin.ts", - "lineNumber": 108, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L108" + "lineNumber": 100, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L100" } } ], "source": { "path": "x-pack/plugins/actions/server/plugin.ts", - "lineNumber": 98, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L98" + "lineNumber": 90, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/actions/server/plugin.ts#L90" }, "lifecycle": "start", "initialIsOpen": true diff --git a/api_docs/core.json b/api_docs/core.json index ad83038c3fb3f..856dbb7e3737f 100644 --- a/api_docs/core.json +++ b/api_docs/core.json @@ -4345,8 +4345,8 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 208, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L208" + "lineNumber": 207, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L207" }, "signature": [ { @@ -4368,8 +4368,8 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 210, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L210" + "lineNumber": 209, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L209" }, "signature": [ { @@ -4391,8 +4391,8 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 212, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L212" + "lineNumber": 211, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L211" }, "signature": [ { @@ -4414,8 +4414,8 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 214, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L214" + "lineNumber": 213, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L213" }, "signature": [ { @@ -4437,8 +4437,8 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 216, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L216" + "lineNumber": 215, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L215" }, "signature": [ { @@ -4462,8 +4462,8 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 223, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L223" + "lineNumber": 222, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L222" }, "signature": [ "{ getInjectedVar: (name: string, defaultValue?: any) => unknown; }" @@ -4479,8 +4479,8 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 227, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L227" + "lineNumber": 226, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L226" }, "signature": [ { @@ -4496,8 +4496,8 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 206, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L206" + "lineNumber": 205, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L205" }, "initialIsOpen": false }, @@ -4524,8 +4524,8 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 253, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L253" + "lineNumber": 252, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L252" }, "signature": [ { @@ -4547,8 +4547,8 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 255, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L255" + "lineNumber": 254, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L254" }, "signature": [ { @@ -4570,8 +4570,8 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 257, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L257" + "lineNumber": 256, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L256" }, "signature": [ { @@ -4593,8 +4593,8 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 259, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L259" + "lineNumber": 258, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L258" }, "signature": [ { @@ -4616,8 +4616,8 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 261, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L261" + "lineNumber": 260, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L260" }, "signature": [ { @@ -4639,8 +4639,8 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 263, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L263" + "lineNumber": 262, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L262" }, "signature": [ { @@ -4662,8 +4662,8 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 265, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L265" + "lineNumber": 264, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L264" }, "signature": [ { @@ -4685,8 +4685,8 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 267, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L267" + "lineNumber": 266, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L266" }, "signature": [ { @@ -4708,8 +4708,8 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 269, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L269" + "lineNumber": 268, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L268" }, "signature": [ { @@ -4731,8 +4731,8 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 271, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L271" + "lineNumber": 270, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L270" }, "signature": [ { @@ -4756,8 +4756,8 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 278, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L278" + "lineNumber": 277, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L277" }, "signature": [ "{ getInjectedVar: (name: string, defaultValue?: any) => unknown; }" @@ -4766,8 +4766,8 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 251, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L251" + "lineNumber": 250, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L250" }, "initialIsOpen": false }, @@ -6287,8 +6287,8 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 237, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L237" + "lineNumber": 236, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/index.ts#L236" }, "signature": [ "() => Promise<[", @@ -6499,702 +6499,102 @@ "initialIsOpen": false }, { - "id": "def-server.LegacyClusterClient", + "id": "def-server.ElasticsearchConfig", "type": "Class", "tags": [ - "deprecated", "public" ], - "label": "LegacyClusterClient", + "label": "ElasticsearchConfig", "description": [ - "\n{@inheritDoc IClusterClient}" - ], - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.LegacyClusterClient", - "text": "LegacyClusterClient" - }, - " implements Pick<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.LegacyClusterClient", - "text": "LegacyClusterClient" - }, - ", \"callAsInternalUser\" | \"asScoped\">" + "\nWrapper of config schema." ], "children": [ { - "id": "def-server.LegacyClusterClient.Unnamed", - "type": "Function", - "label": "Constructor", - "signature": [ - "any" - ], - "description": [], - "children": [ - { - "type": "CompoundType", - "label": "config", - "isRequired": true, - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.LegacyElasticsearchClientConfig", - "text": "LegacyElasticsearchClientConfig" - } - ], - "description": [], - "source": { - "path": "src/core/server/elasticsearch/legacy/cluster_client.ts", - "lineNumber": 122, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/cluster_client.ts#L122" - } - }, - { - "type": "Object", - "label": "log", - "isRequired": true, - "signature": [ - "Logger" - ], - "description": [], - "source": { - "path": "src/core/server/elasticsearch/legacy/cluster_client.ts", - "lineNumber": 123, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/cluster_client.ts#L123" - } - }, - { - "type": "string", - "label": "type", - "isRequired": true, - "signature": [ - "string" - ], - "description": [], - "source": { - "path": "src/core/server/elasticsearch/legacy/cluster_client.ts", - "lineNumber": 124, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/cluster_client.ts#L124" - } - }, - { - "type": "Function", - "label": "getAuthHeaders", - "isRequired": true, - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.GetAuthHeaders", - "text": "GetAuthHeaders" - } - ], - "description": [], - "source": { - "path": "src/core/server/elasticsearch/legacy/cluster_client.ts", - "lineNumber": 125, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/cluster_client.ts#L125" - } - } - ], "tags": [], - "returnComment": [], - "source": { - "path": "src/core/server/elasticsearch/legacy/cluster_client.ts", - "lineNumber": 121, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/cluster_client.ts#L121" - } - }, - { - "id": "def-server.LegacyClusterClient.callAsInternalUser", - "type": "Function", - "children": [ - { - "type": "string", - "label": "endpoint", - "isRequired": true, - "signature": [ - "string" - ], - "description": [], - "source": { - "path": "src/core/server/elasticsearch/legacy/cluster_client.ts", - "lineNumber": 141, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/cluster_client.ts#L141" - } - }, - { - "type": "Object", - "label": "clientParams", - "isRequired": true, - "signature": [ - "Record" - ], - "description": [], - "source": { - "path": "src/core/server/elasticsearch/legacy/cluster_client.ts", - "lineNumber": 142, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/cluster_client.ts#L142" - } - }, - { - "type": "Object", - "label": "options", - "isRequired": false, - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.LegacyCallAPIOptions", - "text": "LegacyCallAPIOptions" - }, - " | undefined" - ], - "description": [], - "source": { - "path": "src/core/server/elasticsearch/legacy/cluster_client.ts", - "lineNumber": 143, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/cluster_client.ts#L143" - } - } - ], - "signature": [ - "(endpoint: string, clientParams?: Record, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.LegacyCallAPIOptions", - "text": "LegacyCallAPIOptions" - }, - " | undefined) => Promise" - ], + "id": "def-server.ElasticsearchConfig.healthCheckDelay", + "type": "Object", + "label": "healthCheckDelay", "description": [ - "\nCalls specified endpoint with provided clientParams on behalf of the\nKibana internal user.\nSee {@link LegacyAPICaller}." + "\nThe interval between health check requests Kibana sends to the Elasticsearch." ], - "label": "callAsInternalUser", "source": { - "path": "src/core/server/elasticsearch/legacy/cluster_client.ts", - "lineNumber": 140, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/cluster_client.ts#L140" + "path": "src/core/server/elasticsearch/elasticsearch_config.ts", + "lineNumber": 192, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/elasticsearch_config.ts#L192" }, - "tags": [ - "deprecated" - ], - "returnComment": [] + "signature": [ + "moment.Duration" + ] }, { - "id": "def-server.LegacyClusterClient.close", - "type": "Function", - "label": "close", - "signature": [ - "() => void" - ], + "tags": [], + "id": "def-server.ElasticsearchConfig.ignoreVersionMismatch", + "type": "boolean", + "label": "ignoreVersionMismatch", "description": [ - "\nCloses the cluster client. After that client cannot be used and one should\ncreate a new client instance to be able to interact with Elasticsearch API." + "\nWhether to allow kibana to connect to a non-compatible elasticsearch node." ], - "children": [], - "tags": [], - "returnComment": [], "source": { - "path": "src/core/server/elasticsearch/legacy/cluster_client.ts", - "lineNumber": 158, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/cluster_client.ts#L158" + "path": "src/core/server/elasticsearch/elasticsearch_config.ts", + "lineNumber": 197, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/elasticsearch_config.ts#L197" } }, { - "id": "def-server.LegacyClusterClient.asScoped", - "type": "Function", - "label": "asScoped", - "signature": [ - "(request?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.FakeRequest", - "text": "FakeRequest" - }, - " | ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.KibanaRequest", - "text": "KibanaRequest" - }, - " | ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.LegacyRequest", - "text": "LegacyRequest" - }, - " | undefined) => Pick<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.LegacyScopedClusterClient", - "text": "LegacyScopedClusterClient" - }, - ", \"callAsCurrentUser\" | \"callAsInternalUser\">" - ], + "tags": [], + "id": "def-server.ElasticsearchConfig.apiVersion", + "type": "string", + "label": "apiVersion", "description": [ - "\nCreates an instance of {@link ILegacyScopedClusterClient} based on the configuration the\ncurrent cluster client that exposes additional `callAsCurrentUser` method\nscoped to the provided req. Consumers shouldn't worry about closing\nscoped client instances, these will be automatically closed as soon as the\noriginal cluster client isn't needed anymore and closed.\n" - ], - "children": [ - { - "type": "CompoundType", - "label": "request", - "isRequired": false, - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.FakeRequest", - "text": "FakeRequest" - }, - " | ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.KibanaRequest", - "text": "KibanaRequest" - }, - " | ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.LegacyRequest", - "text": "LegacyRequest" - }, - " | undefined" - ], - "description": [ - "- Request the `IScopedClusterClient` instance will be scoped to.\nSupports request optionality, Legacy.Request & FakeRequest for BWC with LegacyPlatform" - ], - "source": { - "path": "src/core/server/elasticsearch/legacy/cluster_client.ts", - "lineNumber": 181, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/cluster_client.ts#L181" - } - } + "\nVersion of the Elasticsearch (6.7, 7.1 or `master`) client will be connecting to." ], - "tags": [], - "returnComment": [], "source": { - "path": "src/core/server/elasticsearch/legacy/cluster_client.ts", - "lineNumber": 181, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/cluster_client.ts#L181" + "path": "src/core/server/elasticsearch/elasticsearch_config.ts", + "lineNumber": 202, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/elasticsearch_config.ts#L202" } - } - ], - "source": { - "path": "src/core/server/elasticsearch/legacy/cluster_client.ts", - "lineNumber": 104, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/cluster_client.ts#L104" - }, - "initialIsOpen": false - }, - { - "id": "def-server.LegacyScopedClusterClient", - "type": "Class", - "tags": [ - "deprecated", - "public" - ], - "label": "LegacyScopedClusterClient", - "description": [ - "\n{@inheritDoc IScopedClusterClient}" - ], - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.LegacyScopedClusterClient", - "text": "LegacyScopedClusterClient" }, - " implements Pick<", { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.LegacyScopedClusterClient", - "text": "LegacyScopedClusterClient" + "tags": [], + "id": "def-server.ElasticsearchConfig.hosts", + "type": "Array", + "label": "hosts", + "description": [ + "\nHosts that the client will connect to. If sniffing is enabled, this list will\nbe used as seeds to discover the rest of your cluster." + ], + "source": { + "path": "src/core/server/elasticsearch/elasticsearch_config.ts", + "lineNumber": 208, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/elasticsearch_config.ts#L208" + }, + "signature": [ + "string[]" + ] }, - ", \"callAsCurrentUser\" | \"callAsInternalUser\">" - ], - "children": [ { - "id": "def-server.LegacyScopedClusterClient.Unnamed", - "type": "Function", - "label": "Constructor", - "signature": [ - "any" - ], - "description": [], - "children": [ - { - "type": "Function", - "label": "internalAPICaller", - "isRequired": true, - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.LegacyAPICaller", - "text": "LegacyAPICaller" - } - ], - "description": [], - "source": { - "path": "src/core/server/elasticsearch/legacy/scoped_cluster_client.ts", - "lineNumber": 36, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/scoped_cluster_client.ts#L36" - } - }, - { - "type": "Function", - "label": "scopedAPICaller", - "isRequired": true, - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.LegacyAPICaller", - "text": "LegacyAPICaller" - } - ], - "description": [], - "source": { - "path": "src/core/server/elasticsearch/legacy/scoped_cluster_client.ts", - "lineNumber": 37, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/scoped_cluster_client.ts#L37" - } - }, - { - "type": "CompoundType", - "label": "headers", - "isRequired": false, - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.Headers", - "text": "Headers" - }, - " | undefined" - ], - "description": [], - "source": { - "path": "src/core/server/elasticsearch/legacy/scoped_cluster_client.ts", - "lineNumber": 38, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/scoped_cluster_client.ts#L38" - } - } - ], "tags": [], - "returnComment": [], + "id": "def-server.ElasticsearchConfig.requestHeadersWhitelist", + "type": "Array", + "label": "requestHeadersWhitelist", + "description": [ + "\nList of Kibana client-side headers to send to Elasticsearch when request\nscoped cluster client is used. If this is an empty array then *no* client-side\nwill be sent." + ], "source": { - "path": "src/core/server/elasticsearch/legacy/scoped_cluster_client.ts", - "lineNumber": 35, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/scoped_cluster_client.ts#L35" - } + "path": "src/core/server/elasticsearch/elasticsearch_config.ts", + "lineNumber": 215, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/elasticsearch_config.ts#L215" + }, + "signature": [ + "string[]" + ] }, { - "id": "def-server.LegacyScopedClusterClient.callAsInternalUser", - "type": "Function", - "label": "callAsInternalUser", - "signature": [ - "(endpoint: string, clientParams?: Record, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.LegacyCallAPIOptions", - "text": "LegacyCallAPIOptions" - }, - " | undefined) => Promise" - ], + "tags": [], + "id": "def-server.ElasticsearchConfig.pingTimeout", + "type": "Object", + "label": "pingTimeout", "description": [ - "\nCalls specified `endpoint` with provided `clientParams` on behalf of the\nKibana internal user.\nSee {@link LegacyAPICaller}." - ], - "children": [ - { - "type": "string", - "label": "endpoint", - "isRequired": true, - "signature": [ - "string" - ], - "description": [ - "- String descriptor of the endpoint e.g. `cluster.getSettings` or `ping`." - ], - "source": { - "path": "src/core/server/elasticsearch/legacy/scoped_cluster_client.ts", - "lineNumber": 55, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/scoped_cluster_client.ts#L55" - } - }, - { - "type": "Object", - "label": "clientParams", - "isRequired": true, - "signature": [ - "Record" - ], - "description": [ - "- A dictionary of parameters that will be passed directly to the Elasticsearch JS client." - ], - "source": { - "path": "src/core/server/elasticsearch/legacy/scoped_cluster_client.ts", - "lineNumber": 56, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/scoped_cluster_client.ts#L56" - } - }, - { - "type": "Object", - "label": "options", - "isRequired": false, - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.LegacyCallAPIOptions", - "text": "LegacyCallAPIOptions" - }, - " | undefined" - ], - "description": [ - "- Options that affect the way we call the API and process the result." - ], - "source": { - "path": "src/core/server/elasticsearch/legacy/scoped_cluster_client.ts", - "lineNumber": 57, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/scoped_cluster_client.ts#L57" - } - } - ], - "tags": [ - "deprecated" - ], - "returnComment": [], - "source": { - "path": "src/core/server/elasticsearch/legacy/scoped_cluster_client.ts", - "lineNumber": 54, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/scoped_cluster_client.ts#L54" - } - }, - { - "id": "def-server.LegacyScopedClusterClient.callAsCurrentUser", - "type": "Function", - "label": "callAsCurrentUser", - "signature": [ - "(endpoint: string, clientParams?: Record, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.LegacyCallAPIOptions", - "text": "LegacyCallAPIOptions" - }, - " | undefined) => Promise" - ], - "description": [ - "\nCalls specified `endpoint` with provided `clientParams` on behalf of the\nuser initiated request to the Kibana server (via HTTP request headers).\nSee {@link LegacyAPICaller}." - ], - "children": [ - { - "type": "string", - "label": "endpoint", - "isRequired": true, - "signature": [ - "string" - ], - "description": [ - "- String descriptor of the endpoint e.g. `cluster.getSettings` or `ping`." - ], - "source": { - "path": "src/core/server/elasticsearch/legacy/scoped_cluster_client.ts", - "lineNumber": 73, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/scoped_cluster_client.ts#L73" - } - }, - { - "type": "Object", - "label": "clientParams", - "isRequired": true, - "signature": [ - "Record" - ], - "description": [ - "- A dictionary of parameters that will be passed directly to the Elasticsearch JS client." - ], - "source": { - "path": "src/core/server/elasticsearch/legacy/scoped_cluster_client.ts", - "lineNumber": 74, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/scoped_cluster_client.ts#L74" - } - }, - { - "type": "Object", - "label": "options", - "isRequired": false, - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.LegacyCallAPIOptions", - "text": "LegacyCallAPIOptions" - }, - " | undefined" - ], - "description": [ - "- Options that affect the way we call the API and process the result." - ], - "source": { - "path": "src/core/server/elasticsearch/legacy/scoped_cluster_client.ts", - "lineNumber": 75, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/scoped_cluster_client.ts#L75" - } - } - ], - "tags": [ - "deprecated" - ], - "returnComment": [], - "source": { - "path": "src/core/server/elasticsearch/legacy/scoped_cluster_client.ts", - "lineNumber": 72, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/scoped_cluster_client.ts#L72" - } - } - ], - "source": { - "path": "src/core/server/elasticsearch/legacy/scoped_cluster_client.ts", - "lineNumber": 34, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/scoped_cluster_client.ts#L34" - }, - "initialIsOpen": false - }, - { - "id": "def-server.ElasticsearchConfig", - "type": "Class", - "tags": [ - "public" - ], - "label": "ElasticsearchConfig", - "description": [ - "\nWrapper of config schema." - ], - "children": [ - { - "tags": [], - "id": "def-server.ElasticsearchConfig.healthCheckDelay", - "type": "Object", - "label": "healthCheckDelay", - "description": [ - "\nThe interval between health check requests Kibana sends to the Elasticsearch." - ], - "source": { - "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 192, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/elasticsearch_config.ts#L192" - }, - "signature": [ - "moment.Duration" - ] - }, - { - "tags": [], - "id": "def-server.ElasticsearchConfig.ignoreVersionMismatch", - "type": "boolean", - "label": "ignoreVersionMismatch", - "description": [ - "\nWhether to allow kibana to connect to a non-compatible elasticsearch node." - ], - "source": { - "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 197, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/elasticsearch_config.ts#L197" - } - }, - { - "tags": [], - "id": "def-server.ElasticsearchConfig.apiVersion", - "type": "string", - "label": "apiVersion", - "description": [ - "\nVersion of the Elasticsearch (6.7, 7.1 or `master`) client will be connecting to." - ], - "source": { - "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 202, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/elasticsearch_config.ts#L202" - } - }, - { - "tags": [], - "id": "def-server.ElasticsearchConfig.hosts", - "type": "Array", - "label": "hosts", - "description": [ - "\nHosts that the client will connect to. If sniffing is enabled, this list will\nbe used as seeds to discover the rest of your cluster." - ], - "source": { - "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 208, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/elasticsearch_config.ts#L208" - }, - "signature": [ - "string[]" - ] - }, - { - "tags": [], - "id": "def-server.ElasticsearchConfig.requestHeadersWhitelist", - "type": "Array", - "label": "requestHeadersWhitelist", - "description": [ - "\nList of Kibana client-side headers to send to Elasticsearch when request\nscoped cluster client is used. If this is an empty array then *no* client-side\nwill be sent." - ], - "source": { - "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 215, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/elasticsearch_config.ts#L215" - }, - "signature": [ - "string[]" - ] - }, - { - "tags": [], - "id": "def-server.ElasticsearchConfig.pingTimeout", - "type": "Object", - "label": "pingTimeout", - "description": [ - "\nTimeout after which PING HTTP request will be aborted and retried." + "\nTimeout after which PING HTTP request will be aborted and retried." ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", @@ -7393,1235 +6793,1522 @@ "initialIsOpen": false }, { - "id": "def-server.LegacyElasticsearchErrorHelpers", + "id": "def-server.LegacyClusterClient", "type": "Class", "tags": [ - "public", - "example" + "deprecated", + "public" ], - "label": "LegacyElasticsearchErrorHelpers", + "label": "LegacyClusterClient", "description": [ - "\nHelpers for working with errors returned from the Elasticsearch service.Since the internal data of\nerrors are subject to change, consumers of the Elasticsearch service should always use these helpers\nto classify errors instead of checking error internals such as `body.error.header[WWW-Authenticate]`" + "\n{@inheritDoc IClusterClient}" + ], + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.LegacyClusterClient", + "text": "LegacyClusterClient" + }, + " implements Pick<", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.LegacyClusterClient", + "text": "LegacyClusterClient" + }, + ", \"callAsInternalUser\" | \"asScoped\">" ], "children": [ { - "id": "def-server.LegacyElasticsearchErrorHelpers.isNotAuthorizedError", + "id": "def-server.LegacyClusterClient.Unnamed", "type": "Function", - "label": "isNotAuthorizedError", + "label": "Constructor", "signature": [ - "typeof ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.LegacyElasticsearchErrorHelpers", - "text": "LegacyElasticsearchErrorHelpers" - }, - ".isNotAuthorizedError" + "any" ], "description": [], "children": [ { - "type": "Any", - "label": "error", + "type": "CompoundType", + "label": "config", "isRequired": true, "signature": [ - "any" + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.LegacyElasticsearchClientConfig", + "text": "LegacyElasticsearchClientConfig" + } ], "description": [], "source": { - "path": "src/core/server/elasticsearch/legacy/errors.ts", - "lineNumber": 70, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/errors.ts#L70" + "path": "src/core/server/elasticsearch/legacy/cluster_client.ts", + "lineNumber": 122, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/cluster_client.ts#L122" + } + }, + { + "type": "Object", + "label": "log", + "isRequired": true, + "signature": [ + "Logger" + ], + "description": [], + "source": { + "path": "src/core/server/elasticsearch/legacy/cluster_client.ts", + "lineNumber": 123, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/cluster_client.ts#L123" + } + }, + { + "type": "string", + "label": "type", + "isRequired": true, + "signature": [ + "string" + ], + "description": [], + "source": { + "path": "src/core/server/elasticsearch/legacy/cluster_client.ts", + "lineNumber": 124, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/cluster_client.ts#L124" + } + }, + { + "type": "Function", + "label": "getAuthHeaders", + "isRequired": true, + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.GetAuthHeaders", + "text": "GetAuthHeaders" + } + ], + "description": [], + "source": { + "path": "src/core/server/elasticsearch/legacy/cluster_client.ts", + "lineNumber": 125, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/cluster_client.ts#L125" } } ], "tags": [], "returnComment": [], "source": { - "path": "src/core/server/elasticsearch/legacy/errors.ts", - "lineNumber": 70, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/errors.ts#L70" + "path": "src/core/server/elasticsearch/legacy/cluster_client.ts", + "lineNumber": 121, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/cluster_client.ts#L121" } }, { - "id": "def-server.LegacyElasticsearchErrorHelpers.decorateNotAuthorizedError", + "id": "def-server.LegacyClusterClient.callAsInternalUser", "type": "Function", - "label": "decorateNotAuthorizedError", - "signature": [ - "typeof ", + "children": [ { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.LegacyElasticsearchErrorHelpers", - "text": "LegacyElasticsearchErrorHelpers" + "type": "string", + "label": "endpoint", + "isRequired": true, + "signature": [ + "string" + ], + "description": [], + "source": { + "path": "src/core/server/elasticsearch/legacy/cluster_client.ts", + "lineNumber": 141, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/cluster_client.ts#L141" + } }, - ".decorateNotAuthorizedError" - ], - "description": [], - "children": [ { "type": "Object", - "label": "error", + "label": "clientParams", "isRequired": true, "signature": [ - "Error" + "Record" ], "description": [], "source": { - "path": "src/core/server/elasticsearch/legacy/errors.ts", - "lineNumber": 74, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/errors.ts#L74" + "path": "src/core/server/elasticsearch/legacy/cluster_client.ts", + "lineNumber": 142, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/cluster_client.ts#L142" } }, { - "type": "string", - "label": "reason", + "type": "Object", + "label": "options", "isRequired": false, "signature": [ - "string | undefined" + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.LegacyCallAPIOptions", + "text": "LegacyCallAPIOptions" + }, + " | undefined" ], "description": [], "source": { - "path": "src/core/server/elasticsearch/legacy/errors.ts", - "lineNumber": 74, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/errors.ts#L74" + "path": "src/core/server/elasticsearch/legacy/cluster_client.ts", + "lineNumber": 143, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/cluster_client.ts#L143" } } ], - "tags": [], - "returnComment": [], - "source": { - "path": "src/core/server/elasticsearch/legacy/errors.ts", - "lineNumber": 74, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/errors.ts#L74" - } - } - ], - "source": { - "path": "src/core/server/elasticsearch/legacy/errors.ts", - "lineNumber": 69, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/errors.ts#L69" - }, - "initialIsOpen": false - } - ], - "functions": [], - "interfaces": [ - { - "id": "def-server.Capabilities", - "type": "Interface", - "label": "Capabilities", - "description": [ - "\nThe read-only set of capabilities available for the current UI session.\nCapabilities are simple key-value pairs of (string, boolean), where the string denotes the capability ID,\nand the boolean is a flag indicating if the capability is enabled or disabled.\n" - ], - "tags": [ - "public" - ], - "children": [ - { - "tags": [], - "id": "def-server.Capabilities.navLinks", - "type": "Object", - "label": "navLinks", + "signature": [ + "(endpoint: string, clientParams?: Record, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.LegacyCallAPIOptions", + "text": "LegacyCallAPIOptions" + }, + " | undefined) => Promise" + ], "description": [ - "Navigation link capabilities." + "\nCalls specified endpoint with provided clientParams on behalf of the\nKibana internal user.\nSee {@link LegacyAPICaller}." ], + "label": "callAsInternalUser", "source": { - "path": "src/core/types/capabilities.ts", - "lineNumber": 18, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/capabilities.ts#L18" + "path": "src/core/server/elasticsearch/legacy/cluster_client.ts", + "lineNumber": 140, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/cluster_client.ts#L140" }, - "signature": [ - "Record" - ] + "tags": [ + "deprecated" + ], + "returnComment": [] }, { - "tags": [], - "id": "def-server.Capabilities.management", - "type": "Object", - "label": "management", + "id": "def-server.LegacyClusterClient.close", + "type": "Function", + "label": "close", + "signature": [ + "() => void" + ], "description": [ - "Management section capabilities." + "\nCloses the cluster client. After that client cannot be used and one should\ncreate a new client instance to be able to interact with Elasticsearch API." ], + "children": [], + "tags": [], + "returnComment": [], "source": { - "path": "src/core/types/capabilities.ts", - "lineNumber": 21, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/capabilities.ts#L21" - }, - "signature": [ - "{ [sectionId: string]: Record; }" - ] + "path": "src/core/server/elasticsearch/legacy/cluster_client.ts", + "lineNumber": 158, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/cluster_client.ts#L158" + } }, { - "tags": [], - "id": "def-server.Capabilities.catalogue", - "type": "Object", - "label": "catalogue", - "description": [ - "Catalogue capabilities. Catalogue entries drive the visibility of the Kibana homepage options." - ], - "source": { - "path": "src/core/types/capabilities.ts", - "lineNumber": 26, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/capabilities.ts#L26" - }, + "id": "def-server.LegacyClusterClient.asScoped", + "type": "Function", + "label": "asScoped", "signature": [ - "Record" - ] - }, - { - "id": "def-server.Capabilities.Unnamed", - "type": "Any", - "label": "Unnamed", - "tags": [], - "description": [ - "Custom capabilities, registered by plugins." + "(request?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.FakeRequest", + "text": "FakeRequest" + }, + " | ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.KibanaRequest", + "text": "KibanaRequest" + }, + " | ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.LegacyRequest", + "text": "LegacyRequest" + }, + " | undefined) => Pick<", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.LegacyScopedClusterClient", + "text": "LegacyScopedClusterClient" + }, + ", \"callAsCurrentUser\" | \"callAsInternalUser\">" ], - "source": { - "path": "src/core/types/capabilities.ts", - "lineNumber": 29, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/capabilities.ts#L29" - }, - "signature": [ - "any" - ] - } - ], - "source": { - "path": "src/core/types/capabilities.ts", - "lineNumber": 16, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/capabilities.ts#L16" - }, - "initialIsOpen": false - }, - { - "id": "def-server.ResolveCapabilitiesOptions", - "type": "Interface", - "label": "ResolveCapabilitiesOptions", - "description": [ - "\nDefines a set of additional options for the `resolveCapabilities` method of {@link CapabilitiesStart}.\n" - ], - "tags": [ - "public" - ], - "children": [ - { - "tags": [], - "id": "def-server.ResolveCapabilitiesOptions.useDefaultCapabilities", - "type": "boolean", - "label": "useDefaultCapabilities", "description": [ - "\nIndicates if capability switchers are supposed to return a default set of capabilities." + "\nCreates an instance of {@link ILegacyScopedClusterClient} based on the configuration the\ncurrent cluster client that exposes additional `callAsCurrentUser` method\nscoped to the provided req. Consumers shouldn't worry about closing\nscoped client instances, these will be automatically closed as soon as the\noriginal cluster client isn't needed anymore and closed.\n" + ], + "children": [ + { + "type": "CompoundType", + "label": "request", + "isRequired": false, + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.FakeRequest", + "text": "FakeRequest" + }, + " | ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.KibanaRequest", + "text": "KibanaRequest" + }, + " | ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.LegacyRequest", + "text": "LegacyRequest" + }, + " | undefined" + ], + "description": [ + "- Request the `IScopedClusterClient` instance will be scoped to.\nSupports request optionality, Legacy.Request & FakeRequest for BWC with LegacyPlatform" + ], + "source": { + "path": "src/core/server/elasticsearch/legacy/cluster_client.ts", + "lineNumber": 181, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/cluster_client.ts#L181" + } + } ], + "tags": [], + "returnComment": [], "source": { - "path": "src/core/server/capabilities/capabilities_service.ts", - "lineNumber": 105, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/capabilities/capabilities_service.ts#L105" + "path": "src/core/server/elasticsearch/legacy/cluster_client.ts", + "lineNumber": 181, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/cluster_client.ts#L181" } } ], "source": { - "path": "src/core/server/capabilities/capabilities_service.ts", - "lineNumber": 101, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/capabilities/capabilities_service.ts#L101" + "path": "src/core/server/elasticsearch/legacy/cluster_client.ts", + "lineNumber": 104, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/cluster_client.ts#L104" }, "initialIsOpen": false }, { - "id": "def-server.ConfigDeprecationFactory", - "type": "Interface", - "label": "ConfigDeprecationFactory", - "signature": [ - "ConfigDeprecationFactory" + "id": "def-server.LegacyScopedClusterClient", + "type": "Class", + "tags": [ + "deprecated", + "public" ], + "label": "LegacyScopedClusterClient", "description": [ - "\nProvides helpers to generates the most commonly used {@link ConfigDeprecation}\nwhen invoking a {@link ConfigDeprecationProvider}.\n\nSee methods documentation for more detailed examples.\n" + "\n{@inheritDoc IScopedClusterClient}" ], - "tags": [ - "example", - "public" + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.LegacyScopedClusterClient", + "text": "LegacyScopedClusterClient" + }, + " implements Pick<", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.LegacyScopedClusterClient", + "text": "LegacyScopedClusterClient" + }, + ", \"callAsCurrentUser\" | \"callAsInternalUser\">" ], "children": [ { - "id": "def-server.ConfigDeprecationFactory.rename", + "id": "def-server.LegacyScopedClusterClient.Unnamed", "type": "Function", - "label": "rename", + "label": "Constructor", "signature": [ - "(oldKey: string, newKey: string) => ", - "ConfigDeprecation" - ], - "description": [ - "\nRename a configuration property from inside a plugin's configuration path.\nWill log a deprecation warning if the oldKey was found and deprecation applied.\n" + "any" ], + "description": [], "children": [ { - "type": "string", - "label": "oldKey", + "type": "Function", + "label": "internalAPICaller", "isRequired": true, "signature": [ - "string" + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.LegacyAPICaller", + "text": "LegacyAPICaller" + } ], "description": [], "source": { - "path": "node_modules/@kbn/config/target/deprecation/types.d.ts", - "lineNumber": 63, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/deprecation/types.d.ts#L63" + "path": "src/core/server/elasticsearch/legacy/scoped_cluster_client.ts", + "lineNumber": 36, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/scoped_cluster_client.ts#L36" } }, { - "type": "string", - "label": "newKey", + "type": "Function", + "label": "scopedAPICaller", "isRequired": true, "signature": [ - "string" + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.LegacyAPICaller", + "text": "LegacyAPICaller" + } ], "description": [], "source": { - "path": "node_modules/@kbn/config/target/deprecation/types.d.ts", - "lineNumber": 63, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/deprecation/types.d.ts#L63" + "path": "src/core/server/elasticsearch/legacy/scoped_cluster_client.ts", + "lineNumber": 37, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/scoped_cluster_client.ts#L37" + } + }, + { + "type": "CompoundType", + "label": "headers", + "isRequired": false, + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.Headers", + "text": "Headers" + }, + " | undefined" + ], + "description": [], + "source": { + "path": "src/core/server/elasticsearch/legacy/scoped_cluster_client.ts", + "lineNumber": 38, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/scoped_cluster_client.ts#L38" } } ], - "tags": [ - "example" - ], + "tags": [], "returnComment": [], "source": { - "path": "node_modules/@kbn/config/target/deprecation/types.d.ts", - "lineNumber": 63, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/deprecation/types.d.ts#L63" + "path": "src/core/server/elasticsearch/legacy/scoped_cluster_client.ts", + "lineNumber": 35, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/scoped_cluster_client.ts#L35" } }, { - "id": "def-server.ConfigDeprecationFactory.renameFromRoot", + "id": "def-server.LegacyScopedClusterClient.callAsInternalUser", "type": "Function", - "label": "renameFromRoot", + "label": "callAsInternalUser", "signature": [ - "(oldKey: string, newKey: string, silent?: boolean | undefined) => ", - "ConfigDeprecation" + "(endpoint: string, clientParams?: Record, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.LegacyCallAPIOptions", + "text": "LegacyCallAPIOptions" + }, + " | undefined) => Promise" ], "description": [ - "\nRename a configuration property from the root configuration.\nWill log a deprecation warning if the oldKey was found and deprecation applied.\n\nThis should be only used when renaming properties from different configuration's path.\nTo rename properties from inside a plugin's configuration, use 'rename' instead.\n" + "\nCalls specified `endpoint` with provided `clientParams` on behalf of the\nKibana internal user.\nSee {@link LegacyAPICaller}." ], "children": [ { "type": "string", - "label": "oldKey", + "label": "endpoint", "isRequired": true, "signature": [ "string" ], - "description": [], + "description": [ + "- String descriptor of the endpoint e.g. `cluster.getSettings` or `ping`." + ], "source": { - "path": "node_modules/@kbn/config/target/deprecation/types.d.ts", - "lineNumber": 79, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/deprecation/types.d.ts#L79" + "path": "src/core/server/elasticsearch/legacy/scoped_cluster_client.ts", + "lineNumber": 55, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/scoped_cluster_client.ts#L55" } }, { - "type": "string", - "label": "newKey", + "type": "Object", + "label": "clientParams", "isRequired": true, "signature": [ - "string" + "Record" + ], + "description": [ + "- A dictionary of parameters that will be passed directly to the Elasticsearch JS client." ], - "description": [], "source": { - "path": "node_modules/@kbn/config/target/deprecation/types.d.ts", - "lineNumber": 79, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/deprecation/types.d.ts#L79" + "path": "src/core/server/elasticsearch/legacy/scoped_cluster_client.ts", + "lineNumber": 56, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/scoped_cluster_client.ts#L56" } }, { - "type": "CompoundType", - "label": "silent", + "type": "Object", + "label": "options", "isRequired": false, "signature": [ - "boolean | undefined" + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.LegacyCallAPIOptions", + "text": "LegacyCallAPIOptions" + }, + " | undefined" + ], + "description": [ + "- Options that affect the way we call the API and process the result." ], - "description": [], "source": { - "path": "node_modules/@kbn/config/target/deprecation/types.d.ts", - "lineNumber": 79, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/deprecation/types.d.ts#L79" + "path": "src/core/server/elasticsearch/legacy/scoped_cluster_client.ts", + "lineNumber": 57, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/scoped_cluster_client.ts#L57" } } ], "tags": [ - "example" + "deprecated" ], "returnComment": [], "source": { - "path": "node_modules/@kbn/config/target/deprecation/types.d.ts", - "lineNumber": 79, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/deprecation/types.d.ts#L79" + "path": "src/core/server/elasticsearch/legacy/scoped_cluster_client.ts", + "lineNumber": 54, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/scoped_cluster_client.ts#L54" } }, { - "id": "def-server.ConfigDeprecationFactory.unused", + "id": "def-server.LegacyScopedClusterClient.callAsCurrentUser", "type": "Function", - "label": "unused", + "label": "callAsCurrentUser", "signature": [ - "(unusedKey: string) => ", - "ConfigDeprecation" + "(endpoint: string, clientParams?: Record, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.LegacyCallAPIOptions", + "text": "LegacyCallAPIOptions" + }, + " | undefined) => Promise" ], "description": [ - "\nRemove a configuration property from inside a plugin's configuration path.\nWill log a deprecation warning if the unused key was found and deprecation applied.\n" + "\nCalls specified `endpoint` with provided `clientParams` on behalf of the\nuser initiated request to the Kibana server (via HTTP request headers).\nSee {@link LegacyAPICaller}." ], "children": [ { "type": "string", - "label": "unusedKey", + "label": "endpoint", "isRequired": true, "signature": [ "string" ], - "description": [], + "description": [ + "- String descriptor of the endpoint e.g. `cluster.getSettings` or `ping`." + ], "source": { - "path": "node_modules/@kbn/config/target/deprecation/types.d.ts", - "lineNumber": 92, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/deprecation/types.d.ts#L92" + "path": "src/core/server/elasticsearch/legacy/scoped_cluster_client.ts", + "lineNumber": 73, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/scoped_cluster_client.ts#L73" } - } - ], - "tags": [ - "example" - ], - "returnComment": [], - "source": { - "path": "node_modules/@kbn/config/target/deprecation/types.d.ts", - "lineNumber": 92, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/deprecation/types.d.ts#L92" - } - }, - { - "id": "def-server.ConfigDeprecationFactory.unusedFromRoot", - "type": "Function", - "label": "unusedFromRoot", - "signature": [ - "(unusedKey: string) => ", - "ConfigDeprecation" - ], - "description": [ - "\nRemove a configuration property from the root configuration.\nWill log a deprecation warning if the unused key was found and deprecation applied.\n\nThis should be only used when removing properties from outside of a plugin's configuration.\nTo remove properties from inside a plugin's configuration, use 'unused' instead.\n" - ], - "children": [ + }, { - "type": "string", - "label": "unusedKey", + "type": "Object", + "label": "clientParams", "isRequired": true, "signature": [ - "string" + "Record" + ], + "description": [ + "- A dictionary of parameters that will be passed directly to the Elasticsearch JS client." ], - "description": [], "source": { - "path": "node_modules/@kbn/config/target/deprecation/types.d.ts", - "lineNumber": 108, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/deprecation/types.d.ts#L108" + "path": "src/core/server/elasticsearch/legacy/scoped_cluster_client.ts", + "lineNumber": 74, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/scoped_cluster_client.ts#L74" + } + }, + { + "type": "Object", + "label": "options", + "isRequired": false, + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.LegacyCallAPIOptions", + "text": "LegacyCallAPIOptions" + }, + " | undefined" + ], + "description": [ + "- Options that affect the way we call the API and process the result." + ], + "source": { + "path": "src/core/server/elasticsearch/legacy/scoped_cluster_client.ts", + "lineNumber": 75, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/scoped_cluster_client.ts#L75" } } ], "tags": [ - "example" + "deprecated" ], "returnComment": [], "source": { - "path": "node_modules/@kbn/config/target/deprecation/types.d.ts", - "lineNumber": 108, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/deprecation/types.d.ts#L108" + "path": "src/core/server/elasticsearch/legacy/scoped_cluster_client.ts", + "lineNumber": 72, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/scoped_cluster_client.ts#L72" } } ], "source": { - "path": "node_modules/@kbn/config/target/deprecation/types.d.ts", - "lineNumber": 50, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/deprecation/types.d.ts#L50" + "path": "src/core/server/elasticsearch/legacy/scoped_cluster_client.ts", + "lineNumber": 34, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/scoped_cluster_client.ts#L34" }, "initialIsOpen": false }, { - "id": "def-server.EnvironmentMode", - "type": "Interface", - "label": "EnvironmentMode", - "signature": [ - "EnvironmentMode" - ], - "description": [], + "id": "def-server.LegacyElasticsearchErrorHelpers", + "type": "Class", "tags": [ - "public" + "public", + "example" + ], + "label": "LegacyElasticsearchErrorHelpers", + "description": [ + "\nHelpers for working with errors returned from the Elasticsearch service.Since the internal data of\nerrors are subject to change, consumers of the Elasticsearch service should always use these helpers\nto classify errors instead of checking error internals such as `body.error.header[WWW-Authenticate]`" ], "children": [ { - "tags": [], - "id": "def-server.EnvironmentMode.name", - "type": "CompoundType", - "label": "name", - "description": [], - "source": { - "path": "node_modules/@kbn/config/target/types.d.ts", - "lineNumber": 15, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/types.d.ts#L15" - }, + "id": "def-server.LegacyElasticsearchErrorHelpers.isNotAuthorizedError", + "type": "Function", + "label": "isNotAuthorizedError", "signature": [ - "\"production\" | \"development\"" - ] - }, - { - "tags": [], - "id": "def-server.EnvironmentMode.dev", - "type": "boolean", - "label": "dev", + "typeof ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.LegacyElasticsearchErrorHelpers", + "text": "LegacyElasticsearchErrorHelpers" + }, + ".isNotAuthorizedError" + ], "description": [], + "children": [ + { + "type": "Any", + "label": "error", + "isRequired": true, + "signature": [ + "any" + ], + "description": [], + "source": { + "path": "src/core/server/elasticsearch/legacy/errors.ts", + "lineNumber": 70, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/errors.ts#L70" + } + } + ], + "tags": [], + "returnComment": [], "source": { - "path": "node_modules/@kbn/config/target/types.d.ts", - "lineNumber": 16, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/types.d.ts#L16" + "path": "src/core/server/elasticsearch/legacy/errors.ts", + "lineNumber": 70, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/errors.ts#L70" } }, { - "tags": [], - "id": "def-server.EnvironmentMode.prod", - "type": "boolean", - "label": "prod", - "description": [], - "source": { - "path": "node_modules/@kbn/config/target/types.d.ts", - "lineNumber": 17, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/types.d.ts#L17" + "id": "def-server.LegacyElasticsearchErrorHelpers.decorateNotAuthorizedError", + "type": "Function", + "label": "decorateNotAuthorizedError", + "signature": [ + "typeof ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.LegacyElasticsearchErrorHelpers", + "text": "LegacyElasticsearchErrorHelpers" + }, + ".decorateNotAuthorizedError" + ], + "description": [], + "children": [ + { + "type": "Object", + "label": "error", + "isRequired": true, + "signature": [ + "Error" + ], + "description": [], + "source": { + "path": "src/core/server/elasticsearch/legacy/errors.ts", + "lineNumber": 74, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/errors.ts#L74" + } + }, + { + "type": "string", + "label": "reason", + "isRequired": false, + "signature": [ + "string | undefined" + ], + "description": [], + "source": { + "path": "src/core/server/elasticsearch/legacy/errors.ts", + "lineNumber": 74, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/errors.ts#L74" + } + } + ], + "tags": [], + "returnComment": [], + "source": { + "path": "src/core/server/elasticsearch/legacy/errors.ts", + "lineNumber": 74, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/errors.ts#L74" } } ], "source": { - "path": "node_modules/@kbn/config/target/types.d.ts", - "lineNumber": 14, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/types.d.ts#L14" + "path": "src/core/server/elasticsearch/legacy/errors.ts", + "lineNumber": 69, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/errors.ts#L69" }, "initialIsOpen": false - }, + } + ], + "functions": [], + "interfaces": [ { - "id": "def-server.PackageInfo", + "id": "def-server.Capabilities", "type": "Interface", - "label": "PackageInfo", - "signature": [ - "PackageInfo" + "label": "Capabilities", + "description": [ + "\nThe read-only set of capabilities available for the current UI session.\nCapabilities are simple key-value pairs of (string, boolean), where the string denotes the capability ID,\nand the boolean is a flag indicating if the capability is enabled or disabled.\n" ], - "description": [], "tags": [ "public" ], "children": [ { "tags": [], - "id": "def-server.PackageInfo.version", - "type": "string", - "label": "version", - "description": [], + "id": "def-server.Capabilities.navLinks", + "type": "Object", + "label": "navLinks", + "description": [ + "Navigation link capabilities." + ], "source": { - "path": "node_modules/@kbn/config/target/types.d.ts", - "lineNumber": 5, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/types.d.ts#L5" - } + "path": "src/core/types/capabilities.ts", + "lineNumber": 18, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/capabilities.ts#L18" + }, + "signature": [ + "Record" + ] }, { "tags": [], - "id": "def-server.PackageInfo.branch", - "type": "string", - "label": "branch", - "description": [], + "id": "def-server.Capabilities.management", + "type": "Object", + "label": "management", + "description": [ + "Management section capabilities." + ], "source": { - "path": "node_modules/@kbn/config/target/types.d.ts", - "lineNumber": 6, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/types.d.ts#L6" - } + "path": "src/core/types/capabilities.ts", + "lineNumber": 21, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/capabilities.ts#L21" + }, + "signature": [ + "{ [sectionId: string]: Record; }" + ] }, { "tags": [], - "id": "def-server.PackageInfo.buildNum", - "type": "number", - "label": "buildNum", - "description": [], + "id": "def-server.Capabilities.catalogue", + "type": "Object", + "label": "catalogue", + "description": [ + "Catalogue capabilities. Catalogue entries drive the visibility of the Kibana homepage options." + ], "source": { - "path": "node_modules/@kbn/config/target/types.d.ts", - "lineNumber": 7, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/types.d.ts#L7" - } + "path": "src/core/types/capabilities.ts", + "lineNumber": 26, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/capabilities.ts#L26" + }, + "signature": [ + "Record" + ] }, { + "id": "def-server.Capabilities.Unnamed", + "type": "Any", + "label": "Unnamed", "tags": [], - "id": "def-server.PackageInfo.buildSha", - "type": "string", - "label": "buildSha", - "description": [], + "description": [ + "Custom capabilities, registered by plugins." + ], "source": { - "path": "node_modules/@kbn/config/target/types.d.ts", - "lineNumber": 8, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/types.d.ts#L8" - } - }, + "path": "src/core/types/capabilities.ts", + "lineNumber": 29, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/capabilities.ts#L29" + }, + "signature": [ + "any" + ] + } + ], + "source": { + "path": "src/core/types/capabilities.ts", + "lineNumber": 16, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/capabilities.ts#L16" + }, + "initialIsOpen": false + }, + { + "id": "def-server.ResolveCapabilitiesOptions", + "type": "Interface", + "label": "ResolveCapabilitiesOptions", + "description": [ + "\nDefines a set of additional options for the `resolveCapabilities` method of {@link CapabilitiesStart}.\n" + ], + "tags": [ + "public" + ], + "children": [ { "tags": [], - "id": "def-server.PackageInfo.dist", + "id": "def-server.ResolveCapabilitiesOptions.useDefaultCapabilities", "type": "boolean", - "label": "dist", - "description": [], + "label": "useDefaultCapabilities", + "description": [ + "\nIndicates if capability switchers are supposed to return a default set of capabilities." + ], "source": { - "path": "node_modules/@kbn/config/target/types.d.ts", - "lineNumber": 9, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/types.d.ts#L9" + "path": "src/core/server/capabilities/capabilities_service.ts", + "lineNumber": 105, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/capabilities/capabilities_service.ts#L105" } } ], "source": { - "path": "node_modules/@kbn/config/target/types.d.ts", - "lineNumber": 4, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/types.d.ts#L4" + "path": "src/core/server/capabilities/capabilities_service.ts", + "lineNumber": 101, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/capabilities/capabilities_service.ts#L101" }, "initialIsOpen": false }, { - "id": "def-server.IContextContainer", + "id": "def-server.ConfigDeprecationFactory", "type": "Interface", - "label": "IContextContainer", + "label": "ConfigDeprecationFactory", "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.IContextContainer", - "text": "IContextContainer" - }, - "" + "ConfigDeprecationFactory" ], "description": [ - "\nAn object that handles registration of context providers and configuring handlers with context.\n" + "\nProvides helpers to generates the most commonly used {@link ConfigDeprecation}\nwhen invoking a {@link ConfigDeprecationProvider}.\n\nSee methods documentation for more detailed examples.\n" ], "tags": [ - "remarks", - "typeParam", + "example", "public" ], "children": [ { - "id": "def-server.IContextContainer.registerContext", + "id": "def-server.ConfigDeprecationFactory.rename", "type": "Function", - "label": "registerContext", + "label": "rename", "signature": [ - "(pluginOpaqueId: symbol, contextName: ContextName, provider: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.IContextProvider", - "text": "IContextProvider" - }, - ") => this" + "(oldKey: string, newKey: string) => ", + "ConfigDeprecation" ], "description": [ - "\nRegister a new context provider.\n" + "\nRename a configuration property from inside a plugin's configuration path.\nWill log a deprecation warning if the oldKey was found and deprecation applied.\n" ], "children": [ { - "type": "Uncategorized", - "label": "pluginOpaqueId", + "type": "string", + "label": "oldKey", "isRequired": true, "signature": [ - "symbol" - ], - "description": [ - "- The plugin opaque ID for the plugin that registers this context." + "string" ], + "description": [], "source": { - "path": "src/core/server/context/container/context.ts", - "lineNumber": 154, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/context/container/context.ts#L154" + "path": "node_modules/@kbn/config/target/deprecation/types.d.ts", + "lineNumber": 63, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/deprecation/types.d.ts#L63" } }, { - "type": "Uncategorized", - "label": "contextName", - "isRequired": true, + "type": "string", + "label": "newKey", + "isRequired": true, "signature": [ - "ContextName" + "string" ], - "description": [ - "- The key of the `TContext` object this provider supplies the value for." + "description": [], + "source": { + "path": "node_modules/@kbn/config/target/deprecation/types.d.ts", + "lineNumber": 63, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/deprecation/types.d.ts#L63" + } + } + ], + "tags": [ + "example" + ], + "returnComment": [], + "source": { + "path": "node_modules/@kbn/config/target/deprecation/types.d.ts", + "lineNumber": 63, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/deprecation/types.d.ts#L63" + } + }, + { + "id": "def-server.ConfigDeprecationFactory.renameFromRoot", + "type": "Function", + "label": "renameFromRoot", + "signature": [ + "(oldKey: string, newKey: string, silent?: boolean | undefined) => ", + "ConfigDeprecation" + ], + "description": [ + "\nRename a configuration property from the root configuration.\nWill log a deprecation warning if the oldKey was found and deprecation applied.\n\nThis should be only used when renaming properties from different configuration's path.\nTo rename properties from inside a plugin's configuration, use 'rename' instead.\n" + ], + "children": [ + { + "type": "string", + "label": "oldKey", + "isRequired": true, + "signature": [ + "string" ], + "description": [], "source": { - "path": "src/core/server/context/container/context.ts", - "lineNumber": 155, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/context/container/context.ts#L155" + "path": "node_modules/@kbn/config/target/deprecation/types.d.ts", + "lineNumber": 79, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/deprecation/types.d.ts#L79" } }, { - "type": "Function", - "label": "provider", + "type": "string", + "label": "newKey", "isRequired": true, "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.IContextProvider", - "text": "IContextProvider" - }, - "" + "string" ], - "description": [ - "- A {@link IContextProvider} to be called each time a new context is created." + "description": [], + "source": { + "path": "node_modules/@kbn/config/target/deprecation/types.d.ts", + "lineNumber": 79, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/deprecation/types.d.ts#L79" + } + }, + { + "type": "CompoundType", + "label": "silent", + "isRequired": false, + "signature": [ + "boolean | undefined" ], + "description": [], "source": { - "path": "src/core/server/context/container/context.ts", - "lineNumber": 156, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/context/container/context.ts#L156" + "path": "node_modules/@kbn/config/target/deprecation/types.d.ts", + "lineNumber": 79, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/deprecation/types.d.ts#L79" } } ], "tags": [ - "remarks" - ], - "returnComment": [ - "The {@link IContextContainer} for method chaining." + "example" ], + "returnComment": [], "source": { - "path": "src/core/server/context/container/context.ts", - "lineNumber": 153, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/context/container/context.ts#L153" + "path": "node_modules/@kbn/config/target/deprecation/types.d.ts", + "lineNumber": 79, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/deprecation/types.d.ts#L79" } }, { - "id": "def-server.IContextContainer.createHandler", + "id": "def-server.ConfigDeprecationFactory.unused", "type": "Function", - "label": "createHandler", + "label": "unused", "signature": [ - "(pluginOpaqueId: symbol, handler: THandler) => (...rest: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.HandlerParameters", - "text": "HandlerParameters" - }, - ") => ", - "ShallowPromise", - ">" + "(unusedKey: string) => ", + "ConfigDeprecation" ], "description": [ - "\nCreate a new handler function pre-wired to context for the plugin.\n" + "\nRemove a configuration property from inside a plugin's configuration path.\nWill log a deprecation warning if the unused key was found and deprecation applied.\n" ], "children": [ { - "type": "Uncategorized", - "label": "pluginOpaqueId", + "type": "string", + "label": "unusedKey", "isRequired": true, "signature": [ - "symbol" - ], - "description": [ - "- The plugin opaque ID for the plugin that registers this handler." + "string" ], + "description": [], "source": { - "path": "src/core/server/context/container/context.ts", - "lineNumber": 168, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/context/container/context.ts#L168" + "path": "node_modules/@kbn/config/target/deprecation/types.d.ts", + "lineNumber": 92, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/deprecation/types.d.ts#L92" } - }, + } + ], + "tags": [ + "example" + ], + "returnComment": [], + "source": { + "path": "node_modules/@kbn/config/target/deprecation/types.d.ts", + "lineNumber": 92, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/deprecation/types.d.ts#L92" + } + }, + { + "id": "def-server.ConfigDeprecationFactory.unusedFromRoot", + "type": "Function", + "label": "unusedFromRoot", + "signature": [ + "(unusedKey: string) => ", + "ConfigDeprecation" + ], + "description": [ + "\nRemove a configuration property from the root configuration.\nWill log a deprecation warning if the unused key was found and deprecation applied.\n\nThis should be only used when removing properties from outside of a plugin's configuration.\nTo remove properties from inside a plugin's configuration, use 'unused' instead.\n" + ], + "children": [ { - "type": "Function", - "label": "handler", + "type": "string", + "label": "unusedKey", "isRequired": true, "signature": [ - "THandler" - ], - "description": [ - "- Handler function to pass context object to." + "string" ], + "description": [], "source": { - "path": "src/core/server/context/container/context.ts", - "lineNumber": 169, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/context/container/context.ts#L169" + "path": "node_modules/@kbn/config/target/deprecation/types.d.ts", + "lineNumber": 108, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/deprecation/types.d.ts#L108" } } ], - "tags": [], - "returnComment": [ - "A function that takes `THandlerParameters`, calls `handler` with a new context, and returns a Promise of\nthe `handler` return value." + "tags": [ + "example" ], + "returnComment": [], "source": { - "path": "src/core/server/context/container/context.ts", - "lineNumber": 167, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/context/container/context.ts#L167" + "path": "node_modules/@kbn/config/target/deprecation/types.d.ts", + "lineNumber": 108, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/deprecation/types.d.ts#L108" } } ], "source": { - "path": "src/core/server/context/container/context.ts", - "lineNumber": 138, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/context/container/context.ts#L138" + "path": "node_modules/@kbn/config/target/deprecation/types.d.ts", + "lineNumber": 50, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/deprecation/types.d.ts#L50" }, "initialIsOpen": false }, { - "id": "def-server.ICspConfig", + "id": "def-server.EnvironmentMode", "type": "Interface", - "label": "ICspConfig", - "description": [ - "\nCSP configuration for use in Kibana." + "label": "EnvironmentMode", + "signature": [ + "EnvironmentMode" ], + "description": [], "tags": [ "public" ], "children": [ { "tags": [], - "id": "def-server.ICspConfig.rules", - "type": "Array", - "label": "rules", - "description": [ - "\nThe CSP rules used for Kibana." - ], + "id": "def-server.EnvironmentMode.name", + "type": "CompoundType", + "label": "name", + "description": [], "source": { - "path": "src/core/server/csp/csp_config.ts", - "lineNumber": 21, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/csp/csp_config.ts#L21" + "path": "node_modules/@kbn/config/target/types.d.ts", + "lineNumber": 15, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/types.d.ts#L15" }, "signature": [ - "string[]" + "\"production\" | \"development\"" ] }, { "tags": [], - "id": "def-server.ICspConfig.strict", + "id": "def-server.EnvironmentMode.dev", "type": "boolean", - "label": "strict", - "description": [ - "\nSpecify whether browsers that do not support CSP should be\nable to use Kibana. Use `true` to block and `false` to allow." - ], + "label": "dev", + "description": [], "source": { - "path": "src/core/server/csp/csp_config.ts", - "lineNumber": 27, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/csp/csp_config.ts#L27" + "path": "node_modules/@kbn/config/target/types.d.ts", + "lineNumber": 16, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/types.d.ts#L16" } }, { "tags": [], - "id": "def-server.ICspConfig.warnLegacyBrowsers", + "id": "def-server.EnvironmentMode.prod", "type": "boolean", - "label": "warnLegacyBrowsers", - "description": [ - "\nSpecify whether users with legacy browsers should be warned\nabout their lack of Kibana security compliance." - ], - "source": { - "path": "src/core/server/csp/csp_config.ts", - "lineNumber": 33, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/csp/csp_config.ts#L33" - } - }, - { - "tags": [], - "id": "def-server.ICspConfig.header", - "type": "string", - "label": "header", - "description": [ - "\nThe CSP rules in a formatted directives string for use\nin a `Content-Security-Policy` header." - ], + "label": "prod", + "description": [], "source": { - "path": "src/core/server/csp/csp_config.ts", - "lineNumber": 39, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/csp/csp_config.ts#L39" + "path": "node_modules/@kbn/config/target/types.d.ts", + "lineNumber": 17, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/types.d.ts#L17" } } ], "source": { - "path": "src/core/server/csp/csp_config.ts", - "lineNumber": 17, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/csp/csp_config.ts#L17" + "path": "node_modules/@kbn/config/target/types.d.ts", + "lineNumber": 14, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/types.d.ts#L14" }, "initialIsOpen": false }, { - "id": "def-server.LegacyElasticsearchError", + "id": "def-server.PackageInfo", "type": "Interface", - "label": "LegacyElasticsearchError", + "label": "PackageInfo", "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.LegacyElasticsearchError", - "text": "LegacyElasticsearchError" - }, - " extends ", - "Boom", - "" + "PackageInfo" ], "description": [], "tags": [ - "deprecated", "public" ], "children": [ { "tags": [], - "id": "def-server.LegacyElasticsearchError.[code]", + "id": "def-server.PackageInfo.version", "type": "string", - "label": "[code]", + "label": "version", "description": [], "source": { - "path": "src/core/server/elasticsearch/legacy/errors.ts", - "lineNumber": 23, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/errors.ts#L23" - }, - "signature": [ - "string | undefined" - ] + "path": "node_modules/@kbn/config/target/types.d.ts", + "lineNumber": 5, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/types.d.ts#L5" + } + }, + { + "tags": [], + "id": "def-server.PackageInfo.branch", + "type": "string", + "label": "branch", + "description": [], + "source": { + "path": "node_modules/@kbn/config/target/types.d.ts", + "lineNumber": 6, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/types.d.ts#L6" + } + }, + { + "tags": [], + "id": "def-server.PackageInfo.buildNum", + "type": "number", + "label": "buildNum", + "description": [], + "source": { + "path": "node_modules/@kbn/config/target/types.d.ts", + "lineNumber": 7, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/types.d.ts#L7" + } + }, + { + "tags": [], + "id": "def-server.PackageInfo.buildSha", + "type": "string", + "label": "buildSha", + "description": [], + "source": { + "path": "node_modules/@kbn/config/target/types.d.ts", + "lineNumber": 8, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/types.d.ts#L8" + } + }, + { + "tags": [], + "id": "def-server.PackageInfo.dist", + "type": "boolean", + "label": "dist", + "description": [], + "source": { + "path": "node_modules/@kbn/config/target/types.d.ts", + "lineNumber": 9, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/types.d.ts#L9" + } } ], "source": { - "path": "src/core/server/elasticsearch/legacy/errors.ts", - "lineNumber": 22, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/errors.ts#L22" + "path": "node_modules/@kbn/config/target/types.d.ts", + "lineNumber": 4, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/config/target/types.d.ts#L4" }, "initialIsOpen": false }, { - "id": "def-server.ElasticsearchServiceSetup", + "id": "def-server.IContextContainer", "type": "Interface", - "label": "ElasticsearchServiceSetup", - "description": [], + "label": "IContextContainer", + "description": [ + "\nAn object that handles registration of context providers and configuring handlers with context.\n" + ], "tags": [ + "remarks", "public" ], "children": [ { - "tags": [ - "deprecated" - ], - "id": "def-server.ElasticsearchServiceSetup.legacy", - "type": "Object", - "label": "legacy", - "description": [], - "source": { - "path": "src/core/server/elasticsearch/types.ts", - "lineNumber": 30, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/types.ts#L30" - }, + "id": "def-server.IContextContainer.registerContext", + "type": "Function", + "label": "registerContext", "signature": [ - "{ readonly config$: ", - "Observable", - "<", + "; readonly createClient: (type: string, clientConfig?: Partial<", + ", ContextName extends keyof Context>(pluginOpaqueId: symbol, contextName: ContextName, provider: ", { "pluginId": "core", "scope": "server", "docId": "kibCorePluginApi", - "section": "def-server.LegacyElasticsearchClientConfig", - "text": "LegacyElasticsearchClientConfig" + "section": "def-server.IContextProvider", + "text": "IContextProvider" }, - "> | undefined) => Pick<", + ") => this" + ], + "description": [ + "\nRegister a new context provider.\n" + ], + "children": [ { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.LegacyClusterClient", - "text": "LegacyClusterClient" + "type": "Uncategorized", + "label": "pluginOpaqueId", + "isRequired": true, + "signature": [ + "symbol" + ], + "description": [ + "- The plugin opaque ID for the plugin that registers this context." + ], + "source": { + "path": "src/core/server/context/container/context.ts", + "lineNumber": 151, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/context/container/context.ts#L151" + } }, - ", \"close\" | \"callAsInternalUser\" | \"asScoped\">; readonly client: Pick<", { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.LegacyClusterClient", - "text": "LegacyClusterClient" + "type": "Uncategorized", + "label": "contextName", + "isRequired": true, + "signature": [ + "ContextName" + ], + "description": [ + "- The key of the `TContext` object this provider supplies the value for." + ], + "source": { + "path": "src/core/server/context/container/context.ts", + "lineNumber": 152, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/context/container/context.ts#L152" + } + }, + { + "type": "Function", + "label": "provider", + "isRequired": true, + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.IContextProvider", + "text": "IContextProvider" + }, + "" + ], + "description": [ + "- A {@link IContextProvider} to be called each time a new context is created." + ], + "source": { + "path": "src/core/server/context/container/context.ts", + "lineNumber": 153, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/context/container/context.ts#L153" + } } - ] - } - ], - "source": { - "path": "src/core/server/elasticsearch/types.ts", - "lineNumber": 25, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/types.ts#L25" - }, - "initialIsOpen": false - }, - { - "id": "def-server.ElasticsearchServiceStart", - "type": "Interface", - "label": "ElasticsearchServiceStart", - "description": [], - "tags": [ - "public" - ], - "children": [ - { + ], "tags": [ - "example" + "remarks" ], - "id": "def-server.ElasticsearchServiceStart.client", - "type": "Object", - "label": "client", - "description": [ - "\nA pre-configured {@link IClusterClient | Elasticsearch client}\n" + "returnComment": [ + "The {@link IContextContainer} for method chaining." ], "source": { - "path": "src/core/server/elasticsearch/types.ts", - "lineNumber": 96, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/types.ts#L96" - }, - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.IClusterClient", - "text": "IClusterClient" - } - ] + "path": "src/core/server/context/container/context.ts", + "lineNumber": 150, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/context/container/context.ts#L150" + } }, { - "tags": [ - "example" - ], - "id": "def-server.ElasticsearchServiceStart.createClient", + "id": "def-server.IContextContainer.createHandler", "type": "Function", - "label": "createClient", - "description": [ - "\nCreate application specific Elasticsearch cluster API client with customized config. See {@link IClusterClient}.\n" - ], - "source": { - "path": "src/core/server/elasticsearch/types.ts", - "lineNumber": 114, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/types.ts#L114" - }, + "label": "createHandler", "signature": [ - "(type: string, clientConfig?: Partial<", + "(pluginOpaqueId: symbol, handler: ", { "pluginId": "core", "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.ElasticsearchClientConfig", - "text": "ElasticsearchClientConfig" + "docId": "kibCoreHttpPluginApi", + "section": "def-server.RequestHandler", + "text": "RequestHandler" }, - "> | undefined) => ", + "; readonly createClient: (type: string, clientConfig?: Partial<", + ", any, { custom: | Error | { message: string | Error; attributes?: Record | undefined; } | Buffer | ", + "Stream", + " | undefined>(options: ", { "pluginId": "core", "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.LegacyElasticsearchClientConfig", - "text": "LegacyElasticsearchClientConfig" + "docId": "kibCoreHttpPluginApi", + "section": "def-server.CustomHttpResponseOptions", + "text": "CustomHttpResponseOptions" }, - "> | undefined) => Pick<", + ") => ", { "pluginId": "core", "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.LegacyClusterClient", - "text": "LegacyClusterClient" + "docId": "kibCoreHttpPluginApi", + "section": "def-server.KibanaResponse", + "text": "KibanaResponse" + } + ], + "description": [ + "\nCreate a new handler function pre-wired to context for the plugin.\n" + ], + "children": [ + { + "type": "Uncategorized", + "label": "pluginOpaqueId", + "isRequired": true, + "signature": [ + "symbol" + ], + "description": [ + "- The plugin opaque ID for the plugin that registers this handler." + ], + "source": { + "path": "src/core/server/context/container/context.ts", + "lineNumber": 165, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/context/container/context.ts#L165" + } }, - ", \"close\" | \"callAsInternalUser\" | \"asScoped\">; readonly client: Pick<", { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.LegacyClusterClient", - "text": "LegacyClusterClient" + "type": "Function", + "label": "handler", + "isRequired": true, + "signature": [ + { + "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" + }, + ") => ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.KibanaResponse", + "text": "KibanaResponse" + } + ], + "description": [ + "- Handler function to pass context object to." + ], + "source": { + "path": "src/core/server/context/container/context.ts", + "lineNumber": 166, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/context/container/context.ts#L166" + } } - ] + ], + "tags": [], + "returnComment": [ + "A function that takes `RequestHandler` parameters, calls `handler` with a new context, and returns a Promise of\nthe `handler` return value." + ], + "source": { + "path": "src/core/server/context/container/context.ts", + "lineNumber": 164, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/context/container/context.ts#L164" + } } ], "source": { - "path": "src/core/server/elasticsearch/types.ts", - "lineNumber": 87, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/types.ts#L87" + "path": "src/core/server/context/container/context.ts", + "lineNumber": 135, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/context/container/context.ts#L135" }, "initialIsOpen": false }, { - "id": "def-server.ElasticsearchStatusMeta", + "id": "def-server.ICspConfig", "type": "Interface", - "label": "ElasticsearchStatusMeta", - "description": [], + "label": "ICspConfig", + "description": [ + "\nCSP configuration for use in Kibana." + ], "tags": [ "public" ], "children": [ { "tags": [], - "id": "def-server.ElasticsearchStatusMeta.warningNodes", + "id": "def-server.ICspConfig.rules", "type": "Array", - "label": "warningNodes", - "description": [], + "label": "rules", + "description": [ + "\nThe CSP rules used for Kibana." + ], "source": { - "path": "src/core/server/elasticsearch/types.ts", - "lineNumber": 172, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/types.ts#L172" + "path": "src/core/server/csp/csp_config.ts", + "lineNumber": 21, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/csp/csp_config.ts#L21" }, "signature": [ - "NodeInfo[]" + "string[]" ] }, { "tags": [], - "id": "def-server.ElasticsearchStatusMeta.incompatibleNodes", - "type": "Array", - "label": "incompatibleNodes", - "description": [], - "source": { - "path": "src/core/server/elasticsearch/types.ts", - "lineNumber": 173, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/types.ts#L173" - }, - "signature": [ - "NodeInfo[]" - ] - } - ], - "source": { - "path": "src/core/server/elasticsearch/types.ts", - "lineNumber": 171, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/types.ts#L171" - }, - "initialIsOpen": false - }, - { - "id": "def-server.NodesVersionCompatibility", - "type": "Interface", - "label": "NodesVersionCompatibility", - "description": [], - "tags": [], - "children": [ - { - "tags": [], - "id": "def-server.NodesVersionCompatibility.isCompatible", + "id": "def-server.ICspConfig.strict", "type": "boolean", - "label": "isCompatible", - "description": [], + "label": "strict", + "description": [ + "\nSpecify whether browsers that do not support CSP should be\nable to use Kibana. Use `true` to block and `false` to allow." + ], "source": { - "path": "src/core/server/elasticsearch/version_check/ensure_es_version.ts", - "lineNumber": 47, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/version_check/ensure_es_version.ts#L47" + "path": "src/core/server/csp/csp_config.ts", + "lineNumber": 27, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/csp/csp_config.ts#L27" } }, { "tags": [], - "id": "def-server.NodesVersionCompatibility.message", - "type": "string", - "label": "message", - "description": [], - "source": { - "path": "src/core/server/elasticsearch/version_check/ensure_es_version.ts", - "lineNumber": 48, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/version_check/ensure_es_version.ts#L48" - }, - "signature": [ - "string | undefined" - ] - }, - { - "tags": [], - "id": "def-server.NodesVersionCompatibility.incompatibleNodes", - "type": "Array", - "label": "incompatibleNodes", - "description": [], - "source": { - "path": "src/core/server/elasticsearch/version_check/ensure_es_version.ts", - "lineNumber": 49, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/version_check/ensure_es_version.ts#L49" - }, - "signature": [ - "NodeInfo[]" - ] - }, - { - "tags": [], - "id": "def-server.NodesVersionCompatibility.warningNodes", - "type": "Array", - "label": "warningNodes", - "description": [], + "id": "def-server.ICspConfig.warnLegacyBrowsers", + "type": "boolean", + "label": "warnLegacyBrowsers", + "description": [ + "\nSpecify whether users with legacy browsers should be warned\nabout their lack of Kibana security compliance." + ], "source": { - "path": "src/core/server/elasticsearch/version_check/ensure_es_version.ts", - "lineNumber": 50, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/version_check/ensure_es_version.ts#L50" - }, - "signature": [ - "NodeInfo[]" - ] + "path": "src/core/server/csp/csp_config.ts", + "lineNumber": 33, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/csp/csp_config.ts#L33" + } }, { "tags": [], - "id": "def-server.NodesVersionCompatibility.kibanaVersion", + "id": "def-server.ICspConfig.header", "type": "string", - "label": "kibanaVersion", - "description": [], + "label": "header", + "description": [ + "\nThe CSP rules in a formatted directives string for use\nin a `Content-Security-Policy` header." + ], "source": { - "path": "src/core/server/elasticsearch/version_check/ensure_es_version.ts", - "lineNumber": 51, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/version_check/ensure_es_version.ts#L51" + "path": "src/core/server/csp/csp_config.ts", + "lineNumber": 39, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/csp/csp_config.ts#L39" } } ], "source": { - "path": "src/core/server/elasticsearch/version_check/ensure_es_version.ts", - "lineNumber": 46, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/version_check/ensure_es_version.ts#L46" + "path": "src/core/server/csp/csp_config.ts", + "lineNumber": 17, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/csp/csp_config.ts#L17" }, "initialIsOpen": false }, { - "id": "def-server.LegacyAPICaller", + "id": "def-server.LegacyElasticsearchError", "type": "Interface", - "label": "LegacyAPICaller", + "label": "LegacyElasticsearchError", + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.LegacyElasticsearchError", + "text": "LegacyElasticsearchError" + }, + " extends ", + "Boom", + "" + ], "description": [], "tags": [ "deprecated", @@ -8629,99 +8316,456 @@ ], "children": [ { - "id": "def-server.LegacyAPICaller.Unnamed", - "type": "Any", - "label": "Unnamed", "tags": [], - "description": [], + "id": "def-server.LegacyElasticsearchError.[code]", + "type": "string", + "label": "[code]", + "description": [], "source": { - "path": "src/core/server/elasticsearch/legacy/api_types.ts", - "lineNumber": 164, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L164" + "path": "src/core/server/elasticsearch/legacy/errors.ts", + "lineNumber": 23, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/errors.ts#L23" }, "signature": [ - "any" + "string | undefined" ] - }, + } + ], + "source": { + "path": "src/core/server/elasticsearch/legacy/errors.ts", + "lineNumber": 22, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/errors.ts#L22" + }, + "initialIsOpen": false + }, + { + "id": "def-server.ElasticsearchServiceSetup", + "type": "Interface", + "label": "ElasticsearchServiceSetup", + "description": [], + "tags": [ + "public" + ], + "children": [ { - "id": "def-server.LegacyAPICaller.Unnamed", - "type": "Any", - "label": "Unnamed", - "tags": [], + "tags": [ + "deprecated" + ], + "id": "def-server.ElasticsearchServiceSetup.legacy", + "type": "Object", + "label": "legacy", "description": [], "source": { - "path": "src/core/server/elasticsearch/legacy/api_types.ts", - "lineNumber": 165, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L165" + "path": "src/core/server/elasticsearch/types.ts", + "lineNumber": 30, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/types.ts#L30" }, "signature": [ - "any" + "{ readonly config$: ", + "Observable", + "<", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.ElasticsearchConfig", + "text": "ElasticsearchConfig" + }, + ">; readonly createClient: (type: string, clientConfig?: Partial<", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.LegacyElasticsearchClientConfig", + "text": "LegacyElasticsearchClientConfig" + }, + "> | undefined) => Pick<", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.LegacyClusterClient", + "text": "LegacyClusterClient" + }, + ", \"close\" | \"callAsInternalUser\" | \"asScoped\">; readonly client: Pick<", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.LegacyClusterClient", + "text": "LegacyClusterClient" + } ] - }, + } + ], + "source": { + "path": "src/core/server/elasticsearch/types.ts", + "lineNumber": 25, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/types.ts#L25" + }, + "initialIsOpen": false + }, + { + "id": "def-server.ElasticsearchServiceStart", + "type": "Interface", + "label": "ElasticsearchServiceStart", + "description": [], + "tags": [ + "public" + ], + "children": [ { - "id": "def-server.LegacyAPICaller.Unnamed", - "type": "Any", - "label": "Unnamed", - "tags": [], - "description": [], + "tags": [ + "example" + ], + "id": "def-server.ElasticsearchServiceStart.client", + "type": "Object", + "label": "client", + "description": [ + "\nA pre-configured {@link IClusterClient | Elasticsearch client}\n" + ], "source": { - "path": "src/core/server/elasticsearch/legacy/api_types.ts", - "lineNumber": 166, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L166" + "path": "src/core/server/elasticsearch/types.ts", + "lineNumber": 96, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/types.ts#L96" }, "signature": [ - "any" + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.IClusterClient", + "text": "IClusterClient" + } ] }, { - "id": "def-server.LegacyAPICaller.Unnamed", - "type": "Any", - "label": "Unnamed", - "tags": [], - "description": [], + "tags": [ + "example" + ], + "id": "def-server.ElasticsearchServiceStart.createClient", + "type": "Function", + "label": "createClient", + "description": [ + "\nCreate application specific Elasticsearch cluster API client with customized config. See {@link IClusterClient}.\n" + ], "source": { - "path": "src/core/server/elasticsearch/legacy/api_types.ts", - "lineNumber": 167, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L167" + "path": "src/core/server/elasticsearch/types.ts", + "lineNumber": 114, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/types.ts#L114" }, "signature": [ - "any" + "(type: string, clientConfig?: Partial<", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.ElasticsearchClientConfig", + "text": "ElasticsearchClientConfig" + }, + "> | undefined) => ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.ICustomClusterClient", + "text": "ICustomClusterClient" + } ] }, { - "id": "def-server.LegacyAPICaller.Unnamed", - "type": "Any", - "label": "Unnamed", - "tags": [], + "tags": [ + "deprecated" + ], + "id": "def-server.ElasticsearchServiceStart.legacy", + "type": "Object", + "label": "legacy", "description": [], "source": { - "path": "src/core/server/elasticsearch/legacy/api_types.ts", - "lineNumber": 168, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L168" + "path": "src/core/server/elasticsearch/types.ts", + "lineNumber": 124, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/types.ts#L124" }, "signature": [ - "any" + "{ readonly config$: ", + "Observable", + "<", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.ElasticsearchConfig", + "text": "ElasticsearchConfig" + }, + ">; readonly createClient: (type: string, clientConfig?: Partial<", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.LegacyElasticsearchClientConfig", + "text": "LegacyElasticsearchClientConfig" + }, + "> | undefined) => Pick<", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.LegacyClusterClient", + "text": "LegacyClusterClient" + }, + ", \"close\" | \"callAsInternalUser\" | \"asScoped\">; readonly client: Pick<", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.LegacyClusterClient", + "text": "LegacyClusterClient" + } ] - }, + } + ], + "source": { + "path": "src/core/server/elasticsearch/types.ts", + "lineNumber": 87, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/types.ts#L87" + }, + "initialIsOpen": false + }, + { + "id": "def-server.ElasticsearchStatusMeta", + "type": "Interface", + "label": "ElasticsearchStatusMeta", + "description": [], + "tags": [ + "public" + ], + "children": [ { - "id": "def-server.LegacyAPICaller.Unnamed", - "type": "Any", - "label": "Unnamed", "tags": [], + "id": "def-server.ElasticsearchStatusMeta.warningNodes", + "type": "Array", + "label": "warningNodes", "description": [], "source": { - "path": "src/core/server/elasticsearch/legacy/api_types.ts", - "lineNumber": 169, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L169" + "path": "src/core/server/elasticsearch/types.ts", + "lineNumber": 172, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/types.ts#L172" }, "signature": [ - "any" + "NodeInfo[]" ] }, { - "id": "def-server.LegacyAPICaller.Unnamed", - "type": "Any", - "label": "Unnamed", + "tags": [], + "id": "def-server.ElasticsearchStatusMeta.incompatibleNodes", + "type": "Array", + "label": "incompatibleNodes", + "description": [], + "source": { + "path": "src/core/server/elasticsearch/types.ts", + "lineNumber": 173, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/types.ts#L173" + }, + "signature": [ + "NodeInfo[]" + ] + } + ], + "source": { + "path": "src/core/server/elasticsearch/types.ts", + "lineNumber": 171, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/types.ts#L171" + }, + "initialIsOpen": false + }, + { + "id": "def-server.NodesVersionCompatibility", + "type": "Interface", + "label": "NodesVersionCompatibility", + "description": [], + "tags": [], + "children": [ + { + "tags": [], + "id": "def-server.NodesVersionCompatibility.isCompatible", + "type": "boolean", + "label": "isCompatible", + "description": [], + "source": { + "path": "src/core/server/elasticsearch/version_check/ensure_es_version.ts", + "lineNumber": 47, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/version_check/ensure_es_version.ts#L47" + } + }, + { + "tags": [], + "id": "def-server.NodesVersionCompatibility.message", + "type": "string", + "label": "message", + "description": [], + "source": { + "path": "src/core/server/elasticsearch/version_check/ensure_es_version.ts", + "lineNumber": 48, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/version_check/ensure_es_version.ts#L48" + }, + "signature": [ + "string | undefined" + ] + }, + { + "tags": [], + "id": "def-server.NodesVersionCompatibility.incompatibleNodes", + "type": "Array", + "label": "incompatibleNodes", + "description": [], + "source": { + "path": "src/core/server/elasticsearch/version_check/ensure_es_version.ts", + "lineNumber": 49, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/version_check/ensure_es_version.ts#L49" + }, + "signature": [ + "NodeInfo[]" + ] + }, + { + "tags": [], + "id": "def-server.NodesVersionCompatibility.warningNodes", + "type": "Array", + "label": "warningNodes", + "description": [], + "source": { + "path": "src/core/server/elasticsearch/version_check/ensure_es_version.ts", + "lineNumber": 50, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/version_check/ensure_es_version.ts#L50" + }, + "signature": [ + "NodeInfo[]" + ] + }, + { + "tags": [], + "id": "def-server.NodesVersionCompatibility.kibanaVersion", + "type": "string", + "label": "kibanaVersion", + "description": [], + "source": { + "path": "src/core/server/elasticsearch/version_check/ensure_es_version.ts", + "lineNumber": 51, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/version_check/ensure_es_version.ts#L51" + } + } + ], + "source": { + "path": "src/core/server/elasticsearch/version_check/ensure_es_version.ts", + "lineNumber": 46, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/version_check/ensure_es_version.ts#L46" + }, + "initialIsOpen": false + }, + { + "id": "def-server.LegacyAPICaller", + "type": "Interface", + "label": "LegacyAPICaller", + "description": [], + "tags": [ + "deprecated", + "public" + ], + "children": [ + { + "id": "def-server.LegacyAPICaller.Unnamed", + "type": "Any", + "label": "Unnamed", + "tags": [], + "description": [], + "source": { + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 164, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L164" + }, + "signature": [ + "any" + ] + }, + { + "id": "def-server.LegacyAPICaller.Unnamed", + "type": "Any", + "label": "Unnamed", + "tags": [], + "description": [], + "source": { + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 165, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L165" + }, + "signature": [ + "any" + ] + }, + { + "id": "def-server.LegacyAPICaller.Unnamed", + "type": "Any", + "label": "Unnamed", + "tags": [], + "description": [], + "source": { + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 166, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L166" + }, + "signature": [ + "any" + ] + }, + { + "id": "def-server.LegacyAPICaller.Unnamed", + "type": "Any", + "label": "Unnamed", + "tags": [], + "description": [], + "source": { + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 167, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L167" + }, + "signature": [ + "any" + ] + }, + { + "id": "def-server.LegacyAPICaller.Unnamed", + "type": "Any", + "label": "Unnamed", + "tags": [], + "description": [], + "source": { + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 168, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L168" + }, + "signature": [ + "any" + ] + }, + { + "id": "def-server.LegacyAPICaller.Unnamed", + "type": "Any", + "label": "Unnamed", + "tags": [], + "description": [], + "source": { + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 169, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L169" + }, + "signature": [ + "any" + ] + }, + { + "id": "def-server.LegacyAPICaller.Unnamed", + "type": "Any", + "label": "Unnamed", "tags": [], "description": [], "source": { @@ -10993,9 +11037,19 @@ "initialIsOpen": false }, { - "id": "def-server.Explanation", + "id": "def-server.GetResponse", "type": "Interface", - "label": "Explanation", + "label": "GetResponse", + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.GetResponse", + "text": "GetResponse" + }, + "" + ], "description": [], "tags": [ "public" @@ -11003,106 +11057,33 @@ "children": [ { "tags": [], - "id": "def-server.Explanation.value", - "type": "number", - "label": "value", + "id": "def-server.GetResponse._index", + "type": "string", + "label": "_index", "description": [], "source": { "path": "src/core/server/elasticsearch/client/types.ts", - "lineNumber": 53, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/client/types.ts#L53" + "lineNumber": 110, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/client/types.ts#L110" } }, { "tags": [], - "id": "def-server.Explanation.description", + "id": "def-server.GetResponse._type", "type": "string", - "label": "description", + "label": "_type", "description": [], "source": { "path": "src/core/server/elasticsearch/client/types.ts", - "lineNumber": 54, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/client/types.ts#L54" + "lineNumber": 111, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/client/types.ts#L111" } }, { "tags": [], - "id": "def-server.Explanation.details", - "type": "Array", - "label": "details", - "description": [], - "source": { - "path": "src/core/server/elasticsearch/client/types.ts", - "lineNumber": 55, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/client/types.ts#L55" - }, - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.Explanation", - "text": "Explanation" - }, - "[]" - ] - } - ], - "source": { - "path": "src/core/server/elasticsearch/client/types.ts", - "lineNumber": 52, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/client/types.ts#L52" - }, - "initialIsOpen": false - }, - { - "id": "def-server.GetResponse", - "type": "Interface", - "label": "GetResponse", - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.GetResponse", - "text": "GetResponse" - }, - "" - ], - "description": [], - "tags": [ - "public" - ], - "children": [ - { - "tags": [], - "id": "def-server.GetResponse._index", - "type": "string", - "label": "_index", - "description": [], - "source": { - "path": "src/core/server/elasticsearch/client/types.ts", - "lineNumber": 110, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/client/types.ts#L110" - } - }, - { - "tags": [], - "id": "def-server.GetResponse._type", - "type": "string", - "label": "_type", - "description": [], - "source": { - "path": "src/core/server/elasticsearch/client/types.ts", - "lineNumber": 111, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/client/types.ts#L111" - } - }, - { - "tags": [], - "id": "def-server.GetResponse._id", - "type": "string", - "label": "_id", + "id": "def-server.GetResponse._id", + "type": "string", + "label": "_id", "description": [], "source": { "path": "src/core/server/elasticsearch/client/types.ts", @@ -11322,973 +11303,592 @@ "initialIsOpen": false }, { - "id": "def-server.IExternalUrlConfig", + "id": "def-server.LegacyCallAPIOptions", "type": "Interface", - "label": "IExternalUrlConfig", + "label": "LegacyCallAPIOptions", "description": [ - "\nExternal Url configuration for use in Kibana." + "\nThe set of options that defines how API call should be made and result be\nprocessed.\n" ], "tags": [ - "public" + "public", + "deprecated" ], "children": [ { "tags": [], - "id": "def-server.IExternalUrlConfig.policy", - "type": "Array", - "label": "policy", + "id": "def-server.LegacyCallAPIOptions.wrap401Errors", + "type": "CompoundType", + "label": "wrap401Errors", "description": [ - "\nA set of policies describing which external urls are allowed." + "\nIndicates whether `401 Unauthorized` errors returned from the Elasticsearch API\nshould be wrapped into `Boom` error instances with properly set `WWW-Authenticate`\nheader that could have been returned by the API itself. If API didn't specify that\nthen `Basic realm=\"Authorization Required\"` is used as `WWW-Authenticate`." ], "source": { - "path": "src/core/server/external_url/external_url_config.ts", - "lineNumber": 22, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/external_url/external_url_config.ts#L22" + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 151, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L151" }, "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.IExternalUrlPolicy", - "text": "IExternalUrlPolicy" - }, - "[]" + "boolean | undefined" + ] + }, + { + "tags": [], + "id": "def-server.LegacyCallAPIOptions.signal", + "type": "Object", + "label": "signal", + "description": [ + "\nA signal object that allows you to abort the request via an AbortController object." + ], + "source": { + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 155, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L155" + }, + "signature": [ + "AbortSignal | undefined" ] } ], "source": { - "path": "src/core/server/external_url/external_url_config.ts", - "lineNumber": 18, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/external_url/external_url_config.ts#L18" + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 144, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L144" }, "initialIsOpen": false }, { - "id": "def-server.IExternalUrlPolicy", + "id": "def-server.AssistantAPIClientParams", "type": "Interface", - "label": "IExternalUrlPolicy", - "description": [ - "\nA policy describing whether access to an external destination is allowed." + "label": "AssistantAPIClientParams", + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.AssistantAPIClientParams", + "text": "AssistantAPIClientParams" + }, + " extends ", + "GenericParams" ], + "description": [], "tags": [ + "deprecated", "public" ], "children": [ { "tags": [], - "id": "def-server.IExternalUrlPolicy.allow", - "type": "boolean", - "label": "allow", - "description": [ - "\nIndicates if this policy allows or denies access to the described destination." - ], - "source": { - "path": "src/core/server/external_url/external_url_config.ts", - "lineNumber": 33, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/external_url/external_url_config.ts#L33" - } - }, - { - "tags": [ - "example" - ], - "id": "def-server.IExternalUrlPolicy.host", + "id": "def-server.AssistantAPIClientParams.path", "type": "string", - "label": "host", - "description": [ - "\nOptional host describing the external destination.\nMay be combined with `protocol`.\n" - ], + "label": "path", + "description": [], "source": { - "path": "src/core/server/external_url/external_url_config.ts", - "lineNumber": 46, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/external_url/external_url_config.ts#L46" + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 318, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L318" }, "signature": [ - "string | undefined" + "\"/_migration/assistance\"" ] }, { - "tags": [ - "example" - ], - "id": "def-server.IExternalUrlPolicy.protocol", + "tags": [], + "id": "def-server.AssistantAPIClientParams.method", "type": "string", - "label": "protocol", - "description": [ - "\nOptional protocol describing the external destination.\nMay be combined with `host`.\n" - ], + "label": "method", + "description": [], "source": { - "path": "src/core/server/external_url/external_url_config.ts", - "lineNumber": 59, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/external_url/external_url_config.ts#L59" + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 319, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L319" }, "signature": [ - "string | undefined" + "\"GET\"" ] } ], "source": { - "path": "src/core/server/external_url/external_url_config.ts", - "lineNumber": 29, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/external_url/external_url_config.ts#L29" + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 317, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L317" }, "initialIsOpen": false }, { - "id": "def-server.HttpResourcesRenderOptions", + "id": "def-server.AssistanceAPIResponse", "type": "Interface", - "label": "HttpResourcesRenderOptions", - "description": [ - "\nAllows to configure HTTP response parameters" - ], + "label": "AssistanceAPIResponse", + "description": [], "tags": [ + "deprecated", "public" ], "children": [ { - "tags": [ - "remarks" - ], - "id": "def-server.HttpResourcesRenderOptions.headers", - "type": "CompoundType", - "label": "headers", - "description": [ - "\nHTTP Headers with additional information about response." - ], + "tags": [], + "id": "def-server.AssistanceAPIResponse.indices", + "type": "Object", + "label": "indices", + "description": [], "source": { - "path": "src/core/server/http_resources/types.ts", - "lineNumber": 30, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http_resources/types.ts#L30" + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 338, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L338" }, "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" + "{ [indexName: string]: { action_required: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.MIGRATION_ASSISTANCE_INDEX_ACTION", + "text": "MIGRATION_ASSISTANCE_INDEX_ACTION" + }, + "; }; }" ] } ], "source": { - "path": "src/core/server/http_resources/types.ts", - "lineNumber": 24, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http_resources/types.ts#L24" + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 337, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L337" }, "initialIsOpen": false }, { - "id": "def-server.HttpResourcesServiceToolkit", + "id": "def-server.DeprecationAPIClientParams", "type": "Interface", - "label": "HttpResourcesServiceToolkit", - "description": [ - "\nExtended set of {@link KibanaResponseFactory} helpers used to respond with HTML or JS resource." + "label": "DeprecationAPIClientParams", + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.DeprecationAPIClientParams", + "text": "DeprecationAPIClientParams" + }, + " extends ", + "GenericParams" ], + "description": [], "tags": [ + "deprecated", "public" ], "children": [ { "tags": [], - "id": "def-server.HttpResourcesServiceToolkit.renderCoreApp", - "type": "Function", - "label": "renderCoreApp", - "description": [ - "To respond with HTML page bootstrapping Kibana application." - ], - "source": { - "path": "src/core/server/http_resources/types.ts", - "lineNumber": 45, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http_resources/types.ts#L45" - }, - "signature": [ - "(options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.HttpResourcesRenderOptions", - "text": "HttpResourcesRenderOptions" - }, - " | undefined) => Promise<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.IKibanaResponse", - "text": "IKibanaResponse" - }, - ">" - ] - }, - { - "tags": [], - "id": "def-server.HttpResourcesServiceToolkit.renderAnonymousCoreApp", - "type": "Function", - "label": "renderAnonymousCoreApp", - "description": [ - "To respond with HTML page bootstrapping Kibana application without retrieving user-specific information." - ], - "source": { - "path": "src/core/server/http_resources/types.ts", - "lineNumber": 47, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http_resources/types.ts#L47" - }, - "signature": [ - "(options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.HttpResourcesRenderOptions", - "text": "HttpResourcesRenderOptions" - }, - " | undefined) => Promise<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.IKibanaResponse", - "text": "IKibanaResponse" - }, - ">" - ] - }, - { - "tags": [], - "id": "def-server.HttpResourcesServiceToolkit.renderHtml", - "type": "Function", - "label": "renderHtml", - "description": [ - "To respond with a custom HTML page." - ], + "id": "def-server.DeprecationAPIClientParams.path", + "type": "string", + "label": "path", + "description": [], "source": { - "path": "src/core/server/http_resources/types.ts", - "lineNumber": 49, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http_resources/types.ts#L49" + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 350, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L350" }, "signature": [ - "(options: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.HttpResponseOptions", - "text": "HttpResponseOptions" - }, - ") => ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.IKibanaResponse", - "text": "IKibanaResponse" - }, - "" + "\"/_migration/deprecations\"" ] }, { "tags": [], - "id": "def-server.HttpResourcesServiceToolkit.renderJs", - "type": "Function", - "label": "renderJs", - "description": [ - "To respond with a custom JS script file." - ], + "id": "def-server.DeprecationAPIClientParams.method", + "type": "string", + "label": "method", + "description": [], "source": { - "path": "src/core/server/http_resources/types.ts", - "lineNumber": 51, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http_resources/types.ts#L51" + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 351, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L351" }, "signature": [ - "(options: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.HttpResponseOptions", - "text": "HttpResponseOptions" - }, - ") => ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.IKibanaResponse", - "text": "IKibanaResponse" - }, - "" + "\"GET\"" ] } ], "source": { - "path": "src/core/server/http_resources/types.ts", - "lineNumber": 43, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http_resources/types.ts#L43" + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 349, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L349" }, "initialIsOpen": false }, { - "id": "def-server.IRenderOptions", + "id": "def-server.DeprecationInfo", "type": "Interface", - "label": "IRenderOptions", + "label": "DeprecationInfo", "description": [], "tags": [ + "deprecated", "public" ], "children": [ { "tags": [], - "id": "def-server.IRenderOptions.includeUserSettings", + "id": "def-server.DeprecationInfo.level", "type": "CompoundType", - "label": "includeUserSettings", - "description": [ - "\nSet whether to output user settings in the page metadata.\n`true` by default." - ], + "label": "level", + "description": [], "source": { - "path": "src/core/server/rendering/types.ts", - "lineNumber": 72, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/rendering/types.ts#L72" + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 359, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L359" }, "signature": [ - "boolean | undefined" - ] - } - ], - "source": { - "path": "src/core/server/rendering/types.ts", - "lineNumber": 67, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/rendering/types.ts#L67" - }, - "initialIsOpen": false - }, - { - "id": "def-server.Logger", - "type": "Interface", - "label": "Logger", - "signature": [ - "Logger" - ], - "description": [ - "\nLogger exposes all the necessary methods to log any type of information and\nthis is the interface used by the logging consumers including plugins.\n" - ], - "tags": [ - "public" - ], - "children": [ - { - "id": "def-server.Logger.trace", - "type": "Function", - "label": "trace", - "signature": [ - "(message: string, meta?: ", - "LogMeta", - " | undefined) => void" - ], - "description": [ - "\nLog messages at the most detailed log level\n" - ], - "children": [ - { - "type": "string", - "label": "message", - "isRequired": true, - "signature": [ - "string" - ], - "description": [ - "- The log message" - ], - "source": { - "path": "node_modules/@kbn/logging/target/logger.d.ts", - "lineNumber": 23, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L23" - } - }, - { - "type": "Object", - "label": "meta", - "isRequired": false, - "signature": [ - "LogMeta", - " | undefined" - ], - "description": [ - "-" - ], - "source": { - "path": "node_modules/@kbn/logging/target/logger.d.ts", - "lineNumber": 23, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L23" - } - } - ], - "tags": [], - "returnComment": [], - "source": { - "path": "node_modules/@kbn/logging/target/logger.d.ts", - "lineNumber": 23, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L23" - } - }, - { - "id": "def-server.Logger.debug", - "type": "Function", - "label": "debug", - "signature": [ - "(message: string, meta?: ", - "LogMeta", - " | undefined) => void" - ], - "description": [ - "\nLog messages useful for debugging and interactive investigation" - ], - "children": [ { - "type": "string", - "label": "message", - "isRequired": true, - "signature": [ - "string" - ], - "description": [ - "- The log message" - ], - "source": { - "path": "node_modules/@kbn/logging/target/logger.d.ts", - "lineNumber": 29, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L29" - } - }, - { - "type": "Object", - "label": "meta", - "isRequired": false, - "signature": [ - "LogMeta", - " | undefined" - ], - "description": [ - "-" - ], - "source": { - "path": "node_modules/@kbn/logging/target/logger.d.ts", - "lineNumber": 29, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L29" - } - } - ], - "tags": [], - "returnComment": [], - "source": { - "path": "node_modules/@kbn/logging/target/logger.d.ts", - "lineNumber": 29, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L29" - } - }, - { - "id": "def-server.Logger.info", - "type": "Function", - "label": "info", - "signature": [ - "(message: string, meta?: ", - "LogMeta", - " | undefined) => void" - ], - "description": [ - "\nLogs messages related to general application flow" - ], - "children": [ - { - "type": "string", - "label": "message", - "isRequired": true, - "signature": [ - "string" - ], - "description": [ - "- The log message" - ], - "source": { - "path": "node_modules/@kbn/logging/target/logger.d.ts", - "lineNumber": 35, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L35" - } - }, - { - "type": "Object", - "label": "meta", - "isRequired": false, - "signature": [ - "LogMeta", - " | undefined" - ], - "description": [ - "-" - ], - "source": { - "path": "node_modules/@kbn/logging/target/logger.d.ts", - "lineNumber": 35, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L35" - } - } - ], - "tags": [], - "returnComment": [], - "source": { - "path": "node_modules/@kbn/logging/target/logger.d.ts", - "lineNumber": 35, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L35" - } - }, - { - "id": "def-server.Logger.warn", - "type": "Function", - "label": "warn", - "signature": [ - "(errorOrMessage: string | Error, meta?: ", - "LogMeta", - " | undefined) => void" - ], - "description": [ - "\nLogs abnormal or unexpected errors or messages" - ], - "children": [ - { - "type": "CompoundType", - "label": "errorOrMessage", - "isRequired": true, - "signature": [ - "string | Error" - ], - "description": [ - "- An Error object or message string to log" - ], - "source": { - "path": "node_modules/@kbn/logging/target/logger.d.ts", - "lineNumber": 41, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L41" - } - }, - { - "type": "Object", - "label": "meta", - "isRequired": false, - "signature": [ - "LogMeta", - " | undefined" - ], - "description": [ - "-" - ], - "source": { - "path": "node_modules/@kbn/logging/target/logger.d.ts", - "lineNumber": 41, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L41" - } + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.MIGRATION_DEPRECATION_LEVEL", + "text": "MIGRATION_DEPRECATION_LEVEL" } - ], - "tags": [], - "returnComment": [], - "source": { - "path": "node_modules/@kbn/logging/target/logger.d.ts", - "lineNumber": 41, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L41" - } + ] }, { - "id": "def-server.Logger.error", - "type": "Function", - "label": "error", - "signature": [ - "(errorOrMessage: string | Error, meta?: ", - "LogMeta", - " | undefined) => void" - ], - "description": [ - "\nLogs abnormal or unexpected errors or messages that caused a failure in the application flow\n" - ], - "children": [ - { - "type": "CompoundType", - "label": "errorOrMessage", - "isRequired": true, - "signature": [ - "string | Error" - ], - "description": [ - "- An Error object or message string to log" - ], - "source": { - "path": "node_modules/@kbn/logging/target/logger.d.ts", - "lineNumber": 48, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L48" - } - }, - { - "type": "Object", - "label": "meta", - "isRequired": false, - "signature": [ - "LogMeta", - " | undefined" - ], - "description": [ - "-" - ], - "source": { - "path": "node_modules/@kbn/logging/target/logger.d.ts", - "lineNumber": 48, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L48" - } - } - ], "tags": [], - "returnComment": [], + "id": "def-server.DeprecationInfo.message", + "type": "string", + "label": "message", + "description": [], "source": { - "path": "node_modules/@kbn/logging/target/logger.d.ts", - "lineNumber": 48, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L48" - } - }, - { - "id": "def-server.Logger.fatal", - "type": "Function", - "label": "fatal", - "signature": [ - "(errorOrMessage: string | Error, meta?: ", - "LogMeta", - " | undefined) => void" - ], - "description": [ - "\nLogs abnormal or unexpected errors or messages that caused an unrecoverable failure\n" - ], - "children": [ - { - "type": "CompoundType", - "label": "errorOrMessage", - "isRequired": true, - "signature": [ - "string | Error" - ], - "description": [ - "- An Error object or message string to log" - ], - "source": { - "path": "node_modules/@kbn/logging/target/logger.d.ts", - "lineNumber": 55, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L55" - } - }, - { - "type": "Object", - "label": "meta", - "isRequired": false, - "signature": [ - "LogMeta", - " | undefined" - ], - "description": [ - "-" - ], - "source": { - "path": "node_modules/@kbn/logging/target/logger.d.ts", - "lineNumber": 55, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L55" - } - } - ], + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 360, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L360" + } + }, + { "tags": [], - "returnComment": [], + "id": "def-server.DeprecationInfo.url", + "type": "string", + "label": "url", + "description": [], "source": { - "path": "node_modules/@kbn/logging/target/logger.d.ts", - "lineNumber": 55, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L55" + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 361, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L361" } }, { - "id": "def-server.Logger.get", - "type": "Function", - "label": "get", - "signature": [ - "(...childContextPaths: string[]) => ", - "Logger" - ], - "description": [ - "\nReturns a new {@link Logger} instance extending the current logger context.\n" - ], - "children": [ - { - "type": "Array", - "label": "childContextPaths", - "isRequired": true, - "signature": [ - "string[]" - ], - "description": [], - "source": { - "path": "node_modules/@kbn/logging/target/logger.d.ts", - "lineNumber": 67, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L67" - } - } - ], - "tags": [ - "example" - ], - "returnComment": [], + "tags": [], + "id": "def-server.DeprecationInfo.details", + "type": "string", + "label": "details", + "description": [], "source": { - "path": "node_modules/@kbn/logging/target/logger.d.ts", - "lineNumber": 67, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L67" - } + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 362, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L362" + }, + "signature": [ + "string | undefined" + ] } ], "source": { - "path": "node_modules/@kbn/logging/target/logger.d.ts", - "lineNumber": 16, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L16" + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 358, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L358" }, "initialIsOpen": false }, { - "id": "def-server.LoggerFactory", + "id": "def-server.IndexSettingsDeprecationInfo", "type": "Interface", - "label": "LoggerFactory", - "signature": [ - "LoggerFactory" + "label": "IndexSettingsDeprecationInfo", + "description": [], + "tags": [ + "deprecated", + "public" ], - "description": [ - "\nThe single purpose of `LoggerFactory` interface is to define a way to\nretrieve a context-based logger instance.\n" + "children": [ + { + "id": "def-server.IndexSettingsDeprecationInfo.Unnamed", + "type": "Any", + "label": "Unnamed", + "tags": [], + "description": [], + "source": { + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 370, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L370" + }, + "signature": [ + "any" + ] + } ], + "source": { + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 369, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L369" + }, + "initialIsOpen": false + }, + { + "id": "def-server.DeprecationAPIResponse", + "type": "Interface", + "label": "DeprecationAPIResponse", + "description": [], "tags": [ + "deprecated", "public" ], "children": [ { - "id": "def-server.LoggerFactory.get", - "type": "Function", - "label": "get", + "tags": [], + "id": "def-server.DeprecationAPIResponse.cluster_settings", + "type": "Array", + "label": "cluster_settings", + "description": [], + "source": { + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 378, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L378" + }, "signature": [ - "(...contextParts: string[]) => ", - "Logger" - ], - "description": [ - "\nReturns a `Logger` instance for the specified context.\n" - ], - "children": [ { - "type": "Array", - "label": "contextParts", - "isRequired": true, - "signature": [ - "string[]" - ], - "description": [ - "- Parts of the context to return logger for. For example\nget('plugins', 'pid') will return a logger for the `plugins.pid` context." - ], - "source": { - "path": "node_modules/@kbn/logging/target/logger_factory.d.ts", - "lineNumber": 15, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger_factory.d.ts#L15" - } - } - ], + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.DeprecationInfo", + "text": "DeprecationInfo" + }, + "[]" + ] + }, + { "tags": [], - "returnComment": [], + "id": "def-server.DeprecationAPIResponse.ml_settings", + "type": "Array", + "label": "ml_settings", + "description": [], "source": { - "path": "node_modules/@kbn/logging/target/logger_factory.d.ts", - "lineNumber": 15, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger_factory.d.ts#L15" - } + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 379, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L379" + }, + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.DeprecationInfo", + "text": "DeprecationInfo" + }, + "[]" + ] + }, + { + "tags": [], + "id": "def-server.DeprecationAPIResponse.node_settings", + "type": "Array", + "label": "node_settings", + "description": [], + "source": { + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 380, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L380" + }, + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.DeprecationInfo", + "text": "DeprecationInfo" + }, + "[]" + ] + }, + { + "tags": [], + "id": "def-server.DeprecationAPIResponse.index_settings", + "type": "Object", + "label": "index_settings", + "description": [], + "source": { + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 381, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L381" + }, + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.IndexSettingsDeprecationInfo", + "text": "IndexSettingsDeprecationInfo" + } + ] } ], "source": { - "path": "node_modules/@kbn/logging/target/logger_factory.d.ts", - "lineNumber": 8, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger_factory.d.ts#L8" + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 377, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L377" }, "initialIsOpen": false }, { - "id": "def-server.LogMeta", + "id": "def-server.IExternalUrlConfig", "type": "Interface", - "label": "LogMeta", - "signature": [ - "LogMeta" - ], + "label": "IExternalUrlConfig", "description": [ - "\nContextual metadata\n" + "\nExternal Url configuration for use in Kibana." ], "tags": [ "public" ], "children": [ { - "id": "def-server.LogMeta.Unnamed", - "type": "Any", - "label": "Unnamed", "tags": [], - "description": [], + "id": "def-server.IExternalUrlConfig.policy", + "type": "Array", + "label": "policy", + "description": [ + "\nA set of policies describing which external urls are allowed." + ], "source": { - "path": "node_modules/@kbn/logging/target/logger.d.ts", - "lineNumber": 8, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L8" + "path": "src/core/server/external_url/external_url_config.ts", + "lineNumber": 22, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/external_url/external_url_config.ts#L22" }, "signature": [ - "any" + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.IExternalUrlPolicy", + "text": "IExternalUrlPolicy" + }, + "[]" ] } ], "source": { - "path": "node_modules/@kbn/logging/target/logger.d.ts", - "lineNumber": 7, - "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L7" + "path": "src/core/server/external_url/external_url_config.ts", + "lineNumber": 18, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/external_url/external_url_config.ts#L18" }, "initialIsOpen": false }, { - "id": "def-server.LoggingServiceSetup", + "id": "def-server.IExternalUrlPolicy", "type": "Interface", - "label": "LoggingServiceSetup", + "label": "IExternalUrlPolicy", "description": [ - "\nProvides APIs to plugins for customizing the plugin's logger." + "\nA policy describing whether access to an external destination is allowed." ], "tags": [ "public" ], "children": [ { - "id": "def-server.LoggingServiceSetup.configure", - "type": "Function", - "label": "configure", - "signature": [ - "(config$: ", - "Observable", - "<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.LoggerContextConfigInput", - "text": "LoggerContextConfigInput" - }, - ">) => void" - ], + "tags": [], + "id": "def-server.IExternalUrlPolicy.allow", + "type": "boolean", + "label": "allow", "description": [ - "\nCustomizes the logging config for the plugin's context.\n" + "\nIndicates if this policy allows or denies access to the described destination." ], - "children": [ - { - "type": "Object", - "label": "config$", - "isRequired": true, - "signature": [ - "Observable", - "<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.LoggerContextConfigInput", - "text": "LoggerContextConfigInput" - }, - ">" - ], - "description": [], - "source": { - "path": "src/core/server/logging/logging_service.ts", - "lineNumber": 41, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/logging/logging_service.ts#L41" - } - } + "source": { + "path": "src/core/server/external_url/external_url_config.ts", + "lineNumber": 33, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/external_url/external_url_config.ts#L33" + } + }, + { + "tags": [ + "example" + ], + "id": "def-server.IExternalUrlPolicy.host", + "type": "string", + "label": "host", + "description": [ + "\nOptional host describing the external destination.\nMay be combined with `protocol`.\n" ], + "source": { + "path": "src/core/server/external_url/external_url_config.ts", + "lineNumber": 46, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/external_url/external_url_config.ts#L46" + }, + "signature": [ + "string | undefined" + ] + }, + { "tags": [ - "remarks", "example" ], - "returnComment": [], + "id": "def-server.IExternalUrlPolicy.protocol", + "type": "string", + "label": "protocol", + "description": [ + "\nOptional protocol describing the external destination.\nMay be combined with `host`.\n" + ], "source": { - "path": "src/core/server/logging/logging_service.ts", - "lineNumber": 41, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/logging/logging_service.ts#L41" - } + "path": "src/core/server/external_url/external_url_config.ts", + "lineNumber": 59, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/external_url/external_url_config.ts#L59" + }, + "signature": [ + "string | undefined" + ] } ], "source": { - "path": "src/core/server/logging/logging_service.ts", - "lineNumber": 20, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/logging/logging_service.ts#L20" + "path": "src/core/server/external_url/external_url_config.ts", + "lineNumber": 29, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/external_url/external_url_config.ts#L29" }, "initialIsOpen": false }, { - "id": "def-server.LoggerContextConfigInput", + "id": "def-server.HttpResourcesRenderOptions", "type": "Interface", - "label": "LoggerContextConfigInput", - "description": [], + "label": "HttpResourcesRenderOptions", + "description": [ + "\nAllows to configure HTTP response parameters" + ], "tags": [ "public" ], "children": [ { - "tags": [], - "id": "def-server.LoggerContextConfigInput.appenders", + "tags": [ + "remarks" + ], + "id": "def-server.HttpResourcesRenderOptions.headers", "type": "CompoundType", - "label": "appenders", - "description": [], - "source": { - "path": "src/core/server/logging/logging_config.ts", - "lineNumber": 111, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/logging/logging_config.ts#L111" - }, - "signature": [ - "Record | Map | undefined" - ] - }, - { - "tags": [], - "id": "def-server.LoggerContextConfigInput.loggers", - "type": "Array", - "label": "loggers", - "description": [], + "label": "headers", + "description": [ + "\nHTTP Headers with additional information about response." + ], "source": { - "path": "src/core/server/logging/logging_config.ts", - "lineNumber": 112, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/logging/logging_config.ts#L112" + "path": "src/core/server/http_resources/types.ts", + "lineNumber": 30, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http_resources/types.ts#L30" }, "signature": [ - "Readonly<{} & { name: string; level: ", - "LogLevelId", - "; appenders: string[]; }>[] | undefined" + "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" ] } ], "source": { - "path": "src/core/server/logging/logging_config.ts", - "lineNumber": 109, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/logging/logging_config.ts#L109" + "path": "src/core/server/http_resources/types.ts", + "lineNumber": 24, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http_resources/types.ts#L24" }, "initialIsOpen": false }, { - "id": "def-server.DiscoveredPlugin", + "id": "def-server.HttpResourcesServiceToolkit", "type": "Interface", - "label": "DiscoveredPlugin", + "label": "HttpResourcesServiceToolkit", "description": [ - "\nSmall container object used to expose information about discovered plugins that may\nor may not have been started." + "\nExtended set of {@link KibanaResponseFactory} helpers used to respond with HTML or JS resource." ], "tags": [ "public" @@ -12296,697 +11896,840 @@ "children": [ { "tags": [], - "id": "def-server.DiscoveredPlugin.id", - "type": "string", - "label": "id", + "id": "def-server.HttpResourcesServiceToolkit.renderCoreApp", + "type": "Function", + "label": "renderCoreApp", "description": [ - "\nIdentifier of the plugin." + "To respond with HTML page bootstrapping Kibana application." ], "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 189, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L189" - } + "path": "src/core/server/http_resources/types.ts", + "lineNumber": 45, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http_resources/types.ts#L45" + }, + "signature": [ + "(options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.HttpResourcesRenderOptions", + "text": "HttpResourcesRenderOptions" + }, + " | undefined) => Promise<", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.IKibanaResponse", + "text": "IKibanaResponse" + }, + ">" + ] }, { "tags": [], - "id": "def-server.DiscoveredPlugin.configPath", - "type": "CompoundType", - "label": "configPath", + "id": "def-server.HttpResourcesServiceToolkit.renderAnonymousCoreApp", + "type": "Function", + "label": "renderAnonymousCoreApp", "description": [ - "\nRoot configuration path used by the plugin, defaults to \"id\" in snake_case format." + "To respond with HTML page bootstrapping Kibana application without retrieving user-specific information." ], "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 194, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L194" + "path": "src/core/server/http_resources/types.ts", + "lineNumber": 47, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http_resources/types.ts#L47" }, "signature": [ - "string | string[]" + "(options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.HttpResourcesRenderOptions", + "text": "HttpResourcesRenderOptions" + }, + " | undefined) => Promise<", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.IKibanaResponse", + "text": "IKibanaResponse" + }, + ">" ] }, { "tags": [], - "id": "def-server.DiscoveredPlugin.requiredPlugins", - "type": "Object", - "label": "requiredPlugins", + "id": "def-server.HttpResourcesServiceToolkit.renderHtml", + "type": "Function", + "label": "renderHtml", "description": [ - "\nAn optional list of the other plugins that **must be** installed and enabled\nfor this plugin to function properly." + "To respond with a custom HTML page." ], "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 200, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L200" + "path": "src/core/server/http_resources/types.ts", + "lineNumber": 49, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http_resources/types.ts#L49" }, "signature": [ - "readonly string[]" + "(options: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.HttpResponseOptions", + "text": "HttpResponseOptions" + }, + ") => ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.IKibanaResponse", + "text": "IKibanaResponse" + }, + "" ] }, { "tags": [], - "id": "def-server.DiscoveredPlugin.optionalPlugins", - "type": "Object", - "label": "optionalPlugins", + "id": "def-server.HttpResourcesServiceToolkit.renderJs", + "type": "Function", + "label": "renderJs", "description": [ - "\nAn optional list of the other plugins that if installed and enabled **may be**\nleveraged by this plugin for some additional functionality but otherwise are\nnot required for this plugin to work properly." + "To respond with a custom JS script file." ], "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 207, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L207" + "path": "src/core/server/http_resources/types.ts", + "lineNumber": 51, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http_resources/types.ts#L51" }, "signature": [ - "readonly string[]" + "(options: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.HttpResponseOptions", + "text": "HttpResponseOptions" + }, + ") => ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.IKibanaResponse", + "text": "IKibanaResponse" + }, + "" ] - }, + } + ], + "source": { + "path": "src/core/server/http_resources/types.ts", + "lineNumber": 43, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http_resources/types.ts#L43" + }, + "initialIsOpen": false + }, + { + "id": "def-server.IRenderOptions", + "type": "Interface", + "label": "IRenderOptions", + "description": [], + "tags": [ + "public" + ], + "children": [ { - "tags": [ - "remarks" - ], - "id": "def-server.DiscoveredPlugin.requiredBundles", - "type": "Object", - "label": "requiredBundles", + "tags": [], + "id": "def-server.IRenderOptions.includeUserSettings", + "type": "CompoundType", + "label": "includeUserSettings", "description": [ - "\nList of plugin ids that this plugin's UI code imports modules from that are\nnot in `requiredPlugins`.\n" + "\nSet whether to output user settings in the page metadata.\n`true` by default." ], "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 219, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L219" + "path": "src/core/server/rendering/types.ts", + "lineNumber": 72, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/rendering/types.ts#L72" }, "signature": [ - "readonly string[]" + "boolean | undefined" ] } ], "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 185, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L185" + "path": "src/core/server/rendering/types.ts", + "lineNumber": 67, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/rendering/types.ts#L67" }, "initialIsOpen": false }, { - "id": "def-server.Plugin", + "id": "def-server.Logger", "type": "Interface", - "label": "Plugin", + "label": "Logger", "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.Plugin", - "text": "Plugin" - }, - "" + "Logger" ], "description": [ - "\nThe interface that should be returned by a `PluginInitializer`.\n" + "\nLogger exposes all the necessary methods to log any type of information and\nthis is the interface used by the logging consumers including plugins.\n" ], "tags": [ "public" ], "children": [ { - "id": "def-server.Plugin.setup", + "id": "def-server.Logger.trace", "type": "Function", - "label": "setup", + "label": "trace", "signature": [ - "(core: ", + "(message: string, meta?: ", + "LogMeta", + " | undefined) => void" + ], + "description": [ + "\nLog messages at the most detailed log level\n" + ], + "children": [ { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.CoreSetup", - "text": "CoreSetup" + "type": "string", + "label": "message", + "isRequired": true, + "signature": [ + "string" + ], + "description": [ + "- The log message" + ], + "source": { + "path": "node_modules/@kbn/logging/target/logger.d.ts", + "lineNumber": 23, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L23" + } }, - ", plugins: TPluginsSetup) => TSetup" + { + "type": "Object", + "label": "meta", + "isRequired": false, + "signature": [ + "LogMeta", + " | undefined" + ], + "description": [ + "-" + ], + "source": { + "path": "node_modules/@kbn/logging/target/logger.d.ts", + "lineNumber": 23, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L23" + } + } + ], + "tags": [], + "returnComment": [], + "source": { + "path": "node_modules/@kbn/logging/target/logger.d.ts", + "lineNumber": 23, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L23" + } + }, + { + "id": "def-server.Logger.debug", + "type": "Function", + "label": "debug", + "signature": [ + "(message: string, meta?: ", + "LogMeta", + " | undefined) => void" + ], + "description": [ + "\nLog messages useful for debugging and interactive investigation" ], - "description": [], "children": [ + { + "type": "string", + "label": "message", + "isRequired": true, + "signature": [ + "string" + ], + "description": [ + "- The log message" + ], + "source": { + "path": "node_modules/@kbn/logging/target/logger.d.ts", + "lineNumber": 29, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L29" + } + }, { "type": "Object", - "label": "core", + "label": "meta", + "isRequired": false, + "signature": [ + "LogMeta", + " | undefined" + ], + "description": [ + "-" + ], + "source": { + "path": "node_modules/@kbn/logging/target/logger.d.ts", + "lineNumber": 29, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L29" + } + } + ], + "tags": [], + "returnComment": [], + "source": { + "path": "node_modules/@kbn/logging/target/logger.d.ts", + "lineNumber": 29, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L29" + } + }, + { + "id": "def-server.Logger.info", + "type": "Function", + "label": "info", + "signature": [ + "(message: string, meta?: ", + "LogMeta", + " | undefined) => void" + ], + "description": [ + "\nLogs messages related to general application flow" + ], + "children": [ + { + "type": "string", + "label": "message", "isRequired": true, "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.CoreSetup", - "text": "CoreSetup" - }, - "" + "string" + ], + "description": [ + "- The log message" ], - "description": [], "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 252, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L252" + "path": "node_modules/@kbn/logging/target/logger.d.ts", + "lineNumber": 35, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L35" } }, { - "type": "Uncategorized", - "label": "plugins", - "isRequired": true, + "type": "Object", + "label": "meta", + "isRequired": false, "signature": [ - "TPluginsSetup" + "LogMeta", + " | undefined" + ], + "description": [ + "-" ], - "description": [], "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 252, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L252" + "path": "node_modules/@kbn/logging/target/logger.d.ts", + "lineNumber": 35, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L35" } } ], "tags": [], "returnComment": [], "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 252, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L252" + "path": "node_modules/@kbn/logging/target/logger.d.ts", + "lineNumber": 35, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L35" } }, { - "id": "def-server.Plugin.start", + "id": "def-server.Logger.warn", "type": "Function", - "label": "start", + "label": "warn", "signature": [ - "(core: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.CoreStart", - "text": "CoreStart" - }, - ", plugins: TPluginsStart) => TStart" + "(errorOrMessage: string | Error, meta?: ", + "LogMeta", + " | undefined) => void" + ], + "description": [ + "\nLogs abnormal or unexpected errors or messages" ], - "description": [], "children": [ { - "type": "Object", - "label": "core", + "type": "CompoundType", + "label": "errorOrMessage", "isRequired": true, "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.CoreStart", - "text": "CoreStart" - } + "string | Error" + ], + "description": [ + "- An Error object or message string to log" ], - "description": [], "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 253, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L253" + "path": "node_modules/@kbn/logging/target/logger.d.ts", + "lineNumber": 41, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L41" } }, { - "type": "Uncategorized", - "label": "plugins", - "isRequired": true, + "type": "Object", + "label": "meta", + "isRequired": false, "signature": [ - "TPluginsStart" + "LogMeta", + " | undefined" + ], + "description": [ + "-" ], - "description": [], "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 253, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L253" + "path": "node_modules/@kbn/logging/target/logger.d.ts", + "lineNumber": 41, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L41" } } ], "tags": [], "returnComment": [], "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 253, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L253" + "path": "node_modules/@kbn/logging/target/logger.d.ts", + "lineNumber": 41, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L41" } }, { - "id": "def-server.Plugin.stop", + "id": "def-server.Logger.error", "type": "Function", - "label": "stop", + "label": "error", "signature": [ - "(() => void) | undefined" + "(errorOrMessage: string | Error, meta?: ", + "LogMeta", + " | undefined) => void" ], - "description": [], - "children": [], - "tags": [], - "returnComment": [], - "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 254, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L254" - } - } - ], - "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 246, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L246" - }, - "initialIsOpen": false - }, - { - "id": "def-server.AsyncPlugin", - "type": "Interface", - "label": "AsyncPlugin", - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.AsyncPlugin", - "text": "AsyncPlugin" - }, - "" - ], - "description": [ - "\nA plugin with asynchronous lifecycle methods.\n" - ], - "tags": [ - "deprecated", - "public" - ], - "children": [ - { - "id": "def-server.AsyncPlugin.setup", - "type": "Function", - "label": "setup", - "signature": [ - "(core: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.CoreSetup", - "text": "CoreSetup" - }, - ", plugins: TPluginsSetup) => TSetup | Promise" + "description": [ + "\nLogs abnormal or unexpected errors or messages that caused a failure in the application flow\n" ], - "description": [], "children": [ { - "type": "Object", - "label": "core", + "type": "CompoundType", + "label": "errorOrMessage", "isRequired": true, "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.CoreSetup", - "text": "CoreSetup" - }, - "" + "string | Error" + ], + "description": [ + "- An Error object or message string to log" ], - "description": [], "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 269, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L269" + "path": "node_modules/@kbn/logging/target/logger.d.ts", + "lineNumber": 48, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L48" } }, { - "type": "Uncategorized", - "label": "plugins", - "isRequired": true, + "type": "Object", + "label": "meta", + "isRequired": false, "signature": [ - "TPluginsSetup" + "LogMeta", + " | undefined" + ], + "description": [ + "-" ], - "description": [], "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 269, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L269" + "path": "node_modules/@kbn/logging/target/logger.d.ts", + "lineNumber": 48, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L48" } } ], "tags": [], "returnComment": [], "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 269, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L269" + "path": "node_modules/@kbn/logging/target/logger.d.ts", + "lineNumber": 48, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L48" } }, { - "id": "def-server.AsyncPlugin.start", + "id": "def-server.Logger.fatal", "type": "Function", - "label": "start", + "label": "fatal", "signature": [ - "(core: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.CoreStart", - "text": "CoreStart" - }, - ", plugins: TPluginsStart) => TStart | Promise" + "(errorOrMessage: string | Error, meta?: ", + "LogMeta", + " | undefined) => void" + ], + "description": [ + "\nLogs abnormal or unexpected errors or messages that caused an unrecoverable failure\n" ], - "description": [], "children": [ { - "type": "Object", - "label": "core", + "type": "CompoundType", + "label": "errorOrMessage", "isRequired": true, "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.CoreStart", - "text": "CoreStart" - } + "string | Error" + ], + "description": [ + "- An Error object or message string to log" ], - "description": [], "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 270, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L270" + "path": "node_modules/@kbn/logging/target/logger.d.ts", + "lineNumber": 55, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L55" } }, { - "type": "Uncategorized", - "label": "plugins", - "isRequired": true, + "type": "Object", + "label": "meta", + "isRequired": false, "signature": [ - "TPluginsStart" + "LogMeta", + " | undefined" + ], + "description": [ + "-" ], - "description": [], "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 270, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L270" + "path": "node_modules/@kbn/logging/target/logger.d.ts", + "lineNumber": 55, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L55" } } ], "tags": [], "returnComment": [], "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 270, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L270" + "path": "node_modules/@kbn/logging/target/logger.d.ts", + "lineNumber": 55, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L55" } }, { - "id": "def-server.AsyncPlugin.stop", + "id": "def-server.Logger.get", "type": "Function", - "label": "stop", + "label": "get", "signature": [ - "(() => void) | undefined" + "(...childContextPaths: string[]) => ", + "Logger" + ], + "description": [ + "\nReturns a new {@link Logger} instance extending the current logger context.\n" + ], + "children": [ + { + "type": "Array", + "label": "childContextPaths", + "isRequired": true, + "signature": [ + "string[]" + ], + "description": [], + "source": { + "path": "node_modules/@kbn/logging/target/logger.d.ts", + "lineNumber": 67, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L67" + } + } + ], + "tags": [ + "example" ], - "description": [], - "children": [], - "tags": [], "returnComment": [], "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 271, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L271" + "path": "node_modules/@kbn/logging/target/logger.d.ts", + "lineNumber": 67, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L67" } } ], "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 263, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L263" + "path": "node_modules/@kbn/logging/target/logger.d.ts", + "lineNumber": 16, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L16" }, "initialIsOpen": false }, { - "id": "def-server.PluginConfigDescriptor", + "id": "def-server.LoggerFactory", "type": "Interface", - "label": "PluginConfigDescriptor", + "label": "LoggerFactory", "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.PluginConfigDescriptor", - "text": "PluginConfigDescriptor" - }, - "" + "LoggerFactory" ], "description": [ - "\nDescribes a plugin configuration properties.\n" + "\nThe single purpose of `LoggerFactory` interface is to define a way to\nretrieve a context-based logger instance.\n" ], "tags": [ - "example", - "kbn", "public" ], "children": [ { - "tags": [], - "id": "def-server.PluginConfigDescriptor.deprecations", + "id": "def-server.LoggerFactory.get", "type": "Function", - "label": "deprecations", + "label": "get", + "signature": [ + "(...contextParts: string[]) => ", + "Logger" + ], "description": [ - "\nProvider for the {@link ConfigDeprecation} to apply to the plugin configuration." + "\nReturns a `Logger` instance for the specified context.\n" + ], + "children": [ + { + "type": "Array", + "label": "contextParts", + "isRequired": true, + "signature": [ + "string[]" + ], + "description": [ + "- Parts of the context to return logger for. For example\nget('plugins', 'pid') will return a logger for the `plugins.pid` context." + ], + "source": { + "path": "node_modules/@kbn/logging/target/logger_factory.d.ts", + "lineNumber": 15, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger_factory.d.ts#L15" + } + } ], + "tags": [], + "returnComment": [], "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 62, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L62" - }, - "signature": [ - "ConfigDeprecationProvider", - " | undefined" - ] - }, + "path": "node_modules/@kbn/logging/target/logger_factory.d.ts", + "lineNumber": 15, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger_factory.d.ts#L15" + } + } + ], + "source": { + "path": "node_modules/@kbn/logging/target/logger_factory.d.ts", + "lineNumber": 8, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger_factory.d.ts#L8" + }, + "initialIsOpen": false + }, + { + "id": "def-server.LogMeta", + "type": "Interface", + "label": "LogMeta", + "signature": [ + "LogMeta" + ], + "description": [ + "\nContextual metadata\n" + ], + "tags": [ + "public" + ], + "children": [ { + "id": "def-server.LogMeta.Unnamed", + "type": "Any", + "label": "Unnamed", "tags": [], - "id": "def-server.PluginConfigDescriptor.exposeToBrowser", - "type": "Object", - "label": "exposeToBrowser", - "description": [ - "\nList of configuration properties that will be available on the client-side plugin." - ], + "description": [], "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 66, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L66" + "path": "node_modules/@kbn/logging/target/logger.d.ts", + "lineNumber": 8, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L8" }, "signature": [ - "{ [P in keyof T]?: boolean | undefined; } | undefined" + "any" ] - }, + } + ], + "source": { + "path": "node_modules/@kbn/logging/target/logger.d.ts", + "lineNumber": 7, + "link": "https://github.com/elastic/kibana/tree/masternode_modules/@kbn/logging/target/logger.d.ts#L7" + }, + "initialIsOpen": false + }, + { + "id": "def-server.LoggingServiceSetup", + "type": "Interface", + "label": "LoggingServiceSetup", + "description": [ + "\nProvides APIs to plugins for customizing the plugin's logger." + ], + "tags": [ + "public" + ], + "children": [ { - "tags": [], - "id": "def-server.PluginConfigDescriptor.schema", - "type": "Object", - "label": "schema", - "description": [ - "\nSchema to use to validate the plugin configuration.\n\n{@link PluginConfigSchema}" - ], - "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 72, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L72" - }, + "id": "def-server.LoggingServiceSetup.configure", + "type": "Function", + "label": "configure", "signature": [ + "(config$: ", + "Observable", + "<", { "pluginId": "core", "scope": "server", "docId": "kibCorePluginApi", - "section": "def-server.PluginConfigSchema", - "text": "PluginConfigSchema" + "section": "def-server.LoggerContextConfigInput", + "text": "LoggerContextConfigInput" }, - "" - ] + ">) => void" + ], + "description": [ + "\nCustomizes the logging config for the plugin's context.\n" + ], + "children": [ + { + "type": "Object", + "label": "config$", + "isRequired": true, + "signature": [ + "Observable", + "<", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.LoggerContextConfigInput", + "text": "LoggerContextConfigInput" + }, + ">" + ], + "description": [], + "source": { + "path": "src/core/server/logging/logging_service.ts", + "lineNumber": 41, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/logging/logging_service.ts#L41" + } + } + ], + "tags": [ + "remarks", + "example" + ], + "returnComment": [], + "source": { + "path": "src/core/server/logging/logging_service.ts", + "lineNumber": 41, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/logging/logging_service.ts#L41" + } } ], "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 58, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L58" + "path": "src/core/server/logging/logging_service.ts", + "lineNumber": 20, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/logging/logging_service.ts#L20" }, "initialIsOpen": false }, { - "id": "def-server.PluginInitializerContext", + "id": "def-server.LoggerContextConfigInput", "type": "Interface", - "label": "PluginInitializerContext", - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.PluginInitializerContext", - "text": "PluginInitializerContext" - }, - "" - ], - "description": [ - "\nContext that's available to plugins during initialization stage.\n" - ], + "label": "LoggerContextConfigInput", + "description": [], "tags": [ "public" ], "children": [ { "tags": [], - "id": "def-server.PluginInitializerContext.opaqueId", - "type": "Uncategorized", - "label": "opaqueId", + "id": "def-server.LoggerContextConfigInput.appenders", + "type": "CompoundType", + "label": "appenders", "description": [], "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 298, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L298" + "path": "src/core/server/logging/logging_config.ts", + "lineNumber": 111, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/logging/logging_config.ts#L111" }, "signature": [ - "symbol" + "Record | Map | undefined" ] }, { "tags": [], - "id": "def-server.PluginInitializerContext.env", - "type": "Object", - "label": "env", + "id": "def-server.LoggerContextConfigInput.loggers", + "type": "Array", + "label": "loggers", "description": [], "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 299, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L299" - }, - "signature": [ - "{ mode: ", - "EnvironmentMode", - "; packageInfo: Readonly<", - "PackageInfo", - ">; instanceUuid: string; }" - ] - }, - { - "tags": [ - "example" - ], - "id": "def-server.PluginInitializerContext.logger", - "type": "Object", - "label": "logger", - "description": [ - "\n{@link LoggerFactory | logger factory} instance already bound to the plugin's logging context\n" - ], - "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 322, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L322" - }, - "signature": [ - "LoggerFactory" - ] - }, - { - "tags": [], - "id": "def-server.PluginInitializerContext.config", - "type": "Object", - "label": "config", - "description": [ - "\nAccessors for the plugin's configuration" - ], - "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 326, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L326" + "path": "src/core/server/logging/logging_config.ts", + "lineNumber": 112, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/logging/logging_config.ts#L112" }, "signature": [ - "{ legacy: { globalConfig$: ", - "Observable", - " moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly autocompleteTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; elasticsearch: Readonly<{ readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", - "ByteSizeValue", - ") => boolean; isLessThan: (other: ", - "ByteSizeValue", - ") => boolean; isEqualTo: (other: ", - "ByteSizeValue", - ") => boolean; getValueInBytes: () => number; toString: (returnUnit?: \"b\" | \"kb\" | \"mb\" | \"gb\" | undefined) => string; }>; }>; }>>; get: () => Readonly<{ kibana: Readonly<{ readonly index: string; readonly autocompleteTerminateAfter: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly autocompleteTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; elasticsearch: Readonly<{ readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", - "ByteSizeValue" + "Readonly<{} & { name: string; level: ", + "LogLevelId", + "; appenders: string[]; }>[] | undefined" ] } ], "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 297, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L297" + "path": "src/core/server/logging/logging_config.ts", + "lineNumber": 109, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/logging/logging_config.ts#L109" }, "initialIsOpen": false }, { - "id": "def-server.PluginManifest", + "id": "def-server.DiscoveredPlugin", "type": "Interface", - "label": "PluginManifest", + "label": "DiscoveredPlugin", "description": [ - "\nDescribes the set of required and optional properties plugin can define in its\nmandatory JSON manifest file.\n" + "\nSmall container object used to expose information about discovered plugins that may\nor may not have been started." ], "tags": [ - "remarks", "public" ], "children": [ { "tags": [], - "id": "def-server.PluginManifest.id", + "id": "def-server.DiscoveredPlugin.id", "type": "string", "label": "id", "description": [ - "\nIdentifier of the plugin. Must be a string in camelCase. Part of a plugin public contract.\nOther plugins leverage it to access plugin API, navigate to the plugin, etc." - ], - "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 107, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L107" - } - }, - { - "tags": [], - "id": "def-server.PluginManifest.version", - "type": "string", - "label": "version", - "description": [ - "\nVersion of the plugin." + "\nIdentifier of the plugin." ], "source": { "path": "src/core/server/plugins/types.ts", - "lineNumber": 112, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L112" + "lineNumber": 189, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L189" } }, { "tags": [], - "id": "def-server.PluginManifest.kibanaVersion", - "type": "string", - "label": "kibanaVersion", - "description": [ - "\nThe version of Kibana the plugin is compatible with, defaults to \"version\"." - ], - "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 117, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L117" - } - }, - { - "tags": [ - "example" - ], - "id": "def-server.PluginManifest.configPath", + "id": "def-server.DiscoveredPlugin.configPath", "type": "CompoundType", "label": "configPath", "description": [ - "\nRoot {@link ConfigPath | configuration path} used by the plugin, defaults\nto \"id\" in snake_case format.\n" + "\nRoot configuration path used by the plugin, defaults to \"id\" in snake_case format." ], "source": { "path": "src/core/server/plugins/types.ts", - "lineNumber": 127, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L127" + "lineNumber": 194, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L194" }, "signature": [ "string | string[]" @@ -12994,7 +12737,7 @@ }, { "tags": [], - "id": "def-server.PluginManifest.requiredPlugins", + "id": "def-server.DiscoveredPlugin.requiredPlugins", "type": "Object", "label": "requiredPlugins", "description": [ @@ -13002,27 +12745,8 @@ ], "source": { "path": "src/core/server/plugins/types.ts", - "lineNumber": 133, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L133" - }, - "signature": [ - "readonly string[]" - ] - }, - { - "tags": [ - "remarks" - ], - "id": "def-server.PluginManifest.requiredBundles", - "type": "Object", - "label": "requiredBundles", - "description": [ - "\nList of plugin ids that this plugin's UI code imports modules from that are\nnot in `requiredPlugins`.\n" - ], - "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 145, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L145" + "lineNumber": 200, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L200" }, "signature": [ "readonly string[]" @@ -13030,7 +12754,7 @@ }, { "tags": [], - "id": "def-server.PluginManifest.optionalPlugins", + "id": "def-server.DiscoveredPlugin.optionalPlugins", "type": "Object", "label": "optionalPlugins", "description": [ @@ -13038,756 +12762,777 @@ ], "source": { "path": "src/core/server/plugins/types.ts", - "lineNumber": 152, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L152" - }, - "signature": [ - "readonly string[]" - ] - }, - { - "tags": [], - "id": "def-server.PluginManifest.ui", - "type": "boolean", - "label": "ui", - "description": [ - "\nSpecifies whether plugin includes some client/browser specific functionality\nthat should be included into client bundle via `public/ui_plugin.js` file." - ], - "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 158, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L158" - } - }, - { - "tags": [], - "id": "def-server.PluginManifest.server", - "type": "boolean", - "label": "server", - "description": [ - "\nSpecifies whether plugin includes some server-side specific functionality." - ], - "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 163, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L163" - } - }, - { - "tags": [ - "deprecated" - ], - "id": "def-server.PluginManifest.extraPublicDirs", - "type": "Array", - "label": "extraPublicDirs", - "description": [ - "\nSpecifies directory names that can be imported by other ui-plugins built\nusing the same instance of the @kbn/optimizer. A temporary measure we plan\nto replace with better mechanisms for sharing static code between plugins" - ], - "source": { - "path": "src/core/server/plugins/types.ts", - "lineNumber": 171, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L171" + "lineNumber": 207, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L207" }, "signature": [ - "string[] | undefined" + "readonly string[]" ] }, { - "tags": [], - "id": "def-server.PluginManifest.serviceFolders", + "tags": [ + "remarks" + ], + "id": "def-server.DiscoveredPlugin.requiredBundles", "type": "Object", - "label": "serviceFolders", + "label": "requiredBundles", "description": [ - "\nOnly used for the automatically generated API documentation. Specifying service\nfolders will cause your plugin API reference to be broken up into sub sections." + "\nList of plugin ids that this plugin's UI code imports modules from that are\nnot in `requiredPlugins`.\n" ], "source": { "path": "src/core/server/plugins/types.ts", - "lineNumber": 177, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L177" + "lineNumber": 219, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L219" }, "signature": [ - "readonly string[] | undefined" + "readonly string[]" ] } ], "source": { "path": "src/core/server/plugins/types.ts", - "lineNumber": 102, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L102" + "lineNumber": 185, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L185" }, "initialIsOpen": false }, { - "id": "def-server.IUiSettingsClient", + "id": "def-server.Plugin", "type": "Interface", - "label": "IUiSettingsClient", + "label": "Plugin", + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.Plugin", + "text": "Plugin" + }, + "" + ], "description": [ - "\nServer-side client that provides access to the advanced settings stored in elasticsearch.\nThe settings provide control over the behavior of the Kibana application.\nFor example, a user can specify how to display numeric or date fields.\nUsers can adjust the settings via Management UI.\n" + "\nThe interface that should be returned by a `PluginInitializer`.\n" ], "tags": [ "public" ], "children": [ { - "tags": [], - "id": "def-server.IUiSettingsClient.getRegistered", + "id": "def-server.Plugin.setup", "type": "Function", - "label": "getRegistered", - "description": [ - "\nReturns registered uiSettings values {@link UiSettingsParams}" + "label": "setup", + "signature": [ + "(core: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.CoreSetup", + "text": "CoreSetup" + }, + ", plugins: TPluginsSetup) => TSetup" + ], + "description": [], + "children": [ + { + "type": "Object", + "label": "core", + "isRequired": true, + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.CoreSetup", + "text": "CoreSetup" + }, + "" + ], + "description": [], + "source": { + "path": "src/core/server/plugins/types.ts", + "lineNumber": 252, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L252" + } + }, + { + "type": "Uncategorized", + "label": "plugins", + "isRequired": true, + "signature": [ + "TPluginsSetup" + ], + "description": [], + "source": { + "path": "src/core/server/plugins/types.ts", + "lineNumber": 252, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L252" + } + } ], + "tags": [], + "returnComment": [], "source": { - "path": "src/core/server/ui_settings/types.ts", - "lineNumber": 35, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L35" - }, + "path": "src/core/server/plugins/types.ts", + "lineNumber": 252, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L252" + } + }, + { + "id": "def-server.Plugin.start", + "type": "Function", + "label": "start", "signature": [ - "() => Readonly, \"type\" | \"options\" | \"description\" | \"name\" | \"order\" | \"value\" | \"category\" | \"metric\" | \"optionLabels\" | \"requiresPageReload\" | \"readonly\" | \"sensitive\" | \"deprecation\" | \"validation\">>>" - ] + ", plugins: TPluginsStart) => TStart" + ], + "description": [], + "children": [ + { + "type": "Object", + "label": "core", + "isRequired": true, + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.CoreStart", + "text": "CoreStart" + } + ], + "description": [], + "source": { + "path": "src/core/server/plugins/types.ts", + "lineNumber": 253, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L253" + } + }, + { + "type": "Uncategorized", + "label": "plugins", + "isRequired": true, + "signature": [ + "TPluginsStart" + ], + "description": [], + "source": { + "path": "src/core/server/plugins/types.ts", + "lineNumber": 253, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L253" + } + } + ], + "tags": [], + "returnComment": [], + "source": { + "path": "src/core/server/plugins/types.ts", + "lineNumber": 253, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L253" + } }, { + "id": "def-server.Plugin.stop", + "type": "Function", + "label": "stop", + "signature": [ + "(() => void) | undefined" + ], + "description": [], + "children": [], "tags": [], - "id": "def-server.IUiSettingsClient.get", + "returnComment": [], + "source": { + "path": "src/core/server/plugins/types.ts", + "lineNumber": 254, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L254" + } + } + ], + "source": { + "path": "src/core/server/plugins/types.ts", + "lineNumber": 246, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L246" + }, + "initialIsOpen": false + }, + { + "id": "def-server.AsyncPlugin", + "type": "Interface", + "label": "AsyncPlugin", + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.AsyncPlugin", + "text": "AsyncPlugin" + }, + "" + ], + "description": [ + "\nA plugin with asynchronous lifecycle methods.\n" + ], + "tags": [ + "deprecated", + "public" + ], + "children": [ + { + "id": "def-server.AsyncPlugin.setup", "type": "Function", - "label": "get", - "description": [ - "\nRetrieves uiSettings values set by the user with fallbacks to default values if not specified." + "label": "setup", + "signature": [ + "(core: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.CoreSetup", + "text": "CoreSetup" + }, + ", plugins: TPluginsSetup) => TSetup | Promise" + ], + "description": [], + "children": [ + { + "type": "Object", + "label": "core", + "isRequired": true, + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.CoreSetup", + "text": "CoreSetup" + }, + "" + ], + "description": [], + "source": { + "path": "src/core/server/plugins/types.ts", + "lineNumber": 269, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L269" + } + }, + { + "type": "Uncategorized", + "label": "plugins", + "isRequired": true, + "signature": [ + "TPluginsSetup" + ], + "description": [], + "source": { + "path": "src/core/server/plugins/types.ts", + "lineNumber": 269, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L269" + } + } ], - "source": { - "path": "src/core/server/ui_settings/types.ts", - "lineNumber": 39, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L39" - }, - "signature": [ - "(key: string) => Promise" - ] - }, - { "tags": [], - "id": "def-server.IUiSettingsClient.getAll", - "type": "Function", - "label": "getAll", - "description": [ - "\nRetrieves a set of all uiSettings values set by the user with fallbacks to default values if not specified." - ], + "returnComment": [], "source": { - "path": "src/core/server/ui_settings/types.ts", - "lineNumber": 43, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L43" - }, - "signature": [ - "() => Promise>" - ] + "path": "src/core/server/plugins/types.ts", + "lineNumber": 269, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L269" + } }, { - "tags": [], - "id": "def-server.IUiSettingsClient.getUserProvided", + "id": "def-server.AsyncPlugin.start", "type": "Function", - "label": "getUserProvided", - "description": [ - "\nRetrieves a set of all uiSettings values set by the user." - ], - "source": { - "path": "src/core/server/ui_settings/types.ts", - "lineNumber": 47, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L47" - }, + "label": "start", "signature": [ - "() => Promise>>" - ] - }, - { - "tags": [], - "id": "def-server.IUiSettingsClient.setMany", - "type": "Function", - "label": "setMany", - "description": [ - "\nWrites multiple uiSettings values and marks them as set by the user." + ", plugins: TPluginsStart) => TStart | Promise" ], - "source": { - "path": "src/core/server/ui_settings/types.ts", - "lineNumber": 51, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L51" - }, - "signature": [ - "(changes: Record) => Promise" - ] - }, - { - "tags": [], - "id": "def-server.IUiSettingsClient.set", - "type": "Function", - "label": "set", - "description": [ - "\nWrites uiSettings value and marks it as set by the user." + "description": [], + "children": [ + { + "type": "Object", + "label": "core", + "isRequired": true, + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.CoreStart", + "text": "CoreStart" + } + ], + "description": [], + "source": { + "path": "src/core/server/plugins/types.ts", + "lineNumber": 270, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L270" + } + }, + { + "type": "Uncategorized", + "label": "plugins", + "isRequired": true, + "signature": [ + "TPluginsStart" + ], + "description": [], + "source": { + "path": "src/core/server/plugins/types.ts", + "lineNumber": 270, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L270" + } + } ], - "source": { - "path": "src/core/server/ui_settings/types.ts", - "lineNumber": 55, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L55" - }, - "signature": [ - "(key: string, value: any) => Promise" - ] - }, - { "tags": [], - "id": "def-server.IUiSettingsClient.remove", - "type": "Function", - "label": "remove", - "description": [ - "\nRemoves uiSettings value by key." - ], + "returnComment": [], "source": { - "path": "src/core/server/ui_settings/types.ts", - "lineNumber": 59, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L59" - }, - "signature": [ - "(key: string) => Promise" - ] + "path": "src/core/server/plugins/types.ts", + "lineNumber": 270, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L270" + } }, { - "tags": [], - "id": "def-server.IUiSettingsClient.removeMany", + "id": "def-server.AsyncPlugin.stop", "type": "Function", - "label": "removeMany", - "description": [ - "\nRemoves multiple uiSettings values by keys." - ], - "source": { - "path": "src/core/server/ui_settings/types.ts", - "lineNumber": 63, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L63" - }, + "label": "stop", "signature": [ - "(keys: string[]) => Promise" - ] - }, - { - "tags": [], - "id": "def-server.IUiSettingsClient.isOverridden", - "type": "Function", - "label": "isOverridden", - "description": [ - "\nShows whether the uiSettings value set by the user." + "(() => void) | undefined" ], - "source": { - "path": "src/core/server/ui_settings/types.ts", - "lineNumber": 67, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L67" - }, - "signature": [ - "(key: string) => boolean" - ] - }, - { + "description": [], + "children": [], "tags": [], - "id": "def-server.IUiSettingsClient.isSensitive", - "type": "Function", - "label": "isSensitive", - "description": [ - "\nShows whether the uiSetting is a sensitive value. Used by telemetry to not send sensitive values." - ], + "returnComment": [], "source": { - "path": "src/core/server/ui_settings/types.ts", - "lineNumber": 71, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L71" - }, - "signature": [ - "(key: string) => boolean" - ] + "path": "src/core/server/plugins/types.ts", + "lineNumber": 271, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L271" + } } ], "source": { - "path": "src/core/server/ui_settings/types.ts", - "lineNumber": 31, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L31" + "path": "src/core/server/plugins/types.ts", + "lineNumber": 263, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L263" }, "initialIsOpen": false }, { - "id": "def-server.UiSettingsParams", + "id": "def-server.PluginConfigDescriptor", "type": "Interface", - "label": "UiSettingsParams", + "label": "PluginConfigDescriptor", "signature": [ - "UiSettingsParams", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.PluginConfigDescriptor", + "text": "PluginConfigDescriptor" + }, "" ], "description": [ - "\nUiSettings parameters defined by the plugins." + "\nDescribes a plugin configuration properties.\n" ], "tags": [ + "example", + "kbn", "public" ], "children": [ { "tags": [], - "id": "def-server.UiSettingsParams.name", - "type": "string", - "label": "name", - "description": [ - "title in the UI" - ], - "source": { - "path": "src/core/types/ui_settings.ts", - "lineNumber": 45, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L45" - }, - "signature": [ - "string | undefined" - ] - }, - { - "tags": [], - "id": "def-server.UiSettingsParams.value", - "type": "Uncategorized", - "label": "value", + "id": "def-server.PluginConfigDescriptor.deprecations", + "type": "Function", + "label": "deprecations", "description": [ - "default value to fall back to if a user doesn't provide any" + "\nProvider for the {@link ConfigDeprecation} to apply to the plugin configuration." ], "source": { - "path": "src/core/types/ui_settings.ts", - "lineNumber": 47, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L47" + "path": "src/core/server/plugins/types.ts", + "lineNumber": 62, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L62" }, "signature": [ - "T | undefined" + "ConfigDeprecationProvider", + " | undefined" ] }, { "tags": [], - "id": "def-server.UiSettingsParams.description", - "type": "string", - "label": "description", + "id": "def-server.PluginConfigDescriptor.exposeToBrowser", + "type": "Object", + "label": "exposeToBrowser", "description": [ - "description provided to a user in UI" + "\nList of configuration properties that will be available on the client-side plugin." ], "source": { - "path": "src/core/types/ui_settings.ts", - "lineNumber": 49, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L49" + "path": "src/core/server/plugins/types.ts", + "lineNumber": 66, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L66" }, "signature": [ - "string | undefined" + "{ [P in keyof T]?: boolean | undefined; } | undefined" ] }, { "tags": [], - "id": "def-server.UiSettingsParams.category", - "type": "Array", - "label": "category", + "id": "def-server.PluginConfigDescriptor.schema", + "type": "Object", + "label": "schema", "description": [ - "used to group the configured setting in the UI" + "\nSchema to use to validate the plugin configuration.\n\n{@link PluginConfigSchema}" ], "source": { - "path": "src/core/types/ui_settings.ts", - "lineNumber": 51, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L51" + "path": "src/core/server/plugins/types.ts", + "lineNumber": 72, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L72" }, "signature": [ - "string[] | undefined" + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.PluginConfigSchema", + "text": "PluginConfigSchema" + }, + "" ] + } + ], + "source": { + "path": "src/core/server/plugins/types.ts", + "lineNumber": 58, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L58" + }, + "initialIsOpen": false + }, + { + "id": "def-server.PluginInitializerContext", + "type": "Interface", + "label": "PluginInitializerContext", + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.PluginInitializerContext", + "text": "PluginInitializerContext" }, + "" + ], + "description": [ + "\nContext that's available to plugins during initialization stage.\n" + ], + "tags": [ + "public" + ], + "children": [ { "tags": [], - "id": "def-server.UiSettingsParams.options", - "type": "Array", - "label": "options", - "description": [ - "array of permitted values for this setting" - ], + "id": "def-server.PluginInitializerContext.opaqueId", + "type": "Uncategorized", + "label": "opaqueId", + "description": [], "source": { - "path": "src/core/types/ui_settings.ts", - "lineNumber": 53, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L53" + "path": "src/core/server/plugins/types.ts", + "lineNumber": 298, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L298" }, "signature": [ - "string[] | undefined" + "symbol" ] }, { "tags": [], - "id": "def-server.UiSettingsParams.optionLabels", + "id": "def-server.PluginInitializerContext.env", "type": "Object", - "label": "optionLabels", - "description": [ - "text labels for 'select' type UI element" - ], + "label": "env", + "description": [], "source": { - "path": "src/core/types/ui_settings.ts", - "lineNumber": 55, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L55" + "path": "src/core/server/plugins/types.ts", + "lineNumber": 299, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L299" }, "signature": [ - "Record | undefined" + "{ mode: ", + "EnvironmentMode", + "; packageInfo: Readonly<", + "PackageInfo", + ">; instanceUuid: string; }" ] }, { - "tags": [], - "id": "def-server.UiSettingsParams.requiresPageReload", - "type": "CompoundType", - "label": "requiresPageReload", + "tags": [ + "example" + ], + "id": "def-server.PluginInitializerContext.logger", + "type": "Object", + "label": "logger", "description": [ - "a flag indicating whether new value applying requires page reloading" + "\n{@link LoggerFactory | logger factory} instance already bound to the plugin's logging context\n" ], "source": { - "path": "src/core/types/ui_settings.ts", - "lineNumber": 57, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L57" + "path": "src/core/server/plugins/types.ts", + "lineNumber": 322, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L322" }, "signature": [ - "boolean | undefined" + "LoggerFactory" ] }, { "tags": [], - "id": "def-server.UiSettingsParams.readonly", - "type": "CompoundType", - "label": "readonly", + "id": "def-server.PluginInitializerContext.config", + "type": "Object", + "label": "config", "description": [ - "a flag indicating that value cannot be changed" + "\nAccessors for the plugin's configuration" ], "source": { - "path": "src/core/types/ui_settings.ts", - "lineNumber": 59, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L59" + "path": "src/core/server/plugins/types.ts", + "lineNumber": 326, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L326" }, "signature": [ - "boolean | undefined" + "{ legacy: { globalConfig$: ", + "Observable", + " moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly autocompleteTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; elasticsearch: Readonly<{ readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", + "ByteSizeValue", + ") => boolean; isLessThan: (other: ", + "ByteSizeValue", + ") => boolean; isEqualTo: (other: ", + "ByteSizeValue", + ") => boolean; getValueInBytes: () => number; toString: (returnUnit?: \"b\" | \"kb\" | \"mb\" | \"gb\" | undefined) => string; }>; }>; }>>; get: () => Readonly<{ kibana: Readonly<{ readonly index: string; readonly autocompleteTerminateAfter: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly autocompleteTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; elasticsearch: Readonly<{ readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", + "ByteSizeValue" ] - }, + } + ], + "source": { + "path": "src/core/server/plugins/types.ts", + "lineNumber": 297, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L297" + }, + "initialIsOpen": false + }, + { + "id": "def-server.PluginManifest", + "type": "Interface", + "label": "PluginManifest", + "description": [ + "\nDescribes the set of required and optional properties plugin can define in its\nmandatory JSON manifest file.\n" + ], + "tags": [ + "remarks", + "public" + ], + "children": [ { "tags": [], - "id": "def-server.UiSettingsParams.sensitive", - "type": "CompoundType", - "label": "sensitive", + "id": "def-server.PluginManifest.id", + "type": "string", + "label": "id", "description": [ - "\na flag indicating that value might contain user sensitive data.\nused by telemetry to mask the value of the setting when sent." + "\nIdentifier of the plugin. Must be a string in camelCase. Part of a plugin public contract.\nOther plugins leverage it to access plugin API, navigate to the plugin, etc." ], "source": { - "path": "src/core/types/ui_settings.ts", - "lineNumber": 64, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L64" - }, - "signature": [ - "boolean | undefined" - ] + "path": "src/core/server/plugins/types.ts", + "lineNumber": 107, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L107" + } }, { "tags": [], - "id": "def-server.UiSettingsParams.type", - "type": "CompoundType", - "label": "type", + "id": "def-server.PluginManifest.version", + "type": "string", + "label": "version", "description": [ - "defines a type of UI element {@link UiSettingsType}" + "\nVersion of the plugin." ], "source": { - "path": "src/core/types/ui_settings.ts", - "lineNumber": 66, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L66" - }, - "signature": [ - "\"string\" | \"number\" | \"boolean\" | \"undefined\" | \"color\" | \"json\" | \"image\" | \"select\" | \"array\" | \"markdown\" | undefined" - ] + "path": "src/core/server/plugins/types.ts", + "lineNumber": 112, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L112" + } }, { "tags": [], - "id": "def-server.UiSettingsParams.deprecation", - "type": "Object", - "label": "deprecation", + "id": "def-server.PluginManifest.kibanaVersion", + "type": "string", + "label": "kibanaVersion", "description": [ - "optional deprecation information. Used to generate a deprecation warning." + "\nThe version of Kibana the plugin is compatible with, defaults to \"version\"." ], "source": { - "path": "src/core/types/ui_settings.ts", - "lineNumber": 68, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L68" - }, - "signature": [ - { - "pluginId": "core", - "scope": "common", - "docId": "kibCorePluginApi", - "section": "def-common.DeprecationSettings", - "text": "DeprecationSettings" - }, - " | undefined" - ] + "path": "src/core/server/plugins/types.ts", + "lineNumber": 117, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L117" + } }, { "tags": [ - "remark" + "example" ], - "id": "def-server.UiSettingsParams.order", - "type": "number", - "label": "order", + "id": "def-server.PluginManifest.configPath", + "type": "CompoundType", + "label": "configPath", "description": [ - "\nindex of the settings within its category (ascending order, smallest will be displayed first).\nUsed for ordering in the UI.\n" - ], - "source": { - "path": "src/core/types/ui_settings.ts", - "lineNumber": 75, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L75" + "\nRoot {@link ConfigPath | configuration path} used by the plugin, defaults\nto \"id\" in snake_case format.\n" + ], + "source": { + "path": "src/core/server/plugins/types.ts", + "lineNumber": 127, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L127" }, "signature": [ - "number | undefined" + "string | string[]" ] }, { "tags": [], - "id": "def-server.UiSettingsParams.validation", - "type": "CompoundType", - "label": "validation", - "description": [], + "id": "def-server.PluginManifest.requiredPlugins", + "type": "Object", + "label": "requiredPlugins", + "description": [ + "\nAn optional list of the other plugins that **must be** installed and enabled\nfor this plugin to function properly." + ], "source": { - "path": "src/core/types/ui_settings.ts", - "lineNumber": 81, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L81" + "path": "src/core/server/plugins/types.ts", + "lineNumber": 133, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L133" }, "signature": [ - { - "pluginId": "core", - "scope": "common", - "docId": "kibCorePluginApi", - "section": "def-common.ImageValidation", - "text": "ImageValidation" - }, - " | ", - { - "pluginId": "core", - "scope": "common", - "docId": "kibCorePluginApi", - "section": "def-common.StringValidationRegex", - "text": "StringValidationRegex" - }, - " | ", - { - "pluginId": "core", - "scope": "common", - "docId": "kibCorePluginApi", - "section": "def-common.StringValidationRegexString", - "text": "StringValidationRegexString" - }, - " | undefined" + "readonly string[]" ] }, { - "tags": [], - "id": "def-server.UiSettingsParams.schema", + "tags": [ + "remarks" + ], + "id": "def-server.PluginManifest.requiredBundles", "type": "Object", - "label": "schema", - "description": [], + "label": "requiredBundles", + "description": [ + "\nList of plugin ids that this plugin's UI code imports modules from that are\nnot in `requiredPlugins`.\n" + ], "source": { - "path": "src/core/types/ui_settings.ts", - "lineNumber": 86, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L86" + "path": "src/core/server/plugins/types.ts", + "lineNumber": 145, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L145" }, "signature": [ - "Type", - "" + "readonly string[]" ] }, { - "tags": [ - "deprecated" - ], - "id": "def-server.UiSettingsParams.metric", + "tags": [], + "id": "def-server.PluginManifest.optionalPlugins", "type": "Object", - "label": "metric", + "label": "optionalPlugins", "description": [ - "\nMetric to track once this property changes" + "\nAn optional list of the other plugins that if installed and enabled **may be**\nleveraged by this plugin for some additional functionality but otherwise are\nnot required for this plugin to work properly." ], "source": { - "path": "src/core/types/ui_settings.ts", - "lineNumber": 92, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L92" + "path": "src/core/server/plugins/types.ts", + "lineNumber": 152, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L152" }, "signature": [ - "{ type: ", - "UiCounterMetricType", - "; name: string; } | undefined" + "readonly string[]" ] - } - ], - "source": { - "path": "src/core/types/ui_settings.ts", - "lineNumber": 43, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L43" - }, - "initialIsOpen": false - }, - { - "id": "def-server.UiSettingsServiceSetup", - "type": "Interface", - "label": "UiSettingsServiceSetup", - "description": [], - "tags": [ - "public" - ], - "children": [ + }, { - "id": "def-server.UiSettingsServiceSetup.register", - "type": "Function", - "label": "register", - "signature": [ - "(settings: Record>) => void" - ], + "tags": [], + "id": "def-server.PluginManifest.ui", + "type": "boolean", + "label": "ui", "description": [ - "\nSets settings with default values for the uiSettings." - ], - "children": [ - { - "type": "Object", - "label": "settings", - "isRequired": true, - "signature": [ - "Record>" - ], - "description": [], - "source": { - "path": "src/core/server/ui_settings/types.ts", - "lineNumber": 102, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L102" - } - } + "\nSpecifies whether plugin includes some client/browser specific functionality\nthat should be included into client bundle via `public/ui_plugin.js` file." ], - "tags": [ - "example" + "source": { + "path": "src/core/server/plugins/types.ts", + "lineNumber": 158, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L158" + } + }, + { + "tags": [], + "id": "def-server.PluginManifest.server", + "type": "boolean", + "label": "server", + "description": [ + "\nSpecifies whether plugin includes some server-side specific functionality." ], - "returnComment": [], "source": { - "path": "src/core/server/ui_settings/types.ts", - "lineNumber": 102, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L102" + "path": "src/core/server/plugins/types.ts", + "lineNumber": 163, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L163" } - } - ], - "source": { - "path": "src/core/server/ui_settings/types.ts", - "lineNumber": 84, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L84" - }, - "initialIsOpen": false - }, - { - "id": "def-server.UiSettingsServiceStart", - "type": "Interface", - "label": "UiSettingsServiceStart", - "description": [], - "tags": [ - "public" - ], - "children": [ + }, { - "id": "def-server.UiSettingsServiceStart.asScopedToClient", - "type": "Function", - "label": "asScopedToClient", - "signature": [ - "(savedObjectsClient: Pick<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsClient", - "text": "SavedObjectsClient" - }, - ", \"get\" | \"delete\" | \"create\" | \"find\" | \"update\" | \"bulkCreate\" | \"bulkGet\" | \"bulkUpdate\" | \"errors\" | \"checkConflicts\" | \"resolve\" | \"addToNamespaces\" | \"deleteFromNamespaces\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\">) => ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.IUiSettingsClient", - "text": "IUiSettingsClient" - } + "tags": [ + "deprecated" ], + "id": "def-server.PluginManifest.extraPublicDirs", + "type": "Array", + "label": "extraPublicDirs", "description": [ - "\nCreates a {@link IUiSettingsClient} with provided *scoped* saved objects client.\n\nThis should only be used in the specific case where the client needs to be accessed\nfrom outside of the scope of a {@link RequestHandler}.\n" - ], - "children": [ - { - "type": "Object", - "label": "savedObjectsClient", - "isRequired": true, - "signature": [ - "Pick<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsClient", - "text": "SavedObjectsClient" - }, - ", \"get\" | \"delete\" | \"create\" | \"find\" | \"update\" | \"bulkCreate\" | \"bulkGet\" | \"bulkUpdate\" | \"errors\" | \"checkConflicts\" | \"resolve\" | \"addToNamespaces\" | \"deleteFromNamespaces\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\">" - ], - "description": [], - "source": { - "path": "src/core/server/ui_settings/types.ts", - "lineNumber": 121, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L121" - } - } + "\nSpecifies directory names that can be imported by other ui-plugins built\nusing the same instance of the @kbn/optimizer. A temporary measure we plan\nto replace with better mechanisms for sharing static code between plugins" ], - "tags": [ - "example" + "source": { + "path": "src/core/server/plugins/types.ts", + "lineNumber": 171, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L171" + }, + "signature": [ + "string[] | undefined" + ] + }, + { + "tags": [], + "id": "def-server.PluginManifest.serviceFolders", + "type": "Object", + "label": "serviceFolders", + "description": [ + "\nOnly used for the automatically generated API documentation. Specifying service\nfolders will cause your plugin API reference to be broken up into sub sections." ], - "returnComment": [], "source": { - "path": "src/core/server/ui_settings/types.ts", - "lineNumber": 121, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L121" - } + "path": "src/core/server/plugins/types.ts", + "lineNumber": 177, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L177" + }, + "signature": [ + "readonly string[] | undefined" + ] } ], "source": { - "path": "src/core/server/ui_settings/types.ts", - "lineNumber": 106, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L106" + "path": "src/core/server/plugins/types.ts", + "lineNumber": 102, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/plugins/types.ts#L102" }, "initialIsOpen": false }, { - "id": "def-server.UserProvidedValues", + "id": "def-server.IUiSettingsClient", "type": "Interface", - "label": "UserProvidedValues", - "signature": [ - "UserProvidedValues", - "" - ], + "label": "IUiSettingsClient", "description": [ - "\nDescribes the values explicitly set by user." + "\nServer-side client that provides access to the advanced settings stored in elasticsearch.\nThe settings provide control over the behavior of the Kibana application.\nFor example, a user can specify how to display numeric or date fields.\nUsers can adjust the settings via Management UI.\n" ], "tags": [ "public" @@ -13795,127 +13540,208 @@ "children": [ { "tags": [], - "id": "def-server.UserProvidedValues.userValue", - "type": "Uncategorized", - "label": "userValue", - "description": [], + "id": "def-server.IUiSettingsClient.getRegistered", + "type": "Function", + "label": "getRegistered", + "description": [ + "\nReturns registered uiSettings values {@link UiSettingsParams}" + ], "source": { - "path": "src/core/types/ui_settings.ts", - "lineNumber": 143, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L143" + "path": "src/core/server/ui_settings/types.ts", + "lineNumber": 35, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L35" }, "signature": [ - "T | undefined" + "() => Readonly, \"type\" | \"options\" | \"description\" | \"name\" | \"order\" | \"value\" | \"category\" | \"metric\" | \"optionLabels\" | \"requiresPageReload\" | \"readonly\" | \"sensitive\" | \"deprecation\" | \"validation\">>>" ] }, { "tags": [], - "id": "def-server.UserProvidedValues.isOverridden", - "type": "CompoundType", - "label": "isOverridden", - "description": [], + "id": "def-server.IUiSettingsClient.get", + "type": "Function", + "label": "get", + "description": [ + "\nRetrieves uiSettings values set by the user with fallbacks to default values if not specified." + ], "source": { - "path": "src/core/types/ui_settings.ts", - "lineNumber": 144, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L144" + "path": "src/core/server/ui_settings/types.ts", + "lineNumber": 39, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L39" }, "signature": [ - "boolean | undefined" + "(key: string) => Promise" ] - } - ], - "source": { - "path": "src/core/types/ui_settings.ts", - "lineNumber": 142, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L142" - }, - "initialIsOpen": false - }, - { - "id": "def-server.ImageValidation", - "type": "Interface", - "label": "ImageValidation", - "description": [], - "tags": [ - "public" - ], - "children": [ + }, { "tags": [], - "id": "def-server.ImageValidation.maxSize", - "type": "Object", - "label": "maxSize", - "description": [], + "id": "def-server.IUiSettingsClient.getAll", + "type": "Function", + "label": "getAll", + "description": [ + "\nRetrieves a set of all uiSettings values set by the user with fallbacks to default values if not specified." + ], "source": { - "path": "src/core/types/ui_settings.ts", - "lineNumber": 132, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L132" + "path": "src/core/server/ui_settings/types.ts", + "lineNumber": 43, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L43" }, "signature": [ - "{ length: number; description: string; }" + "() => Promise>" ] - } - ], - "source": { - "path": "src/core/types/ui_settings.ts", - "lineNumber": 131, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L131" - }, - "initialIsOpen": false - }, - { - "id": "def-server.DeprecationSettings", - "type": "Interface", - "label": "DeprecationSettings", - "description": [ - "\nUiSettings deprecation field options." - ], - "tags": [ - "public" - ], - "children": [ + }, { "tags": [], - "id": "def-server.DeprecationSettings.message", - "type": "string", - "label": "message", + "id": "def-server.IUiSettingsClient.getUserProvided", + "type": "Function", + "label": "getUserProvided", "description": [ - "Deprecation message" + "\nRetrieves a set of all uiSettings values set by the user." ], "source": { - "path": "src/core/types/ui_settings.ts", - "lineNumber": 34, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L34" - } + "path": "src/core/server/ui_settings/types.ts", + "lineNumber": 47, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L47" + }, + "signature": [ + "() => Promise>>" + ] }, { "tags": [], - "id": "def-server.DeprecationSettings.docLinksKey", - "type": "string", - "label": "docLinksKey", + "id": "def-server.IUiSettingsClient.setMany", + "type": "Function", + "label": "setMany", "description": [ - "Key to documentation links" + "\nWrites multiple uiSettings values and marks them as set by the user." + ], + "source": { + "path": "src/core/server/ui_settings/types.ts", + "lineNumber": 51, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L51" + }, + "signature": [ + "(changes: Record) => Promise" + ] + }, + { + "tags": [], + "id": "def-server.IUiSettingsClient.set", + "type": "Function", + "label": "set", + "description": [ + "\nWrites uiSettings value and marks it as set by the user." + ], + "source": { + "path": "src/core/server/ui_settings/types.ts", + "lineNumber": 55, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L55" + }, + "signature": [ + "(key: string, value: any) => Promise" + ] + }, + { + "tags": [], + "id": "def-server.IUiSettingsClient.remove", + "type": "Function", + "label": "remove", + "description": [ + "\nRemoves uiSettings value by key." + ], + "source": { + "path": "src/core/server/ui_settings/types.ts", + "lineNumber": 59, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L59" + }, + "signature": [ + "(key: string) => Promise" + ] + }, + { + "tags": [], + "id": "def-server.IUiSettingsClient.removeMany", + "type": "Function", + "label": "removeMany", + "description": [ + "\nRemoves multiple uiSettings values by keys." + ], + "source": { + "path": "src/core/server/ui_settings/types.ts", + "lineNumber": 63, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L63" + }, + "signature": [ + "(keys: string[]) => Promise" + ] + }, + { + "tags": [], + "id": "def-server.IUiSettingsClient.isOverridden", + "type": "Function", + "label": "isOverridden", + "description": [ + "\nShows whether the uiSettings value set by the user." + ], + "source": { + "path": "src/core/server/ui_settings/types.ts", + "lineNumber": 67, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L67" + }, + "signature": [ + "(key: string) => boolean" + ] + }, + { + "tags": [], + "id": "def-server.IUiSettingsClient.isSensitive", + "type": "Function", + "label": "isSensitive", + "description": [ + "\nShows whether the uiSetting is a sensitive value. Used by telemetry to not send sensitive values." ], "source": { - "path": "src/core/types/ui_settings.ts", - "lineNumber": 36, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L36" - } + "path": "src/core/server/ui_settings/types.ts", + "lineNumber": 71, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L71" + }, + "signature": [ + "(key: string) => boolean" + ] } ], "source": { - "path": "src/core/types/ui_settings.ts", - "lineNumber": 32, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L32" + "path": "src/core/server/ui_settings/types.ts", + "lineNumber": 31, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L31" }, "initialIsOpen": false }, { - "id": "def-server.StringValidationRegex", + "id": "def-server.UiSettingsParams", "type": "Interface", - "label": "StringValidationRegex", + "label": "UiSettingsParams", + "signature": [ + "UiSettingsParams", + "" + ], "description": [ - "\nStringValidation with regex object" + "\nUiSettings parameters defined by the plugins." ], "tags": [ "public" @@ -13923,384 +13749,455 @@ "children": [ { "tags": [], - "id": "def-server.StringValidationRegex.regex", - "type": "Object", - "label": "regex", - "description": [], + "id": "def-server.UiSettingsParams.name", + "type": "string", + "label": "name", + "description": [ + "title in the UI" + ], "source": { "path": "src/core/types/ui_settings.ts", - "lineNumber": 115, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L115" + "lineNumber": 45, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L45" }, "signature": [ - "RegExp" + "string | undefined" ] }, { "tags": [], - "id": "def-server.StringValidationRegex.message", - "type": "string", - "label": "message", - "description": [], + "id": "def-server.UiSettingsParams.value", + "type": "Uncategorized", + "label": "value", + "description": [ + "default value to fall back to if a user doesn't provide any" + ], "source": { "path": "src/core/types/ui_settings.ts", - "lineNumber": 116, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L116" - } - } - ], - "source": { - "path": "src/core/types/ui_settings.ts", - "lineNumber": 114, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L114" - }, - "initialIsOpen": false - }, - { - "id": "def-server.StringValidationRegexString", - "type": "Interface", - "label": "StringValidationRegexString", - "description": [ - "\nStringValidation as regex string" - ], - "tags": [ - "public" - ], - "children": [ + "lineNumber": 47, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L47" + }, + "signature": [ + "T | undefined" + ] + }, { "tags": [], - "id": "def-server.StringValidationRegexString.regexString", + "id": "def-server.UiSettingsParams.description", "type": "string", - "label": "regexString", - "description": [], + "label": "description", + "description": [ + "description provided to a user in UI" + ], "source": { "path": "src/core/types/ui_settings.ts", - "lineNumber": 124, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L124" - } + "lineNumber": 49, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L49" + }, + "signature": [ + "string | undefined" + ] }, { "tags": [], - "id": "def-server.StringValidationRegexString.message", - "type": "string", - "label": "message", - "description": [], + "id": "def-server.UiSettingsParams.category", + "type": "Array", + "label": "category", + "description": [ + "used to group the configured setting in the UI" + ], "source": { "path": "src/core/types/ui_settings.ts", - "lineNumber": 125, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L125" - } - } - ], - "source": { - "path": "src/core/types/ui_settings.ts", - "lineNumber": 123, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L123" - }, - "initialIsOpen": false - }, - { - "id": "def-server.OpsMetrics", - "type": "Interface", - "label": "OpsMetrics", - "description": [ - "\nRegroups metrics gathered by all the collectors.\nThis contains metrics about the os/runtime, the kibana process and the http server.\n" - ], - "tags": [ - "public" - ], - "children": [ + "lineNumber": 51, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L51" + }, + "signature": [ + "string[] | undefined" + ] + }, { "tags": [], - "id": "def-server.OpsMetrics.collected_at", - "type": "Object", - "label": "collected_at", + "id": "def-server.UiSettingsParams.options", + "type": "Array", + "label": "options", "description": [ - "Time metrics were recorded at." + "array of permitted values for this setting" ], "source": { - "path": "src/core/server/metrics/types.ts", + "path": "src/core/types/ui_settings.ts", "lineNumber": 53, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/types.ts#L53" + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L53" }, "signature": [ - "Date" + "string[] | undefined" ] }, { "tags": [], - "id": "def-server.OpsMetrics.process", + "id": "def-server.UiSettingsParams.optionLabels", "type": "Object", - "label": "process", + "label": "optionLabels", "description": [ - "Process related metrics" + "text labels for 'select' type UI element" ], "source": { - "path": "src/core/server/metrics/types.ts", + "path": "src/core/types/ui_settings.ts", "lineNumber": 55, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/types.ts#L55" + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L55" }, "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.OpsProcessMetrics", - "text": "OpsProcessMetrics" - } + "Record | undefined" ] }, { "tags": [], - "id": "def-server.OpsMetrics.os", - "type": "Object", - "label": "os", + "id": "def-server.UiSettingsParams.requiresPageReload", + "type": "CompoundType", + "label": "requiresPageReload", "description": [ - "OS related metrics" + "a flag indicating whether new value applying requires page reloading" ], "source": { - "path": "src/core/server/metrics/types.ts", + "path": "src/core/types/ui_settings.ts", "lineNumber": 57, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/types.ts#L57" + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L57" }, "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.OpsOsMetrics", - "text": "OpsOsMetrics" - } + "boolean | undefined" ] }, { "tags": [], - "id": "def-server.OpsMetrics.response_times", - "type": "Object", - "label": "response_times", + "id": "def-server.UiSettingsParams.readonly", + "type": "CompoundType", + "label": "readonly", "description": [ - "server response time stats" + "a flag indicating that value cannot be changed" ], "source": { - "path": "src/core/server/metrics/types.ts", + "path": "src/core/types/ui_settings.ts", "lineNumber": 59, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/types.ts#L59" + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L59" }, "signature": [ - "{ avg_in_millis: number; max_in_millis: number; }" + "boolean | undefined" ] }, { "tags": [], - "id": "def-server.OpsMetrics.requests", - "type": "Object", - "label": "requests", + "id": "def-server.UiSettingsParams.sensitive", + "type": "CompoundType", + "label": "sensitive", "description": [ - "server requests stats" + "\na flag indicating that value might contain user sensitive data.\nused by telemetry to mask the value of the setting when sent." ], "source": { - "path": "src/core/server/metrics/types.ts", - "lineNumber": 61, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/types.ts#L61" + "path": "src/core/types/ui_settings.ts", + "lineNumber": 64, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L64" }, "signature": [ - "{ disconnects: number; total: number; statusCodes: Record; }" + "boolean | undefined" ] - }, - { - "tags": [], - "id": "def-server.OpsMetrics.concurrent_connections", - "type": "number", - "label": "concurrent_connections", - "description": [ - "number of current concurrent connections to the server" - ], - "source": { - "path": "src/core/server/metrics/types.ts", - "lineNumber": 63, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/types.ts#L63" - } - } - ], - "source": { - "path": "src/core/server/metrics/types.ts", - "lineNumber": 51, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/types.ts#L51" - }, - "initialIsOpen": false - }, - { - "id": "def-server.OpsOsMetrics", - "type": "Interface", - "label": "OpsOsMetrics", - "description": [ - "\nOS related metrics" - ], - "tags": [ - "public" - ], - "children": [ + }, { "tags": [], - "id": "def-server.OpsOsMetrics.platform", + "id": "def-server.UiSettingsParams.type", "type": "CompoundType", - "label": "platform", + "label": "type", "description": [ - "The os platform" + "defines a type of UI element {@link UiSettingsType}" ], "source": { - "path": "src/core/server/metrics/collectors/types.ts", - "lineNumber": 50, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L50" + "path": "src/core/types/ui_settings.ts", + "lineNumber": 66, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L66" }, "signature": [ - "NodeJS.Platform" + "\"string\" | \"number\" | \"boolean\" | \"undefined\" | \"color\" | \"json\" | \"image\" | \"select\" | \"array\" | \"markdown\" | undefined" ] }, { "tags": [], - "id": "def-server.OpsOsMetrics.platformRelease", - "type": "string", - "label": "platformRelease", + "id": "def-server.UiSettingsParams.deprecation", + "type": "Object", + "label": "deprecation", "description": [ - "The os platform release, prefixed by the platform name" + "optional deprecation information. Used to generate a deprecation warning." ], "source": { - "path": "src/core/server/metrics/collectors/types.ts", - "lineNumber": 52, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L52" - } + "path": "src/core/types/ui_settings.ts", + "lineNumber": 68, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L68" + }, + "signature": [ + { + "pluginId": "core", + "scope": "common", + "docId": "kibCorePluginApi", + "section": "def-common.DeprecationSettings", + "text": "DeprecationSettings" + }, + " | undefined" + ] }, { - "tags": [], - "id": "def-server.OpsOsMetrics.distro", - "type": "string", - "label": "distro", + "tags": [ + "remark" + ], + "id": "def-server.UiSettingsParams.order", + "type": "number", + "label": "order", "description": [ - "The os distrib. Only present for linux platforms" + "\nindex of the settings within its category (ascending order, smallest will be displayed first).\nUsed for ordering in the UI.\n" ], "source": { - "path": "src/core/server/metrics/collectors/types.ts", - "lineNumber": 54, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L54" + "path": "src/core/types/ui_settings.ts", + "lineNumber": 75, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L75" }, "signature": [ - "string | undefined" + "number | undefined" ] }, { "tags": [], - "id": "def-server.OpsOsMetrics.distroRelease", - "type": "string", - "label": "distroRelease", - "description": [ - "The os distrib release, prefixed by the os distrib. Only present for linux platforms" - ], + "id": "def-server.UiSettingsParams.validation", + "type": "CompoundType", + "label": "validation", + "description": [], "source": { - "path": "src/core/server/metrics/collectors/types.ts", - "lineNumber": 56, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L56" + "path": "src/core/types/ui_settings.ts", + "lineNumber": 81, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L81" }, "signature": [ - "string | undefined" + { + "pluginId": "core", + "scope": "common", + "docId": "kibCorePluginApi", + "section": "def-common.ImageValidation", + "text": "ImageValidation" + }, + " | ", + { + "pluginId": "core", + "scope": "common", + "docId": "kibCorePluginApi", + "section": "def-common.StringValidationRegex", + "text": "StringValidationRegex" + }, + " | ", + { + "pluginId": "core", + "scope": "common", + "docId": "kibCorePluginApi", + "section": "def-common.StringValidationRegexString", + "text": "StringValidationRegexString" + }, + " | undefined" ] }, { "tags": [], - "id": "def-server.OpsOsMetrics.load", + "id": "def-server.UiSettingsParams.schema", "type": "Object", - "label": "load", - "description": [ - "cpu load metrics" - ], + "label": "schema", + "description": [], "source": { - "path": "src/core/server/metrics/collectors/types.ts", - "lineNumber": 58, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L58" + "path": "src/core/types/ui_settings.ts", + "lineNumber": 86, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L86" }, "signature": [ - "{ '1m': number; '5m': number; '15m': number; }" + "Type", + "" ] }, { - "tags": [], - "id": "def-server.OpsOsMetrics.memory", + "tags": [ + "deprecated" + ], + "id": "def-server.UiSettingsParams.metric", "type": "Object", - "label": "memory", + "label": "metric", "description": [ - "system memory usage metrics" + "\nMetric to track once this property changes" ], "source": { - "path": "src/core/server/metrics/collectors/types.ts", - "lineNumber": 67, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L67" + "path": "src/core/types/ui_settings.ts", + "lineNumber": 92, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L92" }, "signature": [ - "{ total_in_bytes: number; free_in_bytes: number; used_in_bytes: number; }" + "{ type: ", + "UiCounterMetricType", + "; name: string; } | undefined" ] - }, + } + ], + "source": { + "path": "src/core/types/ui_settings.ts", + "lineNumber": 43, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L43" + }, + "initialIsOpen": false + }, + { + "id": "def-server.UiSettingsServiceSetup", + "type": "Interface", + "label": "UiSettingsServiceSetup", + "description": [], + "tags": [ + "public" + ], + "children": [ { - "tags": [], - "id": "def-server.OpsOsMetrics.uptime_in_millis", - "type": "number", - "label": "uptime_in_millis", + "id": "def-server.UiSettingsServiceSetup.register", + "type": "Function", + "label": "register", + "signature": [ + "(settings: Record>) => void" + ], "description": [ - "the OS uptime" + "\nSets settings with default values for the uiSettings." + ], + "children": [ + { + "type": "Object", + "label": "settings", + "isRequired": true, + "signature": [ + "Record>" + ], + "description": [], + "source": { + "path": "src/core/server/ui_settings/types.ts", + "lineNumber": 102, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L102" + } + } + ], + "tags": [ + "example" ], + "returnComment": [], "source": { - "path": "src/core/server/metrics/collectors/types.ts", - "lineNumber": 76, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L76" + "path": "src/core/server/ui_settings/types.ts", + "lineNumber": 102, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L102" } - }, + } + ], + "source": { + "path": "src/core/server/ui_settings/types.ts", + "lineNumber": 84, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L84" + }, + "initialIsOpen": false + }, + { + "id": "def-server.UiSettingsServiceStart", + "type": "Interface", + "label": "UiSettingsServiceStart", + "description": [], + "tags": [ + "public" + ], + "children": [ { - "tags": [], - "id": "def-server.OpsOsMetrics.cpuacct", - "type": "Object", - "label": "cpuacct", - "description": [ - "cpu accounting metrics, undefined when not running in a cgroup" + "id": "def-server.UiSettingsServiceStart.asScopedToClient", + "type": "Function", + "label": "asScopedToClient", + "signature": [ + "(savedObjectsClient: Pick<", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsClient", + "text": "SavedObjectsClient" + }, + ", \"get\" | \"delete\" | \"create\" | \"find\" | \"update\" | \"bulkCreate\" | \"bulkGet\" | \"bulkUpdate\" | \"errors\" | \"checkConflicts\" | \"resolve\" | \"addToNamespaces\" | \"deleteFromNamespaces\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\">) => ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.IUiSettingsClient", + "text": "IUiSettingsClient" + } ], - "source": { - "path": "src/core/server/metrics/collectors/types.ts", - "lineNumber": 79, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L79" - }, - "signature": [ - "{ control_group: string; usage_nanos: number; } | undefined" - ] - }, - { - "tags": [], - "id": "def-server.OpsOsMetrics.cpu", - "type": "Object", - "label": "cpu", "description": [ - "cpu cgroup metrics, undefined when not running in a cgroup" + "\nCreates a {@link IUiSettingsClient} with provided *scoped* saved objects client.\n\nThis should only be used in the specific case where the client needs to be accessed\nfrom outside of the scope of a {@link RequestHandler}.\n" + ], + "children": [ + { + "type": "Object", + "label": "savedObjectsClient", + "isRequired": true, + "signature": [ + "Pick<", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsClient", + "text": "SavedObjectsClient" + }, + ", \"get\" | \"delete\" | \"create\" | \"find\" | \"update\" | \"bulkCreate\" | \"bulkGet\" | \"bulkUpdate\" | \"errors\" | \"checkConflicts\" | \"resolve\" | \"addToNamespaces\" | \"deleteFromNamespaces\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\">" + ], + "description": [], + "source": { + "path": "src/core/server/ui_settings/types.ts", + "lineNumber": 121, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L121" + } + } + ], + "tags": [ + "example" ], + "returnComment": [], "source": { - "path": "src/core/server/metrics/collectors/types.ts", - "lineNumber": 87, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L87" - }, - "signature": [ - "{ control_group: string; cfs_period_micros: number; cfs_quota_micros: number; stat: { number_of_elapsed_periods: number; number_of_times_throttled: number; time_throttled_nanos: number; }; } | undefined" - ] + "path": "src/core/server/ui_settings/types.ts", + "lineNumber": 121, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L121" + } } ], "source": { - "path": "src/core/server/metrics/collectors/types.ts", - "lineNumber": 48, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L48" + "path": "src/core/server/ui_settings/types.ts", + "lineNumber": 106, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/ui_settings/types.ts#L106" }, "initialIsOpen": false }, { - "id": "def-server.OpsServerMetrics", + "id": "def-server.UserProvidedValues", "type": "Interface", - "label": "OpsServerMetrics", + "label": "UserProvidedValues", + "signature": [ + "UserProvidedValues", + "" + ], "description": [ - "\nserver related metrics" + "\nDescribes the values explicitly set by user." ], "tags": [ "public" @@ -14308,144 +14205,127 @@ "children": [ { "tags": [], - "id": "def-server.OpsServerMetrics.response_times", - "type": "Object", - "label": "response_times", - "description": [ - "server response time stats" - ], + "id": "def-server.UserProvidedValues.userValue", + "type": "Uncategorized", + "label": "userValue", + "description": [], "source": { - "path": "src/core/server/metrics/collectors/types.ts", - "lineNumber": 112, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L112" + "path": "src/core/types/ui_settings.ts", + "lineNumber": 143, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L143" }, "signature": [ - "{ avg_in_millis: number; max_in_millis: number; }" + "T | undefined" ] }, { "tags": [], - "id": "def-server.OpsServerMetrics.requests", - "type": "Object", - "label": "requests", - "description": [ - "server requests stats" - ], + "id": "def-server.UserProvidedValues.isOverridden", + "type": "CompoundType", + "label": "isOverridden", + "description": [], "source": { - "path": "src/core/server/metrics/collectors/types.ts", - "lineNumber": 119, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L119" + "path": "src/core/types/ui_settings.ts", + "lineNumber": 144, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L144" }, "signature": [ - "{ disconnects: number; total: number; statusCodes: Record; }" + "boolean | undefined" ] - }, - { - "tags": [], - "id": "def-server.OpsServerMetrics.concurrent_connections", - "type": "number", - "label": "concurrent_connections", - "description": [ - "number of current concurrent connections to the server" - ], - "source": { - "path": "src/core/server/metrics/collectors/types.ts", - "lineNumber": 128, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L128" - } } ], "source": { - "path": "src/core/server/metrics/collectors/types.ts", - "lineNumber": 110, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L110" + "path": "src/core/types/ui_settings.ts", + "lineNumber": 142, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L142" }, "initialIsOpen": false }, { - "id": "def-server.OpsProcessMetrics", + "id": "def-server.ImageValidation", "type": "Interface", - "label": "OpsProcessMetrics", - "description": [ - "\nProcess related metrics" - ], + "label": "ImageValidation", + "description": [], "tags": [ "public" ], "children": [ { "tags": [], - "id": "def-server.OpsProcessMetrics.memory", + "id": "def-server.ImageValidation.maxSize", "type": "Object", - "label": "memory", - "description": [ - "process memory usage" - ], + "label": "maxSize", + "description": [], "source": { - "path": "src/core/server/metrics/collectors/types.ts", - "lineNumber": 23, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L23" + "path": "src/core/types/ui_settings.ts", + "lineNumber": 132, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L132" }, "signature": [ - "{ heap: { total_in_bytes: number; used_in_bytes: number; size_limit: number; }; resident_set_size_in_bytes: number; }" + "{ length: number; description: string; }" ] - }, - { - "tags": [], - "id": "def-server.OpsProcessMetrics.event_loop_delay", - "type": "number", - "label": "event_loop_delay", - "description": [ - "node event loop delay" - ], - "source": { - "path": "src/core/server/metrics/collectors/types.ts", - "lineNumber": 37, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L37" - } - }, + } + ], + "source": { + "path": "src/core/types/ui_settings.ts", + "lineNumber": 131, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L131" + }, + "initialIsOpen": false + }, + { + "id": "def-server.DeprecationSettings", + "type": "Interface", + "label": "DeprecationSettings", + "description": [ + "\nUiSettings deprecation field options." + ], + "tags": [ + "public" + ], + "children": [ { "tags": [], - "id": "def-server.OpsProcessMetrics.pid", - "type": "number", - "label": "pid", + "id": "def-server.DeprecationSettings.message", + "type": "string", + "label": "message", "description": [ - "pid of the kibana process" + "Deprecation message" ], "source": { - "path": "src/core/server/metrics/collectors/types.ts", - "lineNumber": 39, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L39" + "path": "src/core/types/ui_settings.ts", + "lineNumber": 34, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L34" } }, { "tags": [], - "id": "def-server.OpsProcessMetrics.uptime_in_millis", - "type": "number", - "label": "uptime_in_millis", + "id": "def-server.DeprecationSettings.docLinksKey", + "type": "string", + "label": "docLinksKey", "description": [ - "uptime of the kibana process" + "Key to documentation links" ], "source": { - "path": "src/core/server/metrics/collectors/types.ts", - "lineNumber": 41, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L41" + "path": "src/core/types/ui_settings.ts", + "lineNumber": 36, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L36" } } ], "source": { - "path": "src/core/server/metrics/collectors/types.ts", - "lineNumber": 21, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L21" + "path": "src/core/types/ui_settings.ts", + "lineNumber": 32, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L32" }, "initialIsOpen": false }, { - "id": "def-server.MetricsServiceSetup", + "id": "def-server.StringValidationRegex", "type": "Interface", - "label": "MetricsServiceSetup", + "label": "StringValidationRegex", "description": [ - "\nAPIs to retrieves metrics gathered and exposed by the core platform.\n" + "\nStringValidation with regex object" ], "tags": [ "public" @@ -14453,260 +14333,283 @@ "children": [ { "tags": [], - "id": "def-server.MetricsServiceSetup.collectionInterval", - "type": "number", - "label": "collectionInterval", - "description": [ - "Interval metrics are collected in milliseconds" - ], - "source": { - "path": "src/core/server/metrics/types.ts", - "lineNumber": 19, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/types.ts#L19" - } - }, - { - "tags": [ - "example" - ], - "id": "def-server.MetricsServiceSetup.getOpsMetrics$", - "type": "Function", - "label": "getOpsMetrics$", - "description": [ - "\nRetrieve an observable emitting the {@link OpsMetrics} gathered.\nThe observable will emit an initial value during core's `start` phase, and a new value every fixed interval of time,\nbased on the `opts.interval` configuration property.\n" - ], - "source": { - "path": "src/core/server/metrics/types.ts", - "lineNumber": 33, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/types.ts#L33" + "id": "def-server.StringValidationRegex.regex", + "type": "Object", + "label": "regex", + "description": [], + "source": { + "path": "src/core/types/ui_settings.ts", + "lineNumber": 115, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L115" }, "signature": [ - "() => ", - "Observable", - "<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.OpsMetrics", - "text": "OpsMetrics" - }, - ">" + "RegExp" ] + }, + { + "tags": [], + "id": "def-server.StringValidationRegex.message", + "type": "string", + "label": "message", + "description": [], + "source": { + "path": "src/core/types/ui_settings.ts", + "lineNumber": 116, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L116" + } } ], "source": { - "path": "src/core/server/metrics/types.ts", - "lineNumber": 17, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/types.ts#L17" + "path": "src/core/types/ui_settings.ts", + "lineNumber": 114, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L114" }, "initialIsOpen": false }, { - "id": "def-server.I18nServiceSetup", + "id": "def-server.StringValidationRegexString", "type": "Interface", - "label": "I18nServiceSetup", - "description": [], + "label": "StringValidationRegexString", + "description": [ + "\nStringValidation as regex string" + ], "tags": [ "public" ], "children": [ { - "id": "def-server.I18nServiceSetup.getLocale", - "type": "Function", - "label": "getLocale", - "signature": [ - "() => string" - ], - "description": [ - "\nReturn the locale currently in use." - ], - "children": [], "tags": [], - "returnComment": [], + "id": "def-server.StringValidationRegexString.regexString", + "type": "string", + "label": "regexString", + "description": [], "source": { - "path": "src/core/server/i18n/i18n_service.ts", - "lineNumber": 31, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/i18n/i18n_service.ts#L31" + "path": "src/core/types/ui_settings.ts", + "lineNumber": 124, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L124" } }, { - "id": "def-server.I18nServiceSetup.getTranslationFiles", - "type": "Function", - "label": "getTranslationFiles", - "signature": [ - "() => string[]" - ], - "description": [ - "\nReturn the absolute paths to translation files currently in use." - ], - "children": [], "tags": [], - "returnComment": [], + "id": "def-server.StringValidationRegexString.message", + "type": "string", + "label": "message", + "description": [], "source": { - "path": "src/core/server/i18n/i18n_service.ts", - "lineNumber": 36, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/i18n/i18n_service.ts#L36" + "path": "src/core/types/ui_settings.ts", + "lineNumber": 125, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L125" } } ], "source": { - "path": "src/core/server/i18n/i18n_service.ts", - "lineNumber": 27, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/i18n/i18n_service.ts#L27" + "path": "src/core/types/ui_settings.ts", + "lineNumber": 123, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/ui_settings.ts#L123" }, "initialIsOpen": false }, { - "id": "def-server.AppCategory", + "id": "def-server.OpsMetrics", "type": "Interface", - "label": "AppCategory", + "label": "OpsMetrics", "description": [ - "\n\nA category definition for nav links to know where to sort them in the left hand nav" + "\nRegroups metrics gathered by all the collectors.\nThis contains metrics about the os/runtime, the kibana process and the http server.\n" ], "tags": [ - "public", "public" ], "children": [ { "tags": [], - "id": "def-server.AppCategory.id", - "type": "string", - "label": "id", + "id": "def-server.OpsMetrics.collected_at", + "type": "Object", + "label": "collected_at", "description": [ - "\nUnique identifier for the categories" + "Time metrics were recorded at." ], "source": { - "path": "src/core/types/app_category.ts", - "lineNumber": 19, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/app_category.ts#L19" - } + "path": "src/core/server/metrics/types.ts", + "lineNumber": 53, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/types.ts#L53" + }, + "signature": [ + "Date" + ] }, { "tags": [], - "id": "def-server.AppCategory.label", - "type": "string", - "label": "label", + "id": "def-server.OpsMetrics.process", + "type": "Object", + "label": "process", "description": [ - "\nLabel used for category name.\nAlso used as aria-label if one isn't set." + "Process related metrics" ], "source": { - "path": "src/core/types/app_category.ts", - "lineNumber": 25, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/app_category.ts#L25" - } + "path": "src/core/server/metrics/types.ts", + "lineNumber": 55, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/types.ts#L55" + }, + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.OpsProcessMetrics", + "text": "OpsProcessMetrics" + } + ] }, { "tags": [], - "id": "def-server.AppCategory.ariaLabel", - "type": "string", - "label": "ariaLabel", + "id": "def-server.OpsMetrics.os", + "type": "Object", + "label": "os", "description": [ - "\nIf the visual label isn't appropriate for screen readers,\ncan override it here" + "OS related metrics" ], "source": { - "path": "src/core/types/app_category.ts", - "lineNumber": 31, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/app_category.ts#L31" + "path": "src/core/server/metrics/types.ts", + "lineNumber": 57, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/types.ts#L57" }, "signature": [ - "string | undefined" + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.OpsOsMetrics", + "text": "OpsOsMetrics" + } ] }, { "tags": [], - "id": "def-server.AppCategory.order", - "type": "number", - "label": "order", + "id": "def-server.OpsMetrics.response_times", + "type": "Object", + "label": "response_times", "description": [ - "\nThe order that categories will be sorted in\nPrefer large steps between categories to allow for further editing\n(Default categories are in steps of 1000)" + "server response time stats" ], "source": { - "path": "src/core/types/app_category.ts", - "lineNumber": 38, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/app_category.ts#L38" + "path": "src/core/server/metrics/types.ts", + "lineNumber": 59, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/types.ts#L59" }, "signature": [ - "number | undefined" + "{ avg_in_millis: number; max_in_millis: number; }" ] }, { "tags": [], - "id": "def-server.AppCategory.euiIconType", - "type": "string", - "label": "euiIconType", + "id": "def-server.OpsMetrics.requests", + "type": "Object", + "label": "requests", "description": [ - "\nDefine an icon to be used for the category\nIf the category is only 1 item, and no icon is defined, will default to the product icon\nDefaults to initials if no icon is defined" + "server requests stats" ], "source": { - "path": "src/core/types/app_category.ts", - "lineNumber": 45, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/app_category.ts#L45" + "path": "src/core/server/metrics/types.ts", + "lineNumber": 61, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/types.ts#L61" }, "signature": [ - "string | undefined" + "{ disconnects: number; total: number; statusCodes: Record; }" ] + }, + { + "tags": [], + "id": "def-server.OpsMetrics.concurrent_connections", + "type": "number", + "label": "concurrent_connections", + "description": [ + "number of current concurrent connections to the server" + ], + "source": { + "path": "src/core/server/metrics/types.ts", + "lineNumber": 63, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/types.ts#L63" + } } ], "source": { - "path": "src/core/types/app_category.ts", - "lineNumber": 15, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/app_category.ts#L15" + "path": "src/core/server/metrics/types.ts", + "lineNumber": 51, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/types.ts#L51" }, "initialIsOpen": false }, { - "id": "def-server.SavedObject", + "id": "def-server.OpsOsMetrics", "type": "Interface", - "label": "SavedObject", - "signature": [ - "SavedObject", - "" + "label": "OpsOsMetrics", + "description": [ + "\nOS related metrics" + ], + "tags": [ + "public" ], - "description": [], - "tags": [], "children": [ { "tags": [], - "id": "def-server.SavedObject.id", + "id": "def-server.OpsOsMetrics.platform", + "type": "CompoundType", + "label": "platform", + "description": [ + "The os platform" + ], + "source": { + "path": "src/core/server/metrics/collectors/types.ts", + "lineNumber": 50, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L50" + }, + "signature": [ + "NodeJS.Platform" + ] + }, + { + "tags": [], + "id": "def-server.OpsOsMetrics.platformRelease", "type": "string", - "label": "id", + "label": "platformRelease", "description": [ - "The ID of this Saved Object, guaranteed to be unique for all objects of the same `type`" + "The os platform release, prefixed by the platform name" ], "source": { - "path": "src/core/types/saved_objects.ts", - "lineNumber": 71, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L71" + "path": "src/core/server/metrics/collectors/types.ts", + "lineNumber": 52, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L52" } }, { "tags": [], - "id": "def-server.SavedObject.type", + "id": "def-server.OpsOsMetrics.distro", "type": "string", - "label": "type", + "label": "distro", "description": [ - " The type of Saved Object. Each plugin can define it's own custom Saved Object types." + "The os distrib. Only present for linux platforms" ], "source": { - "path": "src/core/types/saved_objects.ts", - "lineNumber": 73, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L73" - } + "path": "src/core/server/metrics/collectors/types.ts", + "lineNumber": 54, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L54" + }, + "signature": [ + "string | undefined" + ] }, { "tags": [], - "id": "def-server.SavedObject.version", + "id": "def-server.OpsOsMetrics.distroRelease", "type": "string", - "label": "version", + "label": "distroRelease", "description": [ - "An opaque version number which changes on each successful write operation. Can be used for implementing optimistic concurrency control." + "The os distrib release, prefixed by the os distrib. Only present for linux platforms" ], "source": { - "path": "src/core/types/saved_objects.ts", - "lineNumber": 75, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L75" + "path": "src/core/server/metrics/collectors/types.ts", + "lineNumber": 56, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L56" }, "signature": [ "string | undefined" @@ -14714,543 +14617,627 @@ }, { "tags": [], - "id": "def-server.SavedObject.updated_at", - "type": "string", - "label": "updated_at", + "id": "def-server.OpsOsMetrics.load", + "type": "Object", + "label": "load", "description": [ - "Timestamp of the last time this document had been updated." + "cpu load metrics" ], "source": { - "path": "src/core/types/saved_objects.ts", - "lineNumber": 77, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L77" + "path": "src/core/server/metrics/collectors/types.ts", + "lineNumber": 58, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L58" }, "signature": [ - "string | undefined" + "{ '1m': number; '5m': number; '15m': number; }" ] }, { "tags": [], - "id": "def-server.SavedObject.error", + "id": "def-server.OpsOsMetrics.memory", "type": "Object", - "label": "error", - "description": [], + "label": "memory", + "description": [ + "system memory usage metrics" + ], "source": { - "path": "src/core/types/saved_objects.ts", - "lineNumber": 78, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L78" + "path": "src/core/server/metrics/collectors/types.ts", + "lineNumber": 67, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L67" }, "signature": [ - { - "pluginId": "core", - "scope": "common", - "docId": "kibCorePluginApi", - "section": "def-common.SavedObjectError", - "text": "SavedObjectError" - }, - " | undefined" + "{ total_in_bytes: number; free_in_bytes: number; used_in_bytes: number; }" ] }, { "tags": [], - "id": "def-server.SavedObject.attributes", - "type": "Uncategorized", - "label": "attributes", + "id": "def-server.OpsOsMetrics.uptime_in_millis", + "type": "number", + "label": "uptime_in_millis", "description": [ - "{@inheritdoc SavedObjectAttributes}" + "the OS uptime" ], "source": { - "path": "src/core/types/saved_objects.ts", - "lineNumber": 80, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L80" + "path": "src/core/server/metrics/collectors/types.ts", + "lineNumber": 76, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L76" + } + }, + { + "tags": [], + "id": "def-server.OpsOsMetrics.cpuacct", + "type": "Object", + "label": "cpuacct", + "description": [ + "cpu accounting metrics, undefined when not running in a cgroup" + ], + "source": { + "path": "src/core/server/metrics/collectors/types.ts", + "lineNumber": 79, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L79" }, "signature": [ - "T" + "{ control_group: string; usage_nanos: number; } | undefined" ] }, { "tags": [], - "id": "def-server.SavedObject.references", - "type": "Array", - "label": "references", + "id": "def-server.OpsOsMetrics.cpu", + "type": "Object", + "label": "cpu", "description": [ - "{@inheritdoc SavedObjectReference}" + "cpu cgroup metrics, undefined when not running in a cgroup" ], "source": { - "path": "src/core/types/saved_objects.ts", - "lineNumber": 82, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L82" + "path": "src/core/server/metrics/collectors/types.ts", + "lineNumber": 87, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L87" }, "signature": [ - { - "pluginId": "core", - "scope": "common", - "docId": "kibCorePluginApi", - "section": "def-common.SavedObjectReference", - "text": "SavedObjectReference" - }, - "[]" + "{ control_group: string; cfs_period_micros: number; cfs_quota_micros: number; stat: { number_of_elapsed_periods: number; number_of_times_throttled: number; time_throttled_nanos: number; }; } | undefined" ] - }, + } + ], + "source": { + "path": "src/core/server/metrics/collectors/types.ts", + "lineNumber": 48, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L48" + }, + "initialIsOpen": false + }, + { + "id": "def-server.OpsServerMetrics", + "type": "Interface", + "label": "OpsServerMetrics", + "description": [ + "\nserver related metrics" + ], + "tags": [ + "public" + ], + "children": [ { "tags": [], - "id": "def-server.SavedObject.migrationVersion", + "id": "def-server.OpsServerMetrics.response_times", "type": "Object", - "label": "migrationVersion", + "label": "response_times", "description": [ - "{@inheritdoc SavedObjectsMigrationVersion}" + "server response time stats" ], "source": { - "path": "src/core/types/saved_objects.ts", - "lineNumber": 84, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L84" + "path": "src/core/server/metrics/collectors/types.ts", + "lineNumber": 112, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L112" }, "signature": [ - { - "pluginId": "core", - "scope": "common", - "docId": "kibCorePluginApi", - "section": "def-common.SavedObjectsMigrationVersion", - "text": "SavedObjectsMigrationVersion" - }, - " | undefined" + "{ avg_in_millis: number; max_in_millis: number; }" ] }, { "tags": [], - "id": "def-server.SavedObject.coreMigrationVersion", - "type": "string", - "label": "coreMigrationVersion", + "id": "def-server.OpsServerMetrics.requests", + "type": "Object", + "label": "requests", "description": [ - "A semver value that is used when upgrading objects between Kibana versions." + "server requests stats" ], "source": { - "path": "src/core/types/saved_objects.ts", - "lineNumber": 86, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L86" + "path": "src/core/server/metrics/collectors/types.ts", + "lineNumber": 119, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L119" }, "signature": [ - "string | undefined" + "{ disconnects: number; total: number; statusCodes: Record; }" ] }, { "tags": [], - "id": "def-server.SavedObject.namespaces", - "type": "Array", - "label": "namespaces", + "id": "def-server.OpsServerMetrics.concurrent_connections", + "type": "number", + "label": "concurrent_connections", "description": [ - "Namespace(s) that this saved object exists in. This attribute is only used for multi-namespace saved object types." + "number of current concurrent connections to the server" ], "source": { - "path": "src/core/types/saved_objects.ts", - "lineNumber": 88, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L88" + "path": "src/core/server/metrics/collectors/types.ts", + "lineNumber": 128, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L128" + } + } + ], + "source": { + "path": "src/core/server/metrics/collectors/types.ts", + "lineNumber": 110, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L110" + }, + "initialIsOpen": false + }, + { + "id": "def-server.OpsProcessMetrics", + "type": "Interface", + "label": "OpsProcessMetrics", + "description": [ + "\nProcess related metrics" + ], + "tags": [ + "public" + ], + "children": [ + { + "tags": [], + "id": "def-server.OpsProcessMetrics.memory", + "type": "Object", + "label": "memory", + "description": [ + "process memory usage" + ], + "source": { + "path": "src/core/server/metrics/collectors/types.ts", + "lineNumber": 23, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L23" }, "signature": [ - "string[] | undefined" + "{ heap: { total_in_bytes: number; used_in_bytes: number; size_limit: number; }; resident_set_size_in_bytes: number; }" ] }, { "tags": [], - "id": "def-server.SavedObject.originId", - "type": "string", - "label": "originId", + "id": "def-server.OpsProcessMetrics.event_loop_delay", + "type": "number", + "label": "event_loop_delay", + "description": [ + "node event loop delay" + ], + "source": { + "path": "src/core/server/metrics/collectors/types.ts", + "lineNumber": 37, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L37" + } + }, + { + "tags": [], + "id": "def-server.OpsProcessMetrics.pid", + "type": "number", + "label": "pid", + "description": [ + "pid of the kibana process" + ], + "source": { + "path": "src/core/server/metrics/collectors/types.ts", + "lineNumber": 39, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L39" + } + }, + { + "tags": [], + "id": "def-server.OpsProcessMetrics.uptime_in_millis", + "type": "number", + "label": "uptime_in_millis", "description": [ - "\nThe ID of the saved object this originated from. This is set if this object's `id` was regenerated; that can happen during migration\nfrom a legacy single-namespace type, or during import. It is only set during migration or create operations. This is used during import\nto ensure that ID regeneration is deterministic, so saved objects will be overwritten if they are imported multiple times into a given\nspace." + "uptime of the kibana process" ], "source": { - "path": "src/core/types/saved_objects.ts", - "lineNumber": 95, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L95" - }, - "signature": [ - "string | undefined" - ] + "path": "src/core/server/metrics/collectors/types.ts", + "lineNumber": 41, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L41" + } } ], "source": { - "path": "src/core/types/saved_objects.ts", - "lineNumber": 69, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L69" + "path": "src/core/server/metrics/collectors/types.ts", + "lineNumber": 21, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/collectors/types.ts#L21" }, "initialIsOpen": false }, { - "id": "def-server.SavedObjectAttributes", + "id": "def-server.MetricsServiceSetup", "type": "Interface", - "label": "SavedObjectAttributes", + "label": "MetricsServiceSetup", "description": [ - "\nThe data for a Saved Object is stored as an object in the `attributes`\nproperty.\n" + "\nAPIs to retrieves metrics gathered and exposed by the core platform.\n" ], "tags": [ "public" ], "children": [ { - "id": "def-server.SavedObjectAttributes.Unnamed", - "type": "Any", - "label": "Unnamed", "tags": [], - "description": [], + "id": "def-server.MetricsServiceSetup.collectionInterval", + "type": "number", + "label": "collectionInterval", + "description": [ + "Interval metrics are collected in milliseconds" + ], "source": { - "path": "src/core/types/saved_objects.ts", - "lineNumber": 36, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L36" + "path": "src/core/server/metrics/types.ts", + "lineNumber": 19, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/types.ts#L19" + } + }, + { + "tags": [ + "example" + ], + "id": "def-server.MetricsServiceSetup.getOpsMetrics$", + "type": "Function", + "label": "getOpsMetrics$", + "description": [ + "\nRetrieve an observable emitting the {@link OpsMetrics} gathered.\nThe observable will emit an initial value during core's `start` phase, and a new value every fixed interval of time,\nbased on the `opts.interval` configuration property.\n" + ], + "source": { + "path": "src/core/server/metrics/types.ts", + "lineNumber": 33, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/types.ts#L33" }, "signature": [ - "any" + "() => ", + "Observable", + "<", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.OpsMetrics", + "text": "OpsMetrics" + }, + ">" ] } ], "source": { - "path": "src/core/types/saved_objects.ts", - "lineNumber": 35, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L35" + "path": "src/core/server/metrics/types.ts", + "lineNumber": 17, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/metrics/types.ts#L17" }, "initialIsOpen": false }, { - "id": "def-server.SavedObjectReference", + "id": "def-server.I18nServiceSetup", "type": "Interface", - "label": "SavedObjectReference", - "description": [ - "\nA reference to another saved object.\n" - ], + "label": "I18nServiceSetup", + "description": [], "tags": [ "public" ], "children": [ { + "id": "def-server.I18nServiceSetup.getLocale", + "type": "Function", + "label": "getLocale", + "signature": [ + "() => string" + ], + "description": [ + "\nReturn the locale currently in use." + ], + "children": [], "tags": [], - "id": "def-server.SavedObjectReference.name", - "type": "string", - "label": "name", - "description": [], - "source": { - "path": "src/core/types/saved_objects.ts", - "lineNumber": 45, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L45" - } - }, - { - "tags": [], - "id": "def-server.SavedObjectReference.type", - "type": "string", - "label": "type", - "description": [], + "returnComment": [], "source": { - "path": "src/core/types/saved_objects.ts", - "lineNumber": 46, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L46" + "path": "src/core/server/i18n/i18n_service.ts", + "lineNumber": 31, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/i18n/i18n_service.ts#L31" } }, { + "id": "def-server.I18nServiceSetup.getTranslationFiles", + "type": "Function", + "label": "getTranslationFiles", + "signature": [ + "() => string[]" + ], + "description": [ + "\nReturn the absolute paths to translation files currently in use." + ], + "children": [], "tags": [], - "id": "def-server.SavedObjectReference.id", - "type": "string", - "label": "id", - "description": [], + "returnComment": [], "source": { - "path": "src/core/types/saved_objects.ts", - "lineNumber": 47, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L47" + "path": "src/core/server/i18n/i18n_service.ts", + "lineNumber": 36, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/i18n/i18n_service.ts#L36" } } ], "source": { - "path": "src/core/types/saved_objects.ts", - "lineNumber": 44, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L44" + "path": "src/core/server/i18n/i18n_service.ts", + "lineNumber": 27, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/i18n/i18n_service.ts#L27" }, "initialIsOpen": false }, { - "id": "def-server.SavedObjectsMigrationVersion", + "id": "def-server.AppCategory", "type": "Interface", - "label": "SavedObjectsMigrationVersion", + "label": "AppCategory", "description": [ - "\nInformation about the migrations that have been applied to this SavedObject.\nWhen Kibana starts up, KibanaMigrator detects outdated documents and\nmigrates them based on this value. For each migration that has been applied,\nthe plugin's name is used as a key and the latest migration version as the\nvalue.\n" + "\n\nA category definition for nav links to know where to sort them in the left hand nav" ], "tags": [ - "example", + "public", "public" ], "children": [ { - "id": "def-server.SavedObjectsMigrationVersion.Unnamed", - "type": "Any", - "label": "Unnamed", "tags": [], - "description": [], + "id": "def-server.AppCategory.id", + "type": "string", + "label": "id", + "description": [ + "\nUnique identifier for the categories" + ], "source": { - "path": "src/core/types/saved_objects.ts", - "lineNumber": 66, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L66" - }, - "signature": [ - "any" - ] - } - ], - "source": { - "path": "src/core/types/saved_objects.ts", - "lineNumber": 65, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L65" - }, - "initialIsOpen": false - }, - { - "id": "def-server.LegacyServiceSetupDeps", - "type": "Interface", - "label": "LegacyServiceSetupDeps", - "description": [], - "tags": [ - "public", - "deprecated" - ], - "children": [ + "path": "src/core/types/app_category.ts", + "lineNumber": 19, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/app_category.ts#L19" + } + }, { "tags": [], - "id": "def-server.LegacyServiceSetupDeps.core", - "type": "CompoundType", - "label": "core", - "description": [], + "id": "def-server.AppCategory.label", + "type": "string", + "label": "label", + "description": [ + "\nLabel used for category name.\nAlso used as aria-label if one isn't set." + ], "source": { - "path": "src/core/server/legacy/types.ts", - "lineNumber": 43, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/legacy/types.ts#L43" + "path": "src/core/types/app_category.ts", + "lineNumber": 25, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/app_category.ts#L25" + } + }, + { + "tags": [], + "id": "def-server.AppCategory.ariaLabel", + "type": "string", + "label": "ariaLabel", + "description": [ + "\nIf the visual label isn't appropriate for screen readers,\ncan override it here" + ], + "source": { + "path": "src/core/types/app_category.ts", + "lineNumber": 31, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/app_category.ts#L31" }, "signature": [ - "LegacyCoreSetup" + "string | undefined" ] }, { "tags": [], - "id": "def-server.LegacyServiceSetupDeps.plugins", - "type": "Object", - "label": "plugins", - "description": [], + "id": "def-server.AppCategory.order", + "type": "number", + "label": "order", + "description": [ + "\nThe order that categories will be sorted in\nPrefer large steps between categories to allow for further editing\n(Default categories are in steps of 1000)" + ], "source": { - "path": "src/core/server/legacy/types.ts", - "lineNumber": 44, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/legacy/types.ts#L44" + "path": "src/core/types/app_category.ts", + "lineNumber": 38, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/app_category.ts#L38" }, "signature": [ - "Record" + "number | undefined" ] }, { "tags": [], - "id": "def-server.LegacyServiceSetupDeps.uiPlugins", - "type": "Object", - "label": "uiPlugins", - "description": [], + "id": "def-server.AppCategory.euiIconType", + "type": "string", + "label": "euiIconType", + "description": [ + "\nDefine an icon to be used for the category\nIf the category is only 1 item, and no icon is defined, will default to the product icon\nDefaults to initials if no icon is defined" + ], "source": { - "path": "src/core/server/legacy/types.ts", + "path": "src/core/types/app_category.ts", "lineNumber": 45, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/legacy/types.ts#L45" + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/app_category.ts#L45" }, "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.UiPlugins", - "text": "UiPlugins" - } + "string | undefined" ] } ], "source": { - "path": "src/core/server/legacy/types.ts", - "lineNumber": 42, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/legacy/types.ts#L42" + "path": "src/core/types/app_category.ts", + "lineNumber": 15, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/app_category.ts#L15" }, "initialIsOpen": false }, { - "id": "def-server.LegacyServiceStartDeps", + "id": "def-server.SavedObject", "type": "Interface", - "label": "LegacyServiceStartDeps", - "description": [], - "tags": [ - "public", - "deprecated" + "label": "SavedObject", + "signature": [ + "SavedObject", + "" ], + "description": [], + "tags": [], "children": [ { "tags": [], - "id": "def-server.LegacyServiceStartDeps.core", - "type": "CompoundType", - "label": "core", - "description": [], + "id": "def-server.SavedObject.id", + "type": "string", + "label": "id", + "description": [ + "The ID of this Saved Object, guaranteed to be unique for all objects of the same `type`" + ], "source": { - "path": "src/core/server/legacy/types.ts", - "lineNumber": 53, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/legacy/types.ts#L53" + "path": "src/core/types/saved_objects.ts", + "lineNumber": 71, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L71" + } + }, + { + "tags": [], + "id": "def-server.SavedObject.type", + "type": "string", + "label": "type", + "description": [ + " The type of Saved Object. Each plugin can define it's own custom Saved Object types." + ], + "source": { + "path": "src/core/types/saved_objects.ts", + "lineNumber": 73, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L73" + } + }, + { + "tags": [], + "id": "def-server.SavedObject.version", + "type": "string", + "label": "version", + "description": [ + "An opaque version number which changes on each successful write operation. Can be used for implementing optimistic concurrency control." + ], + "source": { + "path": "src/core/types/saved_objects.ts", + "lineNumber": 75, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L75" }, "signature": [ - "LegacyCoreStart" + "string | undefined" ] }, { "tags": [], - "id": "def-server.LegacyServiceStartDeps.plugins", - "type": "Object", - "label": "plugins", - "description": [], + "id": "def-server.SavedObject.updated_at", + "type": "string", + "label": "updated_at", + "description": [ + "Timestamp of the last time this document had been updated." + ], "source": { - "path": "src/core/server/legacy/types.ts", - "lineNumber": 54, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/legacy/types.ts#L54" + "path": "src/core/types/saved_objects.ts", + "lineNumber": 77, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L77" }, "signature": [ - "Record" + "string | undefined" ] - } - ], - "source": { - "path": "src/core/server/legacy/types.ts", - "lineNumber": 52, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/legacy/types.ts#L52" - }, - "initialIsOpen": false - }, - { - "id": "def-server.CoreStatus", - "type": "Interface", - "label": "CoreStatus", - "description": [ - "\nStatus of core services.\n" - ], - "tags": [ - "internalRemarks", - "public" - ], - "children": [ + }, { "tags": [], - "id": "def-server.CoreStatus.elasticsearch", + "id": "def-server.SavedObject.error", "type": "Object", - "label": "elasticsearch", + "label": "error", "description": [], "source": { - "path": "src/core/server/status/types.ts", - "lineNumber": 115, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L115" + "path": "src/core/types/saved_objects.ts", + "lineNumber": 78, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L78" }, "signature": [ { "pluginId": "core", - "scope": "server", + "scope": "common", "docId": "kibCorePluginApi", - "section": "def-server.ServiceStatus", - "text": "ServiceStatus" + "section": "def-common.SavedObjectError", + "text": "SavedObjectError" }, - "" + " | undefined" ] }, { "tags": [], - "id": "def-server.CoreStatus.savedObjects", - "type": "Object", - "label": "savedObjects", - "description": [], + "id": "def-server.SavedObject.attributes", + "type": "Uncategorized", + "label": "attributes", + "description": [ + "{@inheritdoc SavedObjectAttributes}" + ], "source": { - "path": "src/core/server/status/types.ts", - "lineNumber": 116, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L116" + "path": "src/core/types/saved_objects.ts", + "lineNumber": 80, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L80" }, "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.ServiceStatus", - "text": "ServiceStatus" - }, - "" + "T" ] - } - ], - "source": { - "path": "src/core/server/status/types.ts", - "lineNumber": 114, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L114" - }, - "initialIsOpen": false - }, - { - "id": "def-server.ServiceStatus", - "type": "Interface", - "label": "ServiceStatus", - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.ServiceStatus", - "text": "ServiceStatus" }, - "" - ], - "description": [ - "\nThe current status of a service at a point in time.\n" - ], - "tags": [ - "typeParam", - "public" - ], - "children": [ { "tags": [], - "id": "def-server.ServiceStatus.level", - "type": "CompoundType", - "label": "level", + "id": "def-server.SavedObject.references", + "type": "Array", + "label": "references", "description": [ - "\nThe current availability level of the service." + "{@inheritdoc SavedObjectReference}" ], "source": { - "path": "src/core/server/status/types.ts", - "lineNumber": 24, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L24" + "path": "src/core/types/saved_objects.ts", + "lineNumber": 82, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L82" }, "signature": [ { "pluginId": "core", - "scope": "server", + "scope": "common", "docId": "kibCorePluginApi", - "section": "def-server.ServiceStatusLevel", - "text": "ServiceStatusLevel" - } + "section": "def-common.SavedObjectReference", + "text": "SavedObjectReference" + }, + "[]" ] }, { "tags": [], - "id": "def-server.ServiceStatus.summary", - "type": "string", - "label": "summary", + "id": "def-server.SavedObject.migrationVersion", + "type": "Object", + "label": "migrationVersion", "description": [ - "\nA high-level summary of the service status." + "{@inheritdoc SavedObjectsMigrationVersion}" ], "source": { - "path": "src/core/server/status/types.ts", - "lineNumber": 28, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L28" - } + "path": "src/core/types/saved_objects.ts", + "lineNumber": 84, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L84" + }, + "signature": [ + { + "pluginId": "core", + "scope": "common", + "docId": "kibCorePluginApi", + "section": "def-common.SavedObjectsMigrationVersion", + "text": "SavedObjectsMigrationVersion" + }, + " | undefined" + ] }, { "tags": [], - "id": "def-server.ServiceStatus.detail", + "id": "def-server.SavedObject.coreMigrationVersion", "type": "string", - "label": "detail", + "label": "coreMigrationVersion", "description": [ - "\nA more detailed description of the service status." + "A semver value that is used when upgrading objects between Kibana versions." ], "source": { - "path": "src/core/server/status/types.ts", - "lineNumber": 32, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L32" + "path": "src/core/types/saved_objects.ts", + "lineNumber": 86, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L86" }, "signature": [ "string | undefined" @@ -15258,621 +15245,677 @@ }, { "tags": [], - "id": "def-server.ServiceStatus.documentationUrl", - "type": "string", - "label": "documentationUrl", + "id": "def-server.SavedObject.namespaces", + "type": "Array", + "label": "namespaces", "description": [ - "\nA URL to open in a new tab about how to resolve or troubleshoot the problem." + "Namespace(s) that this saved object exists in. This attribute is only used for multi-namespace saved object types." ], "source": { - "path": "src/core/server/status/types.ts", - "lineNumber": 36, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L36" + "path": "src/core/types/saved_objects.ts", + "lineNumber": 88, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L88" }, "signature": [ - "string | undefined" + "string[] | undefined" ] }, { "tags": [], - "id": "def-server.ServiceStatus.meta", - "type": "Uncategorized", - "label": "meta", + "id": "def-server.SavedObject.originId", + "type": "string", + "label": "originId", "description": [ - "\nAny JSON-serializable data to be included in the HTTP API response. Useful for providing more fine-grained,\nmachine-readable information about the service status. May include status information for underlying features." + "\nThe ID of the saved object this originated from. This is set if this object's `id` was regenerated; that can happen during migration\nfrom a legacy single-namespace type, or during import. It is only set during migration or create operations. This is used during import\nto ensure that ID regeneration is deterministic, so saved objects will be overwritten if they are imported multiple times into a given\nspace." ], "source": { - "path": "src/core/server/status/types.ts", - "lineNumber": 41, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L41" + "path": "src/core/types/saved_objects.ts", + "lineNumber": 95, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L95" }, "signature": [ - "Meta | undefined" + "string | undefined" ] } ], "source": { - "path": "src/core/server/status/types.ts", - "lineNumber": 20, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L20" + "path": "src/core/types/saved_objects.ts", + "lineNumber": 69, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L69" }, "initialIsOpen": false }, { - "id": "def-server.StatusServiceSetup", + "id": "def-server.SavedObjectAttributes", "type": "Interface", - "label": "StatusServiceSetup", + "label": "SavedObjectAttributes", "description": [ - "\nAPI for accessing status of Core and this plugin's dependencies as well as for customizing this plugin's status.\n" + "\nThe data for a Saved Object is stored as an object in the `attributes`\nproperty.\n" ], "tags": [ - "remarks", - "example", - "example", "public" ], "children": [ { + "id": "def-server.SavedObjectAttributes.Unnamed", + "type": "Any", + "label": "Unnamed", "tags": [], - "id": "def-server.StatusServiceSetup.core$", - "type": "Object", - "label": "core$", - "description": [ - "\nCurrent status for all Core services." - ], + "description": [], "source": { - "path": "src/core/server/status/types.ts", - "lineNumber": 181, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L181" + "path": "src/core/types/saved_objects.ts", + "lineNumber": 36, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L36" }, "signature": [ - "Observable", - "<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.CoreStatus", - "text": "CoreStatus" - }, - ">" + "any" ] + } + ], + "source": { + "path": "src/core/types/saved_objects.ts", + "lineNumber": 35, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L35" + }, + "initialIsOpen": false + }, + { + "id": "def-server.SavedObjectReference", + "type": "Interface", + "label": "SavedObjectReference", + "description": [ + "\nA reference to another saved object.\n" + ], + "tags": [ + "public" + ], + "children": [ + { + "tags": [], + "id": "def-server.SavedObjectReference.name", + "type": "string", + "label": "name", + "description": [], + "source": { + "path": "src/core/types/saved_objects.ts", + "lineNumber": 45, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L45" + } }, { - "tags": [ - "remarks" - ], - "id": "def-server.StatusServiceSetup.overall$", - "type": "Object", - "label": "overall$", - "description": [ - "\nOverall system status for all of Kibana.\n" - ], + "tags": [], + "id": "def-server.SavedObjectReference.type", + "type": "string", + "label": "type", + "description": [], "source": { - "path": "src/core/server/status/types.ts", - "lineNumber": 192, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L192" - }, - "signature": [ - "Observable", - "<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.ServiceStatus", - "text": "ServiceStatus" - }, - ">" - ] + "path": "src/core/types/saved_objects.ts", + "lineNumber": 46, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L46" + } }, { - "id": "def-server.StatusServiceSetup.set", - "type": "Function", - "label": "set", - "signature": [ - "(status$: ", - "Observable", - "<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.ServiceStatus", - "text": "ServiceStatus" - }, - ">) => void" - ], - "description": [ - "\nAllows a plugin to specify a custom status dependent on its own criteria.\nCompletely overrides the default inherited status.\n" - ], - "children": [ - { - "type": "Object", - "label": "status$", - "isRequired": true, - "signature": [ - "Observable", - "<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.ServiceStatus", - "text": "ServiceStatus" - }, - ">" - ], - "description": [], - "source": { - "path": "src/core/server/status/types.ts", - "lineNumber": 202, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L202" - } - } - ], - "tags": [ - "remarks" - ], - "returnComment": [], + "tags": [], + "id": "def-server.SavedObjectReference.id", + "type": "string", + "label": "id", + "description": [], "source": { - "path": "src/core/server/status/types.ts", - "lineNumber": 202, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L202" + "path": "src/core/types/saved_objects.ts", + "lineNumber": 47, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L47" } + } + ], + "source": { + "path": "src/core/types/saved_objects.ts", + "lineNumber": 44, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L44" + }, + "initialIsOpen": false + }, + { + "id": "def-server.SavedObjectsMigrationVersion", + "type": "Interface", + "label": "SavedObjectsMigrationVersion", + "description": [ + "\nInformation about the migrations that have been applied to this SavedObject.\nWhen Kibana starts up, KibanaMigrator detects outdated documents and\nmigrates them based on this value. For each migration that has been applied,\nthe plugin's name is used as a key and the latest migration version as the\nvalue.\n" + ], + "tags": [ + "example", + "public" + ], + "children": [ + { + "id": "def-server.SavedObjectsMigrationVersion.Unnamed", + "type": "Any", + "label": "Unnamed", + "tags": [], + "description": [], + "source": { + "path": "src/core/types/saved_objects.ts", + "lineNumber": 66, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L66" + }, + "signature": [ + "any" + ] + } + ], + "source": { + "path": "src/core/types/saved_objects.ts", + "lineNumber": 65, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/types/saved_objects.ts#L65" + }, + "initialIsOpen": false + }, + { + "id": "def-server.LegacyServiceSetupDeps", + "type": "Interface", + "label": "LegacyServiceSetupDeps", + "description": [], + "tags": [ + "public", + "deprecated" + ], + "children": [ + { + "tags": [], + "id": "def-server.LegacyServiceSetupDeps.core", + "type": "CompoundType", + "label": "core", + "description": [], + "source": { + "path": "src/core/server/legacy/types.ts", + "lineNumber": 43, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/legacy/types.ts#L43" + }, + "signature": [ + "LegacyCoreSetup" + ] }, { "tags": [], - "id": "def-server.StatusServiceSetup.dependencies$", + "id": "def-server.LegacyServiceSetupDeps.plugins", "type": "Object", - "label": "dependencies$", - "description": [ - "\nCurrent status for all plugins this plugin depends on.\nEach key of the `Record` is a plugin id." - ], + "label": "plugins", + "description": [], "source": { - "path": "src/core/server/status/types.ts", - "lineNumber": 208, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L208" + "path": "src/core/server/legacy/types.ts", + "lineNumber": 44, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/legacy/types.ts#L44" }, "signature": [ - "Observable", - ">>" + "Record" ] }, { - "tags": [ - "remarks" - ], - "id": "def-server.StatusServiceSetup.derivedStatus$", + "tags": [], + "id": "def-server.LegacyServiceSetupDeps.uiPlugins", "type": "Object", - "label": "derivedStatus$", - "description": [ - "\nThe status of this plugin as derived from its dependencies.\n" - ], + "label": "uiPlugins", + "description": [], "source": { - "path": "src/core/server/status/types.ts", - "lineNumber": 220, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L220" + "path": "src/core/server/legacy/types.ts", + "lineNumber": 45, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/legacy/types.ts#L45" }, "signature": [ - "Observable", - "<", { "pluginId": "core", "scope": "server", "docId": "kibCorePluginApi", - "section": "def-server.ServiceStatus", - "text": "ServiceStatus" - }, - ">" + "section": "def-server.UiPlugins", + "text": "UiPlugins" + } + ] + } + ], + "source": { + "path": "src/core/server/legacy/types.ts", + "lineNumber": 42, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/legacy/types.ts#L42" + }, + "initialIsOpen": false + }, + { + "id": "def-server.LegacyServiceStartDeps", + "type": "Interface", + "label": "LegacyServiceStartDeps", + "description": [], + "tags": [ + "public", + "deprecated" + ], + "children": [ + { + "tags": [], + "id": "def-server.LegacyServiceStartDeps.core", + "type": "CompoundType", + "label": "core", + "description": [], + "source": { + "path": "src/core/server/legacy/types.ts", + "lineNumber": 53, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/legacy/types.ts#L53" + }, + "signature": [ + "LegacyCoreStart" ] }, { "tags": [], - "id": "def-server.StatusServiceSetup.isStatusPageAnonymous", - "type": "Function", - "label": "isStatusPageAnonymous", - "description": [ - "\nWhether or not the status HTTP APIs are available to unauthenticated users when an authentication provider is\npresent." - ], + "id": "def-server.LegacyServiceStartDeps.plugins", + "type": "Object", + "label": "plugins", + "description": [], "source": { - "path": "src/core/server/status/types.ts", - "lineNumber": 226, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L226" + "path": "src/core/server/legacy/types.ts", + "lineNumber": 54, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/legacy/types.ts#L54" }, "signature": [ - "() => boolean" + "Record" ] } ], "source": { - "path": "src/core/server/status/types.ts", - "lineNumber": 177, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L177" + "path": "src/core/server/legacy/types.ts", + "lineNumber": 52, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/legacy/types.ts#L52" }, "initialIsOpen": false }, { - "id": "def-server.RequestHandlerContext", + "id": "def-server.CoreStatus", "type": "Interface", - "label": "RequestHandlerContext", + "label": "CoreStatus", "description": [ - "\nPlugin specific context passed to a route handler.\n\nProvides the following clients and services:\n - {@link SavedObjectsClient | savedObjects.client} - Saved Objects client\n which uses the credentials of the incoming request\n - {@link ISavedObjectTypeRegistry | savedObjects.typeRegistry} - Type registry containing\n all the registered types.\n - {@link IScopedClusterClient | elasticsearch.client} - Elasticsearch\n data client which uses the credentials of the incoming request\n - {@link LegacyScopedClusterClient | elasticsearch.legacy.client} - The legacy Elasticsearch\n data client which uses the credentials of the incoming request\n - {@link IUiSettingsClient | uiSettings.client} - uiSettings client\n which uses the credentials of the incoming request\n" + "\nStatus of core services.\n" ], "tags": [ + "internalRemarks", "public" ], "children": [ { "tags": [], - "id": "def-server.RequestHandlerContext.core", + "id": "def-server.CoreStatus.elasticsearch", "type": "Object", - "label": "core", + "label": "elasticsearch", "description": [], "source": { - "path": "src/core/server/index.ts", - "lineNumber": 415, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L415" + "path": "src/core/server/status/types.ts", + "lineNumber": 115, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L115" }, "signature": [ - "{ savedObjects: { client: Pick<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsClient", - "text": "SavedObjectsClient" - }, - ", \"get\" | \"delete\" | \"create\" | \"find\" | \"update\" | \"bulkCreate\" | \"bulkGet\" | \"bulkUpdate\" | \"errors\" | \"checkConflicts\" | \"resolve\" | \"addToNamespaces\" | \"deleteFromNamespaces\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\">; typeRegistry: Pick<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectTypeRegistry", - "text": "SavedObjectTypeRegistry" - }, - ", \"getType\" | \"getVisibleTypes\" | \"getAllTypes\" | \"getImportableAndExportableTypes\" | \"isNamespaceAgnostic\" | \"isSingleNamespace\" | \"isMultiNamespace\" | \"isShareable\" | \"isHidden\" | \"getIndex\" | \"isImportableAndExportable\">; getClient: (options?: ", { "pluginId": "core", "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsClientProviderOptions", - "text": "SavedObjectsClientProviderOptions" + "docId": "kibCorePluginApi", + "section": "def-server.ServiceStatus", + "text": "ServiceStatus" }, - " | undefined) => Pick<", + "" + ] + }, + { + "tags": [], + "id": "def-server.CoreStatus.savedObjects", + "type": "Object", + "label": "savedObjects", + "description": [], + "source": { + "path": "src/core/server/status/types.ts", + "lineNumber": 116, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L116" + }, + "signature": [ { "pluginId": "core", "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsClient", - "text": "SavedObjectsClient" + "docId": "kibCorePluginApi", + "section": "def-server.ServiceStatus", + "text": "ServiceStatus" }, - ", \"get\" | \"delete\" | \"create\" | \"find\" | \"update\" | \"bulkCreate\" | \"bulkGet\" | \"bulkUpdate\" | \"errors\" | \"checkConflicts\" | \"resolve\" | \"addToNamespaces\" | \"deleteFromNamespaces\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\">; getExporter: (client: Pick<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsClient", - "text": "SavedObjectsClient" - } + "" ] } ], "source": { - "path": "src/core/server/index.ts", - "lineNumber": 414, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L414" + "path": "src/core/server/status/types.ts", + "lineNumber": 114, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L114" }, "initialIsOpen": false }, { - "id": "def-server.CoreSetup", + "id": "def-server.ServiceStatus", "type": "Interface", - "label": "CoreSetup", + "label": "ServiceStatus", "signature": [ { "pluginId": "core", "scope": "server", "docId": "kibCorePluginApi", - "section": "def-server.CoreSetup", - "text": "CoreSetup" + "section": "def-server.ServiceStatus", + "text": "ServiceStatus" }, - "" + "" ], "description": [ - "\nContext passed to the plugins `setup` method.\n" + "\nThe current status of a service at a point in time.\n" ], "tags": [ - "typeParam", "typeParam", "public" ], "children": [ { "tags": [], - "id": "def-server.CoreSetup.capabilities", - "type": "Object", - "label": "capabilities", + "id": "def-server.ServiceStatus.level", + "type": "CompoundType", + "label": "level", "description": [ - "{@link CapabilitiesSetup}" + "\nThe current availability level of the service." ], "source": { - "path": "src/core/server/index.ts", - "lineNumber": 449, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L449" + "path": "src/core/server/status/types.ts", + "lineNumber": 24, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L24" }, "signature": [ { "pluginId": "core", "scope": "server", "docId": "kibCorePluginApi", - "section": "def-server.CapabilitiesSetup", - "text": "CapabilitiesSetup" + "section": "def-server.ServiceStatusLevel", + "text": "ServiceStatusLevel" } ] }, { "tags": [], - "id": "def-server.CoreSetup.context", - "type": "Object", - "label": "context", + "id": "def-server.ServiceStatus.summary", + "type": "string", + "label": "summary", "description": [ - "{@link ContextSetup}" + "\nA high-level summary of the service status." ], "source": { - "path": "src/core/server/index.ts", - "lineNumber": 451, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L451" - }, - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.ContextSetup", - "text": "ContextSetup" - } - ] + "path": "src/core/server/status/types.ts", + "lineNumber": 28, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L28" + } }, { "tags": [], - "id": "def-server.CoreSetup.elasticsearch", - "type": "Object", - "label": "elasticsearch", + "id": "def-server.ServiceStatus.detail", + "type": "string", + "label": "detail", "description": [ - "{@link ElasticsearchServiceSetup}" + "\nA more detailed description of the service status." ], "source": { - "path": "src/core/server/index.ts", - "lineNumber": 453, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L453" + "path": "src/core/server/status/types.ts", + "lineNumber": 32, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L32" }, "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.ElasticsearchServiceSetup", - "text": "ElasticsearchServiceSetup" - } + "string | undefined" ] }, { "tags": [], - "id": "def-server.CoreSetup.http", - "type": "CompoundType", - "label": "http", + "id": "def-server.ServiceStatus.documentationUrl", + "type": "string", + "label": "documentationUrl", "description": [ - "{@link HttpServiceSetup}" + "\nA URL to open in a new tab about how to resolve or troubleshoot the problem." ], "source": { - "path": "src/core/server/index.ts", - "lineNumber": 455, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L455" + "path": "src/core/server/status/types.ts", + "lineNumber": 36, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L36" }, "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.HttpServiceSetup", - "text": "HttpServiceSetup" - }, - " & { resources: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.HttpResources", - "text": "HttpResources" - }, - "; }" + "string | undefined" ] }, { "tags": [], - "id": "def-server.CoreSetup.i18n", - "type": "Object", - "label": "i18n", + "id": "def-server.ServiceStatus.meta", + "type": "Uncategorized", + "label": "meta", "description": [ - "{@link I18nServiceSetup}" + "\nAny JSON-serializable data to be included in the HTTP API response. Useful for providing more fine-grained,\nmachine-readable information about the service status. May include status information for underlying features." ], "source": { - "path": "src/core/server/index.ts", - "lineNumber": 460, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L460" + "path": "src/core/server/status/types.ts", + "lineNumber": 41, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L41" }, "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.I18nServiceSetup", - "text": "I18nServiceSetup" - } + "Meta | undefined" ] - }, + } + ], + "source": { + "path": "src/core/server/status/types.ts", + "lineNumber": 20, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L20" + }, + "initialIsOpen": false + }, + { + "id": "def-server.StatusServiceSetup", + "type": "Interface", + "label": "StatusServiceSetup", + "description": [ + "\nAPI for accessing status of Core and this plugin's dependencies as well as for customizing this plugin's status.\n" + ], + "tags": [ + "remarks", + "example", + "example", + "public" + ], + "children": [ { "tags": [], - "id": "def-server.CoreSetup.logging", + "id": "def-server.StatusServiceSetup.core$", "type": "Object", - "label": "logging", + "label": "core$", "description": [ - "{@link LoggingServiceSetup}" + "\nCurrent status for all Core services." ], "source": { - "path": "src/core/server/index.ts", - "lineNumber": 462, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L462" + "path": "src/core/server/status/types.ts", + "lineNumber": 181, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L181" }, "signature": [ + "Observable", + "<", { "pluginId": "core", "scope": "server", "docId": "kibCorePluginApi", - "section": "def-server.LoggingServiceSetup", - "text": "LoggingServiceSetup" - } + "section": "def-server.CoreStatus", + "text": "CoreStatus" + }, + ">" ] }, { - "tags": [], - "id": "def-server.CoreSetup.metrics", + "tags": [ + "remarks" + ], + "id": "def-server.StatusServiceSetup.overall$", "type": "Object", - "label": "metrics", + "label": "overall$", "description": [ - "{@link MetricsServiceSetup}" + "\nOverall system status for all of Kibana.\n" ], "source": { - "path": "src/core/server/index.ts", - "lineNumber": 464, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L464" + "path": "src/core/server/status/types.ts", + "lineNumber": 192, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L192" }, "signature": [ + "Observable", + "<", { "pluginId": "core", "scope": "server", "docId": "kibCorePluginApi", - "section": "def-server.MetricsServiceSetup", - "text": "MetricsServiceSetup" - } + "section": "def-server.ServiceStatus", + "text": "ServiceStatus" + }, + ">" ] }, { - "tags": [], - "id": "def-server.CoreSetup.savedObjects", - "type": "Object", - "label": "savedObjects", - "description": [ - "{@link SavedObjectsServiceSetup}" - ], - "source": { - "path": "src/core/server/index.ts", - "lineNumber": 466, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L466" - }, + "id": "def-server.StatusServiceSetup.set", + "type": "Function", + "label": "set", "signature": [ + "(status$: ", + "Observable", + "<", { "pluginId": "core", "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsServiceSetup", - "text": "SavedObjectsServiceSetup" + "docId": "kibCorePluginApi", + "section": "def-server.ServiceStatus", + "text": "ServiceStatus" + }, + ">) => void" + ], + "description": [ + "\nAllows a plugin to specify a custom status dependent on its own criteria.\nCompletely overrides the default inherited status.\n" + ], + "children": [ + { + "type": "Object", + "label": "status$", + "isRequired": true, + "signature": [ + "Observable", + "<", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.ServiceStatus", + "text": "ServiceStatus" + }, + ">" + ], + "description": [], + "source": { + "path": "src/core/server/status/types.ts", + "lineNumber": 202, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L202" + } } - ] + ], + "tags": [ + "remarks" + ], + "returnComment": [], + "source": { + "path": "src/core/server/status/types.ts", + "lineNumber": 202, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L202" + } }, { "tags": [], - "id": "def-server.CoreSetup.status", + "id": "def-server.StatusServiceSetup.dependencies$", "type": "Object", - "label": "status", + "label": "dependencies$", "description": [ - "{@link StatusServiceSetup}" + "\nCurrent status for all plugins this plugin depends on.\nEach key of the `Record` is a plugin id." ], "source": { - "path": "src/core/server/index.ts", - "lineNumber": 468, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L468" + "path": "src/core/server/status/types.ts", + "lineNumber": 208, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L208" }, "signature": [ + "Observable", + ">>" ] }, { - "tags": [], - "id": "def-server.CoreSetup.uiSettings", + "tags": [ + "remarks" + ], + "id": "def-server.StatusServiceSetup.derivedStatus$", "type": "Object", - "label": "uiSettings", + "label": "derivedStatus$", "description": [ - "{@link UiSettingsServiceSetup}" + "\nThe status of this plugin as derived from its dependencies.\n" ], "source": { - "path": "src/core/server/index.ts", - "lineNumber": 470, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L470" + "path": "src/core/server/status/types.ts", + "lineNumber": 220, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L220" }, "signature": [ + "Observable", + "<", { "pluginId": "core", "scope": "server", "docId": "kibCorePluginApi", - "section": "def-server.UiSettingsServiceSetup", - "text": "UiSettingsServiceSetup" - } + "section": "def-server.ServiceStatus", + "text": "ServiceStatus" + }, + ">" ] }, { "tags": [], - "id": "def-server.CoreSetup.getStartServices", + "id": "def-server.StatusServiceSetup.isStatusPageAnonymous", "type": "Function", - "label": "getStartServices", + "label": "isStatusPageAnonymous", "description": [ - "{@link StartServicesAccessor}" + "\nWhether or not the status HTTP APIs are available to unauthenticated users when an authentication provider is\npresent." ], "source": { - "path": "src/core/server/index.ts", - "lineNumber": 472, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L472" + "path": "src/core/server/status/types.ts", + "lineNumber": 226, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L226" }, "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.StartServicesAccessor", - "text": "StartServicesAccessor" - }, - "" + "() => boolean" ] } ], "source": { - "path": "src/core/server/index.ts", - "lineNumber": 447, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L447" + "path": "src/core/server/status/types.ts", + "lineNumber": 177, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L177" }, "initialIsOpen": false }, { - "id": "def-server.CoreStart", + "id": "def-server.RequestHandlerContext", "type": "Interface", - "label": "CoreStart", + "label": "RequestHandlerContext", "description": [ - "\nContext passed to the plugins `start` method.\n" + "\nPlugin specific context passed to a route handler.\n\nProvides the following clients and services:\n - {@link SavedObjectsClient | savedObjects.client} - Saved Objects client\n which uses the credentials of the incoming request\n - {@link ISavedObjectTypeRegistry | savedObjects.typeRegistry} - Type registry containing\n all the registered types.\n - {@link IScopedClusterClient | elasticsearch.client} - Elasticsearch\n data client which uses the credentials of the incoming request\n - {@link LegacyScopedClusterClient | elasticsearch.legacy.client} - The legacy Elasticsearch\n data client which uses the credentials of the incoming request\n - {@link IUiSettingsClient | uiSettings.client} - uiSettings client\n which uses the credentials of the incoming request\n" ], "tags": [ "public" @@ -15880,924 +15923,853 @@ "children": [ { "tags": [], - "id": "def-server.CoreStart.capabilities", + "id": "def-server.RequestHandlerContext.core", "type": "Object", - "label": "capabilities", - "description": [ - "{@link CapabilitiesStart}" - ], + "label": "core", + "description": [], "source": { "path": "src/core/server/index.ts", - "lineNumber": 495, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L495" + "lineNumber": 425, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L425" }, "signature": [ + "{ savedObjects: { client: Pick<", { "pluginId": "core", "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.CapabilitiesStart", - "text": "CapabilitiesStart" - } - ] - }, - { - "tags": [], - "id": "def-server.CoreStart.elasticsearch", - "type": "Object", - "label": "elasticsearch", - "description": [ - "{@link ElasticsearchServiceStart}" - ], - "source": { - "path": "src/core/server/index.ts", - "lineNumber": 497, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L497" - }, - "signature": [ + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsClient", + "text": "SavedObjectsClient" + }, + ", \"get\" | \"delete\" | \"create\" | \"find\" | \"update\" | \"bulkCreate\" | \"bulkGet\" | \"bulkUpdate\" | \"errors\" | \"checkConflicts\" | \"resolve\" | \"addToNamespaces\" | \"deleteFromNamespaces\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\">; typeRegistry: Pick<", { "pluginId": "core", "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.ElasticsearchServiceStart", - "text": "ElasticsearchServiceStart" - } - ] - }, - { - "tags": [], - "id": "def-server.CoreStart.http", - "type": "Object", - "label": "http", - "description": [ - "{@link HttpServiceStart}" - ], - "source": { - "path": "src/core/server/index.ts", - "lineNumber": 499, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L499" - }, - "signature": [ + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectTypeRegistry", + "text": "SavedObjectTypeRegistry" + }, + ", \"getType\" | \"getVisibleTypes\" | \"getAllTypes\" | \"getImportableAndExportableTypes\" | \"isNamespaceAgnostic\" | \"isSingleNamespace\" | \"isMultiNamespace\" | \"isShareable\" | \"isHidden\" | \"getIndex\" | \"isImportableAndExportable\">; getClient: (options?: ", { "pluginId": "core", "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.HttpServiceStart", - "text": "HttpServiceStart" + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsClientProviderOptions", + "text": "SavedObjectsClientProviderOptions" + }, + " | undefined) => Pick<", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsClient", + "text": "SavedObjectsClient" + }, + ", \"get\" | \"delete\" | \"create\" | \"find\" | \"update\" | \"bulkCreate\" | \"bulkGet\" | \"bulkUpdate\" | \"errors\" | \"checkConflicts\" | \"resolve\" | \"addToNamespaces\" | \"deleteFromNamespaces\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\">; getExporter: (client: Pick<", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsClient", + "text": "SavedObjectsClient" } ] + } + ], + "source": { + "path": "src/core/server/index.ts", + "lineNumber": 424, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L424" + }, + "initialIsOpen": false + }, + { + "id": "def-server.CoreSetup", + "type": "Interface", + "label": "CoreSetup", + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.CoreSetup", + "text": "CoreSetup" }, + "" + ], + "description": [ + "\nContext passed to the plugins `setup` method.\n" + ], + "tags": [ + "typeParam", + "typeParam", + "public" + ], + "children": [ { "tags": [], - "id": "def-server.CoreStart.metrics", + "id": "def-server.CoreSetup.capabilities", "type": "Object", - "label": "metrics", + "label": "capabilities", "description": [ - "{@link MetricsServiceStart}" + "{@link CapabilitiesSetup}" ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 501, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L501" + "lineNumber": 459, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L459" }, "signature": [ { "pluginId": "core", "scope": "server", "docId": "kibCorePluginApi", - "section": "def-server.MetricsServiceSetup", - "text": "MetricsServiceSetup" + "section": "def-server.CapabilitiesSetup", + "text": "CapabilitiesSetup" } ] }, { "tags": [], - "id": "def-server.CoreStart.savedObjects", + "id": "def-server.CoreSetup.context", "type": "Object", - "label": "savedObjects", + "label": "context", "description": [ - "{@link SavedObjectsServiceStart}" + "{@link ContextSetup}" ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 503, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L503" + "lineNumber": 461, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L461" }, "signature": [ { "pluginId": "core", "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsServiceStart", - "text": "SavedObjectsServiceStart" + "docId": "kibCorePluginApi", + "section": "def-server.ContextSetup", + "text": "ContextSetup" } ] }, { "tags": [], - "id": "def-server.CoreStart.uiSettings", + "id": "def-server.CoreSetup.elasticsearch", "type": "Object", - "label": "uiSettings", + "label": "elasticsearch", "description": [ - "{@link UiSettingsServiceStart}" + "{@link ElasticsearchServiceSetup}" ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 505, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L505" + "lineNumber": 463, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L463" }, "signature": [ { "pluginId": "core", "scope": "server", "docId": "kibCorePluginApi", - "section": "def-server.UiSettingsServiceStart", - "text": "UiSettingsServiceStart" + "section": "def-server.ElasticsearchServiceSetup", + "text": "ElasticsearchServiceSetup" } ] - } - ], - "source": { - "path": "src/core/server/index.ts", - "lineNumber": 493, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L493" - }, - "initialIsOpen": false - }, - { - "id": "def-server.CapabilitiesSetup", - "type": "Interface", - "label": "CapabilitiesSetup", - "description": [ - "\nAPIs to manage the {@link Capabilities} that will be used by the application.\n\nPlugins relying on capabilities to toggle some of their features should register them during the setup phase\nusing the `registerProvider` method.\n\nPlugins having the responsibility to restrict capabilities depending on a given context should register\ntheir capabilities switcher using the `registerSwitcher` method.\n\nRefers to the methods documentation for complete description and examples.\n" - ], - "tags": [ - "public" - ], - "children": [ - { - "id": "def-server.CapabilitiesSetup.registerProvider", - "type": "Function", - "label": "registerProvider", - "signature": [ - "(provider: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.CapabilitiesProvider", - "text": "CapabilitiesProvider" - }, - ") => void" - ], - "description": [ - "\nRegister a {@link CapabilitiesProvider} to be used to provide {@link Capabilities}\nwhen resolving them.\n" - ], - "children": [ - { - "type": "Function", - "label": "provider", - "isRequired": true, - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.CapabilitiesProvider", - "text": "CapabilitiesProvider" - } - ], - "description": [], - "source": { - "path": "src/core/server/capabilities/capabilities_service.ts", - "lineNumber": 54, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/capabilities/capabilities_service.ts#L54" - } - } - ], - "tags": [ - "example" - ], - "returnComment": [], - "source": { - "path": "src/core/server/capabilities/capabilities_service.ts", - "lineNumber": 54, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/capabilities/capabilities_service.ts#L54" - } - }, - { - "id": "def-server.CapabilitiesSetup.registerSwitcher", - "type": "Function", - "label": "registerSwitcher", - "signature": [ - "(switcher: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.CapabilitiesSwitcher", - "text": "CapabilitiesSwitcher" - }, - ") => void" - ], - "description": [ - "\nRegister a {@link CapabilitiesSwitcher} to be used to change the default state\nof the {@link Capabilities} entries when resolving them.\n\nA capabilities switcher can only change the state of existing capabilities.\nCapabilities added or removed when invoking the switcher will be ignored.\n" - ], - "children": [ - { - "type": "Function", - "label": "switcher", - "isRequired": true, - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.CapabilitiesSwitcher", - "text": "CapabilitiesSwitcher" - } - ], - "description": [], - "source": { - "path": "src/core/server/capabilities/capabilities_service.ts", - "lineNumber": 93, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/capabilities/capabilities_service.ts#L93" - } - } - ], - "tags": [ - "example" + }, + { + "tags": [], + "id": "def-server.CoreSetup.http", + "type": "CompoundType", + "label": "http", + "description": [ + "{@link HttpServiceSetup}" ], - "returnComment": [], "source": { - "path": "src/core/server/capabilities/capabilities_service.ts", - "lineNumber": 93, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/capabilities/capabilities_service.ts#L93" - } - } - ], - "source": { - "path": "src/core/server/capabilities/capabilities_service.ts", - "lineNumber": 30, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/capabilities/capabilities_service.ts#L30" - }, - "initialIsOpen": false - }, - { - "id": "def-server.CapabilitiesStart", - "type": "Interface", - "label": "CapabilitiesStart", - "description": [ - "\nAPIs to access the application {@link Capabilities}.\n" - ], - "tags": [ - "public" - ], - "children": [ - { - "id": "def-server.CapabilitiesStart.resolveCapabilities", - "type": "Function", - "label": "resolveCapabilities", + "path": "src/core/server/index.ts", + "lineNumber": 465, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L465" + }, "signature": [ - "(request: ", { "pluginId": "core", "scope": "server", "docId": "kibCoreHttpPluginApi", - "section": "def-server.KibanaRequest", - "text": "KibanaRequest" + "section": "def-server.HttpServiceSetup", + "text": "HttpServiceSetup" }, - ", options?: ", + " & { resources: ", { "pluginId": "core", "scope": "server", "docId": "kibCorePluginApi", - "section": "def-server.ResolveCapabilitiesOptions", - "text": "ResolveCapabilitiesOptions" + "section": "def-server.HttpResources", + "text": "HttpResources" }, - " | undefined) => Promise<", + "; }" + ] + }, + { + "tags": [], + "id": "def-server.CoreSetup.i18n", + "type": "Object", + "label": "i18n", + "description": [ + "{@link I18nServiceSetup}" + ], + "source": { + "path": "src/core/server/index.ts", + "lineNumber": 470, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L470" + }, + "signature": [ { "pluginId": "core", - "scope": "common", + "scope": "server", "docId": "kibCorePluginApi", - "section": "def-common.Capabilities", - "text": "Capabilities" - }, - ">" - ], + "section": "def-server.I18nServiceSetup", + "text": "I18nServiceSetup" + } + ] + }, + { + "tags": [], + "id": "def-server.CoreSetup.logging", + "type": "Object", + "label": "logging", "description": [ - "\nResolve the {@link Capabilities} to be used for given request" + "{@link LoggingServiceSetup}" ], - "children": [ - { - "type": "Object", - "label": "request", - "isRequired": true, - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.KibanaRequest", - "text": "KibanaRequest" - }, - "" - ], - "description": [], - "source": { - "path": "src/core/server/capabilities/capabilities_service.ts", - "lineNumber": 118, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/capabilities/capabilities_service.ts#L118" - } - }, + "source": { + "path": "src/core/server/index.ts", + "lineNumber": 472, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L472" + }, + "signature": [ { - "type": "Object", - "label": "options", - "isRequired": false, - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.ResolveCapabilitiesOptions", - "text": "ResolveCapabilitiesOptions" - }, - " | undefined" - ], - "description": [], - "source": { - "path": "src/core/server/capabilities/capabilities_service.ts", - "lineNumber": 119, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/capabilities/capabilities_service.ts#L119" - } + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.LoggingServiceSetup", + "text": "LoggingServiceSetup" } - ], + ] + }, + { "tags": [], - "returnComment": [], + "id": "def-server.CoreSetup.metrics", + "type": "Object", + "label": "metrics", + "description": [ + "{@link MetricsServiceSetup}" + ], "source": { - "path": "src/core/server/capabilities/capabilities_service.ts", - "lineNumber": 117, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/capabilities/capabilities_service.ts#L117" - } - } - ], - "source": { - "path": "src/core/server/capabilities/capabilities_service.ts", - "lineNumber": 113, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/capabilities/capabilities_service.ts#L113" - }, - "initialIsOpen": false - }, - { - "id": "def-server.ContextSetup", - "type": "Interface", - "label": "ContextSetup", - "description": [ - "\n{@inheritdoc IContextContainer}\n" - ], - "tags": [ - "example", - "public" - ], - "children": [ - { - "id": "def-server.ContextSetup.createContextContainer", - "type": "Function", - "label": "createContextContainer", + "path": "src/core/server/index.ts", + "lineNumber": 474, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L474" + }, "signature": [ - ">() => ", + "section": "def-server.MetricsServiceSetup", + "text": "MetricsServiceSetup" + } + ] + }, + { + "tags": [], + "id": "def-server.CoreSetup.savedObjects", + "type": "Object", + "label": "savedObjects", + "description": [ + "{@link SavedObjectsServiceSetup}" + ], + "source": { + "path": "src/core/server/index.ts", + "lineNumber": 476, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L476" + }, + "signature": [ { "pluginId": "core", "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.IContextContainer", - "text": "IContextContainer" - }, - "" - ], + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsServiceSetup", + "text": "SavedObjectsServiceSetup" + } + ] + }, + { + "tags": [], + "id": "def-server.CoreSetup.status", + "type": "Object", + "label": "status", "description": [ - "\nCreates a new {@link IContextContainer} for a service owner." + "{@link StatusServiceSetup}" ], - "children": [], - "tags": [], - "returnComment": [], "source": { - "path": "src/core/server/context/context_service.ts", - "lineNumber": 96, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/context/context_service.ts#L96" - } - } - ], - "source": { - "path": "src/core/server/context/context_service.ts", - "lineNumber": 92, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/context/context_service.ts#L92" - }, - "initialIsOpen": false - }, - { - "id": "def-server.HttpResources", - "type": "Interface", - "label": "HttpResources", - "description": [ - "\nHttpResources service is responsible for serving static & dynamic assets for Kibana application via HTTP.\nProvides API allowing plug-ins to respond with:\n- a pre-configured HTML page bootstrapping Kibana client app\n- custom HTML page\n- custom JS script file." - ], - "tags": [ - "public" - ], - "children": [ + "path": "src/core/server/index.ts", + "lineNumber": 478, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L478" + }, + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.StatusServiceSetup", + "text": "StatusServiceSetup" + } + ] + }, { "tags": [], - "id": "def-server.HttpResources.register", - "type": "Function", - "label": "register", + "id": "def-server.CoreSetup.uiSettings", + "type": "Object", + "label": "uiSettings", "description": [ - "To register a route handler executing passed function to form response." + "{@link UiSettingsServiceSetup}" ], "source": { - "path": "src/core/server/http_resources/types.ts", - "lineNumber": 101, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http_resources/types.ts#L101" + "path": "src/core/server/index.ts", + "lineNumber": 480, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L480" }, "signature": [ - "(route: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.RouteConfig", - "text": "RouteConfig" - }, - ", handler: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.RequestHandler", - "text": "RequestHandler" + "section": "def-server.StartServicesAccessor", + "text": "StartServicesAccessor" }, - " | Error | { message: string | Error; attributes?: Record | undefined; } | Buffer | ", - "Stream" + "" ] } ], "source": { - "path": "src/core/server/http_resources/types.ts", - "lineNumber": 99, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http_resources/types.ts#L99" + "path": "src/core/server/index.ts", + "lineNumber": 457, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L457" }, "initialIsOpen": false }, { - "id": "def-server.LegacyCallAPIOptions", + "id": "def-server.CoreStart", "type": "Interface", - "label": "LegacyCallAPIOptions", + "label": "CoreStart", "description": [ - "\nThe set of options that defines how API call should be made and result be\nprocessed.\n" + "\nContext passed to the plugins `start` method.\n" ], "tags": [ - "public", - "deprecated" + "public" ], "children": [ { "tags": [], - "id": "def-server.LegacyCallAPIOptions.wrap401Errors", - "type": "CompoundType", - "label": "wrap401Errors", + "id": "def-server.CoreStart.capabilities", + "type": "Object", + "label": "capabilities", "description": [ - "\nIndicates whether `401 Unauthorized` errors returned from the Elasticsearch API\nshould be wrapped into `Boom` error instances with properly set `WWW-Authenticate`\nheader that could have been returned by the API itself. If API didn't specify that\nthen `Basic realm=\"Authorization Required\"` is used as `WWW-Authenticate`." + "{@link CapabilitiesStart}" ], "source": { - "path": "src/core/server/elasticsearch/legacy/api_types.ts", - "lineNumber": 151, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L151" + "path": "src/core/server/index.ts", + "lineNumber": 505, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L505" }, "signature": [ - "boolean | undefined" + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.CapabilitiesStart", + "text": "CapabilitiesStart" + } ] }, { "tags": [], - "id": "def-server.LegacyCallAPIOptions.signal", + "id": "def-server.CoreStart.elasticsearch", "type": "Object", - "label": "signal", + "label": "elasticsearch", "description": [ - "\nA signal object that allows you to abort the request via an AbortController object." + "{@link ElasticsearchServiceStart}" ], "source": { - "path": "src/core/server/elasticsearch/legacy/api_types.ts", - "lineNumber": 155, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L155" + "path": "src/core/server/index.ts", + "lineNumber": 507, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L507" }, "signature": [ - "AbortSignal | undefined" + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.ElasticsearchServiceStart", + "text": "ElasticsearchServiceStart" + } ] - } - ], - "source": { - "path": "src/core/server/elasticsearch/legacy/api_types.ts", - "lineNumber": 144, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L144" - }, - "initialIsOpen": false - }, - { - "id": "def-server.AssistantAPIClientParams", - "type": "Interface", - "label": "AssistantAPIClientParams", - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.AssistantAPIClientParams", - "text": "AssistantAPIClientParams" }, - " extends ", - "GenericParams" - ], - "description": [], - "tags": [ - "deprecated", - "public" - ], - "children": [ { "tags": [], - "id": "def-server.AssistantAPIClientParams.path", - "type": "string", - "label": "path", - "description": [], + "id": "def-server.CoreStart.http", + "type": "Object", + "label": "http", + "description": [ + "{@link HttpServiceStart}" + ], "source": { - "path": "src/core/server/elasticsearch/legacy/api_types.ts", - "lineNumber": 318, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L318" + "path": "src/core/server/index.ts", + "lineNumber": 509, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L509" }, "signature": [ - "\"/_migration/assistance\"" + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.HttpServiceStart", + "text": "HttpServiceStart" + } ] }, { "tags": [], - "id": "def-server.AssistantAPIClientParams.method", - "type": "string", - "label": "method", - "description": [], - "source": { - "path": "src/core/server/elasticsearch/legacy/api_types.ts", - "lineNumber": 319, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L319" - }, - "signature": [ - "\"GET\"" - ] - } - ], - "source": { - "path": "src/core/server/elasticsearch/legacy/api_types.ts", - "lineNumber": 317, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L317" - }, - "initialIsOpen": false - }, - { - "id": "def-server.AssistanceAPIResponse", - "type": "Interface", - "label": "AssistanceAPIResponse", - "description": [], - "tags": [ - "deprecated", - "public" - ], - "children": [ - { - "tags": [], - "id": "def-server.AssistanceAPIResponse.indices", + "id": "def-server.CoreStart.metrics", "type": "Object", - "label": "indices", - "description": [], + "label": "metrics", + "description": [ + "{@link MetricsServiceStart}" + ], "source": { - "path": "src/core/server/elasticsearch/legacy/api_types.ts", - "lineNumber": 338, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L338" + "path": "src/core/server/index.ts", + "lineNumber": 511, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L511" }, "signature": [ - "{ [indexName: string]: { action_required: ", { "pluginId": "core", "scope": "server", "docId": "kibCorePluginApi", - "section": "def-server.MIGRATION_ASSISTANCE_INDEX_ACTION", - "text": "MIGRATION_ASSISTANCE_INDEX_ACTION" - }, - "; }; }" + "section": "def-server.MetricsServiceSetup", + "text": "MetricsServiceSetup" + } ] - } - ], - "source": { - "path": "src/core/server/elasticsearch/legacy/api_types.ts", - "lineNumber": 337, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L337" - }, - "initialIsOpen": false - }, - { - "id": "def-server.DeprecationAPIClientParams", - "type": "Interface", - "label": "DeprecationAPIClientParams", - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.DeprecationAPIClientParams", - "text": "DeprecationAPIClientParams" }, - " extends ", - "GenericParams" - ], - "description": [], - "tags": [ - "deprecated", - "public" - ], - "children": [ { "tags": [], - "id": "def-server.DeprecationAPIClientParams.path", - "type": "string", - "label": "path", - "description": [], + "id": "def-server.CoreStart.savedObjects", + "type": "Object", + "label": "savedObjects", + "description": [ + "{@link SavedObjectsServiceStart}" + ], "source": { - "path": "src/core/server/elasticsearch/legacy/api_types.ts", - "lineNumber": 350, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L350" + "path": "src/core/server/index.ts", + "lineNumber": 513, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L513" }, "signature": [ - "\"/_migration/deprecations\"" + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsServiceStart", + "text": "SavedObjectsServiceStart" + } ] }, { "tags": [], - "id": "def-server.DeprecationAPIClientParams.method", - "type": "string", - "label": "method", - "description": [], + "id": "def-server.CoreStart.uiSettings", + "type": "Object", + "label": "uiSettings", + "description": [ + "{@link UiSettingsServiceStart}" + ], "source": { - "path": "src/core/server/elasticsearch/legacy/api_types.ts", - "lineNumber": 351, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L351" + "path": "src/core/server/index.ts", + "lineNumber": 515, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L515" }, "signature": [ - "\"GET\"" + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.UiSettingsServiceStart", + "text": "UiSettingsServiceStart" + } ] } ], "source": { - "path": "src/core/server/elasticsearch/legacy/api_types.ts", - "lineNumber": 349, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L349" + "path": "src/core/server/index.ts", + "lineNumber": 503, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L503" }, "initialIsOpen": false }, { - "id": "def-server.DeprecationInfo", + "id": "def-server.CapabilitiesSetup", "type": "Interface", - "label": "DeprecationInfo", - "description": [], + "label": "CapabilitiesSetup", + "description": [ + "\nAPIs to manage the {@link Capabilities} that will be used by the application.\n\nPlugins relying on capabilities to toggle some of their features should register them during the setup phase\nusing the `registerProvider` method.\n\nPlugins having the responsibility to restrict capabilities depending on a given context should register\ntheir capabilities switcher using the `registerSwitcher` method.\n\nRefers to the methods documentation for complete description and examples.\n" + ], "tags": [ - "deprecated", "public" ], "children": [ { - "tags": [], - "id": "def-server.DeprecationInfo.level", - "type": "CompoundType", - "label": "level", - "description": [], - "source": { - "path": "src/core/server/elasticsearch/legacy/api_types.ts", - "lineNumber": 359, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L359" - }, + "id": "def-server.CapabilitiesSetup.registerProvider", + "type": "Function", + "label": "registerProvider", "signature": [ + "(provider: ", { "pluginId": "core", "scope": "server", "docId": "kibCorePluginApi", - "section": "def-server.MIGRATION_DEPRECATION_LEVEL", - "text": "MIGRATION_DEPRECATION_LEVEL" + "section": "def-server.CapabilitiesProvider", + "text": "CapabilitiesProvider" + }, + ") => void" + ], + "description": [ + "\nRegister a {@link CapabilitiesProvider} to be used to provide {@link Capabilities}\nwhen resolving them.\n" + ], + "children": [ + { + "type": "Function", + "label": "provider", + "isRequired": true, + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.CapabilitiesProvider", + "text": "CapabilitiesProvider" + } + ], + "description": [], + "source": { + "path": "src/core/server/capabilities/capabilities_service.ts", + "lineNumber": 54, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/capabilities/capabilities_service.ts#L54" + } } - ] - }, - { - "tags": [], - "id": "def-server.DeprecationInfo.message", - "type": "string", - "label": "message", - "description": [], + ], + "tags": [ + "example" + ], + "returnComment": [], "source": { - "path": "src/core/server/elasticsearch/legacy/api_types.ts", - "lineNumber": 360, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L360" + "path": "src/core/server/capabilities/capabilities_service.ts", + "lineNumber": 54, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/capabilities/capabilities_service.ts#L54" } }, { - "tags": [], - "id": "def-server.DeprecationInfo.url", - "type": "string", - "label": "url", - "description": [], + "id": "def-server.CapabilitiesSetup.registerSwitcher", + "type": "Function", + "label": "registerSwitcher", + "signature": [ + "(switcher: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.CapabilitiesSwitcher", + "text": "CapabilitiesSwitcher" + }, + ") => void" + ], + "description": [ + "\nRegister a {@link CapabilitiesSwitcher} to be used to change the default state\nof the {@link Capabilities} entries when resolving them.\n\nA capabilities switcher can only change the state of existing capabilities.\nCapabilities added or removed when invoking the switcher will be ignored.\n" + ], + "children": [ + { + "type": "Function", + "label": "switcher", + "isRequired": true, + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.CapabilitiesSwitcher", + "text": "CapabilitiesSwitcher" + } + ], + "description": [], + "source": { + "path": "src/core/server/capabilities/capabilities_service.ts", + "lineNumber": 93, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/capabilities/capabilities_service.ts#L93" + } + } + ], + "tags": [ + "example" + ], + "returnComment": [], "source": { - "path": "src/core/server/elasticsearch/legacy/api_types.ts", - "lineNumber": 361, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L361" + "path": "src/core/server/capabilities/capabilities_service.ts", + "lineNumber": 93, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/capabilities/capabilities_service.ts#L93" } - }, + } + ], + "source": { + "path": "src/core/server/capabilities/capabilities_service.ts", + "lineNumber": 30, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/capabilities/capabilities_service.ts#L30" + }, + "initialIsOpen": false + }, + { + "id": "def-server.CapabilitiesStart", + "type": "Interface", + "label": "CapabilitiesStart", + "description": [ + "\nAPIs to access the application {@link Capabilities}.\n" + ], + "tags": [ + "public" + ], + "children": [ { + "id": "def-server.CapabilitiesStart.resolveCapabilities", + "type": "Function", + "label": "resolveCapabilities", + "signature": [ + "(request: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.KibanaRequest", + "text": "KibanaRequest" + }, + ", options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.ResolveCapabilitiesOptions", + "text": "ResolveCapabilitiesOptions" + }, + " | undefined) => Promise<", + { + "pluginId": "core", + "scope": "common", + "docId": "kibCorePluginApi", + "section": "def-common.Capabilities", + "text": "Capabilities" + }, + ">" + ], + "description": [ + "\nResolve the {@link Capabilities} to be used for given request" + ], + "children": [ + { + "type": "Object", + "label": "request", + "isRequired": true, + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.KibanaRequest", + "text": "KibanaRequest" + }, + "" + ], + "description": [], + "source": { + "path": "src/core/server/capabilities/capabilities_service.ts", + "lineNumber": 118, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/capabilities/capabilities_service.ts#L118" + } + }, + { + "type": "Object", + "label": "options", + "isRequired": false, + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.ResolveCapabilitiesOptions", + "text": "ResolveCapabilitiesOptions" + }, + " | undefined" + ], + "description": [], + "source": { + "path": "src/core/server/capabilities/capabilities_service.ts", + "lineNumber": 119, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/capabilities/capabilities_service.ts#L119" + } + } + ], "tags": [], - "id": "def-server.DeprecationInfo.details", - "type": "string", - "label": "details", - "description": [], + "returnComment": [], "source": { - "path": "src/core/server/elasticsearch/legacy/api_types.ts", - "lineNumber": 362, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L362" - }, - "signature": [ - "string | undefined" - ] + "path": "src/core/server/capabilities/capabilities_service.ts", + "lineNumber": 117, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/capabilities/capabilities_service.ts#L117" + } } ], "source": { - "path": "src/core/server/elasticsearch/legacy/api_types.ts", - "lineNumber": 358, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L358" + "path": "src/core/server/capabilities/capabilities_service.ts", + "lineNumber": 113, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/capabilities/capabilities_service.ts#L113" }, "initialIsOpen": false }, { - "id": "def-server.IndexSettingsDeprecationInfo", + "id": "def-server.ContextSetup", "type": "Interface", - "label": "IndexSettingsDeprecationInfo", - "description": [], + "label": "ContextSetup", + "description": [ + "\n{@inheritdoc IContextContainer}\n" + ], "tags": [ - "deprecated", + "example", "public" ], "children": [ { - "id": "def-server.IndexSettingsDeprecationInfo.Unnamed", - "type": "Any", - "label": "Unnamed", + "id": "def-server.ContextSetup.createContextContainer", + "type": "Function", + "label": "createContextContainer", + "signature": [ + "() => ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCorePluginApi", + "section": "def-server.IContextContainer", + "text": "IContextContainer" + } + ], + "description": [ + "\nCreates a new {@link IContextContainer} for a service owner." + ], + "children": [], "tags": [], - "description": [], + "returnComment": [], "source": { - "path": "src/core/server/elasticsearch/legacy/api_types.ts", - "lineNumber": 370, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L370" - }, - "signature": [ - "any" - ] + "path": "src/core/server/context/context_service.ts", + "lineNumber": 96, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/context/context_service.ts#L96" + } } ], "source": { - "path": "src/core/server/elasticsearch/legacy/api_types.ts", - "lineNumber": 369, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L369" + "path": "src/core/server/context/context_service.ts", + "lineNumber": 92, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/context/context_service.ts#L92" }, "initialIsOpen": false }, { - "id": "def-server.DeprecationAPIResponse", + "id": "def-server.HttpResources", "type": "Interface", - "label": "DeprecationAPIResponse", - "description": [], + "label": "HttpResources", + "description": [ + "\nHttpResources service is responsible for serving static & dynamic assets for Kibana application via HTTP.\nProvides API allowing plug-ins to respond with:\n- a pre-configured HTML page bootstrapping Kibana client app\n- custom HTML page\n- custom JS script file." + ], "tags": [ - "deprecated", "public" ], "children": [ { "tags": [], - "id": "def-server.DeprecationAPIResponse.cluster_settings", - "type": "Array", - "label": "cluster_settings", - "description": [], + "id": "def-server.HttpResources.register", + "type": "Function", + "label": "register", + "description": [ + "To register a route handler executing passed function to form response." + ], "source": { - "path": "src/core/server/elasticsearch/legacy/api_types.ts", - "lineNumber": 378, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L378" + "path": "src/core/server/http_resources/types.ts", + "lineNumber": 101, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http_resources/types.ts#L101" }, "signature": [ + "(route: ", { "pluginId": "core", "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.DeprecationInfo", - "text": "DeprecationInfo" + "docId": "kibCoreHttpPluginApi", + "section": "def-server.RouteConfig", + "text": "RouteConfig" }, - "[]" - ] - }, - { - "tags": [], - "id": "def-server.DeprecationAPIResponse.index_settings", - "type": "Object", - "label": "index_settings", - "description": [], - "source": { - "path": "src/core/server/elasticsearch/legacy/api_types.ts", - "lineNumber": 381, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L381" - }, - "signature": [ + ", handler: ", { "pluginId": "core", "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.IndexSettingsDeprecationInfo", - "text": "IndexSettingsDeprecationInfo" - } + "docId": "kibCoreHttpPluginApi", + "section": "def-server.RequestHandler", + "text": "RequestHandler" + }, + " | Error | { message: string | Error; attributes?: Record | undefined; } | Buffer | ", + "Stream" ] } ], "source": { - "path": "src/core/server/elasticsearch/legacy/api_types.ts", - "lineNumber": 377, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L377" + "path": "src/core/server/http_resources/types.ts", + "lineNumber": 99, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http_resources/types.ts#L99" }, "initialIsOpen": false } @@ -17267,6 +17239,44 @@ ], "initialIsOpen": false }, + { + "id": "def-server.MIGRATION_ASSISTANCE_INDEX_ACTION", + "type": "Type", + "label": "MIGRATION_ASSISTANCE_INDEX_ACTION", + "tags": [ + "deprecated", + "public" + ], + "description": [], + "source": { + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 326, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L326" + }, + "signature": [ + "\"upgrade\" | \"reindex\"" + ], + "initialIsOpen": false + }, + { + "id": "def-server.MIGRATION_DEPRECATION_LEVEL", + "type": "Type", + "label": "MIGRATION_DEPRECATION_LEVEL", + "tags": [ + "deprecated", + "public" + ], + "description": [], + "source": { + "path": "src/core/server/elasticsearch/legacy/api_types.ts", + "lineNumber": 331, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L331" + }, + "signature": [ + "\"warning\" | \"none\" | \"info\" | \"critical\"" + ], + "initialIsOpen": false + }, { "id": "def-server.HttpResourcesResponseOptions", "type": "Type", @@ -17639,7 +17649,7 @@ "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/status/types.ts#L103" }, "signature": [ - "Readonly<{ toString: () => \"critical\"; valueOf: () => 3; toJSON: () => \"critical\"; }> | Readonly<{ toString: () => \"degraded\"; valueOf: () => 1; toJSON: () => \"degraded\"; }> | Readonly<{ toString: () => \"unavailable\"; valueOf: () => 2; toJSON: () => \"unavailable\"; }> | Readonly<{ toString: () => \"available\"; valueOf: () => 0; toJSON: () => \"available\"; }>" + "Readonly<{ toString: () => \"available\"; valueOf: () => 0; toJSON: () => \"available\"; }> | Readonly<{ toString: () => \"degraded\"; valueOf: () => 1; toJSON: () => \"degraded\"; }> | Readonly<{ toString: () => \"unavailable\"; valueOf: () => 2; toJSON: () => \"unavailable\"; }> | Readonly<{ toString: () => \"critical\"; valueOf: () => 3; toJSON: () => \"critical\"; }>" ], "initialIsOpen": false }, @@ -17655,8 +17665,8 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 483, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L483" + "lineNumber": 493, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/index.ts#L493" }, "signature": [ "() => Promise<[", @@ -17688,44 +17698,6 @@ "symbol" ], "initialIsOpen": false - }, - { - "id": "def-server.MIGRATION_ASSISTANCE_INDEX_ACTION", - "type": "Type", - "label": "MIGRATION_ASSISTANCE_INDEX_ACTION", - "tags": [ - "deprecated", - "public" - ], - "description": [], - "source": { - "path": "src/core/server/elasticsearch/legacy/api_types.ts", - "lineNumber": 326, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L326" - }, - "signature": [ - "\"upgrade\" | \"reindex\"" - ], - "initialIsOpen": false - }, - { - "id": "def-server.MIGRATION_DEPRECATION_LEVEL", - "type": "Type", - "label": "MIGRATION_DEPRECATION_LEVEL", - "tags": [ - "deprecated", - "public" - ], - "description": [], - "source": { - "path": "src/core/server/elasticsearch/legacy/api_types.ts", - "lineNumber": 331, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/elasticsearch/legacy/api_types.ts#L331" - }, - "signature": [ - "\"warning\" | \"none\" | \"info\" | \"critical\"" - ], - "initialIsOpen": false } ], "objects": [ diff --git a/api_docs/core_application.json b/api_docs/core_application.json index 17efa538b3122..c6aa4cfde1b50 100644 --- a/api_docs/core_application.json +++ b/api_docs/core_application.json @@ -1652,19 +1652,19 @@ ], "enums": [ { - "id": "def-public.AppLeaveActionType", + "id": "def-public.AppNavLinkStatus", "type": "Enum", - "label": "AppLeaveActionType", + "label": "AppNavLinkStatus", "tags": [ "public" ], "description": [ - "\nPossible type of actions on application leave.\n" + "\nStatus of the application's navLink.\n" ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 540, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/application/types.ts#L540" + "lineNumber": 40, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/application/types.ts#L40" }, "initialIsOpen": false }, @@ -1686,19 +1686,19 @@ "initialIsOpen": false }, { - "id": "def-public.AppNavLinkStatus", + "id": "def-public.AppLeaveActionType", "type": "Enum", - "label": "AppNavLinkStatus", + "label": "AppLeaveActionType", "tags": [ "public" ], "description": [ - "\nStatus of the application's navLink.\n" + "\nPossible type of actions on application leave.\n" ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 40, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/application/types.ts#L40" + "lineNumber": 540, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/application/types.ts#L540" }, "initialIsOpen": false } diff --git a/api_docs/core_http.json b/api_docs/core_http.json index 13edda7ee6554..284c2efc4cc38 100644 --- a/api_docs/core_http.json +++ b/api_docs/core_http.json @@ -2360,6 +2360,82 @@ }, "initialIsOpen": false }, + { + "id": "def-server.RouteValidationError", + "type": "Class", + "tags": [ + "public" + ], + "label": "RouteValidationError", + "description": [ + "\nError to return when the validation is not successful." + ], + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.RouteValidationError", + "text": "RouteValidationError" + }, + " extends ", + "SchemaTypeError" + ], + "children": [ + { + "id": "def-server.RouteValidationError.Unnamed", + "type": "Function", + "label": "Constructor", + "signature": [ + "any" + ], + "description": [], + "children": [ + { + "type": "CompoundType", + "label": "error", + "isRequired": true, + "signature": [ + "string | Error" + ], + "description": [], + "source": { + "path": "src/core/server/http/router/validator/validator_error.ts", + "lineNumber": 16, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/validator/validator_error.ts#L16" + } + }, + { + "type": "Array", + "label": "path", + "isRequired": true, + "signature": [ + "string[]" + ], + "description": [], + "source": { + "path": "src/core/server/http/router/validator/validator_error.ts", + "lineNumber": 16, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/validator/validator_error.ts#L16" + } + } + ], + "tags": [], + "returnComment": [], + "source": { + "path": "src/core/server/http/router/validator/validator_error.ts", + "lineNumber": 16, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/validator/validator_error.ts#L16" + } + } + ], + "source": { + "path": "src/core/server/http/router/validator/validator_error.ts", + "lineNumber": 15, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/validator/validator_error.ts#L15" + }, + "initialIsOpen": false + }, { "id": "def-server.KibanaRequest", "type": "Class", @@ -2393,8 +2469,8 @@ ], "source": { "path": "src/core/server/http/router/request.ts", - "lineNumber": 145, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L145" + "lineNumber": 144, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L144" } }, { @@ -2409,8 +2485,8 @@ ], "source": { "path": "src/core/server/http/router/request.ts", - "lineNumber": 153, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L153" + "lineNumber": 152, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L152" } }, { @@ -2423,8 +2499,8 @@ ], "source": { "path": "src/core/server/http/router/request.ts", - "lineNumber": 155, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L155" + "lineNumber": 154, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L154" }, "signature": [ "URL" @@ -2440,8 +2516,8 @@ ], "source": { "path": "src/core/server/http/router/request.ts", - "lineNumber": 157, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L157" + "lineNumber": 156, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L156" }, "signature": [ "Readonly<{ path: string; method: ", @@ -2471,8 +2547,8 @@ ], "source": { "path": "src/core/server/http/router/request.ts", - "lineNumber": 163, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L163" + "lineNumber": 162, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L162" }, "signature": [ { @@ -2494,8 +2570,8 @@ ], "source": { "path": "src/core/server/http/router/request.ts", - "lineNumber": 168, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L168" + "lineNumber": 167, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L167" } }, { @@ -2508,8 +2584,8 @@ ], "source": { "path": "src/core/server/http/router/request.ts", - "lineNumber": 171, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L171" + "lineNumber": 170, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L170" }, "signature": [ { @@ -2531,8 +2607,8 @@ ], "source": { "path": "src/core/server/http/router/request.ts", - "lineNumber": 173, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L173" + "lineNumber": 172, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L172" }, "signature": [ { @@ -2552,8 +2628,8 @@ "description": [], "source": { "path": "src/core/server/http/router/request.ts", - "lineNumber": 174, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L174" + "lineNumber": 173, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L173" }, "signature": [ "{ isAuthenticated: boolean; }" @@ -2569,8 +2645,8 @@ ], "source": { "path": "src/core/server/http/router/request.ts", - "lineNumber": 182, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L182" + "lineNumber": 181, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L181" }, "signature": [ "URL", @@ -2596,8 +2672,8 @@ "description": [], "source": { "path": "src/core/server/http/router/request.ts", - "lineNumber": 188, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L188" + "lineNumber": 187, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L187" } }, { @@ -2610,8 +2686,8 @@ "description": [], "source": { "path": "src/core/server/http/router/request.ts", - "lineNumber": 189, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L189" + "lineNumber": 188, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L188" } }, { @@ -2624,8 +2700,8 @@ "description": [], "source": { "path": "src/core/server/http/router/request.ts", - "lineNumber": 190, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L190" + "lineNumber": 189, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L189" } }, { @@ -2638,8 +2714,8 @@ "description": [], "source": { "path": "src/core/server/http/router/request.ts", - "lineNumber": 191, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L191" + "lineNumber": 190, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L190" } }, { @@ -2652,8 +2728,8 @@ "description": [], "source": { "path": "src/core/server/http/router/request.ts", - "lineNumber": 194, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L194" + "lineNumber": 193, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L193" } } ], @@ -2661,8 +2737,8 @@ "returnComment": [], "source": { "path": "src/core/server/http/router/request.ts", - "lineNumber": 187, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L187" + "lineNumber": 186, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L186" } } ], @@ -2672,82 +2748,6 @@ "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/request.ts#L90" }, "initialIsOpen": false - }, - { - "id": "def-server.RouteValidationError", - "type": "Class", - "tags": [ - "public" - ], - "label": "RouteValidationError", - "description": [ - "\nError to return when the validation is not successful." - ], - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.RouteValidationError", - "text": "RouteValidationError" - }, - " extends ", - "SchemaTypeError" - ], - "children": [ - { - "id": "def-server.RouteValidationError.Unnamed", - "type": "Function", - "label": "Constructor", - "signature": [ - "any" - ], - "description": [], - "children": [ - { - "type": "CompoundType", - "label": "error", - "isRequired": true, - "signature": [ - "string | Error" - ], - "description": [], - "source": { - "path": "src/core/server/http/router/validator/validator_error.ts", - "lineNumber": 16, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/validator/validator_error.ts#L16" - } - }, - { - "type": "Array", - "label": "path", - "isRequired": true, - "signature": [ - "string[]" - ], - "description": [], - "source": { - "path": "src/core/server/http/router/validator/validator_error.ts", - "lineNumber": 16, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/validator/validator_error.ts#L16" - } - } - ], - "tags": [], - "returnComment": [], - "source": { - "path": "src/core/server/http/router/validator/validator_error.ts", - "lineNumber": 16, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/validator/validator_error.ts#L16" - } - } - ], - "source": { - "path": "src/core/server/http/router/validator/validator_error.ts", - "lineNumber": 15, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/router/validator/validator_error.ts#L15" - }, - "initialIsOpen": false } ], "functions": [], @@ -3725,9 +3725,9 @@ { "pluginId": "core", "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.RequestHandlerContextContainer", - "text": "RequestHandlerContextContainer" + "docId": "kibCorePluginApi", + "section": "def-server.IContextContainer", + "text": "IContextContainer" } ] }, @@ -6509,28 +6509,7 @@ "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/http/types.ts#L30" }, "signature": [ - "IContextContainer | Error | { message: string | Error; attributes?: Record | undefined; } | Buffer | ", - "Stream", - " | undefined>(options: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.CustomHttpResponseOptions", - "text": "CustomHttpResponseOptions" - }, - ") => ", - "KibanaResponse", - "; badRequest: (options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.ErrorHttpResponseOptions", - "text": "ErrorHttpResponseOptions" - }, - ") => ", - "KibanaResponse" + "IContextContainer" ], "initialIsOpen": false }, diff --git a/api_docs/core_saved_objects.json b/api_docs/core_saved_objects.json index a108fda2c12e0..01332a30010f1 100644 --- a/api_docs/core_saved_objects.json +++ b/api_docs/core_saved_objects.json @@ -3,191 +3,395 @@ "client": { "classes": [ { - "id": "def-public.SavedObjectsClient", + "id": "def-public.SimpleSavedObject", "type": "Class", "tags": [ "public" ], - "label": "SavedObjectsClient", + "label": "SimpleSavedObject", "description": [ - "\nSaved Objects is Kibana's data persisentence mechanism allowing plugins to\nuse Elasticsearch for storing plugin state. The client-side\nSavedObjectsClient is a thin convenience library around the SavedObjects\nHTTP API for interacting with Saved Objects.\n" + "\nThis class is a very simple wrapper for SavedObjects loaded from the server\nwith the {@link SavedObjectsClient}.\n\nIt provides basic functionality for creating/saving/deleting saved objects,\nbut doesn't include any type-specific implementations.\n" + ], + "signature": [ + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SimpleSavedObject", + "text": "SimpleSavedObject" + }, + "" ], "children": [ { - "id": "def-public.SavedObjectsClient.create", - "type": "Function", - "children": [ - { - "type": "string", - "label": "type", - "isRequired": true, - "signature": [ - "string" - ], - "description": [], - "source": { - "path": "src/core/public/saved_objects/saved_objects_client.ts", - "lineNumber": 221, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L221" - } - }, - { - "type": "Uncategorized", - "label": "attributes", - "isRequired": true, - "signature": [ - "T" - ], - "description": [], - "source": { - "path": "src/core/public/saved_objects/saved_objects_client.ts", - "lineNumber": 222, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L222" - } - }, - { - "type": "Object", - "label": "options", - "isRequired": true, - "signature": [ - { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-public.SavedObjectsCreateOptions", - "text": "SavedObjectsCreateOptions" - } - ], - "description": [], - "source": { - "path": "src/core/public/saved_objects/saved_objects_client.ts", - "lineNumber": 223, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L223" - } - } - ], + "tags": [], + "id": "def-public.SimpleSavedObject.attributes", + "type": "Uncategorized", + "label": "attributes", + "description": [], + "source": { + "path": "src/core/public/saved_objects/simple_saved_object.ts", + "lineNumber": 24, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L24" + }, + "signature": [ + "T" + ] + }, + { + "tags": [], + "id": "def-public.SimpleSavedObject._version", + "type": "string", + "label": "_version", + "description": [], + "source": { + "path": "src/core/public/saved_objects/simple_saved_object.ts", + "lineNumber": 26, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L26" + }, + "signature": [ + "string | undefined" + ] + }, + { + "tags": [], + "id": "def-public.SimpleSavedObject.id", + "type": "string", + "label": "id", + "description": [], + "source": { + "path": "src/core/public/saved_objects/simple_saved_object.ts", + "lineNumber": 27, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L27" + } + }, + { + "tags": [], + "id": "def-public.SimpleSavedObject.type", + "type": "string", + "label": "type", + "description": [], + "source": { + "path": "src/core/public/saved_objects/simple_saved_object.ts", + "lineNumber": 28, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L28" + } + }, + { + "tags": [], + "id": "def-public.SimpleSavedObject.migrationVersion", + "type": "Object", + "label": "migrationVersion", + "description": [], + "source": { + "path": "src/core/public/saved_objects/simple_saved_object.ts", + "lineNumber": 29, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L29" + }, "signature": [ - "(type: string, attributes: T, options?: ", { "pluginId": "core", - "scope": "public", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-public.SavedObjectsCreateOptions", - "text": "SavedObjectsCreateOptions" + "scope": "common", + "docId": "kibCorePluginApi", + "section": "def-common.SavedObjectsMigrationVersion", + "text": "SavedObjectsMigrationVersion" }, - ") => Promise<", + " | undefined" + ] + }, + { + "tags": [], + "id": "def-public.SimpleSavedObject.coreMigrationVersion", + "type": "string", + "label": "coreMigrationVersion", + "description": [], + "source": { + "path": "src/core/public/saved_objects/simple_saved_object.ts", + "lineNumber": 30, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L30" + }, + "signature": [ + "string | undefined" + ] + }, + { + "tags": [], + "id": "def-public.SimpleSavedObject.error", + "type": "Object", + "label": "error", + "description": [], + "source": { + "path": "src/core/public/saved_objects/simple_saved_object.ts", + "lineNumber": 31, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L31" + }, + "signature": [ { "pluginId": "core", - "scope": "public", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-public.SimpleSavedObject", - "text": "SimpleSavedObject" + "scope": "common", + "docId": "kibCorePluginApi", + "section": "def-common.SavedObjectError", + "text": "SavedObjectError" }, - ">" - ], - "description": [ - "\nPersists an object\n" - ], - "label": "create", + " | undefined" + ] + }, + { + "tags": [], + "id": "def-public.SimpleSavedObject.references", + "type": "Array", + "label": "references", + "description": [], "source": { - "path": "src/core/public/saved_objects/saved_objects_client.ts", - "lineNumber": 220, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L220" + "path": "src/core/public/saved_objects/simple_saved_object.ts", + "lineNumber": 32, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L32" }, - "tags": [], - "returnComment": [] + "signature": [ + { + "pluginId": "core", + "scope": "common", + "docId": "kibCorePluginApi", + "section": "def-common.SavedObjectReference", + "text": "SavedObjectReference" + }, + "[]" + ] }, { - "id": "def-public.SavedObjectsClient.bulkCreate", + "id": "def-public.SimpleSavedObject.Unnamed", "type": "Function", + "label": "Constructor", + "signature": [ + "any" + ], + "description": [], "children": [ { - "type": "Array", - "label": "objects", + "type": "Object", + "label": "client", "isRequired": true, "signature": [ + "Pick<", { "pluginId": "core", "scope": "public", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-public.SavedObjectsBulkCreateObject", - "text": "SavedObjectsBulkCreateObject" + "section": "def-public.SavedObjectsClient", + "text": "SavedObjectsClient" }, - "[]" + ", \"get\" | \"delete\" | \"create\" | \"find\" | \"update\" | \"bulkCreate\" | \"bulkGet\" | \"bulkUpdate\">" ], "description": [], "source": { - "path": "src/core/public/saved_objects/saved_objects_client.ts", - "lineNumber": 256, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L256" + "path": "src/core/public/saved_objects/simple_saved_object.ts", + "lineNumber": 35, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L35" } }, { "type": "Object", - "label": "options", + "label": "{\n id,\n type,\n version,\n attributes,\n error,\n references,\n migrationVersion,\n coreMigrationVersion,\n }", "isRequired": true, "signature": [ { "pluginId": "core", - "scope": "public", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-public.SavedObjectsBulkCreateOptions", - "text": "SavedObjectsBulkCreateOptions" - } + "scope": "common", + "docId": "kibCorePluginApi", + "section": "def-common.SavedObject", + "text": "SavedObject" + }, + "" ], "description": [], "source": { - "path": "src/core/public/saved_objects/saved_objects_client.ts", - "lineNumber": 257, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L257" + "path": "src/core/public/saved_objects/simple_saved_object.ts", + "lineNumber": 36, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L36" } } ], + "tags": [], + "returnComment": [], + "source": { + "path": "src/core/public/saved_objects/simple_saved_object.ts", + "lineNumber": 34, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L34" + } + }, + { + "id": "def-public.SimpleSavedObject.get", + "type": "Function", + "label": "get", "signature": [ - "(objects?: ", + "(key: string) => any" + ], + "description": [], + "children": [ { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-public.SavedObjectsBulkCreateObject", - "text": "SavedObjectsBulkCreateObject" - }, - "[], options?: ", + "type": "string", + "label": "key", + "isRequired": true, + "signature": [ + "string" + ], + "description": [], + "source": { + "path": "src/core/public/saved_objects/simple_saved_object.ts", + "lineNumber": 59, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L59" + } + } + ], + "tags": [], + "returnComment": [], + "source": { + "path": "src/core/public/saved_objects/simple_saved_object.ts", + "lineNumber": 59, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L59" + } + }, + { + "id": "def-public.SimpleSavedObject.set", + "type": "Function", + "label": "set", + "signature": [ + "(key: string, value: any) => T" + ], + "description": [], + "children": [ { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-public.SavedObjectsBulkCreateOptions", - "text": "SavedObjectsBulkCreateOptions" + "type": "string", + "label": "key", + "isRequired": true, + "signature": [ + "string" + ], + "description": [], + "source": { + "path": "src/core/public/saved_objects/simple_saved_object.ts", + "lineNumber": 63, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L63" + } }, - ") => Promise<", + { + "type": "Any", + "label": "value", + "isRequired": true, + "signature": [ + "any" + ], + "description": [], + "source": { + "path": "src/core/public/saved_objects/simple_saved_object.ts", + "lineNumber": 63, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L63" + } + } + ], + "tags": [], + "returnComment": [], + "source": { + "path": "src/core/public/saved_objects/simple_saved_object.ts", + "lineNumber": 63, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L63" + } + }, + { + "id": "def-public.SimpleSavedObject.has", + "type": "Function", + "label": "has", + "signature": [ + "(key: string) => boolean" + ], + "description": [], + "children": [ + { + "type": "string", + "label": "key", + "isRequired": true, + "signature": [ + "string" + ], + "description": [], + "source": { + "path": "src/core/public/saved_objects/simple_saved_object.ts", + "lineNumber": 67, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L67" + } + } + ], + "tags": [], + "returnComment": [], + "source": { + "path": "src/core/public/saved_objects/simple_saved_object.ts", + "lineNumber": 67, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L67" + } + }, + { + "id": "def-public.SimpleSavedObject.save", + "type": "Function", + "label": "save", + "signature": [ + "() => Promise<", { "pluginId": "core", "scope": "public", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-public.SavedObjectsBatchResponse", - "text": "SavedObjectsBatchResponse" + "section": "def-public.SimpleSavedObject", + "text": "SimpleSavedObject" }, - ">" - ], - "description": [ - "\nCreates multiple documents at once\n" + ">" ], - "label": "bulkCreate", + "description": [], + "children": [], + "tags": [], + "returnComment": [], "source": { - "path": "src/core/public/saved_objects/saved_objects_client.ts", - "lineNumber": 255, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L255" - }, - "tags": [ - "property" - ], - "returnComment": [ - "The result of the create operation containing created saved objects." - ] + "path": "src/core/public/saved_objects/simple_saved_object.ts", + "lineNumber": 71, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L71" + } }, { - "id": "def-public.SavedObjectsClient.delete", + "id": "def-public.SimpleSavedObject.delete", + "type": "Function", + "label": "delete", + "signature": [ + "() => Promise<{}>" + ], + "description": [], + "children": [], + "tags": [], + "returnComment": [], + "source": { + "path": "src/core/public/saved_objects/simple_saved_object.ts", + "lineNumber": 86, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L86" + } + } + ], + "source": { + "path": "src/core/public/saved_objects/simple_saved_object.ts", + "lineNumber": 23, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L23" + }, + "initialIsOpen": false + }, + { + "id": "def-public.SavedObjectsClient", + "type": "Class", + "tags": [ + "public" + ], + "label": "SavedObjectsClient", + "description": [ + "\nSaved Objects is Kibana's data persisentence mechanism allowing plugins to\nuse Elasticsearch for storing plugin state. The client-side\nSavedObjectsClient is a thin convenience library around the SavedObjects\nHTTP API for interacting with Saved Objects.\n" + ], + "children": [ + { + "id": "def-public.SavedObjectsClient.create", "type": "Function", "children": [ { @@ -200,139 +404,167 @@ "description": [], "source": { "path": "src/core/public/saved_objects/saved_objects_client.ts", - "lineNumber": 284, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L284" + "lineNumber": 221, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L221" } }, { - "type": "string", - "label": "id", + "type": "Uncategorized", + "label": "attributes", "isRequired": true, "signature": [ - "string" + "T" ], "description": [], "source": { "path": "src/core/public/saved_objects/saved_objects_client.ts", - "lineNumber": 285, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L285" + "lineNumber": 222, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L222" } }, { "type": "Object", "label": "options", - "isRequired": false, + "isRequired": true, "signature": [ { "pluginId": "core", "scope": "public", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-public.SavedObjectsDeleteOptions", - "text": "SavedObjectsDeleteOptions" - }, - " | undefined" + "section": "def-public.SavedObjectsCreateOptions", + "text": "SavedObjectsCreateOptions" + } ], "description": [], "source": { "path": "src/core/public/saved_objects/saved_objects_client.ts", - "lineNumber": 286, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L286" + "lineNumber": 223, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L223" } } ], "signature": [ - "(type: string, id: string, options?: ", + "(type: string, attributes: T, options?: ", { "pluginId": "core", "scope": "public", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-public.SavedObjectsDeleteOptions", - "text": "SavedObjectsDeleteOptions" + "section": "def-public.SavedObjectsCreateOptions", + "text": "SavedObjectsCreateOptions" }, - " | undefined) => Promise<{}>" + ") => Promise<", + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SimpleSavedObject", + "text": "SimpleSavedObject" + }, + ">" ], "description": [ - "\nDeletes an object\n" + "\nPersists an object\n" ], - "label": "delete", + "label": "create", "source": { "path": "src/core/public/saved_objects/saved_objects_client.ts", - "lineNumber": 283, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L283" + "lineNumber": 220, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L220" }, "tags": [], "returnComment": [] }, { - "id": "def-public.SavedObjectsClient.find", + "id": "def-public.SavedObjectsClient.bulkCreate", "type": "Function", "children": [ { - "type": "Object", - "label": "options", - "isRequired": true, + "type": "Array", + "label": "objects", + "isRequired": true, "signature": [ - "Pick<", { "pluginId": "core", - "scope": "server", + "scope": "public", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsFindOptions", - "text": "SavedObjectsFindOptions" + "section": "def-public.SavedObjectsBulkCreateObject", + "text": "SavedObjectsBulkCreateObject" }, - ", \"type\" | \"filter\" | \"fields\" | \"search\" | \"page\" | \"perPage\" | \"sortField\" | \"searchFields\" | \"hasReference\" | \"hasReferenceOperator\" | \"defaultSearchOperator\" | \"namespaces\" | \"preference\">" + "[]" ], "description": [], "source": { "path": "src/core/public/saved_objects/saved_objects_client.ts", - "lineNumber": 314, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L314" + "lineNumber": 256, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L256" + } + }, + { + "type": "Object", + "label": "options", + "isRequired": true, + "signature": [ + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SavedObjectsBulkCreateOptions", + "text": "SavedObjectsBulkCreateOptions" + } + ], + "description": [], + "source": { + "path": "src/core/public/saved_objects/saved_objects_client.ts", + "lineNumber": 257, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L257" } } ], "signature": [ - "(options: Pick<", + "(objects?: ", { "pluginId": "core", - "scope": "server", + "scope": "public", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsFindOptions", - "text": "SavedObjectsFindOptions" + "section": "def-public.SavedObjectsBulkCreateObject", + "text": "SavedObjectsBulkCreateObject" }, - ", \"type\" | \"filter\" | \"fields\" | \"search\" | \"page\" | \"perPage\" | \"sortField\" | \"searchFields\" | \"hasReference\" | \"hasReferenceOperator\" | \"defaultSearchOperator\" | \"namespaces\" | \"preference\">) => Promise<", + "[], options?: ", { "pluginId": "core", "scope": "public", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-public.SavedObjectsFindResponsePublic", - "text": "SavedObjectsFindResponsePublic" + "section": "def-public.SavedObjectsBulkCreateOptions", + "text": "SavedObjectsBulkCreateOptions" }, - ">" + ") => Promise<", + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SavedObjectsBatchResponse", + "text": "SavedObjectsBatchResponse" + }, + ">" ], "description": [ - "\nSearch for objects\n" + "\nCreates multiple documents at once\n" ], - "label": "find", + "label": "bulkCreate", "source": { "path": "src/core/public/saved_objects/saved_objects_client.ts", - "lineNumber": 313, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L313" + "lineNumber": 255, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L255" }, "tags": [ - "property", - "property", - "property", - "property", - "property", - "property", "property" ], "returnComment": [ - "A find result with objects matching the specified search." + "The result of the create operation containing created saved objects." ] }, { - "id": "def-public.SavedObjectsClient.get", + "id": "def-public.SavedObjectsClient.delete", "type": "Function", "children": [ { @@ -345,8 +577,8 @@ "description": [], "source": { "path": "src/core/public/saved_objects/saved_objects_client.ts", - "lineNumber": 372, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L372" + "lineNumber": 284, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L284" } }, { @@ -359,108 +591,126 @@ "description": [], "source": { "path": "src/core/public/saved_objects/saved_objects_client.ts", - "lineNumber": 372, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L372" + "lineNumber": 285, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L285" + } + }, + { + "type": "Object", + "label": "options", + "isRequired": false, + "signature": [ + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SavedObjectsDeleteOptions", + "text": "SavedObjectsDeleteOptions" + }, + " | undefined" + ], + "description": [], + "source": { + "path": "src/core/public/saved_objects/saved_objects_client.ts", + "lineNumber": 286, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L286" } } ], "signature": [ - "(type: string, id: string) => Promise<", + "(type: string, id: string, options?: ", { "pluginId": "core", "scope": "public", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-public.SimpleSavedObject", - "text": "SimpleSavedObject" + "section": "def-public.SavedObjectsDeleteOptions", + "text": "SavedObjectsDeleteOptions" }, - ">" + " | undefined) => Promise<{}>" ], "description": [ - "\nFetches a single object\n" + "\nDeletes an object\n" ], - "label": "get", + "label": "delete", "source": { "path": "src/core/public/saved_objects/saved_objects_client.ts", - "lineNumber": 372, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L372" + "lineNumber": 283, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L283" }, "tags": [], - "returnComment": [ - "The saved object for the given type and id." - ] + "returnComment": [] }, { - "id": "def-public.SavedObjectsClient.bulkGet", + "id": "def-public.SavedObjectsClient.find", "type": "Function", "children": [ { - "type": "Array", - "label": "objects", + "type": "Object", + "label": "options", "isRequired": true, "signature": [ - "{ id: string; type: string; }[]" + "Pick<", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsFindOptions", + "text": "SavedObjectsFindOptions" + }, + ", \"type\" | \"filter\" | \"fields\" | \"search\" | \"page\" | \"perPage\" | \"sortField\" | \"searchFields\" | \"hasReference\" | \"hasReferenceOperator\" | \"defaultSearchOperator\" | \"namespaces\" | \"preference\">" ], "description": [], "source": { "path": "src/core/public/saved_objects/saved_objects_client.ts", - "lineNumber": 395, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L395" + "lineNumber": 314, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L314" } } ], "signature": [ - "(objects?: { id: string; type: string; }[]) => Promise<", + "(options: Pick<", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsFindOptions", + "text": "SavedObjectsFindOptions" + }, + ", \"type\" | \"filter\" | \"fields\" | \"search\" | \"page\" | \"perPage\" | \"sortField\" | \"searchFields\" | \"hasReference\" | \"hasReferenceOperator\" | \"defaultSearchOperator\" | \"namespaces\" | \"preference\">) => Promise<", { "pluginId": "core", "scope": "public", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-public.SavedObjectsBatchResponse", - "text": "SavedObjectsBatchResponse" + "section": "def-public.SavedObjectsFindResponsePublic", + "text": "SavedObjectsFindResponsePublic" }, - ">" + ">" ], "description": [ - "\nReturns an array of objects by id\n" + "\nSearch for objects\n" ], - "label": "bulkGet", + "label": "find", "source": { "path": "src/core/public/saved_objects/saved_objects_client.ts", - "lineNumber": 395, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L395" + "lineNumber": 313, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L313" }, "tags": [ - "example" + "property", + "property", + "property", + "property", + "property", + "property", + "property" ], "returnComment": [ - "The saved objects with the given type and ids requested" + "A find result with objects matching the specified search." ] }, { - "id": "def-public.SavedObjectsClient.update", + "id": "def-public.SavedObjectsClient.get", "type": "Function", - "label": "update", - "signature": [ - "(type: string, id: string, attributes: T, { version, migrationVersion, references }?: ", - { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-public.SavedObjectsUpdateOptions", - "text": "SavedObjectsUpdateOptions" - }, - ") => Promise<", - { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-public.SimpleSavedObject", - "text": "SimpleSavedObject" - }, - ">" - ], - "description": [ - "\nUpdates an object\n" - ], "children": [ { "type": "string", @@ -472,8 +722,8 @@ "description": [], "source": { "path": "src/core/public/saved_objects/saved_objects_client.ts", - "lineNumber": 427, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L427" + "lineNumber": 372, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L372" } }, { @@ -486,499 +736,249 @@ "description": [], "source": { "path": "src/core/public/saved_objects/saved_objects_client.ts", - "lineNumber": 428, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L428" - } - }, - { - "type": "Uncategorized", - "label": "attributes", - "isRequired": true, - "signature": [ - "T" - ], - "description": [], - "source": { - "path": "src/core/public/saved_objects/saved_objects_client.ts", - "lineNumber": 429, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L429" - } - }, - { - "type": "Object", - "label": "{ version, migrationVersion, references }", - "isRequired": true, - "signature": [ - { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-public.SavedObjectsUpdateOptions", - "text": "SavedObjectsUpdateOptions" - } - ], - "description": [], - "source": { - "path": "src/core/public/saved_objects/saved_objects_client.ts", - "lineNumber": 430, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L430" + "lineNumber": 372, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L372" } } ], - "tags": [ - "prop", - "prop" - ], - "returnComment": [], - "source": { - "path": "src/core/public/saved_objects/saved_objects_client.ts", - "lineNumber": 426, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L426" - } - }, - { - "id": "def-public.SavedObjectsClient.bulkUpdate", - "type": "Function", - "label": "bulkUpdate", "signature": [ - "(objects?: ", - { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-public.SavedObjectsBulkUpdateObject", - "text": "SavedObjectsBulkUpdateObject" - }, - "[]) => Promise<", + "(type: string, id: string) => Promise<", { "pluginId": "core", "scope": "public", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-public.SavedObjectsBatchResponse", - "text": "SavedObjectsBatchResponse" + "section": "def-public.SimpleSavedObject", + "text": "SimpleSavedObject" }, - ">" + ">" ], "description": [ - "\nUpdate multiple documents at once\n" - ], - "children": [ - { - "type": "Array", - "label": "objects", - "isRequired": true, - "signature": [ - { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-public.SavedObjectsBulkUpdateObject", - "text": "SavedObjectsBulkUpdateObject" - }, - "[]" - ], - "description": [ - "- [{ type, id, attributes, options: { version, references } }]" - ], - "source": { - "path": "src/core/public/saved_objects/saved_objects_client.ts", - "lineNumber": 458, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L458" - } - } - ], - "tags": [], - "returnComment": [ - "The result of the update operation containing both failed and updated saved objects." + "\nFetches a single object\n" ], + "label": "get", "source": { "path": "src/core/public/saved_objects/saved_objects_client.ts", - "lineNumber": 458, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L458" - } - } - ], - "source": { - "path": "src/core/public/saved_objects/saved_objects_client.ts", - "lineNumber": 165, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L165" - }, - "initialIsOpen": false - }, - { - "id": "def-public.SimpleSavedObject", - "type": "Class", - "tags": [ - "public" - ], - "label": "SimpleSavedObject", - "description": [ - "\nThis class is a very simple wrapper for SavedObjects loaded from the server\nwith the {@link SavedObjectsClient}.\n\nIt provides basic functionality for creating/saving/deleting saved objects,\nbut doesn't include any type-specific implementations.\n" - ], - "signature": [ - { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-public.SimpleSavedObject", - "text": "SimpleSavedObject" - }, - "" - ], - "children": [ - { - "tags": [], - "id": "def-public.SimpleSavedObject.attributes", - "type": "Uncategorized", - "label": "attributes", - "description": [], - "source": { - "path": "src/core/public/saved_objects/simple_saved_object.ts", - "lineNumber": 24, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L24" - }, - "signature": [ - "T" - ] - }, - { - "tags": [], - "id": "def-public.SimpleSavedObject._version", - "type": "string", - "label": "_version", - "description": [], - "source": { - "path": "src/core/public/saved_objects/simple_saved_object.ts", - "lineNumber": 26, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L26" - }, - "signature": [ - "string | undefined" - ] - }, - { - "tags": [], - "id": "def-public.SimpleSavedObject.id", - "type": "string", - "label": "id", - "description": [], - "source": { - "path": "src/core/public/saved_objects/simple_saved_object.ts", - "lineNumber": 27, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L27" - } - }, - { - "tags": [], - "id": "def-public.SimpleSavedObject.type", - "type": "string", - "label": "type", - "description": [], - "source": { - "path": "src/core/public/saved_objects/simple_saved_object.ts", - "lineNumber": 28, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L28" - } - }, - { - "tags": [], - "id": "def-public.SimpleSavedObject.migrationVersion", - "type": "Object", - "label": "migrationVersion", - "description": [], - "source": { - "path": "src/core/public/saved_objects/simple_saved_object.ts", - "lineNumber": 29, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L29" - }, - "signature": [ - { - "pluginId": "core", - "scope": "common", - "docId": "kibCorePluginApi", - "section": "def-common.SavedObjectsMigrationVersion", - "text": "SavedObjectsMigrationVersion" - }, - " | undefined" - ] - }, - { - "tags": [], - "id": "def-public.SimpleSavedObject.coreMigrationVersion", - "type": "string", - "label": "coreMigrationVersion", - "description": [], - "source": { - "path": "src/core/public/saved_objects/simple_saved_object.ts", - "lineNumber": 30, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L30" - }, - "signature": [ - "string | undefined" - ] - }, - { - "tags": [], - "id": "def-public.SimpleSavedObject.error", - "type": "Object", - "label": "error", - "description": [], - "source": { - "path": "src/core/public/saved_objects/simple_saved_object.ts", - "lineNumber": 31, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L31" + "lineNumber": 372, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L372" }, - "signature": [ - { - "pluginId": "core", - "scope": "common", - "docId": "kibCorePluginApi", - "section": "def-common.SavedObjectError", - "text": "SavedObjectError" - }, - " | undefined" - ] - }, - { "tags": [], - "id": "def-public.SimpleSavedObject.references", - "type": "Array", - "label": "references", - "description": [], - "source": { - "path": "src/core/public/saved_objects/simple_saved_object.ts", - "lineNumber": 32, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L32" - }, - "signature": [ - { - "pluginId": "core", - "scope": "common", - "docId": "kibCorePluginApi", - "section": "def-common.SavedObjectReference", - "text": "SavedObjectReference" - }, - "[]" + "returnComment": [ + "The saved object for the given type and id." ] }, { - "id": "def-public.SimpleSavedObject.Unnamed", + "id": "def-public.SavedObjectsClient.bulkGet", "type": "Function", - "label": "Constructor", - "signature": [ - "any" - ], - "description": [], "children": [ { - "type": "Object", - "label": "client", - "isRequired": true, - "signature": [ - "Pick<", - { - "pluginId": "core", - "scope": "public", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-public.SavedObjectsClient", - "text": "SavedObjectsClient" - }, - ", \"get\" | \"delete\" | \"create\" | \"find\" | \"update\" | \"bulkCreate\" | \"bulkGet\" | \"bulkUpdate\">" - ], - "description": [], - "source": { - "path": "src/core/public/saved_objects/simple_saved_object.ts", - "lineNumber": 35, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L35" - } - }, - { - "type": "Object", - "label": "{\n id,\n type,\n version,\n attributes,\n error,\n references,\n migrationVersion,\n coreMigrationVersion,\n }", + "type": "Array", + "label": "objects", "isRequired": true, "signature": [ - { - "pluginId": "core", - "scope": "common", - "docId": "kibCorePluginApi", - "section": "def-common.SavedObject", - "text": "SavedObject" - }, - "" + "{ id: string; type: string; }[]" ], "description": [], "source": { - "path": "src/core/public/saved_objects/simple_saved_object.ts", - "lineNumber": 36, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L36" + "path": "src/core/public/saved_objects/saved_objects_client.ts", + "lineNumber": 395, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L395" } } ], - "tags": [], - "returnComment": [], + "signature": [ + "(objects?: { id: string; type: string; }[]) => Promise<", + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SavedObjectsBatchResponse", + "text": "SavedObjectsBatchResponse" + }, + ">" + ], + "description": [ + "\nReturns an array of objects by id\n" + ], + "label": "bulkGet", "source": { - "path": "src/core/public/saved_objects/simple_saved_object.ts", - "lineNumber": 34, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L34" - } + "path": "src/core/public/saved_objects/saved_objects_client.ts", + "lineNumber": 395, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L395" + }, + "tags": [ + "example" + ], + "returnComment": [ + "The saved objects with the given type and ids requested" + ] }, { - "id": "def-public.SimpleSavedObject.get", + "id": "def-public.SavedObjectsClient.update", "type": "Function", - "label": "get", + "label": "update", "signature": [ - "(key: string) => any" + "(type: string, id: string, attributes: T, { version, migrationVersion, references }?: ", + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SavedObjectsUpdateOptions", + "text": "SavedObjectsUpdateOptions" + }, + ") => Promise<", + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SimpleSavedObject", + "text": "SimpleSavedObject" + }, + ">" + ], + "description": [ + "\nUpdates an object\n" ], - "description": [], "children": [ { "type": "string", - "label": "key", + "label": "type", "isRequired": true, "signature": [ "string" ], "description": [], "source": { - "path": "src/core/public/saved_objects/simple_saved_object.ts", - "lineNumber": 59, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L59" + "path": "src/core/public/saved_objects/saved_objects_client.ts", + "lineNumber": 427, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L427" } - } - ], - "tags": [], - "returnComment": [], - "source": { - "path": "src/core/public/saved_objects/simple_saved_object.ts", - "lineNumber": 59, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L59" - } - }, - { - "id": "def-public.SimpleSavedObject.set", - "type": "Function", - "label": "set", - "signature": [ - "(key: string, value: any) => T" - ], - "description": [], - "children": [ + }, { "type": "string", - "label": "key", + "label": "id", "isRequired": true, "signature": [ "string" ], "description": [], "source": { - "path": "src/core/public/saved_objects/simple_saved_object.ts", - "lineNumber": 63, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L63" + "path": "src/core/public/saved_objects/saved_objects_client.ts", + "lineNumber": 428, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L428" } }, { - "type": "Any", - "label": "value", + "type": "Uncategorized", + "label": "attributes", "isRequired": true, "signature": [ - "any" + "T" ], "description": [], "source": { - "path": "src/core/public/saved_objects/simple_saved_object.ts", - "lineNumber": 63, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L63" + "path": "src/core/public/saved_objects/saved_objects_client.ts", + "lineNumber": 429, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L429" } - } - ], - "tags": [], - "returnComment": [], - "source": { - "path": "src/core/public/saved_objects/simple_saved_object.ts", - "lineNumber": 63, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L63" - } - }, - { - "id": "def-public.SimpleSavedObject.has", - "type": "Function", - "label": "has", - "signature": [ - "(key: string) => boolean" - ], - "description": [], - "children": [ + }, { - "type": "string", - "label": "key", + "type": "Object", + "label": "{ version, migrationVersion, references }", "isRequired": true, "signature": [ - "string" + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SavedObjectsUpdateOptions", + "text": "SavedObjectsUpdateOptions" + } ], "description": [], "source": { - "path": "src/core/public/saved_objects/simple_saved_object.ts", - "lineNumber": 67, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L67" + "path": "src/core/public/saved_objects/saved_objects_client.ts", + "lineNumber": 430, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L430" } } ], - "tags": [], + "tags": [ + "prop", + "prop" + ], "returnComment": [], "source": { - "path": "src/core/public/saved_objects/simple_saved_object.ts", - "lineNumber": 67, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L67" + "path": "src/core/public/saved_objects/saved_objects_client.ts", + "lineNumber": 426, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L426" } }, { - "id": "def-public.SimpleSavedObject.save", + "id": "def-public.SavedObjectsClient.bulkUpdate", "type": "Function", - "label": "save", + "label": "bulkUpdate", "signature": [ - "() => Promise<", + "(objects?: ", { "pluginId": "core", "scope": "public", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-public.SimpleSavedObject", - "text": "SimpleSavedObject" + "section": "def-public.SavedObjectsBulkUpdateObject", + "text": "SavedObjectsBulkUpdateObject" }, - ">" + "[]) => Promise<", + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SavedObjectsBatchResponse", + "text": "SavedObjectsBatchResponse" + }, + ">" ], - "description": [], - "children": [], - "tags": [], - "returnComment": [], - "source": { - "path": "src/core/public/saved_objects/simple_saved_object.ts", - "lineNumber": 71, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L71" - } - }, - { - "id": "def-public.SimpleSavedObject.delete", - "type": "Function", - "label": "delete", - "signature": [ - "() => Promise<{}>" + "description": [ + "\nUpdate multiple documents at once\n" + ], + "children": [ + { + "type": "Array", + "label": "objects", + "isRequired": true, + "signature": [ + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-public.SavedObjectsBulkUpdateObject", + "text": "SavedObjectsBulkUpdateObject" + }, + "[]" + ], + "description": [ + "- [{ type, id, attributes, options: { version, references } }]" + ], + "source": { + "path": "src/core/public/saved_objects/saved_objects_client.ts", + "lineNumber": 458, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L458" + } + } ], - "description": [], - "children": [], "tags": [], - "returnComment": [], + "returnComment": [ + "The result of the update operation containing both failed and updated saved objects." + ], "source": { - "path": "src/core/public/saved_objects/simple_saved_object.ts", - "lineNumber": 86, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L86" + "path": "src/core/public/saved_objects/saved_objects_client.ts", + "lineNumber": 458, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L458" } } ], "source": { - "path": "src/core/public/saved_objects/simple_saved_object.ts", - "lineNumber": 23, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/simple_saved_object.ts#L23" + "path": "src/core/public/saved_objects/saved_objects_client.ts", + "lineNumber": 165, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/public/saved_objects/saved_objects_client.ts#L165" }, "initialIsOpen": false } @@ -4754,300 +4754,366 @@ "initialIsOpen": false }, { - "id": "def-server.SavedObjectsRepository", + "id": "def-server.SavedObjectTypeRegistry", "type": "Class", "tags": [ "public" ], - "label": "SavedObjectsRepository", - "description": [], + "label": "SavedObjectTypeRegistry", + "description": [ + "\nRegistry holding information about all the registered {@link SavedObjectsType | saved object types}.\n" + ], "children": [ { - "id": "def-server.SavedObjectsRepository.create", + "id": "def-server.SavedObjectTypeRegistry.registerType", "type": "Function", - "label": "create", + "label": "registerType", "signature": [ - "(type: string, attributes: T, options?: ", + "(type: ", { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsCreateOptions", - "text": "SavedObjectsCreateOptions" - }, - ") => Promise<", - { - "pluginId": "core", - "scope": "common", - "docId": "kibCorePluginApi", - "section": "def-common.SavedObject", - "text": "SavedObject" + "section": "def-server.SavedObjectsType", + "text": "SavedObjectsType" }, - ">" + ") => void" ], "description": [ - "\nPersists an object\n" + "\nRegister a {@link SavedObjectsType | type} inside the registry.\nA type can only be registered once. subsequent calls with the same type name will throw an error." ], "children": [ { - "type": "string", + "type": "Object", "label": "type", "isRequired": true, "signature": [ - "string" + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsType", + "text": "SavedObjectsType" + } ], "description": [], "source": { - "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 237, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L237" + "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", + "lineNumber": 31, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L31" } - }, + } + ], + "tags": [], + "returnComment": [], + "source": { + "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", + "lineNumber": 31, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L31" + } + }, + { + "id": "def-server.SavedObjectTypeRegistry.getType", + "type": "Function", + "label": "getType", + "signature": [ + "(type: string) => ", { - "type": "Uncategorized", - "label": "attributes", - "isRequired": true, - "signature": [ - "T" - ], - "description": [], - "source": { - "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 238, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L238" - } + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsType", + "text": "SavedObjectsType" }, + " | undefined" + ], + "description": [ + "\nReturn the {@link SavedObjectsType | type} definition for given type name." + ], + "children": [ { - "type": "Object", - "label": "options", + "type": "string", + "label": "type", "isRequired": true, "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsCreateOptions", - "text": "SavedObjectsCreateOptions" - } + "string" ], "description": [], "source": { - "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 239, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L239" + "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", + "lineNumber": 42, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L42" } } ], - "tags": [ - "property", - "property", - "property", - "property", - "property" - ], - "returnComment": [ - "- { id, type, version, attributes }" - ], + "tags": [], + "returnComment": [], "source": { - "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 236, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L236" + "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", + "lineNumber": 42, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L42" } }, { - "id": "def-server.SavedObjectsRepository.bulkCreate", + "id": "def-server.SavedObjectTypeRegistry.getVisibleTypes", "type": "Function", - "label": "bulkCreate", + "label": "getVisibleTypes", "signature": [ - "(objects: ", + "() => ", { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBulkCreateObject", - "text": "SavedObjectsBulkCreateObject" + "section": "def-server.SavedObjectsType", + "text": "SavedObjectsType" }, - "[], options?: ", + "[]" + ], + "description": [ + "\nReturns all visible {@link SavedObjectsType | types}.\n\nA visible type is a type that doesn't explicitly define `hidden=true` during registration." + ], + "children": [], + "tags": [], + "returnComment": [], + "source": { + "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", + "lineNumber": 51, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L51" + } + }, + { + "id": "def-server.SavedObjectTypeRegistry.getAllTypes", + "type": "Function", + "label": "getAllTypes", + "signature": [ + "() => ", { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsCreateOptions", - "text": "SavedObjectsCreateOptions" + "section": "def-server.SavedObjectsType", + "text": "SavedObjectsType" }, - ") => Promise<", + "[]" + ], + "description": [ + "\nReturn all {@link SavedObjectsType | types} currently registered, including the hidden ones.\n\nTo only get the visible types (which is the most common use case), use `getVisibleTypes` instead." + ], + "children": [], + "tags": [], + "returnComment": [], + "source": { + "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", + "lineNumber": 60, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L60" + } + }, + { + "id": "def-server.SavedObjectTypeRegistry.getImportableAndExportableTypes", + "type": "Function", + "label": "getImportableAndExportableTypes", + "signature": [ + "() => ", { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBulkResponse", - "text": "SavedObjectsBulkResponse" + "section": "def-server.SavedObjectsType", + "text": "SavedObjectsType" }, - ">" + "[]" + ], + "description": [ + "\nReturn all {@link SavedObjectsType | types} currently registered that are importable/exportable." + ], + "children": [], + "tags": [], + "returnComment": [], + "source": { + "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", + "lineNumber": 67, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L67" + } + }, + { + "id": "def-server.SavedObjectTypeRegistry.isNamespaceAgnostic", + "type": "Function", + "label": "isNamespaceAgnostic", + "signature": [ + "(type: string) => boolean" + ], + "description": [ + "\nReturns whether the type is namespace-agnostic (global);\nresolves to `false` if the type is not registered" + ], + "children": [ + { + "type": "string", + "label": "type", + "isRequired": true, + "signature": [ + "string" + ], + "description": [], + "source": { + "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", + "lineNumber": 75, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L75" + } + } + ], + "tags": [], + "returnComment": [], + "source": { + "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", + "lineNumber": 75, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L75" + } + }, + { + "id": "def-server.SavedObjectTypeRegistry.isSingleNamespace", + "type": "Function", + "label": "isSingleNamespace", + "signature": [ + "(type: string) => boolean" + ], + "description": [ + "\nReturns whether the type is single-namespace (isolated);\nresolves to `true` if the type is not registered" + ], + "children": [ + { + "type": "string", + "label": "type", + "isRequired": true, + "signature": [ + "string" + ], + "description": [], + "source": { + "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", + "lineNumber": 83, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L83" + } + } + ], + "tags": [], + "returnComment": [], + "source": { + "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", + "lineNumber": 83, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L83" + } + }, + { + "id": "def-server.SavedObjectTypeRegistry.isMultiNamespace", + "type": "Function", + "label": "isMultiNamespace", + "signature": [ + "(type: string) => boolean" ], "description": [ - "\nCreates multiple documents at once\n" + "\nReturns whether the type is multi-namespace (shareable *or* isolated);\nresolves to `false` if the type is not registered" ], "children": [ { - "type": "Array", - "label": "objects", - "isRequired": true, - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBulkCreateObject", - "text": "SavedObjectsBulkCreateObject" - }, - "[]" - ], - "description": [ - "- [{ type, id, attributes, references, migrationVersion }]" - ], - "source": { - "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 330, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L330" - } - }, - { - "type": "Object", - "label": "options", + "type": "string", + "label": "type", "isRequired": true, "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsCreateOptions", - "text": "SavedObjectsCreateOptions" - } + "string" ], "description": [], "source": { - "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 331, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L331" + "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", + "lineNumber": 92, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L92" } } ], - "tags": [ - "property", - "property" - ], - "returnComment": [ - "- {saved_objects: [[{ id, type, version, references, attributes, error: { message } }]}" - ], + "tags": [], + "returnComment": [], "source": { - "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 329, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L329" + "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", + "lineNumber": 92, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L92" } }, { - "id": "def-server.SavedObjectsRepository.checkConflicts", + "id": "def-server.SavedObjectTypeRegistry.isShareable", "type": "Function", - "label": "checkConflicts", + "label": "isShareable", "signature": [ - "(objects?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsCheckConflictsObject", - "text": "SavedObjectsCheckConflictsObject" - }, - "[], options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" - }, - ") => Promise<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsCheckConflictsResponse", - "text": "SavedObjectsCheckConflictsResponse" - }, - ">" + "(type: string) => boolean" ], "description": [ - "\nCheck what conflicts will result when creating a given array of saved objects. This includes \"unresolvable conflicts\", which are\nmulti-namespace objects that exist in a different namespace; such conflicts cannot be resolved/overwritten." + "\nReturns whether the type is multi-namespace (shareable);\nresolves to `false` if the type is not registered" ], "children": [ { - "type": "Array", - "label": "objects", + "type": "string", + "label": "type", "isRequired": true, "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsCheckConflictsObject", - "text": "SavedObjectsCheckConflictsObject" - }, - "[]" + "string" ], "description": [], "source": { - "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 517, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L517" + "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", + "lineNumber": 101, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L101" } - }, + } + ], + "tags": [], + "returnComment": [], + "source": { + "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", + "lineNumber": 101, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L101" + } + }, + { + "id": "def-server.SavedObjectTypeRegistry.isHidden", + "type": "Function", + "label": "isHidden", + "signature": [ + "(type: string) => boolean" + ], + "description": [ + "\nReturns the `hidden` property for given type, or `false` if\nthe type is not registered." + ], + "children": [ { - "type": "Object", - "label": "options", + "type": "string", + "label": "type", "isRequired": true, "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" - } + "string" ], "description": [], "source": { - "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 518, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L518" + "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", + "lineNumber": 109, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L109" } } ], "tags": [], "returnComment": [], "source": { - "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 516, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L516" + "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", + "lineNumber": 109, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L109" } }, { - "id": "def-server.SavedObjectsRepository.delete", + "id": "def-server.SavedObjectTypeRegistry.getIndex", "type": "Function", - "label": "delete", + "label": "getIndex", "signature": [ - "(type: string, id: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsDeleteOptions", - "text": "SavedObjectsDeleteOptions" - }, - ") => Promise<{}>" + "(type: string) => string | undefined" ], "description": [ - "\nDeletes an object\n" + "\nReturns the `indexPattern` property for given type, or `undefined` if\nthe type is not registered." ], "children": [ { @@ -5059,74 +5125,108 @@ ], "description": [], "source": { - "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 602, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L602" + "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", + "lineNumber": 117, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L117" } - }, + } + ], + "tags": [], + "returnComment": [], + "source": { + "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", + "lineNumber": 117, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L117" + } + }, + { + "id": "def-server.SavedObjectTypeRegistry.isImportableAndExportable", + "type": "Function", + "label": "isImportableAndExportable", + "signature": [ + "(type: string) => boolean" + ], + "description": [ + "\nReturns the `management.importableAndExportable` property for given type, or\n`false` if the type is not registered or does not define a management section." + ], + "children": [ { "type": "string", - "label": "id", + "label": "type", "isRequired": true, "signature": [ "string" ], "description": [], "source": { - "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 602, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L602" + "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", + "lineNumber": 125, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L125" } - }, - { - "type": "Object", - "label": "options", - "isRequired": true, + } + ], + "tags": [], + "returnComment": [], + "source": { + "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", + "lineNumber": 125, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L125" + } + } + ], + "source": { + "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", + "lineNumber": 24, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L24" + }, + "initialIsOpen": false + }, + { + "id": "def-server.SavedObjectsUtils", + "type": "Class", + "tags": [ + "public" + ], + "label": "SavedObjectsUtils", + "description": [], + "children": [ + { + "id": "def-server.SavedObjectsUtils.namespaceIdToString", + "type": "Function", + "children": [ + { + "type": "string", + "label": "namespace", + "isRequired": false, "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsDeleteOptions", - "text": "SavedObjectsDeleteOptions" - } + "string | undefined" ], "description": [], "source": { - "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 602, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L602" + "path": "src/core/server/saved_objects/service/lib/utils.ts", + "lineNumber": 29, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/utils.ts#L29" } } ], - "tags": [ - "property" + "signature": [ + "(namespace?: string | undefined) => string" ], - "returnComment": [], + "description": [ + "\nConverts a given saved object namespace ID to its string representation. All namespace IDs have an identical string representation, with\nthe exception of the `undefined` namespace ID (which has a namespace string of `'default'`).\n" + ], + "label": "namespaceIdToString", "source": { - "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 602, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L602" - } + "path": "src/core/server/saved_objects/service/lib/utils.ts", + "lineNumber": 29, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/utils.ts#L29" + }, + "tags": [], + "returnComment": [] }, { - "id": "def-server.SavedObjectsRepository.deleteByNamespace", + "id": "def-server.SavedObjectsUtils.namespaceStringToId", "type": "Function", - "label": "deleteByNamespace", - "signature": [ - "(namespace: string, options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsDeleteByNamespaceOptions", - "text": "SavedObjectsDeleteByNamespaceOptions" - }, - ") => Promise" - ], - "description": [ - "\nDeletes all objects from the provided namespace.\n" - ], "children": [ { "type": "string", @@ -5137,48 +5237,54 @@ ], "description": [], "source": { - "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 664, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L664" + "path": "src/core/server/saved_objects/service/lib/utils.ts", + "lineNumber": 43, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/utils.ts#L43" } - }, + } + ], + "signature": [ + "(namespace: string) => string | undefined" + ], + "description": [ + "\nConverts a given saved object namespace string to its ID representation. All namespace strings have an identical ID representation, with\nthe exception of the `'default'` namespace string (which has a namespace ID of `undefined`).\n" + ], + "label": "namespaceStringToId", + "source": { + "path": "src/core/server/saved_objects/service/lib/utils.ts", + "lineNumber": 43, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/utils.ts#L43" + }, + "tags": [], + "returnComment": [] + }, + { + "id": "def-server.SavedObjectsUtils.createEmptyFindResponse", + "type": "Function", + "children": [ { "type": "Object", - "label": "options", + "label": "{\n page = FIND_DEFAULT_PAGE,\n perPage = FIND_DEFAULT_PER_PAGE,\n }", "isRequired": true, "signature": [ { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsDeleteByNamespaceOptions", - "text": "SavedObjectsDeleteByNamespaceOptions" + "section": "def-server.SavedObjectsFindOptions", + "text": "SavedObjectsFindOptions" } ], "description": [], "source": { - "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 665, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L665" + "path": "src/core/server/saved_objects/service/lib/utils.ts", + "lineNumber": 54, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/utils.ts#L54" } } ], - "tags": [], - "returnComment": [ - "- { took, timed_out, total, deleted, batches, version_conflicts, noops, retries, failures }" - ], - "source": { - "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 663, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L663" - } - }, - { - "id": "def-server.SavedObjectsRepository.find", - "type": "Function", - "label": "find", "signature": [ - "(options: ", + "({ page, perPage, }: ", { "pluginId": "core", "scope": "server", @@ -5186,7 +5292,7 @@ "section": "def-server.SavedObjectsFindOptions", "text": "SavedObjectsFindOptions" }, - ") => Promise<", + ") => ", { "pluginId": "core", "scope": "server", @@ -5194,160 +5300,122 @@ "section": "def-server.SavedObjectsFindResponse", "text": "SavedObjectsFindResponse" }, - ">" - ], - "description": [], - "children": [ - { - "type": "Object", - "label": "options", - "isRequired": true, - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsFindOptions", - "text": "SavedObjectsFindOptions" - } - ], - "description": [], - "source": { - "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 725, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L725" - } - } - ], - "tags": [ - "property", - "property", - "property", - "property", - "property", - "property", - "property", - "property", - "property", - "property", - "property", - "property", - "property", - "property" + "" ], - "returnComment": [ - "- { saved_objects: [{ id, type, version, attributes }], total, per_page, page }" + "description": [ + "\nCreates an empty response for a find operation. This is only intended to be used by saved objects client wrappers." ], + "label": "createEmptyFindResponse", "source": { - "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 725, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L725" - } + "path": "src/core/server/saved_objects/service/lib/utils.ts", + "lineNumber": 54, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/utils.ts#L54" + }, + "tags": [], + "returnComment": [] }, { - "id": "def-server.SavedObjectsRepository.bulkGet", + "id": "def-server.SavedObjectsUtils.generateId", "type": "Function", - "label": "bulkGet", + "label": "generateId", "signature": [ - "(objects?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBulkGetObject", - "text": "SavedObjectsBulkGetObject" - }, - "[], options?: ", + "typeof ", { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" + "section": "def-server.SavedObjectsUtils", + "text": "SavedObjectsUtils" }, - ") => Promise<", + ".generateId" + ], + "description": [ + "\nGenerates a random ID for a saved objects." + ], + "children": [], + "tags": [], + "returnComment": [], + "source": { + "path": "src/core/server/saved_objects/service/lib/utils.ts", + "lineNumber": 67, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/utils.ts#L67" + } + }, + { + "id": "def-server.SavedObjectsUtils.isRandomId", + "type": "Function", + "label": "isRandomId", + "signature": [ + "typeof ", { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBulkResponse", - "text": "SavedObjectsBulkResponse" + "section": "def-server.SavedObjectsUtils", + "text": "SavedObjectsUtils" }, - ">" + ".isRandomId" ], "description": [ - "\nReturns an array of objects by id\n" + "\nValidates that a saved object ID has been randomly generated.\n" ], "children": [ { - "type": "Array", - "label": "objects", - "isRequired": true, + "type": "string", + "label": "id", + "isRequired": false, "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBulkGetObject", - "text": "SavedObjectsBulkGetObject" - }, - "[]" + "string | undefined" ], "description": [ - "- an array of objects containing id, type and optionally fields" - ], - "source": { - "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 875, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L875" - } - }, - { - "type": "Object", - "label": "options", - "isRequired": true, - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" - } + "The ID of a saved object." ], - "description": [], - "source": { - "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 876, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L876" + "source": { + "path": "src/core/server/saved_objects/service/lib/utils.ts", + "lineNumber": 77, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/utils.ts#L77" } } ], "tags": [ - "property", - "example" - ], - "returnComment": [ - "- { saved_objects: [{ id, type, version, attributes }] }" + "todo" ], + "returnComment": [], "source": { - "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 874, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L874" + "path": "src/core/server/saved_objects/service/lib/utils.ts", + "lineNumber": 77, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/utils.ts#L77" } - }, + } + ], + "source": { + "path": "src/core/server/saved_objects/service/lib/utils.ts", + "lineNumber": 22, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/utils.ts#L22" + }, + "initialIsOpen": false + }, + { + "id": "def-server.SavedObjectsRepository", + "type": "Class", + "tags": [ + "public" + ], + "label": "SavedObjectsRepository", + "description": [], + "children": [ { - "id": "def-server.SavedObjectsRepository.get", + "id": "def-server.SavedObjectsRepository.create", "type": "Function", - "label": "get", + "label": "create", "signature": [ - "(type: string, id: string, options?: ", + "(type: string, attributes: T, options?: ", { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" + "section": "def-server.SavedObjectsCreateOptions", + "text": "SavedObjectsCreateOptions" }, ") => Promise<", { @@ -5360,7 +5428,7 @@ ">" ], "description": [ - "\nGets a single object\n" + "\nPersists an object\n" ], "children": [ { @@ -5373,22 +5441,22 @@ "description": [], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 960, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L960" + "lineNumber": 237, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L237" } }, { - "type": "string", - "label": "id", + "type": "Uncategorized", + "label": "attributes", "isRequired": true, "signature": [ - "string" + "T" ], "description": [], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 961, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L961" + "lineNumber": 238, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L238" } }, { @@ -5400,19 +5468,23 @@ "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" + "section": "def-server.SavedObjectsCreateOptions", + "text": "SavedObjectsCreateOptions" } ], "description": [], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 962, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L962" + "lineNumber": 239, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L239" } } ], "tags": [ + "property", + "property", + "property", + "property", "property" ], "returnComment": [ @@ -5420,63 +5492,66 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 959, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L959" + "lineNumber": 236, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L236" } }, { - "id": "def-server.SavedObjectsRepository.resolve", + "id": "def-server.SavedObjectsRepository.bulkCreate", "type": "Function", - "label": "resolve", + "label": "bulkCreate", "signature": [ - "(type: string, id: string, options?: ", + "(objects: ", { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" + "section": "def-server.SavedObjectsBulkCreateObject", + "text": "SavedObjectsBulkCreateObject" + }, + "[], options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsCreateOptions", + "text": "SavedObjectsCreateOptions" }, ") => Promise<", { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsResolveResponse", - "text": "SavedObjectsResolveResponse" + "section": "def-server.SavedObjectsBulkResponse", + "text": "SavedObjectsBulkResponse" }, ">" ], "description": [ - "\nResolves a single object, using any legacy URL alias if it exists\n" + "\nCreates multiple documents at once\n" ], "children": [ { - "type": "string", - "label": "type", + "type": "Array", + "label": "objects", "isRequired": true, "signature": [ - "string" + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsBulkCreateObject", + "text": "SavedObjectsBulkCreateObject" + }, + "[]" ], - "description": [], - "source": { - "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 998, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L998" - } - }, - { - "type": "string", - "label": "id", - "isRequired": true, - "signature": [ - "string" + "description": [ + "- [{ type, id, attributes, references, migrationVersion }]" ], - "description": [], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 999, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L999" + "lineNumber": 330, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L330" } }, { @@ -5488,97 +5563,85 @@ "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" + "section": "def-server.SavedObjectsCreateOptions", + "text": "SavedObjectsCreateOptions" } ], "description": [], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1000, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1000" + "lineNumber": 331, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L331" } } ], "tags": [ + "property", "property" ], "returnComment": [ - "- { saved_object, outcome }" + "- {saved_objects: [[{ id, type, version, references, attributes, error: { message } }]}" ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 997, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L997" + "lineNumber": 329, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L329" } }, { - "id": "def-server.SavedObjectsRepository.update", + "id": "def-server.SavedObjectsRepository.checkConflicts", "type": "Function", - "label": "update", + "label": "checkConflicts", "signature": [ - "(type: string, id: string, attributes: Partial, options?: ", + "(objects?: ", { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsUpdateOptions", - "text": "SavedObjectsUpdateOptions" + "section": "def-server.SavedObjectsCheckConflictsObject", + "text": "SavedObjectsCheckConflictsObject" + }, + "[], options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsBaseOptions", + "text": "SavedObjectsBaseOptions" }, ") => Promise<", { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsUpdateResponse", - "text": "SavedObjectsUpdateResponse" + "section": "def-server.SavedObjectsCheckConflictsResponse", + "text": "SavedObjectsCheckConflictsResponse" }, - ">" + ">" ], "description": [ - "\nUpdates an object\n" + "\nCheck what conflicts will result when creating a given array of saved objects. This includes \"unresolvable conflicts\", which are\nmulti-namespace objects that exist in a different namespace; such conflicts cannot be resolved/overwritten." ], "children": [ { - "type": "string", - "label": "type", - "isRequired": true, - "signature": [ - "string" - ], - "description": [], - "source": { - "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1117, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1117" - } - }, - { - "type": "string", - "label": "id", - "isRequired": true, - "signature": [ - "string" - ], - "description": [], - "source": { - "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1118, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1118" - } - }, - { - "type": "Object", - "label": "attributes", + "type": "Array", + "label": "objects", "isRequired": true, "signature": [ - "Partial" + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsCheckConflictsObject", + "text": "SavedObjectsCheckConflictsObject" + }, + "[]" ], "description": [], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1119, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1119" + "lineNumber": 517, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L517" } }, { @@ -5590,55 +5653,43 @@ "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsUpdateOptions", - "text": "SavedObjectsUpdateOptions" + "section": "def-server.SavedObjectsBaseOptions", + "text": "SavedObjectsBaseOptions" } ], "description": [], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1120, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1120" + "lineNumber": 518, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L518" } } ], - "tags": [ - "property", - "property", - "property" - ], + "tags": [], "returnComment": [], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1116, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1116" + "lineNumber": 516, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L516" } }, { - "id": "def-server.SavedObjectsRepository.addToNamespaces", + "id": "def-server.SavedObjectsRepository.delete", "type": "Function", - "label": "addToNamespaces", + "label": "delete", "signature": [ - "(type: string, id: string, namespaces: string[], options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsAddToNamespacesOptions", - "text": "SavedObjectsAddToNamespacesOptions" - }, - ") => Promise<", + "(type: string, id: string, options?: ", { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsAddToNamespacesResponse", - "text": "SavedObjectsAddToNamespacesResponse" + "section": "def-server.SavedObjectsDeleteOptions", + "text": "SavedObjectsDeleteOptions" }, - ">" + ") => Promise<{}>" ], "description": [ - "\nAdds one or more namespaces to a given multi-namespace saved object. This method and\n[`deleteFromNamespaces`]{@link SavedObjectsRepository.deleteFromNamespaces} are the only ways to change which Spaces a multi-namespace\nsaved object is shared to." + "\nDeletes an object\n" ], "children": [ { @@ -5651,8 +5702,8 @@ "description": [], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1190, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1190" + "lineNumber": 602, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L602" } }, { @@ -5665,22 +5716,8 @@ "description": [], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1191, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1191" - } - }, - { - "type": "Array", - "label": "namespaces", - "isRequired": true, - "signature": [ - "string[]" - ], - "description": [], - "source": { - "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1192, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1192" + "lineNumber": 602, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L602" } }, { @@ -5692,56 +5729,50 @@ "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsAddToNamespacesOptions", - "text": "SavedObjectsAddToNamespacesOptions" + "section": "def-server.SavedObjectsDeleteOptions", + "text": "SavedObjectsDeleteOptions" } ], "description": [], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1193, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1193" + "lineNumber": 602, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L602" } } ], - "tags": [], + "tags": [ + "property" + ], "returnComment": [], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1189, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1189" + "lineNumber": 602, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L602" } }, { - "id": "def-server.SavedObjectsRepository.deleteFromNamespaces", + "id": "def-server.SavedObjectsRepository.deleteByNamespace", "type": "Function", - "label": "deleteFromNamespaces", + "label": "deleteByNamespace", "signature": [ - "(type: string, id: string, namespaces: string[], options?: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsDeleteFromNamespacesOptions", - "text": "SavedObjectsDeleteFromNamespacesOptions" - }, - ") => Promise<", + "(namespace: string, options?: ", { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsDeleteFromNamespacesResponse", - "text": "SavedObjectsDeleteFromNamespacesResponse" + "section": "def-server.SavedObjectsDeleteByNamespaceOptions", + "text": "SavedObjectsDeleteByNamespaceOptions" }, - ">" + ") => Promise" ], "description": [ - "\nRemoves one or more namespaces from a given multi-namespace saved object. If no namespaces remain, the saved object is deleted\nentirely. This method and [`addToNamespaces`]{@link SavedObjectsRepository.addToNamespaces} are the only ways to change which Spaces a\nmulti-namespace saved object is shared to." + "\nDeletes all objects from the provided namespace.\n" ], "children": [ { "type": "string", - "label": "type", + "label": "namespace", "isRequired": true, "signature": [ "string" @@ -5749,38 +5780,66 @@ "description": [], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1253, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1253" + "lineNumber": 664, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L664" } }, { - "type": "string", - "label": "id", + "type": "Object", + "label": "options", "isRequired": true, "signature": [ - "string" + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsDeleteByNamespaceOptions", + "text": "SavedObjectsDeleteByNamespaceOptions" + } ], "description": [], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1254, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1254" + "lineNumber": 665, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L665" } + } + ], + "tags": [], + "returnComment": [ + "- { took, timed_out, total, deleted, batches, version_conflicts, noops, retries, failures }" + ], + "source": { + "path": "src/core/server/saved_objects/service/lib/repository.ts", + "lineNumber": 663, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L663" + } + }, + { + "id": "def-server.SavedObjectsRepository.find", + "type": "Function", + "label": "find", + "signature": [ + "(options: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsFindOptions", + "text": "SavedObjectsFindOptions" }, + ") => Promise<", { - "type": "Array", - "label": "namespaces", - "isRequired": true, - "signature": [ - "string[]" - ], - "description": [], - "source": { - "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1255, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1255" - } + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsFindResponse", + "text": "SavedObjectsFindResponse" }, + ">" + ], + "description": [], + "children": [ { "type": "Object", "label": "options", @@ -5790,59 +5849,76 @@ "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsDeleteFromNamespacesOptions", - "text": "SavedObjectsDeleteFromNamespacesOptions" + "section": "def-server.SavedObjectsFindOptions", + "text": "SavedObjectsFindOptions" } ], "description": [], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1256, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1256" + "lineNumber": 725, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L725" } } ], - "tags": [], - "returnComment": [], + "tags": [ + "property", + "property", + "property", + "property", + "property", + "property", + "property", + "property", + "property", + "property", + "property", + "property", + "property", + "property" + ], + "returnComment": [ + "- { saved_objects: [{ id, type, version, attributes }], total, per_page, page }" + ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1252, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1252" + "lineNumber": 725, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L725" } }, { - "id": "def-server.SavedObjectsRepository.bulkUpdate", + "id": "def-server.SavedObjectsRepository.bulkGet", "type": "Function", - "label": "bulkUpdate", + "label": "bulkGet", "signature": [ - "(objects: ", + "(objects?: ", { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBulkUpdateObject", - "text": "SavedObjectsBulkUpdateObject" + "section": "def-server.SavedObjectsBulkGetObject", + "text": "SavedObjectsBulkGetObject" }, - "[], options?: ", + "[], options?: ", { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBulkUpdateOptions", - "text": "SavedObjectsBulkUpdateOptions" + "section": "def-server.SavedObjectsBaseOptions", + "text": "SavedObjectsBaseOptions" }, ") => Promise<", { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBulkUpdateResponse", - "text": "SavedObjectsBulkUpdateResponse" + "section": "def-server.SavedObjectsBulkResponse", + "text": "SavedObjectsBulkResponse" }, ">" ], "description": [ - "\nUpdates multiple objects in bulk\n" + "\nReturns an array of objects by id\n" ], "children": [ { @@ -5854,18 +5930,18 @@ "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBulkUpdateObject", - "text": "SavedObjectsBulkUpdateObject" + "section": "def-server.SavedObjectsBulkGetObject", + "text": "SavedObjectsBulkGetObject" }, - "[]" + "[]" ], "description": [ - "- [{ type, id, attributes, options: { version, namespace } references }]" + "- an array of objects containing id, type and optionally fields" ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1358, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1358" + "lineNumber": 875, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L875" } }, { @@ -5877,56 +5953,56 @@ "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBulkUpdateOptions", - "text": "SavedObjectsBulkUpdateOptions" + "section": "def-server.SavedObjectsBaseOptions", + "text": "SavedObjectsBaseOptions" } ], "description": [], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1359, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1359" + "lineNumber": 876, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L876" } } ], "tags": [ "property", - "property" + "example" ], "returnComment": [ - "- {saved_objects: [[{ id, type, version, references, attributes, error: { message } }]}" + "- { saved_objects: [{ id, type, version, attributes }] }" ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1357, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1357" + "lineNumber": 874, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L874" } }, { - "id": "def-server.SavedObjectsRepository.removeReferencesTo", + "id": "def-server.SavedObjectsRepository.get", "type": "Function", - "label": "removeReferencesTo", + "label": "get", "signature": [ - "(type: string, id: string, options?: ", + "(type: string, id: string, options?: ", { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsRemoveReferencesToOptions", - "text": "SavedObjectsRemoveReferencesToOptions" + "section": "def-server.SavedObjectsBaseOptions", + "text": "SavedObjectsBaseOptions" }, ") => Promise<", { "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsRemoveReferencesToResponse", - "text": "SavedObjectsRemoveReferencesToResponse" + "scope": "common", + "docId": "kibCorePluginApi", + "section": "def-common.SavedObject", + "text": "SavedObject" }, - ">" + ">" ], "description": [ - "\nUpdates all objects containing a reference to the given {type, id} tuple to remove the said reference.\n" + "\nGets a single object\n" ], "children": [ { @@ -5939,8 +6015,8 @@ "description": [], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1573, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1573" + "lineNumber": 960, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L960" } }, { @@ -5953,8 +6029,8 @@ "description": [], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1574, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1574" + "lineNumber": 961, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L961" } }, { @@ -5966,61 +6042,55 @@ "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsRemoveReferencesToOptions", - "text": "SavedObjectsRemoveReferencesToOptions" + "section": "def-server.SavedObjectsBaseOptions", + "text": "SavedObjectsBaseOptions" } ], "description": [], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1575, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1575" + "lineNumber": 962, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L962" } } ], "tags": [ - "remarks" + "property" + ], + "returnComment": [ + "- { id, type, version, attributes }" ], - "returnComment": [], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1572, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1572" + "lineNumber": 959, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L959" } }, { - "id": "def-server.SavedObjectsRepository.incrementCounter", + "id": "def-server.SavedObjectsRepository.resolve", "type": "Function", - "label": "incrementCounter", + "label": "resolve", "signature": [ - "(type: string, id: string, counterFields: (string | ", + "(type: string, id: string, options?: ", { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsIncrementCounterField", - "text": "SavedObjectsIncrementCounterField" + "section": "def-server.SavedObjectsBaseOptions", + "text": "SavedObjectsBaseOptions" }, - ")[], options?: ", + ") => Promise<", { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsIncrementCounterOptions", - "text": "SavedObjectsIncrementCounterOptions" - }, - ") => Promise<", - { - "pluginId": "core", - "scope": "common", - "docId": "kibCorePluginApi", - "section": "def-common.SavedObject", - "text": "SavedObject" + "section": "def-server.SavedObjectsResolveResponse", + "text": "SavedObjectsResolveResponse" }, ">" ], "description": [ - "\nIncrements all the specified counter fields (by one by default). Creates the document\nif one doesn't exist for the given id.\n" + "\nResolves a single object, using any legacy URL alias if it exists\n" ], "children": [ { @@ -6030,13 +6100,11 @@ "signature": [ "string" ], - "description": [ - "- The type of saved object whose fields should be incremented" - ], + "description": [], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1670, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1670" + "lineNumber": 998, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L998" } }, { @@ -6046,37 +6114,11 @@ "signature": [ "string" ], - "description": [ - "- The id of the document whose fields should be incremented" - ], - "source": { - "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1671, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1671" - } - }, - { - "type": "Array", - "label": "counterFields", - "isRequired": true, - "signature": [ - "(string | ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsIncrementCounterField", - "text": "SavedObjectsIncrementCounterField" - }, - ")[]" - ], - "description": [ - "- An array of field names to increment or an array of {@link SavedObjectsIncrementCounterField}" - ], + "description": [], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1672, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1672" + "lineNumber": 999, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L999" } }, { @@ -6088,139 +6130,162 @@ "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsIncrementCounterOptions", - "text": "SavedObjectsIncrementCounterOptions" + "section": "def-server.SavedObjectsBaseOptions", + "text": "SavedObjectsBaseOptions" } ], - "description": [ - "- {@link SavedObjectsIncrementCounterOptions}" - ], + "description": [], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1673, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1673" + "lineNumber": 1000, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1000" } } ], "tags": [ - "remarks", - "example" + "property" ], "returnComment": [ - "The saved object after the specified fields were incremented" + "- { saved_object, outcome }" ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1669, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1669" + "lineNumber": 997, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L997" } }, { - "id": "def-server.SavedObjectsRepository.openPointInTimeForType", + "id": "def-server.SavedObjectsRepository.update", "type": "Function", - "label": "openPointInTimeForType", + "label": "update", "signature": [ - "(type: string | string[], { keepAlive, preference }?: ", + "(type: string, id: string, attributes: Partial, options?: ", { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsOpenPointInTimeOptions", - "text": "SavedObjectsOpenPointInTimeOptions" + "section": "def-server.SavedObjectsUpdateOptions", + "text": "SavedObjectsUpdateOptions" }, ") => Promise<", { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsOpenPointInTimeResponse", - "text": "SavedObjectsOpenPointInTimeResponse" + "section": "def-server.SavedObjectsUpdateResponse", + "text": "SavedObjectsUpdateResponse" }, - ">" + ">" ], "description": [ - "\nOpens a Point In Time (PIT) against the indices for the specified Saved Object types.\nThe returned `id` can then be passed to `SavedObjects.find` to search against that PIT.\n" + "\nUpdates an object\n" ], "children": [ { - "type": "CompoundType", + "type": "string", "label": "type", "isRequired": true, "signature": [ - "string | string[]" + "string" ], "description": [], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1821, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1821" + "lineNumber": 1117, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1117" + } + }, + { + "type": "string", + "label": "id", + "isRequired": true, + "signature": [ + "string" + ], + "description": [], + "source": { + "path": "src/core/server/saved_objects/service/lib/repository.ts", + "lineNumber": 1118, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1118" } }, { "type": "Object", - "label": "{ keepAlive = '5m', preference }", + "label": "attributes", + "isRequired": true, + "signature": [ + "Partial" + ], + "description": [], + "source": { + "path": "src/core/server/saved_objects/service/lib/repository.ts", + "lineNumber": 1119, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1119" + } + }, + { + "type": "Object", + "label": "options", "isRequired": true, "signature": [ { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsOpenPointInTimeOptions", - "text": "SavedObjectsOpenPointInTimeOptions" + "section": "def-server.SavedObjectsUpdateOptions", + "text": "SavedObjectsUpdateOptions" } ], "description": [], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1822, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1822" + "lineNumber": 1120, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1120" } } ], "tags": [ - "example", + "property", "property", "property" ], - "returnComment": [ - "- { id: string }" - ], + "returnComment": [], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1820, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1820" + "lineNumber": 1116, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1116" } }, { - "id": "def-server.SavedObjectsRepository.closePointInTime", + "id": "def-server.SavedObjectsRepository.addToNamespaces", "type": "Function", - "label": "closePointInTime", + "label": "addToNamespaces", "signature": [ - "(id: string, options?: ", + "(type: string, id: string, namespaces: string[], options?: ", { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" + "section": "def-server.SavedObjectsAddToNamespacesOptions", + "text": "SavedObjectsAddToNamespacesOptions" }, - " | undefined) => Promise<", + ") => Promise<", { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsClosePointInTimeResponse", - "text": "SavedObjectsClosePointInTimeResponse" + "section": "def-server.SavedObjectsAddToNamespacesResponse", + "text": "SavedObjectsAddToNamespacesResponse" }, ">" ], "description": [ - "\nCloses a Point In Time (PIT) by ID. This simply proxies the request to ES\nvia the Elasticsearch client, and is included in the Saved Objects Client\nas a convenience for consumers who are using `openPointInTimeForType`.\n" + "\nAdds one or more namespaces to a given multi-namespace saved object. This method and\n[`deleteFromNamespaces`]{@link SavedObjectsRepository.deleteFromNamespaces} are the only ways to change which Spaces a multi-namespace\nsaved object is shared to." ], "children": [ { "type": "string", - "label": "id", + "label": "type", "isRequired": true, "signature": [ "string" @@ -6228,131 +6293,92 @@ "description": [], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1890, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1890" + "lineNumber": 1190, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1190" } }, { - "type": "Object", - "label": "options", - "isRequired": false, + "type": "string", + "label": "id", + "isRequired": true, "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsBaseOptions", - "text": "SavedObjectsBaseOptions" - }, - " | undefined" - ], - "description": [ - "- {@link SavedObjectsClosePointInTimeOptions}" + "string" ], + "description": [], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1891, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1891" + "lineNumber": 1191, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1191" } - } - ], - "tags": [ - "remarks", - "example" - ], - "returnComment": [ - "- {@link SavedObjectsClosePointInTimeResponse}" - ], - "source": { - "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1889, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1889" - } - } - ], - "source": { - "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 143, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L143" - }, - "initialIsOpen": false - }, - { - "id": "def-server.SavedObjectTypeRegistry", - "type": "Class", - "tags": [ - "public" - ], - "label": "SavedObjectTypeRegistry", - "description": [ - "\nRegistry holding information about all the registered {@link SavedObjectsType | saved object types}.\n" - ], - "children": [ - { - "id": "def-server.SavedObjectTypeRegistry.registerType", - "type": "Function", - "label": "registerType", - "signature": [ - "(type: ", + }, { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsType", - "text": "SavedObjectsType" + "type": "Array", + "label": "namespaces", + "isRequired": true, + "signature": [ + "string[]" + ], + "description": [], + "source": { + "path": "src/core/server/saved_objects/service/lib/repository.ts", + "lineNumber": 1192, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1192" + } }, - ") => void" - ], - "description": [ - "\nRegister a {@link SavedObjectsType | type} inside the registry.\nA type can only be registered once. subsequent calls with the same type name will throw an error." - ], - "children": [ { "type": "Object", - "label": "type", + "label": "options", "isRequired": true, "signature": [ { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsType", - "text": "SavedObjectsType" + "section": "def-server.SavedObjectsAddToNamespacesOptions", + "text": "SavedObjectsAddToNamespacesOptions" } ], "description": [], "source": { - "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", - "lineNumber": 31, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L31" + "path": "src/core/server/saved_objects/service/lib/repository.ts", + "lineNumber": 1193, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1193" } } ], "tags": [], "returnComment": [], "source": { - "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", - "lineNumber": 31, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L31" + "path": "src/core/server/saved_objects/service/lib/repository.ts", + "lineNumber": 1189, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1189" } }, { - "id": "def-server.SavedObjectTypeRegistry.getType", + "id": "def-server.SavedObjectsRepository.deleteFromNamespaces", "type": "Function", - "label": "getType", + "label": "deleteFromNamespaces", "signature": [ - "(type: string) => ", + "(type: string, id: string, namespaces: string[], options?: ", { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsType", - "text": "SavedObjectsType" + "section": "def-server.SavedObjectsDeleteFromNamespacesOptions", + "text": "SavedObjectsDeleteFromNamespacesOptions" }, - " | undefined" + ") => Promise<", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsDeleteFromNamespacesResponse", + "text": "SavedObjectsDeleteFromNamespacesResponse" + }, + ">" ], "description": [ - "\nReturn the {@link SavedObjectsType | type} definition for given type name." + "\nRemoves one or more namespaces from a given multi-namespace saved object. If no namespaces remain, the saved object is deleted\nentirely. This method and [`addToNamespaces`]{@link SavedObjectsRepository.addToNamespaces} are the only ways to change which Spaces a\nmulti-namespace saved object is shared to." ], "children": [ { @@ -6364,178 +6390,185 @@ ], "description": [], "source": { - "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", - "lineNumber": 42, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L42" + "path": "src/core/server/saved_objects/service/lib/repository.ts", + "lineNumber": 1253, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1253" + } + }, + { + "type": "string", + "label": "id", + "isRequired": true, + "signature": [ + "string" + ], + "description": [], + "source": { + "path": "src/core/server/saved_objects/service/lib/repository.ts", + "lineNumber": 1254, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1254" + } + }, + { + "type": "Array", + "label": "namespaces", + "isRequired": true, + "signature": [ + "string[]" + ], + "description": [], + "source": { + "path": "src/core/server/saved_objects/service/lib/repository.ts", + "lineNumber": 1255, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1255" + } + }, + { + "type": "Object", + "label": "options", + "isRequired": true, + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsDeleteFromNamespacesOptions", + "text": "SavedObjectsDeleteFromNamespacesOptions" + } + ], + "description": [], + "source": { + "path": "src/core/server/saved_objects/service/lib/repository.ts", + "lineNumber": 1256, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1256" } } ], "tags": [], "returnComment": [], "source": { - "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", - "lineNumber": 42, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L42" + "path": "src/core/server/saved_objects/service/lib/repository.ts", + "lineNumber": 1252, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1252" } }, { - "id": "def-server.SavedObjectTypeRegistry.getVisibleTypes", + "id": "def-server.SavedObjectsRepository.bulkUpdate", "type": "Function", - "label": "getVisibleTypes", + "label": "bulkUpdate", "signature": [ - "() => ", + "(objects: ", { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsType", - "text": "SavedObjectsType" + "section": "def-server.SavedObjectsBulkUpdateObject", + "text": "SavedObjectsBulkUpdateObject" }, - "[]" - ], - "description": [ - "\nReturns all visible {@link SavedObjectsType | types}.\n\nA visible type is a type that doesn't explicitly define `hidden=true` during registration." - ], - "children": [], - "tags": [], - "returnComment": [], - "source": { - "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", - "lineNumber": 51, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L51" - } - }, - { - "id": "def-server.SavedObjectTypeRegistry.getAllTypes", - "type": "Function", - "label": "getAllTypes", - "signature": [ - "() => ", + "[], options?: ", { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsType", - "text": "SavedObjectsType" + "section": "def-server.SavedObjectsBulkUpdateOptions", + "text": "SavedObjectsBulkUpdateOptions" }, - "[]" - ], - "description": [ - "\nReturn all {@link SavedObjectsType | types} currently registered, including the hidden ones.\n\nTo only get the visible types (which is the most common use case), use `getVisibleTypes` instead." - ], - "children": [], - "tags": [], - "returnComment": [], - "source": { - "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", - "lineNumber": 60, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L60" - } - }, - { - "id": "def-server.SavedObjectTypeRegistry.getImportableAndExportableTypes", - "type": "Function", - "label": "getImportableAndExportableTypes", - "signature": [ - "() => ", + ") => Promise<", { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsType", - "text": "SavedObjectsType" + "section": "def-server.SavedObjectsBulkUpdateResponse", + "text": "SavedObjectsBulkUpdateResponse" }, - "[]" - ], - "description": [ - "\nReturn all {@link SavedObjectsType | types} currently registered that are importable/exportable." - ], - "children": [], - "tags": [], - "returnComment": [], - "source": { - "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", - "lineNumber": 67, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L67" - } - }, - { - "id": "def-server.SavedObjectTypeRegistry.isNamespaceAgnostic", - "type": "Function", - "label": "isNamespaceAgnostic", - "signature": [ - "(type: string) => boolean" + ">" ], "description": [ - "\nReturns whether the type is namespace-agnostic (global);\nresolves to `false` if the type is not registered" + "\nUpdates multiple objects in bulk\n" ], "children": [ { - "type": "string", - "label": "type", + "type": "Array", + "label": "objects", "isRequired": true, "signature": [ - "string" + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsBulkUpdateObject", + "text": "SavedObjectsBulkUpdateObject" + }, + "[]" + ], + "description": [ + "- [{ type, id, attributes, options: { version, namespace } references }]" ], - "description": [], "source": { - "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", - "lineNumber": 75, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L75" + "path": "src/core/server/saved_objects/service/lib/repository.ts", + "lineNumber": 1358, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1358" } - } - ], - "tags": [], - "returnComment": [], - "source": { - "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", - "lineNumber": 75, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L75" - } - }, - { - "id": "def-server.SavedObjectTypeRegistry.isSingleNamespace", - "type": "Function", - "label": "isSingleNamespace", - "signature": [ - "(type: string) => boolean" - ], - "description": [ - "\nReturns whether the type is single-namespace (isolated);\nresolves to `true` if the type is not registered" - ], - "children": [ + }, { - "type": "string", - "label": "type", + "type": "Object", + "label": "options", "isRequired": true, "signature": [ - "string" + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsBulkUpdateOptions", + "text": "SavedObjectsBulkUpdateOptions" + } ], "description": [], "source": { - "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", - "lineNumber": 83, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L83" + "path": "src/core/server/saved_objects/service/lib/repository.ts", + "lineNumber": 1359, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1359" } } ], - "tags": [], - "returnComment": [], + "tags": [ + "property", + "property" + ], + "returnComment": [ + "- {saved_objects: [[{ id, type, version, references, attributes, error: { message } }]}" + ], "source": { - "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", - "lineNumber": 83, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L83" + "path": "src/core/server/saved_objects/service/lib/repository.ts", + "lineNumber": 1357, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1357" } }, { - "id": "def-server.SavedObjectTypeRegistry.isMultiNamespace", + "id": "def-server.SavedObjectsRepository.removeReferencesTo", "type": "Function", - "label": "isMultiNamespace", + "label": "removeReferencesTo", "signature": [ - "(type: string) => boolean" + "(type: string, id: string, options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsRemoveReferencesToOptions", + "text": "SavedObjectsRemoveReferencesToOptions" + }, + ") => Promise<", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsRemoveReferencesToResponse", + "text": "SavedObjectsRemoveReferencesToResponse" + }, + ">" ], "description": [ - "\nReturns whether the type is multi-namespace (shareable *or* isolated);\nresolves to `false` if the type is not registered" + "\nUpdates all objects containing a reference to the given {type, id} tuple to remove the said reference.\n" ], "children": [ { @@ -6547,97 +6580,89 @@ ], "description": [], "source": { - "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", - "lineNumber": 92, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L92" + "path": "src/core/server/saved_objects/service/lib/repository.ts", + "lineNumber": 1573, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1573" } - } - ], - "tags": [], - "returnComment": [], - "source": { - "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", - "lineNumber": 92, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L92" - } - }, - { - "id": "def-server.SavedObjectTypeRegistry.isShareable", - "type": "Function", - "label": "isShareable", - "signature": [ - "(type: string) => boolean" - ], - "description": [ - "\nReturns whether the type is multi-namespace (shareable);\nresolves to `false` if the type is not registered" - ], - "children": [ + }, { "type": "string", - "label": "type", + "label": "id", "isRequired": true, "signature": [ "string" ], "description": [], "source": { - "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", - "lineNumber": 101, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L101" + "path": "src/core/server/saved_objects/service/lib/repository.ts", + "lineNumber": 1574, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1574" } - } - ], - "tags": [], - "returnComment": [], - "source": { - "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", - "lineNumber": 101, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L101" - } - }, - { - "id": "def-server.SavedObjectTypeRegistry.isHidden", - "type": "Function", - "label": "isHidden", - "signature": [ - "(type: string) => boolean" - ], - "description": [ - "\nReturns the `hidden` property for given type, or `false` if\nthe type is not registered." - ], - "children": [ + }, { - "type": "string", - "label": "type", + "type": "Object", + "label": "options", "isRequired": true, "signature": [ - "string" + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsRemoveReferencesToOptions", + "text": "SavedObjectsRemoveReferencesToOptions" + } ], "description": [], "source": { - "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", - "lineNumber": 109, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L109" + "path": "src/core/server/saved_objects/service/lib/repository.ts", + "lineNumber": 1575, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1575" } } ], - "tags": [], + "tags": [ + "remarks" + ], "returnComment": [], "source": { - "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", - "lineNumber": 109, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L109" + "path": "src/core/server/saved_objects/service/lib/repository.ts", + "lineNumber": 1572, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1572" } }, { - "id": "def-server.SavedObjectTypeRegistry.getIndex", + "id": "def-server.SavedObjectsRepository.incrementCounter", "type": "Function", - "label": "getIndex", + "label": "incrementCounter", "signature": [ - "(type: string) => string | undefined" + "(type: string, id: string, counterFields: (string | ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsIncrementCounterField", + "text": "SavedObjectsIncrementCounterField" + }, + ")[], options?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsIncrementCounterOptions", + "text": "SavedObjectsIncrementCounterOptions" + }, + ") => Promise<", + { + "pluginId": "core", + "scope": "common", + "docId": "kibCorePluginApi", + "section": "def-common.SavedObject", + "text": "SavedObject" + }, + ">" ], "description": [ - "\nReturns the `indexPattern` property for given type, or `undefined` if\nthe type is not registered." + "\nIncrements all the specified counter fields (by one by default). Creates the document\nif one doesn't exist for the given id.\n" ], "children": [ { @@ -6647,275 +6672,250 @@ "signature": [ "string" ], - "description": [], + "description": [ + "- The type of saved object whose fields should be incremented" + ], "source": { - "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", - "lineNumber": 117, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L117" + "path": "src/core/server/saved_objects/service/lib/repository.ts", + "lineNumber": 1670, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1670" } - } - ], - "tags": [], - "returnComment": [], - "source": { - "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", - "lineNumber": 117, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L117" - } - }, - { - "id": "def-server.SavedObjectTypeRegistry.isImportableAndExportable", - "type": "Function", - "label": "isImportableAndExportable", - "signature": [ - "(type: string) => boolean" - ], - "description": [ - "\nReturns the `management.importableAndExportable` property for given type, or\n`false` if the type is not registered or does not define a management section." - ], - "children": [ + }, { "type": "string", - "label": "type", + "label": "id", "isRequired": true, "signature": [ "string" ], - "description": [], + "description": [ + "- The id of the document whose fields should be incremented" + ], "source": { - "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", - "lineNumber": 125, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L125" + "path": "src/core/server/saved_objects/service/lib/repository.ts", + "lineNumber": 1671, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1671" } - } - ], - "tags": [], - "returnComment": [], - "source": { - "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", - "lineNumber": 125, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L125" - } - } - ], - "source": { - "path": "src/core/server/saved_objects/saved_objects_type_registry.ts", - "lineNumber": 24, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/saved_objects_type_registry.ts#L24" - }, - "initialIsOpen": false - }, - { - "id": "def-server.SavedObjectsUtils", - "type": "Class", - "tags": [ - "public" - ], - "label": "SavedObjectsUtils", - "description": [], - "children": [ - { - "id": "def-server.SavedObjectsUtils.namespaceIdToString", - "type": "Function", - "children": [ + }, + { + "type": "Array", + "label": "counterFields", + "isRequired": true, + "signature": [ + "(string | ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsIncrementCounterField", + "text": "SavedObjectsIncrementCounterField" + }, + ")[]" + ], + "description": [ + "- An array of field names to increment or an array of {@link SavedObjectsIncrementCounterField}" + ], + "source": { + "path": "src/core/server/saved_objects/service/lib/repository.ts", + "lineNumber": 1672, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1672" + } + }, { - "type": "string", - "label": "namespace", - "isRequired": false, + "type": "Object", + "label": "options", + "isRequired": true, "signature": [ - "string | undefined" + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsIncrementCounterOptions", + "text": "SavedObjectsIncrementCounterOptions" + } + ], + "description": [ + "- {@link SavedObjectsIncrementCounterOptions}" ], - "description": [], "source": { - "path": "src/core/server/saved_objects/service/lib/utils.ts", - "lineNumber": 29, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/utils.ts#L29" + "path": "src/core/server/saved_objects/service/lib/repository.ts", + "lineNumber": 1673, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1673" } } ], - "signature": [ - "(namespace?: string | undefined) => string" + "tags": [ + "remarks", + "example" ], - "description": [ - "\nConverts a given saved object namespace ID to its string representation. All namespace IDs have an identical string representation, with\nthe exception of the `undefined` namespace ID (which has a namespace string of `'default'`).\n" + "returnComment": [ + "The saved object after the specified fields were incremented" ], - "label": "namespaceIdToString", "source": { - "path": "src/core/server/saved_objects/service/lib/utils.ts", - "lineNumber": 29, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/utils.ts#L29" - }, - "tags": [], - "returnComment": [] + "path": "src/core/server/saved_objects/service/lib/repository.ts", + "lineNumber": 1669, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1669" + } }, { - "id": "def-server.SavedObjectsUtils.namespaceStringToId", + "id": "def-server.SavedObjectsRepository.openPointInTimeForType", "type": "Function", + "label": "openPointInTimeForType", + "signature": [ + "(type: string | string[], { keepAlive, preference }?: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsOpenPointInTimeOptions", + "text": "SavedObjectsOpenPointInTimeOptions" + }, + ") => Promise<", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsOpenPointInTimeResponse", + "text": "SavedObjectsOpenPointInTimeResponse" + }, + ">" + ], + "description": [ + "\nOpens a Point In Time (PIT) against the indices for the specified Saved Object types.\nThe returned `id` can then be passed to `SavedObjects.find` to search against that PIT.\n" + ], "children": [ { - "type": "string", - "label": "namespace", + "type": "CompoundType", + "label": "type", "isRequired": true, "signature": [ - "string" + "string | string[]" ], "description": [], "source": { - "path": "src/core/server/saved_objects/service/lib/utils.ts", - "lineNumber": 43, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/utils.ts#L43" + "path": "src/core/server/saved_objects/service/lib/repository.ts", + "lineNumber": 1821, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1821" } - } - ], - "signature": [ - "(namespace: string) => string | undefined" - ], - "description": [ - "\nConverts a given saved object namespace string to its ID representation. All namespace strings have an identical ID representation, with\nthe exception of the `'default'` namespace string (which has a namespace ID of `undefined`).\n" - ], - "label": "namespaceStringToId", - "source": { - "path": "src/core/server/saved_objects/service/lib/utils.ts", - "lineNumber": 43, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/utils.ts#L43" - }, - "tags": [], - "returnComment": [] - }, - { - "id": "def-server.SavedObjectsUtils.createEmptyFindResponse", - "type": "Function", - "children": [ + }, { "type": "Object", - "label": "{\n page = FIND_DEFAULT_PAGE,\n perPage = FIND_DEFAULT_PER_PAGE,\n }", + "label": "{ keepAlive = '5m', preference }", "isRequired": true, "signature": [ { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsFindOptions", - "text": "SavedObjectsFindOptions" + "section": "def-server.SavedObjectsOpenPointInTimeOptions", + "text": "SavedObjectsOpenPointInTimeOptions" } ], "description": [], "source": { - "path": "src/core/server/saved_objects/service/lib/utils.ts", - "lineNumber": 54, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/utils.ts#L54" + "path": "src/core/server/saved_objects/service/lib/repository.ts", + "lineNumber": 1822, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1822" } } ], - "signature": [ - "({ page, perPage, }: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsFindOptions", - "text": "SavedObjectsFindOptions" - }, - ") => ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsFindResponse", - "text": "SavedObjectsFindResponse" - }, - "" + "tags": [ + "example", + "property", + "property" ], - "description": [ - "\nCreates an empty response for a find operation. This is only intended to be used by saved objects client wrappers." + "returnComment": [ + "- { id: string }" ], - "label": "createEmptyFindResponse", "source": { - "path": "src/core/server/saved_objects/service/lib/utils.ts", - "lineNumber": 54, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/utils.ts#L54" - }, - "tags": [], - "returnComment": [] + "path": "src/core/server/saved_objects/service/lib/repository.ts", + "lineNumber": 1820, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1820" + } }, { - "id": "def-server.SavedObjectsUtils.generateId", + "id": "def-server.SavedObjectsRepository.closePointInTime", "type": "Function", - "label": "generateId", + "label": "closePointInTime", "signature": [ - "typeof ", + "(id: string, options?: ", { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsUtils", - "text": "SavedObjectsUtils" + "section": "def-server.SavedObjectsBaseOptions", + "text": "SavedObjectsBaseOptions" }, - ".generateId" - ], - "description": [ - "\nGenerates a random ID for a saved objects." - ], - "children": [], - "tags": [], - "returnComment": [], - "source": { - "path": "src/core/server/saved_objects/service/lib/utils.ts", - "lineNumber": 67, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/utils.ts#L67" - } - }, - { - "id": "def-server.SavedObjectsUtils.isRandomId", - "type": "Function", - "label": "isRandomId", - "signature": [ - "typeof ", + " | undefined) => Promise<", { "pluginId": "core", "scope": "server", "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsUtils", - "text": "SavedObjectsUtils" + "section": "def-server.SavedObjectsClosePointInTimeResponse", + "text": "SavedObjectsClosePointInTimeResponse" }, - ".isRandomId" + ">" ], "description": [ - "\nValidates that a saved object ID has been randomly generated.\n" + "\nCloses a Point In Time (PIT) by ID. This simply proxies the request to ES\nvia the Elasticsearch client, and is included in the Saved Objects Client\nas a convenience for consumers who are using `openPointInTimeForType`.\n" ], "children": [ { "type": "string", "label": "id", + "isRequired": true, + "signature": [ + "string" + ], + "description": [], + "source": { + "path": "src/core/server/saved_objects/service/lib/repository.ts", + "lineNumber": 1890, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1890" + } + }, + { + "type": "Object", + "label": "options", "isRequired": false, "signature": [ - "string | undefined" + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreSavedObjectsPluginApi", + "section": "def-server.SavedObjectsBaseOptions", + "text": "SavedObjectsBaseOptions" + }, + " | undefined" ], "description": [ - "The ID of a saved object." + "- {@link SavedObjectsClosePointInTimeOptions}" ], "source": { - "path": "src/core/server/saved_objects/service/lib/utils.ts", - "lineNumber": 77, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/utils.ts#L77" + "path": "src/core/server/saved_objects/service/lib/repository.ts", + "lineNumber": 1891, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1891" } } ], "tags": [ - "todo" + "remarks", + "example" + ], + "returnComment": [ + "- {@link SavedObjectsClosePointInTimeResponse}" ], - "returnComment": [], "source": { - "path": "src/core/server/saved_objects/service/lib/utils.ts", - "lineNumber": 77, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/utils.ts#L77" + "path": "src/core/server/saved_objects/service/lib/repository.ts", + "lineNumber": 1889, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L1889" } } ], "source": { - "path": "src/core/server/saved_objects/service/lib/utils.ts", - "lineNumber": 22, - "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/utils.ts#L22" + "path": "src/core/server/saved_objects/service/lib/repository.ts", + "lineNumber": 143, + "link": "https://github.com/elastic/kibana/tree/mastersrc/core/server/saved_objects/service/lib/repository.ts#L143" }, "initialIsOpen": false }, diff --git a/api_docs/dashboard.json b/api_docs/dashboard.json index 0df54e577ede6..778bd8b6da64a 100644 --- a/api_docs/dashboard.json +++ b/api_docs/dashboard.json @@ -1389,15 +1389,15 @@ "description": [], "source": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 89, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/dashboard/public/plugin.tsx#L89" + "lineNumber": 90, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/dashboard/public/plugin.tsx#L90" } } ], "source": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 88, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/dashboard/public/plugin.tsx#L88" + "lineNumber": 89, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/dashboard/public/plugin.tsx#L89" }, "initialIsOpen": false }, @@ -1939,8 +1939,8 @@ "description": [], "source": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 86, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/dashboard/public/plugin.tsx#L86" + "lineNumber": 87, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/dashboard/public/plugin.tsx#L87" }, "signature": [ "UrlGeneratorContract<\"DASHBOARD_APP_URL_GENERATOR\">" @@ -2103,8 +2103,8 @@ "description": [], "source": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 118, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/dashboard/public/plugin.tsx#L118" + "lineNumber": 120, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/dashboard/public/plugin.tsx#L120" }, "signature": [ "void" @@ -2127,8 +2127,8 @@ "description": [], "source": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 121, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/dashboard/public/plugin.tsx#L121" + "lineNumber": 123, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/dashboard/public/plugin.tsx#L123" }, "signature": [ "() => ", @@ -2149,8 +2149,8 @@ "description": [], "source": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 122, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/dashboard/public/plugin.tsx#L122" + "lineNumber": 124, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/dashboard/public/plugin.tsx#L124" }, "signature": [ { @@ -2171,8 +2171,8 @@ "description": [], "source": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 123, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/dashboard/public/plugin.tsx#L123" + "lineNumber": 125, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/dashboard/public/plugin.tsx#L125" }, "signature": [ { @@ -2192,8 +2192,8 @@ "description": [], "source": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 124, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/dashboard/public/plugin.tsx#L124" + "lineNumber": 126, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/dashboard/public/plugin.tsx#L126" }, "signature": [ "React.FC" @@ -2202,8 +2202,8 @@ ], "source": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 120, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/dashboard/public/plugin.tsx#L120" + "lineNumber": 122, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/dashboard/public/plugin.tsx#L122" }, "lifecycle": "start", "initialIsOpen": true diff --git a/api_docs/data.json b/api_docs/data.json index 74161a7c239c0..82ab1accac717 100644 --- a/api_docs/data.json +++ b/api_docs/data.json @@ -5434,8 +5434,8 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 259, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L259" + "lineNumber": 263, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L263" } }, { @@ -5461,8 +5461,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 290, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L290" + "lineNumber": 294, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L294" } }, { @@ -5482,8 +5482,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 301, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L301" + "lineNumber": 305, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L305" } }, { @@ -5509,8 +5509,8 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 310, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L310" + "lineNumber": 314, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L314" } }, { @@ -5542,8 +5542,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 365, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L365" + "lineNumber": 369, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L369" } }, { @@ -5567,8 +5567,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 369, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L369" + "lineNumber": 373, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L373" } }, { @@ -5592,8 +5592,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 373, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L373" + "lineNumber": 377, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L377" } }, { @@ -5615,8 +5615,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 377, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L377" + "lineNumber": 381, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L381" } } ], @@ -5624,8 +5624,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 377, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L377" + "lineNumber": 381, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L381" } }, { @@ -5647,8 +5647,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 381, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L381" + "lineNumber": 385, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L385" } }, { @@ -5661,8 +5661,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 381, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L381" + "lineNumber": 385, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L385" } } ], @@ -5670,8 +5670,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 381, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L381" + "lineNumber": 385, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L385" } }, { @@ -5687,8 +5687,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 389, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L389" + "lineNumber": 393, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L393" } }, { @@ -5704,8 +5704,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 395, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L395" + "lineNumber": 399, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L399" } }, { @@ -5723,8 +5723,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 404, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L404" + "lineNumber": 408, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L408" } }, { @@ -5746,8 +5746,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 408, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L408" + "lineNumber": 412, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L412" } } ], @@ -5755,8 +5755,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 408, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L408" + "lineNumber": 412, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L412" } }, { @@ -5779,8 +5779,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 422, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L422" + "lineNumber": 426, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L426" } }, { @@ -5804,8 +5804,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 426, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L426" + "lineNumber": 430, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L430" } }, { @@ -5821,8 +5821,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 430, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L430" + "lineNumber": 434, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L434" } }, { @@ -5838,8 +5838,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 435, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L435" + "lineNumber": 439, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L439" } }, { @@ -5850,8 +5850,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 442, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L442" + "lineNumber": 446, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L446" }, "signature": [ { @@ -5871,8 +5871,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 446, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L446" + "lineNumber": 450, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L450" }, "signature": [ { @@ -5917,8 +5917,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 476, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L476" + "lineNumber": 480, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L480" } } ], @@ -5926,8 +5926,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 476, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L476" + "lineNumber": 480, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L480" } } ], @@ -5955,8 +5955,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 112, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L112" + "lineNumber": 111, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L111" }, "signature": [ "Record[]" @@ -5987,8 +5987,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 116, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L116" + "lineNumber": 115, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L115" } }, { @@ -6007,8 +6007,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 116, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L116" + "lineNumber": 115, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L115" } } ], @@ -6016,8 +6016,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 116, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L116" + "lineNumber": 115, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L115" } }, { @@ -6041,8 +6041,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 134, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L134" + "lineNumber": 133, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L133" } } ], @@ -6050,8 +6050,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 134, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L134" + "lineNumber": 133, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L133" } }, { @@ -6085,8 +6085,8 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 143, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L143" + "lineNumber": 142, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L142" } }, { @@ -6108,8 +6108,8 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 143, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L143" + "lineNumber": 142, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L142" } } ], @@ -6117,8 +6117,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 143, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L143" + "lineNumber": 142, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L142" } }, { @@ -6144,8 +6144,8 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 155, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L155" + "lineNumber": 154, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L154" } } ], @@ -6153,8 +6153,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 155, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L155" + "lineNumber": 154, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L154" } }, { @@ -6194,8 +6194,8 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 166, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L166" + "lineNumber": 165, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L165" } } ], @@ -6205,8 +6205,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 166, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L166" + "lineNumber": 165, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L165" } }, { @@ -6224,8 +6224,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 174, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L174" + "lineNumber": 173, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L173" } }, { @@ -6250,8 +6250,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 181, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L181" + "lineNumber": 180, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L180" } }, { @@ -6283,8 +6283,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 188, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L188" + "lineNumber": 187, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L187" } }, { @@ -6297,8 +6297,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 188, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L188" + "lineNumber": 187, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L187" } } ], @@ -6306,8 +6306,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 188, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L188" + "lineNumber": 187, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L187" } }, { @@ -6339,8 +6339,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 199, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L199" + "lineNumber": 198, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L198" } } ], @@ -6348,8 +6348,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 199, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L199" + "lineNumber": 198, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L198" } }, { @@ -6374,8 +6374,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 206, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L206" + "lineNumber": 205, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L205" } }, { @@ -6400,8 +6400,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 213, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L213" + "lineNumber": 212, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L212" } }, { @@ -6432,8 +6432,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 227, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L227" + "lineNumber": 226, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L226" } } ], @@ -6441,8 +6441,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 227, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L227" + "lineNumber": 226, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L226" } }, { @@ -6492,8 +6492,8 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 239, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L239" + "lineNumber": 238, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L238" } }, { @@ -6514,8 +6514,8 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 239, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L239" + "lineNumber": 238, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L238" } } ], @@ -6527,8 +6527,8 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 239, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L239" + "lineNumber": 238, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L238" } }, { @@ -6556,8 +6556,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 249, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L249" + "lineNumber": 248, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L248" } }, { @@ -6599,8 +6599,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 257, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L257" + "lineNumber": 256, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L256" } } ], @@ -6608,8 +6608,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 257, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L257" + "lineNumber": 256, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L256" } }, { @@ -6649,8 +6649,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 284, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L284" + "lineNumber": 283, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L283" } } ], @@ -6660,8 +6660,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 284, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L284" + "lineNumber": 283, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L283" } }, { @@ -6717,8 +6717,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 294, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L294" + "lineNumber": 293, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L293" } } ], @@ -6728,8 +6728,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 293, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L293" + "lineNumber": 292, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L292" } }, { @@ -6747,8 +6747,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 302, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L302" + "lineNumber": 301, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L301" } }, { @@ -6768,8 +6768,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 311, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L311" + "lineNumber": 310, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L310" } }, { @@ -6800,8 +6800,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 689, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L689" + "lineNumber": 688, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L688" } } ], @@ -6809,8 +6809,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 689, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L689" + "lineNumber": 688, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L688" } }, { @@ -6838,15 +6838,15 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 718, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L718" + "lineNumber": 717, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L717" } } ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 104, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L104" + "lineNumber": 103, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L103" }, "initialIsOpen": false }, @@ -8239,8 +8239,8 @@ "description": [], "source": { "path": "src/plugins/data/common/field_formats/types.ts", - "lineNumber": 62, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L62" + "lineNumber": 63, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L63" } }, { @@ -8251,8 +8251,8 @@ "description": [], "source": { "path": "src/plugins/data/common/field_formats/types.ts", - "lineNumber": 63, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L63" + "lineNumber": 64, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L64" }, "signature": [ "Record" @@ -8266,8 +8266,8 @@ "description": [], "source": { "path": "src/plugins/data/common/field_formats/types.ts", - "lineNumber": 64, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L64" + "lineNumber": 65, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L65" }, "signature": [ "boolean | undefined" @@ -8276,8 +8276,8 @@ ], "source": { "path": "src/plugins/data/common/field_formats/types.ts", - "lineNumber": 61, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L61" + "lineNumber": 62, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L62" }, "initialIsOpen": false }, @@ -12030,8 +12030,8 @@ "description": [], "source": { "path": "src/plugins/data/common/field_formats/types.ts", - "lineNumber": 69, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L69" + "lineNumber": 70, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L70" }, "signature": [ "FieldFormat" @@ -12101,8 +12101,8 @@ "description": [], "source": { "path": "src/plugins/data/common/field_formats/types.ts", - "lineNumber": 67, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L67" + "lineNumber": 68, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L68" }, "signature": [ "(key: string, defaultOverride: T | undefined) => T" @@ -12119,8 +12119,8 @@ "description": [], "source": { "path": "src/plugins/data/common/field_formats/types.ts", - "lineNumber": 74, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L74" + "lineNumber": 75, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L75" }, "signature": [ "string" @@ -13811,8 +13811,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 168, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L168" + "lineNumber": 169, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L169" }, "signature": [ "typeof ", @@ -13833,8 +13833,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 169, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L169" + "lineNumber": 170, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L170" }, "signature": [ "typeof ", @@ -13855,8 +13855,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 171, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L171" + "lineNumber": 172, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L172" }, "signature": [ "{ range: string; regex: string; text: string; background: string; }" @@ -13870,8 +13870,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 172, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L172" + "lineNumber": 173, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L173" }, "signature": [ { @@ -13891,8 +13891,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 173, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L173" + "lineNumber": 174, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L174" }, "signature": [ { @@ -13912,8 +13912,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 174, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L174" + "lineNumber": 175, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L175" }, "signature": [ "typeof ", @@ -13934,8 +13934,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 176, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L176" + "lineNumber": 177, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L177" }, "signature": [ "typeof ", @@ -13956,8 +13956,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 177, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L177" + "lineNumber": 178, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L178" }, "signature": [ "typeof ", @@ -13978,8 +13978,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 178, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L178" + "lineNumber": 179, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L179" }, "signature": [ "typeof ", @@ -14000,8 +14000,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 179, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L179" + "lineNumber": 180, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L180" }, "signature": [ "typeof ", @@ -14022,8 +14022,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 180, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L180" + "lineNumber": 181, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L181" }, "signature": [ "typeof ", @@ -14044,8 +14044,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 181, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L181" + "lineNumber": 182, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L182" }, "signature": [ "typeof ", @@ -14066,8 +14066,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 182, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L182" + "lineNumber": 183, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L183" }, "signature": [ "typeof ", @@ -14088,8 +14088,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 183, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L183" + "lineNumber": 184, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L184" }, "signature": [ "typeof ", @@ -14110,8 +14110,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 184, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L184" + "lineNumber": 185, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L185" }, "signature": [ "typeof ", @@ -14132,8 +14132,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 185, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L185" + "lineNumber": 186, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L186" }, "signature": [ "typeof ", @@ -14154,8 +14154,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 186, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L186" + "lineNumber": 187, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L187" }, "signature": [ "typeof ", @@ -14176,8 +14176,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 187, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L187" + "lineNumber": 188, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L188" }, "signature": [ "typeof ", @@ -14198,8 +14198,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 188, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L188" + "lineNumber": 189, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L189" }, "signature": [ "typeof ", @@ -14220,8 +14220,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 189, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L189" + "lineNumber": 190, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L190" }, "signature": [ "typeof ", @@ -14242,8 +14242,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 190, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L190" + "lineNumber": 191, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L191" }, "signature": [ "typeof ", @@ -14255,14 +14255,36 @@ "text": "TruncateFormat" } ] + }, + { + "tags": [], + "id": "def-public.fieldFormats.HistogramFormat", + "type": "Object", + "label": "HistogramFormat", + "description": [], + "source": { + "path": "src/plugins/data/public/index.ts", + "lineNumber": 192, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L192" + }, + "signature": [ + "typeof ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataFieldFormatsPluginApi", + "section": "def-common.HistogramFormat", + "text": "HistogramFormat" + } + ] } ], "description": [], "label": "fieldFormats", "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 167, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L167" + "lineNumber": 168, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L168" }, "initialIsOpen": false }, @@ -14279,8 +14301,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 210, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L210" + "lineNumber": 212, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L212" }, "signature": [ "typeof ", @@ -14301,8 +14323,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 211, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L211" + "lineNumber": 213, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L213" } } ], @@ -14310,8 +14332,8 @@ "label": "exporters", "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 209, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L209" + "lineNumber": 211, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L211" }, "initialIsOpen": false }, @@ -14328,8 +14350,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 235, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L235" + "lineNumber": 237, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L237" } }, { @@ -14340,8 +14362,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 236, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L236" + "lineNumber": 238, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L238" } }, { @@ -14352,8 +14374,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 237, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L237" + "lineNumber": 239, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L239" }, "signature": [ "string[]" @@ -14367,8 +14389,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 238, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L238" + "lineNumber": 240, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L240" }, "signature": [ "string[]" @@ -14382,8 +14404,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 239, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L239" + "lineNumber": 241, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L241" }, "signature": [ "(indexPattern: ", @@ -14405,8 +14427,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 240, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L240" + "lineNumber": 242, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L242" }, "signature": [ "typeof ", @@ -14427,8 +14449,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 241, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L241" + "lineNumber": 243, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L243" }, "signature": [ "typeof ", @@ -14449,8 +14471,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 242, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L242" + "lineNumber": 244, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L244" }, "signature": [ "typeof ", @@ -14471,8 +14493,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 243, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L243" + "lineNumber": 245, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L245" }, "signature": [ "typeof ", @@ -14493,8 +14515,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 244, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L244" + "lineNumber": 246, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L246" }, "signature": [ "typeof ", @@ -14512,8 +14534,8 @@ "label": "indexPatterns", "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 234, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L234" + "lineNumber": 236, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L236" }, "initialIsOpen": false }, @@ -14618,8 +14640,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 401, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L401" + "lineNumber": 403, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L403" }, "signature": [ "typeof ", @@ -14640,8 +14662,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 402, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L402" + "lineNumber": 404, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L404" }, "signature": [ "typeof ", @@ -14662,8 +14684,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 403, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L403" + "lineNumber": 405, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L405" }, "signature": [ "({ display: string; val: string; enabled(agg: ", @@ -14685,8 +14707,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 404, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L404" + "lineNumber": 406, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L406" }, "signature": [ "typeof ", @@ -14707,8 +14729,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 405, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L405" + "lineNumber": 407, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L407" }, "signature": [ "typeof ", @@ -14729,8 +14751,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 406, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L406" + "lineNumber": 408, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L408" }, "signature": [ "typeof ", @@ -14751,8 +14773,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 407, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L407" + "lineNumber": 409, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L409" }, "signature": [ "typeof ", @@ -14773,8 +14795,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 408, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L408" + "lineNumber": 410, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L410" }, "signature": [ "(agg: ", @@ -14796,8 +14818,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 409, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L409" + "lineNumber": 411, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L411" }, "signature": [ "(agg: ", @@ -14819,8 +14841,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 410, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L410" + "lineNumber": 412, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L412" }, "signature": [ "(...types: string[]) => (agg: ", @@ -14842,8 +14864,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 411, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L411" + "lineNumber": 413, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L413" }, "signature": [ "typeof ", @@ -14864,8 +14886,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 412, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L412" + "lineNumber": 414, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L414" }, "signature": [ "typeof ", @@ -14886,8 +14908,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 413, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L413" + "lineNumber": 415, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L415" } }, { @@ -14898,8 +14920,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 414, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L414" + "lineNumber": 416, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L416" }, "signature": [ "typeof ", @@ -14920,8 +14942,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 415, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L415" + "lineNumber": 417, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L417" }, "signature": [ "typeof ", @@ -14942,8 +14964,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 416, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L416" + "lineNumber": 418, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L418" }, "signature": [ "typeof ", @@ -14964,8 +14986,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 417, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L417" + "lineNumber": 419, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L419" } }, { @@ -14976,8 +14998,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 418, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L418" + "lineNumber": 420, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L420" }, "signature": [ "string[]" @@ -14991,8 +15013,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 419, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L419" + "lineNumber": 421, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L421" }, "signature": [ "typeof ", @@ -15013,8 +15035,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 420, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L420" + "lineNumber": 422, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L422" }, "signature": [ "({ bound: number; interval: moment.Duration; boundLabel: string; intervalLabel: string; } | { bound: moment.Duration; interval: moment.Duration; boundLabel: string; intervalLabel: string; })[]" @@ -15028,8 +15050,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 421, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L421" + "lineNumber": 423, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L423" }, "signature": [ "(column: ", @@ -15048,8 +15070,8 @@ "label": "aggs", "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 400, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L400" + "lineNumber": 402, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L402" } }, { @@ -15060,8 +15082,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 423, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L423" + "lineNumber": 425, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L425" }, "signature": [ "typeof ", @@ -15082,8 +15104,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 424, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L424" + "lineNumber": 426, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L426" }, "signature": [ "typeof ", @@ -15104,8 +15126,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 425, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L425" + "lineNumber": 427, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L427" }, "signature": [ "typeof ", @@ -15126,8 +15148,8 @@ "description": [], "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 426, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L426" + "lineNumber": 428, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L428" }, "signature": [ "typeof ", @@ -15145,8 +15167,8 @@ "label": "search", "source": { "path": "src/plugins/data/public/index.ts", - "lineNumber": 399, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L399" + "lineNumber": 401, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/public/index.ts#L401" }, "initialIsOpen": false } @@ -19822,8 +19844,8 @@ "description": [], "source": { "path": "src/plugins/data/common/field_formats/types.ts", - "lineNumber": 62, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L62" + "lineNumber": 63, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L63" } }, { @@ -19834,8 +19856,8 @@ "description": [], "source": { "path": "src/plugins/data/common/field_formats/types.ts", - "lineNumber": 63, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L63" + "lineNumber": 64, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L64" }, "signature": [ "Record" @@ -19849,8 +19871,8 @@ "description": [], "source": { "path": "src/plugins/data/common/field_formats/types.ts", - "lineNumber": 64, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L64" + "lineNumber": 65, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L65" }, "signature": [ "boolean | undefined" @@ -19859,8 +19881,8 @@ ], "source": { "path": "src/plugins/data/common/field_formats/types.ts", - "lineNumber": 61, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L61" + "lineNumber": 62, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L62" }, "initialIsOpen": false }, @@ -21406,8 +21428,8 @@ "description": [], "source": { "path": "src/plugins/data/common/field_formats/types.ts", - "lineNumber": 67, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L67" + "lineNumber": 68, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L68" }, "signature": [ "(key: string, defaultOverride: T | undefined) => T" @@ -22365,8 +22387,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 101, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L101" + "lineNumber": 102, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L102" }, "signature": [ "typeof ", @@ -22387,8 +22409,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 102, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L102" + "lineNumber": 103, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L103" }, "signature": [ "typeof ", @@ -22409,8 +22431,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 103, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L103" + "lineNumber": 104, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L104" }, "signature": [ "typeof ", @@ -22431,8 +22453,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 104, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L104" + "lineNumber": 105, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L105" }, "signature": [ "typeof ", @@ -22453,8 +22475,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 105, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L105" + "lineNumber": 106, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L106" }, "signature": [ "typeof ", @@ -22475,8 +22497,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 106, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L106" + "lineNumber": 107, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L107" }, "signature": [ "typeof ", @@ -22497,8 +22519,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 107, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L107" + "lineNumber": 108, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L108" }, "signature": [ "typeof ", @@ -22519,8 +22541,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 108, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L108" + "lineNumber": 109, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L109" }, "signature": [ "typeof ", @@ -22541,8 +22563,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 109, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L109" + "lineNumber": 110, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L110" }, "signature": [ "typeof ", @@ -22563,8 +22585,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 110, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L110" + "lineNumber": 111, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L111" }, "signature": [ "typeof ", @@ -22585,8 +22607,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 111, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L111" + "lineNumber": 112, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L112" }, "signature": [ "typeof ", @@ -22607,8 +22629,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 112, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L112" + "lineNumber": 113, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L113" }, "signature": [ "typeof ", @@ -22629,8 +22651,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 113, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L113" + "lineNumber": 114, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L114" }, "signature": [ "typeof ", @@ -22651,8 +22673,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 114, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L114" + "lineNumber": 115, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L115" }, "signature": [ "typeof ", @@ -22673,8 +22695,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 115, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L115" + "lineNumber": 116, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L116" }, "signature": [ "typeof ", @@ -22686,14 +22708,36 @@ "text": "TruncateFormat" } ] + }, + { + "tags": [], + "id": "def-server.fieldFormats.HistogramFormat", + "type": "Object", + "label": "HistogramFormat", + "description": [], + "source": { + "path": "src/plugins/data/server/index.ts", + "lineNumber": 117, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L117" + }, + "signature": [ + "typeof ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataFieldFormatsPluginApi", + "section": "def-common.HistogramFormat", + "text": "HistogramFormat" + } + ] } ], "description": [], "label": "fieldFormats", "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 100, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L100" + "lineNumber": 101, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L101" }, "initialIsOpen": false }, @@ -22710,8 +22754,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 127, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L127" + "lineNumber": 129, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L129" }, "signature": [ "typeof ", @@ -22732,8 +22776,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 128, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L128" + "lineNumber": 130, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L130" }, "signature": [ "typeof ", @@ -22751,8 +22795,8 @@ "label": "indexPatterns", "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 126, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L126" + "lineNumber": 128, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L128" }, "initialIsOpen": false }, @@ -22857,8 +22901,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 243, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L243" + "lineNumber": 245, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L245" }, "signature": [ "typeof ", @@ -22879,8 +22923,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 244, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L244" + "lineNumber": 246, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L246" }, "signature": [ "typeof ", @@ -22901,8 +22945,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 245, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L245" + "lineNumber": 247, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L247" }, "signature": [ "({ display: string; val: string; enabled(agg: ", @@ -22924,8 +22968,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 246, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L246" + "lineNumber": 248, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L248" }, "signature": [ "typeof ", @@ -22946,8 +22990,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 247, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L247" + "lineNumber": 249, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L249" }, "signature": [ "typeof ", @@ -22968,8 +23012,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 248, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L248" + "lineNumber": 250, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L250" }, "signature": [ "typeof ", @@ -22990,8 +23034,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 249, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L249" + "lineNumber": 251, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L251" }, "signature": [ "(agg: ", @@ -23013,8 +23057,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 250, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L250" + "lineNumber": 252, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L252" }, "signature": [ "(agg: ", @@ -23036,8 +23080,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 251, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L251" + "lineNumber": 253, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L253" }, "signature": [ "(...types: string[]) => (agg: ", @@ -23059,8 +23103,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 252, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L252" + "lineNumber": 254, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L254" }, "signature": [ "typeof ", @@ -23081,8 +23125,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 253, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L253" + "lineNumber": 255, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L255" }, "signature": [ "typeof ", @@ -23103,8 +23147,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 254, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L254" + "lineNumber": 256, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L256" } }, { @@ -23115,8 +23159,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 255, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L255" + "lineNumber": 257, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L257" }, "signature": [ "typeof ", @@ -23137,8 +23181,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 256, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L256" + "lineNumber": 258, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L258" }, "signature": [ "typeof ", @@ -23159,8 +23203,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 257, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L257" + "lineNumber": 259, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L259" }, "signature": [ "typeof ", @@ -23181,8 +23225,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 258, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L258" + "lineNumber": 260, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L260" } }, { @@ -23193,8 +23237,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 259, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L259" + "lineNumber": 261, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L261" }, "signature": [ "string[]" @@ -23208,8 +23252,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 260, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L260" + "lineNumber": 262, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L262" }, "signature": [ "typeof ", @@ -23230,8 +23274,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 261, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L261" + "lineNumber": 263, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L263" }, "signature": [ "typeof ", @@ -23249,8 +23293,8 @@ "label": "aggs", "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 242, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L242" + "lineNumber": 244, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L244" } }, { @@ -23261,8 +23305,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 263, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L263" + "lineNumber": 265, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L265" }, "signature": [ "typeof ", @@ -23283,8 +23327,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 264, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L264" + "lineNumber": 266, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L266" }, "signature": [ "typeof ", @@ -23305,8 +23349,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 265, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L265" + "lineNumber": 267, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L267" }, "signature": [ "typeof ", @@ -23327,8 +23371,8 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 266, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L266" + "lineNumber": 268, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L268" }, "signature": [ "typeof ", @@ -23346,8 +23390,8 @@ "label": "search", "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 241, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L241" + "lineNumber": 243, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/server/index.ts#L243" }, "initialIsOpen": false } @@ -26207,106 +26251,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "id": "def-common.getConvertedValueForField", - "type": "Function", - "children": [ - { - "type": "Object", - "label": "field", - "isRequired": true, - "signature": [ - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataIndexPatternsPluginApi", - "section": "def-common.IFieldType", - "text": "IFieldType" - } - ], - "description": [], - "source": { - "path": "src/plugins/data/common/es_query/filters/phrase_filter.ts", - "lineNumber": 107, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/es_query/filters/phrase_filter.ts#L107" - } - }, - { - "type": "Any", - "label": "value", - "isRequired": true, - "signature": [ - "any" - ], - "description": [], - "source": { - "path": "src/plugins/data/common/es_query/filters/phrase_filter.ts", - "lineNumber": 107, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/es_query/filters/phrase_filter.ts#L107" - } - } - ], - "signature": [ - "(field: ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataIndexPatternsPluginApi", - "section": "def-common.IFieldType", - "text": "IFieldType" - }, - ", value: any) => any" - ], - "description": [ - "\nSee issues bellow for the reason behind this change.\nValues need to be converted to correct types for boolean \\ numeric fields.\nhttps://github.com/elastic/kibana/issues/74301\nhttps://github.com/elastic/kibana/issues/8677\nhttps://github.com/elastic/elasticsearch/issues/20941\nhttps://github.com/elastic/elasticsearch/pull/22201" - ], - "label": "getConvertedValueForField", - "source": { - "path": "src/plugins/data/common/es_query/filters/phrase_filter.ts", - "lineNumber": 107, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/es_query/filters/phrase_filter.ts#L107" - }, - "tags": [], - "returnComment": [], - "initialIsOpen": false - }, - { - "id": "def-common.buildInlineScriptForPhraseFilter", - "type": "Function", - "children": [ - { - "type": "Any", - "label": "scriptedField", - "isRequired": true, - "signature": [ - "any" - ], - "description": [], - "source": { - "path": "src/plugins/data/common/es_query/filters/phrase_filter.ts", - "lineNumber": 132, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/es_query/filters/phrase_filter.ts#L132" - } - } - ], - "signature": [ - "(scriptedField: any) => string" - ], - "description": [ - "\nTakes a scripted field and returns an inline script appropriate for use in a script query.\nHandles lucene expression and Painless scripts. Other langs aren't guaranteed to generate valid\nscripts.\n" - ], - "label": "buildInlineScriptForPhraseFilter", - "source": { - "path": "src/plugins/data/common/es_query/filters/phrase_filter.ts", - "lineNumber": 132, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/es_query/filters/phrase_filter.ts#L132" - }, - "tags": [], - "returnComment": [ - "The inline script string" - ], - "initialIsOpen": false - }, { "id": "def-common.isPhrasesFilter", "type": "Function", diff --git a/api_docs/data_field_formats.json b/api_docs/data_field_formats.json index f1bd701515604..777f5e4a68e87 100644 --- a/api_docs/data_field_formats.json +++ b/api_docs/data_field_formats.json @@ -3641,6 +3641,186 @@ }, "initialIsOpen": false }, + { + "id": "def-common.HistogramFormat", + "type": "Class", + "tags": [], + "label": "HistogramFormat", + "description": [], + "signature": [ + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataFieldFormatsPluginApi", + "section": "def-common.HistogramFormat", + "text": "HistogramFormat" + }, + " extends ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataFieldFormatsPluginApi", + "section": "def-common.FieldFormat", + "text": "FieldFormat" + } + ], + "children": [ + { + "tags": [], + "id": "def-common.HistogramFormat.id", + "type": "Enum", + "label": "id", + "description": [], + "source": { + "path": "src/plugins/data/common/field_formats/converters/histogram.ts", + "lineNumber": 18, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/converters/histogram.ts#L18" + }, + "signature": [ + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataFieldFormatsPluginApi", + "section": "def-common.FIELD_FORMAT_IDS", + "text": "FIELD_FORMAT_IDS" + } + ] + }, + { + "tags": [], + "id": "def-common.HistogramFormat.fieldType", + "type": "Enum", + "label": "fieldType", + "description": [], + "source": { + "path": "src/plugins/data/common/field_formats/converters/histogram.ts", + "lineNumber": 19, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/converters/histogram.ts#L19" + }, + "signature": [ + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataPluginApi", + "section": "def-common.KBN_FIELD_TYPES", + "text": "KBN_FIELD_TYPES" + } + ] + }, + { + "tags": [], + "id": "def-common.HistogramFormat.title", + "type": "string", + "label": "title", + "description": [], + "source": { + "path": "src/plugins/data/common/field_formats/converters/histogram.ts", + "lineNumber": 20, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/converters/histogram.ts#L20" + } + }, + { + "tags": [], + "id": "def-common.HistogramFormat.id", + "type": "Enum", + "label": "id", + "description": [], + "source": { + "path": "src/plugins/data/common/field_formats/converters/histogram.ts", + "lineNumber": 24, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/converters/histogram.ts#L24" + }, + "signature": [ + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataFieldFormatsPluginApi", + "section": "def-common.FIELD_FORMAT_IDS", + "text": "FIELD_FORMAT_IDS" + } + ] + }, + { + "tags": [], + "id": "def-common.HistogramFormat.title", + "type": "string", + "label": "title", + "description": [], + "source": { + "path": "src/plugins/data/common/field_formats/converters/histogram.ts", + "lineNumber": 25, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/converters/histogram.ts#L25" + } + }, + { + "tags": [], + "id": "def-common.HistogramFormat.allowsNumericalAggregations", + "type": "boolean", + "label": "allowsNumericalAggregations", + "description": [], + "source": { + "path": "src/plugins/data/common/field_formats/converters/histogram.ts", + "lineNumber": 26, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/converters/histogram.ts#L26" + } + }, + { + "id": "def-common.HistogramFormat.getParamDefaults", + "type": "Function", + "label": "getParamDefaults", + "signature": [ + "() => { id: string; params: {}; }" + ], + "description": [], + "children": [], + "tags": [], + "returnComment": [], + "source": { + "path": "src/plugins/data/common/field_formats/converters/histogram.ts", + "lineNumber": 29, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/converters/histogram.ts#L29" + } + }, + { + "id": "def-common.HistogramFormat.textConvert", + "type": "Function", + "children": [ + { + "type": "Any", + "label": "val", + "isRequired": true, + "signature": [ + "any" + ], + "description": [], + "source": { + "path": "src/plugins/data/common/field_formats/converters/histogram.ts", + "lineNumber": 36, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/converters/histogram.ts#L36" + } + } + ], + "signature": [ + "(val: any) => string" + ], + "description": [], + "label": "textConvert", + "source": { + "path": "src/plugins/data/common/field_formats/converters/histogram.ts", + "lineNumber": 36, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/converters/histogram.ts#L36" + }, + "tags": [], + "returnComment": [] + } + ], + "source": { + "path": "src/plugins/data/common/field_formats/converters/histogram.ts", + "lineNumber": 17, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/converters/histogram.ts#L17" + }, + "initialIsOpen": false + }, { "id": "def-common.FieldFormatNotFoundError", "type": "Class", @@ -3790,8 +3970,8 @@ "description": [], "source": { "path": "src/plugins/data/common/field_formats/types.ts", - "lineNumber": 62, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L62" + "lineNumber": 63, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L63" } }, { @@ -3802,8 +3982,8 @@ "description": [], "source": { "path": "src/plugins/data/common/field_formats/types.ts", - "lineNumber": 63, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L63" + "lineNumber": 64, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L64" }, "signature": [ "Record" @@ -3817,8 +3997,8 @@ "description": [], "source": { "path": "src/plugins/data/common/field_formats/types.ts", - "lineNumber": 64, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L64" + "lineNumber": 65, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L65" }, "signature": [ "boolean | undefined" @@ -3827,8 +4007,8 @@ ], "source": { "path": "src/plugins/data/common/field_formats/types.ts", - "lineNumber": 61, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L61" + "lineNumber": 62, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L62" }, "initialIsOpen": false } @@ -3896,8 +4076,8 @@ "description": [], "source": { "path": "src/plugins/data/common/field_formats/constants/base_formatters.ts", - "lineNumber": 27, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/constants/base_formatters.ts#L27" + "lineNumber": 28, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/constants/base_formatters.ts#L28" }, "signature": [ "FieldFormatInstanceType", @@ -3957,8 +4137,8 @@ "description": [], "source": { "path": "src/plugins/data/common/field_formats/types.ts", - "lineNumber": 67, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L67" + "lineNumber": 68, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L68" }, "signature": [ "(key: string, defaultOverride: T | undefined) => T" @@ -3993,8 +4173,8 @@ "description": [], "source": { "path": "src/plugins/data/common/field_formats/types.ts", - "lineNumber": 74, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L74" + "lineNumber": 75, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L75" }, "signature": [ "string" @@ -4009,8 +4189,8 @@ "description": [], "source": { "path": "src/plugins/data/common/field_formats/types.ts", - "lineNumber": 69, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L69" + "lineNumber": 70, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L70" }, "signature": [ "FieldFormat" @@ -4025,8 +4205,8 @@ "description": [], "source": { "path": "src/plugins/data/common/field_formats/types.ts", - "lineNumber": 96, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L96" + "lineNumber": 97, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/field_formats/types.ts#L97" }, "signature": [ "{ init: (getConfig: GetConfigFn, metaParamsOptions?: Record, defaultFieldConverters?: FieldFormatInstanceType[]) => void; register: (fieldFormats: FieldFormatInstanceType[]) => void; deserialize: ", diff --git a/api_docs/data_search.json b/api_docs/data_search.json index 5e3c0b95d9789..f060343ecef7c 100644 --- a/api_docs/data_search.json +++ b/api_docs/data_search.json @@ -2876,8 +2876,8 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 259, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L259" + "lineNumber": 263, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L263" } }, { @@ -2903,8 +2903,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 290, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L290" + "lineNumber": 294, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L294" } }, { @@ -2924,8 +2924,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 301, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L301" + "lineNumber": 305, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L305" } }, { @@ -2951,8 +2951,8 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 310, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L310" + "lineNumber": 314, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L314" } }, { @@ -2984,8 +2984,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 365, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L365" + "lineNumber": 369, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L369" } }, { @@ -3009,8 +3009,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 369, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L369" + "lineNumber": 373, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L373" } }, { @@ -3034,8 +3034,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 373, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L373" + "lineNumber": 377, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L377" } }, { @@ -3057,8 +3057,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 377, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L377" + "lineNumber": 381, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L381" } } ], @@ -3066,8 +3066,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 377, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L377" + "lineNumber": 381, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L381" } }, { @@ -3089,8 +3089,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 381, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L381" + "lineNumber": 385, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L385" } }, { @@ -3103,8 +3103,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 381, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L381" + "lineNumber": 385, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L385" } } ], @@ -3112,8 +3112,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 381, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L381" + "lineNumber": 385, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L385" } }, { @@ -3129,8 +3129,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 389, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L389" + "lineNumber": 393, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L393" } }, { @@ -3146,8 +3146,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 395, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L395" + "lineNumber": 399, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L399" } }, { @@ -3165,8 +3165,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 404, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L404" + "lineNumber": 408, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L408" } }, { @@ -3188,8 +3188,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 408, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L408" + "lineNumber": 412, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L412" } } ], @@ -3197,8 +3197,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 408, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L408" + "lineNumber": 412, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L412" } }, { @@ -3221,8 +3221,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 422, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L422" + "lineNumber": 426, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L426" } }, { @@ -3246,8 +3246,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 426, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L426" + "lineNumber": 430, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L430" } }, { @@ -3263,8 +3263,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 430, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L430" + "lineNumber": 434, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L434" } }, { @@ -3280,8 +3280,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 435, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L435" + "lineNumber": 439, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L439" } }, { @@ -3292,8 +3292,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 442, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L442" + "lineNumber": 446, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L446" }, "signature": [ { @@ -3313,8 +3313,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 446, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L446" + "lineNumber": 450, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L450" }, "signature": [ { @@ -3359,8 +3359,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 476, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L476" + "lineNumber": 480, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L480" } } ], @@ -3368,8 +3368,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 476, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L476" + "lineNumber": 480, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/aggs/agg_config.ts#L480" } } ], @@ -6522,8 +6522,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 112, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L112" + "lineNumber": 111, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L111" }, "signature": [ "Record[]" @@ -6554,8 +6554,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 116, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L116" + "lineNumber": 115, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L115" } }, { @@ -6574,8 +6574,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 116, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L116" + "lineNumber": 115, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L115" } } ], @@ -6583,8 +6583,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 116, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L116" + "lineNumber": 115, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L115" } }, { @@ -6608,8 +6608,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 134, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L134" + "lineNumber": 133, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L133" } } ], @@ -6617,8 +6617,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 134, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L134" + "lineNumber": 133, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L133" } }, { @@ -6652,8 +6652,8 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 143, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L143" + "lineNumber": 142, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L142" } }, { @@ -6675,8 +6675,8 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 143, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L143" + "lineNumber": 142, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L142" } } ], @@ -6684,8 +6684,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 143, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L143" + "lineNumber": 142, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L142" } }, { @@ -6711,8 +6711,8 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 155, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L155" + "lineNumber": 154, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L154" } } ], @@ -6720,8 +6720,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 155, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L155" + "lineNumber": 154, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L154" } }, { @@ -6761,8 +6761,8 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 166, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L166" + "lineNumber": 165, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L165" } } ], @@ -6772,8 +6772,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 166, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L166" + "lineNumber": 165, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L165" } }, { @@ -6791,8 +6791,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 174, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L174" + "lineNumber": 173, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L173" } }, { @@ -6817,8 +6817,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 181, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L181" + "lineNumber": 180, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L180" } }, { @@ -6850,8 +6850,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 188, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L188" + "lineNumber": 187, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L187" } }, { @@ -6864,8 +6864,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 188, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L188" + "lineNumber": 187, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L187" } } ], @@ -6873,8 +6873,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 188, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L188" + "lineNumber": 187, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L187" } }, { @@ -6906,8 +6906,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 199, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L199" + "lineNumber": 198, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L198" } } ], @@ -6915,8 +6915,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 199, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L199" + "lineNumber": 198, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L198" } }, { @@ -6941,8 +6941,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 206, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L206" + "lineNumber": 205, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L205" } }, { @@ -6967,8 +6967,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 213, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L213" + "lineNumber": 212, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L212" } }, { @@ -6999,8 +6999,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 227, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L227" + "lineNumber": 226, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L226" } } ], @@ -7008,8 +7008,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 227, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L227" + "lineNumber": 226, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L226" } }, { @@ -7059,8 +7059,8 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 239, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L239" + "lineNumber": 238, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L238" } }, { @@ -7081,8 +7081,8 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 239, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L239" + "lineNumber": 238, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L238" } } ], @@ -7094,8 +7094,8 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 239, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L239" + "lineNumber": 238, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L238" } }, { @@ -7123,8 +7123,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 249, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L249" + "lineNumber": 248, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L248" } }, { @@ -7166,8 +7166,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 257, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L257" + "lineNumber": 256, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L256" } } ], @@ -7175,8 +7175,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 257, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L257" + "lineNumber": 256, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L256" } }, { @@ -7216,8 +7216,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 284, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L284" + "lineNumber": 283, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L283" } } ], @@ -7227,8 +7227,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 284, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L284" + "lineNumber": 283, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L283" } }, { @@ -7284,8 +7284,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 294, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L294" + "lineNumber": 293, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L293" } } ], @@ -7295,8 +7295,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 293, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L293" + "lineNumber": 292, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L292" } }, { @@ -7314,8 +7314,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 302, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L302" + "lineNumber": 301, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L301" } }, { @@ -7335,8 +7335,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 311, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L311" + "lineNumber": 310, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L310" } }, { @@ -7367,8 +7367,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 689, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L689" + "lineNumber": 688, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L688" } } ], @@ -7376,8 +7376,8 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 689, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L689" + "lineNumber": 688, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L688" } }, { @@ -7405,15 +7405,15 @@ "returnComment": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 718, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L718" + "lineNumber": 717, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L717" } } ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 104, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L104" + "lineNumber": 103, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L103" }, "initialIsOpen": false }, @@ -16484,8 +16484,8 @@ "description": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 100, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L100" + "lineNumber": 99, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L99" }, "signature": [ { @@ -16500,8 +16500,8 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 99, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L99" + "lineNumber": 98, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/search/search_source/search_source.ts#L98" }, "initialIsOpen": false }, diff --git a/api_docs/fleet.json b/api_docs/fleet.json index 381818efb9f33..58143beeeaca4 100644 --- a/api_docs/fleet.json +++ b/api_docs/fleet.json @@ -191,8 +191,8 @@ ], "source": { "path": "x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts", - "lineNumber": 16, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts#L16" + "lineNumber": 17, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts#L17" }, "signature": [ "[appId: string, options?: ", @@ -232,8 +232,8 @@ ], "source": { "path": "x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts", - "lineNumber": 20, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts#L20" + "lineNumber": 21, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts#L21" }, "signature": [ "[appId: string, options?: ", @@ -257,8 +257,8 @@ ], "source": { "path": "x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts", - "lineNumber": 22, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts#L22" + "lineNumber": 23, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts#L23" }, "signature": [ "string | undefined" @@ -267,8 +267,8 @@ ], "source": { "path": "x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts", - "lineNumber": 14, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts#L14" + "lineNumber": 15, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts#L15" }, "initialIsOpen": false }, @@ -291,8 +291,8 @@ ], "source": { "path": "x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts", - "lineNumber": 30, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts#L30" + "lineNumber": 31, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts#L31" }, "signature": [ "[appId: string, options?: ", @@ -309,8 +309,8 @@ ], "source": { "path": "x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts", - "lineNumber": 28, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts#L28" + "lineNumber": 29, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts#L29" }, "initialIsOpen": false }, @@ -333,8 +333,8 @@ ], "source": { "path": "x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts", - "lineNumber": 38, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts#L38" + "lineNumber": 39, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts#L39" }, "signature": [ "[appId: string, options?: ", @@ -351,8 +351,8 @@ ], "source": { "path": "x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts", - "lineNumber": 36, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts#L36" + "lineNumber": 37, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts#L37" }, "initialIsOpen": false }, @@ -373,8 +373,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", - "lineNumber": 16, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts#L16" + "lineNumber": 17, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts#L17" }, "signature": [ "any" @@ -383,8 +383,8 @@ ], "source": { "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", - "lineNumber": 15, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts#L15" + "lineNumber": 16, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts#L16" }, "initialIsOpen": false }, @@ -405,8 +405,8 @@ ], "source": { "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", - "lineNumber": 27, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts#L27" + "lineNumber": 28, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts#L28" }, "signature": [ { @@ -428,8 +428,8 @@ ], "source": { "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", - "lineNumber": 29, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts#L29" + "lineNumber": 30, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts#L30" }, "signature": [ { @@ -451,8 +451,8 @@ ], "source": { "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", - "lineNumber": 38, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts#L38" + "lineNumber": 39, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts#L39" }, "signature": [ "(opts: { isValid: boolean; updatedPolicy: Partial<", @@ -469,8 +469,8 @@ ], "source": { "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", - "lineNumber": 25, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts#L25" + "lineNumber": 26, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts#L26" }, "initialIsOpen": false }, @@ -491,8 +491,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", - "lineNumber": 48, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts#L48" + "lineNumber": 49, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts#L49" } }, { @@ -503,8 +503,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", - "lineNumber": 49, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts#L49" + "lineNumber": 50, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts#L50" }, "signature": [ "\"package-policy-edit\"" @@ -518,8 +518,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", - "lineNumber": 50, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts#L50" + "lineNumber": 51, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts#L51" }, "signature": [ "React.LazyExoticComponent Promise" @@ -1756,8 +1756,8 @@ ], "source": { "path": "x-pack/plugins/fleet/public/plugin.ts", - "lineNumber": 52, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/plugin.ts#L52" + "lineNumber": 55, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/public/plugin.ts#L55" }, "lifecycle": "start", "initialIsOpen": true @@ -1805,8 +1805,8 @@ ], "source": { "path": "x-pack/plugins/fleet/server/services/index.ts", - "lineNumber": 47, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L47" + "lineNumber": 49, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L49" }, "signature": [ "typeof ", @@ -1880,8 +1880,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/services/index.ts", - "lineNumber": 52, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L52" + "lineNumber": 54, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L54" } }, { @@ -1900,8 +1900,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/services/index.ts", - "lineNumber": 53, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L53" + "lineNumber": 55, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L55" } }, { @@ -1921,8 +1921,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/services/index.ts", - "lineNumber": 54, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L54" + "lineNumber": 56, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L56" } } ], @@ -1930,8 +1930,8 @@ "returnComment": [], "source": { "path": "x-pack/plugins/fleet/server/services/index.ts", - "lineNumber": 51, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L51" + "lineNumber": 53, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L53" } }, { @@ -1987,8 +1987,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/services/index.ts", - "lineNumber": 60, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L60" + "lineNumber": 62, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L62" } }, { @@ -2007,8 +2007,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/services/index.ts", - "lineNumber": 61, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L61" + "lineNumber": 63, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L63" } }, { @@ -2021,8 +2021,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/services/index.ts", - "lineNumber": 62, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L62" + "lineNumber": 64, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L64" } } ], @@ -2030,8 +2030,8 @@ "returnComment": [], "source": { "path": "x-pack/plugins/fleet/server/services/index.ts", - "lineNumber": 59, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L59" + "lineNumber": 61, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L61" } }, { @@ -2044,8 +2044,8 @@ ], "source": { "path": "x-pack/plugins/fleet/server/services/index.ts", - "lineNumber": 67, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L67" + "lineNumber": 69, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L69" }, "signature": [ "typeof ", @@ -2061,8 +2061,8 @@ ], "source": { "path": "x-pack/plugins/fleet/server/services/index.ts", - "lineNumber": 43, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L43" + "lineNumber": 45, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L45" }, "initialIsOpen": false }, @@ -2110,8 +2110,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/services/index.ts", - "lineNumber": 23, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L23" + "lineNumber": 25, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L25" } }, { @@ -2124,8 +2124,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/services/index.ts", - "lineNumber": 24, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L24" + "lineNumber": 26, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L26" } }, { @@ -2138,8 +2138,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/services/index.ts", - "lineNumber": 25, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L25" + "lineNumber": 27, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L27" } } ], @@ -2147,15 +2147,15 @@ "returnComment": [], "source": { "path": "x-pack/plugins/fleet/server/services/index.ts", - "lineNumber": 22, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L22" + "lineNumber": 24, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L24" } } ], "source": { "path": "x-pack/plugins/fleet/server/services/index.ts", - "lineNumber": 21, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L21" + "lineNumber": 23, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L23" }, "initialIsOpen": false }, @@ -2211,8 +2211,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/services/index.ts", - "lineNumber": 35, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L35" + "lineNumber": 37, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L37" } }, { @@ -2225,8 +2225,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/services/index.ts", - "lineNumber": 36, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L36" + "lineNumber": 38, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L38" } } ], @@ -2234,15 +2234,15 @@ "returnComment": [], "source": { "path": "x-pack/plugins/fleet/server/services/index.ts", - "lineNumber": 34, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L34" + "lineNumber": 36, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L36" } } ], "source": { "path": "x-pack/plugins/fleet/server/services/index.ts", - "lineNumber": 33, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L33" + "lineNumber": 35, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L35" }, "initialIsOpen": false }, @@ -2261,8 +2261,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/services/index.ts", - "lineNumber": 71, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L71" + "lineNumber": 73, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L73" }, "signature": [ "(soClient: Pick<", @@ -2292,8 +2292,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/services/index.ts", - "lineNumber": 72, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L72" + "lineNumber": 74, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L74" }, "signature": [ "(soClient: Pick<", @@ -2323,8 +2323,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/services/index.ts", - "lineNumber": 73, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L73" + "lineNumber": 75, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L75" }, "signature": [ "(soClient: Pick<", @@ -2346,8 +2346,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/services/index.ts", - "lineNumber": 74, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L74" + "lineNumber": 76, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L76" }, "signature": [ "(soClient: Pick<", @@ -2372,8 +2372,8 @@ ], "source": { "path": "x-pack/plugins/fleet/server/services/index.ts", - "lineNumber": 70, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L70" + "lineNumber": 72, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/index.ts#L72" }, "initialIsOpen": false }, @@ -2392,8 +2392,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 89, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L89" + "lineNumber": 91, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L91" }, "signature": [ { @@ -2413,8 +2413,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 90, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L90" + "lineNumber": 92, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L92" }, "signature": [ { @@ -2435,8 +2435,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 91, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L91" + "lineNumber": 93, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L93" }, "signature": [ { @@ -2457,8 +2457,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 92, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L92" + "lineNumber": 94, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L94" }, "signature": [ { @@ -2478,8 +2478,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 93, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L93" + "lineNumber": 95, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L95" }, "signature": [ { @@ -2500,8 +2500,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 94, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L94" + "lineNumber": 96, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L96" }, "signature": [ "Pick<", @@ -2518,8 +2518,8 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 88, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L88" + "lineNumber": 90, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L90" }, "initialIsOpen": false } @@ -2536,8 +2536,8 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 132, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L132" + "lineNumber": 134, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L134" }, "signature": [ "[\"packagePolicyCreate\", (newPackagePolicy: ", @@ -2591,8 +2591,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/index.ts", - "lineNumber": 73, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/index.ts#L73" + "lineNumber": 75, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/index.ts#L75" }, "signature": [ "any" @@ -2607,8 +2607,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/services/package_policy.ts", - "lineNumber": 592, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/package_policy.ts#L592" + "lineNumber": 594, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/services/package_policy.ts#L594" }, "signature": [ "PackagePolicyService" @@ -2642,8 +2642,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 117, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L117" + "lineNumber": 119, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L119" }, "signature": [ "void" @@ -2668,8 +2668,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 156, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L156" + "lineNumber": 158, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L158" }, "signature": [ { @@ -2689,8 +2689,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 157, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L157" + "lineNumber": 159, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L159" }, "signature": [ { @@ -2710,8 +2710,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 158, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L158" + "lineNumber": 160, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L160" }, "signature": [ { @@ -2733,8 +2733,8 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 162, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L162" + "lineNumber": 164, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L164" }, "signature": [ { @@ -2754,8 +2754,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 163, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L163" + "lineNumber": 165, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L165" }, "signature": [ { @@ -2777,8 +2777,8 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 168, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L168" + "lineNumber": 170, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L170" }, "signature": [ "(...args: ", @@ -2795,8 +2795,8 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 155, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L155" + "lineNumber": 157, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/server/plugin.ts#L157" }, "lifecycle": "start", "initialIsOpen": true @@ -2849,8 +2849,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/services/license.ts", - "lineNumber": 22, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/services/license.ts#L22" + "lineNumber": 23, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/services/license.ts#L23" } } ], @@ -2858,8 +2858,8 @@ "returnComment": [], "source": { "path": "x-pack/plugins/fleet/common/services/license.ts", - "lineNumber": 22, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/services/license.ts#L22" + "lineNumber": 23, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/services/license.ts#L23" } }, { @@ -2875,8 +2875,8 @@ "returnComment": [], "source": { "path": "x-pack/plugins/fleet/common/services/license.ts", - "lineNumber": 27, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/services/license.ts#L27" + "lineNumber": 28, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/services/license.ts#L28" } }, { @@ -2900,8 +2900,8 @@ "returnComment": [], "source": { "path": "x-pack/plugins/fleet/common/services/license.ts", - "lineNumber": 33, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/services/license.ts#L33" + "lineNumber": 34, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/services/license.ts#L34" } }, { @@ -2927,8 +2927,8 @@ "returnComment": [], "source": { "path": "x-pack/plugins/fleet/common/services/license.ts", - "lineNumber": 37, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/services/license.ts#L37" + "lineNumber": 38, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/services/license.ts#L38" } }, { @@ -2944,8 +2944,8 @@ "returnComment": [], "source": { "path": "x-pack/plugins/fleet/common/services/license.ts", - "lineNumber": 41, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/services/license.ts#L41" + "lineNumber": 42, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/services/license.ts#L42" } }, { @@ -2961,15 +2961,15 @@ "returnComment": [], "source": { "path": "x-pack/plugins/fleet/common/services/license.ts", - "lineNumber": 48, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/services/license.ts#L48" + "lineNumber": 49, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/services/license.ts#L49" } } ], "source": { "path": "x-pack/plugins/fleet/common/services/license.ts", - "lineNumber": 13, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/services/license.ts#L13" + "lineNumber": 14, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/services/license.ts#L14" }, "initialIsOpen": false } @@ -3232,8 +3232,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/services/full_agent_policy_to_yaml.ts", - "lineNumber": 26, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/services/full_agent_policy_to_yaml.ts#L26" + "lineNumber": 27, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/services/full_agent_policy_to_yaml.ts#L27" } } ], @@ -3252,8 +3252,8 @@ "label": "fullAgentPolicyToYaml", "source": { "path": "x-pack/plugins/fleet/common/services/full_agent_policy_to_yaml.ts", - "lineNumber": 26, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/services/full_agent_policy_to_yaml.ts#L26" + "lineNumber": 27, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/services/full_agent_policy_to_yaml.ts#L27" }, "tags": [], "returnComment": [], @@ -3499,8 +3499,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/services/is_agent_upgradeable.ts", - "lineNumber": 12, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/services/is_agent_upgradeable.ts#L12" + "lineNumber": 13, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/services/is_agent_upgradeable.ts#L13" } }, { @@ -3513,8 +3513,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/services/is_agent_upgradeable.ts", - "lineNumber": 12, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/services/is_agent_upgradeable.ts#L12" + "lineNumber": 13, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/services/is_agent_upgradeable.ts#L13" } } ], @@ -3522,8 +3522,8 @@ "returnComment": [], "source": { "path": "x-pack/plugins/fleet/common/services/is_agent_upgradeable.ts", - "lineNumber": 12, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/services/is_agent_upgradeable.ts#L12" + "lineNumber": 13, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/services/is_agent_upgradeable.ts#L13" }, "initialIsOpen": false }, @@ -3632,8 +3632,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 38, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L38" + "lineNumber": 39, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L39" }, "signature": [ { @@ -3653,8 +3653,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 39, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L39" + "lineNumber": 40, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L40" }, "signature": [ "any" @@ -3668,8 +3668,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 40, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L40" + "lineNumber": 41, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L41" }, "signature": [ "string | undefined" @@ -3678,8 +3678,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 37, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L37" + "lineNumber": 38, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L38" }, "initialIsOpen": false }, @@ -3715,8 +3715,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 44, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L44" + "lineNumber": 45, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L45" }, "signature": [ { @@ -3736,8 +3736,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 45, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L45" + "lineNumber": 46, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L46" }, "signature": [ "any" @@ -3751,8 +3751,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 46, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L46" + "lineNumber": 47, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L47" }, "signature": [ "string | undefined" @@ -3766,8 +3766,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 47, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L47" + "lineNumber": 48, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L48" } }, { @@ -3778,8 +3778,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 48, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L48" + "lineNumber": 49, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L49" } }, { @@ -3790,8 +3790,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 49, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L49" + "lineNumber": 50, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L50" } }, { @@ -3802,8 +3802,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 50, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L50" + "lineNumber": 51, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L51" }, "signature": [ "any" @@ -3812,8 +3812,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 43, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L43" + "lineNumber": 44, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L44" }, "initialIsOpen": false }, @@ -3849,8 +3849,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 54, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L54" + "lineNumber": 55, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L55" } }, { @@ -3861,8 +3861,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 55, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L55" + "lineNumber": 56, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L56" }, "signature": [ { @@ -3882,8 +3882,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 56, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L56" + "lineNumber": 57, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L57" }, "signature": [ "{ policy: ", @@ -3905,8 +3905,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 59, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L59" + "lineNumber": 60, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L60" } }, { @@ -3917,8 +3917,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 60, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L60" + "lineNumber": 61, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L61" } }, { @@ -3929,8 +3929,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 61, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L61" + "lineNumber": 62, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L62" } }, { @@ -3941,8 +3941,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 62, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L62" + "lineNumber": 63, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L63" }, "signature": [ "any" @@ -3951,8 +3951,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 53, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L53" + "lineNumber": 54, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L54" }, "initialIsOpen": false }, @@ -3971,8 +3971,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 93, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L93" + "lineNumber": 94, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L94" }, "signature": [ "\"STATE\" | \"ERROR\" | \"ACTION_RESULT\" | \"ACTION\"" @@ -3986,8 +3986,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 94, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L94" + "lineNumber": 95, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L95" }, "signature": [ "\"RUNNING\" | \"STARTING\" | \"IN_PROGRESS\" | \"CONFIG\" | \"FAILED\" | \"STOPPING\" | \"STOPPED\" | \"DEGRADED\" | \"UPDATING\" | \"DATA_DUMP\" | \"ACKNOWLEDGED\" | \"UNKNOWN\"" @@ -4001,8 +4001,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 109, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L109" + "lineNumber": 110, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L110" } }, { @@ -4013,8 +4013,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 110, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L110" + "lineNumber": 111, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L111" } }, { @@ -4025,8 +4025,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 111, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L111" + "lineNumber": 112, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L112" }, "signature": [ "any" @@ -4040,8 +4040,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 112, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L112" + "lineNumber": 113, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L113" } }, { @@ -4052,8 +4052,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 113, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L113" + "lineNumber": 114, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L114" }, "signature": [ "string | undefined" @@ -4067,8 +4067,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 114, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L114" + "lineNumber": 115, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L115" }, "signature": [ "string | undefined" @@ -4082,8 +4082,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 115, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L115" + "lineNumber": 116, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L116" }, "signature": [ "string | undefined" @@ -4092,8 +4092,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 92, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L92" + "lineNumber": 93, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L93" }, "initialIsOpen": false }, @@ -4129,15 +4129,15 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 119, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L119" + "lineNumber": 120, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L120" } } ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 118, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L118" + "lineNumber": 119, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L119" }, "initialIsOpen": false }, @@ -4156,8 +4156,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 125, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L125" + "lineNumber": 126, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L126" }, "signature": [ "any" @@ -4166,8 +4166,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 124, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L124" + "lineNumber": 125, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L125" }, "initialIsOpen": false }, @@ -4196,8 +4196,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 147, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L147" + "lineNumber": 148, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L148" } }, { @@ -4208,8 +4208,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 148, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L148" + "lineNumber": 149, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L149" }, "signature": [ { @@ -4230,8 +4230,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 149, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L149" + "lineNumber": 150, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L150" }, "signature": [ "string | undefined" @@ -4245,8 +4245,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 150, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L150" + "lineNumber": 151, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L151" }, "signature": [ "string | undefined" @@ -4260,8 +4260,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 151, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L151" + "lineNumber": 152, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L152" }, "signature": [ "string[]" @@ -4270,8 +4270,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 146, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L146" + "lineNumber": 147, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L147" }, "initialIsOpen": false }, @@ -4300,8 +4300,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 155, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L155" + "lineNumber": 156, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L156" }, "signature": [ "string | undefined" @@ -4315,8 +4315,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 156, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L156" + "lineNumber": 157, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L157" }, "signature": [ "string[] | undefined" @@ -4325,8 +4325,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 154, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L154" + "lineNumber": 155, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L155" }, "initialIsOpen": false }, @@ -4349,8 +4349,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 168, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L168" + "lineNumber": 169, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L169" }, "signature": [ "number | undefined" @@ -4366,8 +4366,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 172, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L172" + "lineNumber": 173, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L173" }, "signature": [ "string | undefined" @@ -4383,8 +4383,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 176, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L176" + "lineNumber": 177, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L177" }, "signature": [ { @@ -4406,8 +4406,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 180, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L180" + "lineNumber": 181, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L181" } }, { @@ -4420,8 +4420,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 184, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L184" + "lineNumber": 185, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L185" } }, { @@ -4434,8 +4434,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 188, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L188" + "lineNumber": 189, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L189" }, "signature": [ "string | undefined" @@ -4451,8 +4451,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 192, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L192" + "lineNumber": 193, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L193" }, "signature": [ "string | undefined" @@ -4468,8 +4468,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 196, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L196" + "lineNumber": 197, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L197" }, "signature": [ "string | null | undefined" @@ -4485,8 +4485,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 200, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L200" + "lineNumber": 201, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L201" }, "signature": [ "string | null | undefined" @@ -4502,8 +4502,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 204, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L204" + "lineNumber": 205, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L205" }, "signature": [ "string | undefined" @@ -4517,8 +4517,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 205, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L205" + "lineNumber": 206, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L206" }, "signature": [ { @@ -4541,8 +4541,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 209, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L209" + "lineNumber": 210, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L210" }, "signature": [ { @@ -4564,8 +4564,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 213, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L213" + "lineNumber": 214, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L214" }, "signature": [ { @@ -4587,8 +4587,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 217, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L217" + "lineNumber": 218, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L218" }, "signature": [ "string | undefined" @@ -4604,8 +4604,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 221, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L221" + "lineNumber": 222, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L222" }, "signature": [ "number | null | undefined" @@ -4621,8 +4621,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 225, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L225" + "lineNumber": 226, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L226" }, "signature": [ "number | undefined" @@ -4638,8 +4638,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 229, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L229" + "lineNumber": 230, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L230" }, "signature": [ "string | undefined" @@ -4655,8 +4655,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 233, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L233" + "lineNumber": 234, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L234" }, "signature": [ "string | undefined" @@ -4672,8 +4672,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 237, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L237" + "lineNumber": 238, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L238" }, "signature": [ "\"online\" | \"error\" | \"updating\" | \"degraded\" | undefined" @@ -4689,8 +4689,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 241, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L241" + "lineNumber": 242, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L242" }, "signature": [ "string | undefined" @@ -4706,8 +4706,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 245, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L245" + "lineNumber": 246, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L246" }, "signature": [ "string | undefined" @@ -4723,8 +4723,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 249, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L249" + "lineNumber": 250, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L250" }, "signature": [ "string | undefined" @@ -4740,8 +4740,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 253, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L253" + "lineNumber": 254, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L254" }, "signature": [ "string[] | undefined" @@ -4757,8 +4757,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 257, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L257" + "lineNumber": 258, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L258" }, "signature": [ "number | undefined" @@ -4767,8 +4767,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 164, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L164" + "lineNumber": 165, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L165" }, "initialIsOpen": false }, @@ -4791,8 +4791,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 266, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L266" + "lineNumber": 267, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L267" } }, { @@ -4805,8 +4805,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 270, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L270" + "lineNumber": 271, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L271" } }, { @@ -4817,8 +4817,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 271, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L271" + "lineNumber": 272, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L272" }, "signature": [ "any" @@ -4827,8 +4827,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 262, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L262" + "lineNumber": 263, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L263" }, "initialIsOpen": false }, @@ -4851,8 +4851,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 281, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L281" + "lineNumber": 282, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L282" }, "signature": [ "string | undefined" @@ -4868,8 +4868,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 285, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L285" + "lineNumber": 286, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L286" }, "signature": [ "number | undefined" @@ -4885,8 +4885,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 289, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L289" + "lineNumber": 290, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L290" }, "signature": [ "string | undefined" @@ -4902,8 +4902,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 293, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L293" + "lineNumber": 294, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L294" }, "signature": [ "string | undefined" @@ -4919,8 +4919,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 297, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L297" + "lineNumber": 298, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L298" }, "signature": [ "string | undefined" @@ -4936,8 +4936,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 301, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L301" + "lineNumber": 302, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L302" }, "signature": [ "string | undefined" @@ -4953,8 +4953,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 305, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L305" + "lineNumber": 306, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L306" }, "signature": [ "string | undefined" @@ -4970,8 +4970,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 309, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L309" + "lineNumber": 310, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L310" }, "signature": [ "string[] | undefined" @@ -4987,8 +4987,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 313, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L313" + "lineNumber": 314, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L314" }, "signature": [ "{ [k: string]: unknown; } | undefined" @@ -5002,8 +5002,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 316, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L316" + "lineNumber": 317, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L317" }, "signature": [ "any" @@ -5012,8 +5012,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 277, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L277" + "lineNumber": 278, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L278" }, "initialIsOpen": false }, @@ -5032,8 +5032,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 16, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L16" + "lineNumber": 17, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L17" } }, { @@ -5044,8 +5044,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 17, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L17" + "lineNumber": 18, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L18" } }, { @@ -5056,8 +5056,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 18, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L18" + "lineNumber": 19, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L19" }, "signature": [ "string | undefined" @@ -5071,8 +5071,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 19, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L19" + "lineNumber": 20, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L20" }, "signature": [ "boolean | undefined" @@ -5086,8 +5086,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 20, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L20" + "lineNumber": 21, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L21" }, "signature": [ "boolean | undefined" @@ -5101,8 +5101,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 21, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L21" + "lineNumber": 22, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L22" }, "signature": [ "boolean | undefined" @@ -5116,8 +5116,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 22, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L22" + "lineNumber": 23, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L23" }, "signature": [ "(\"metrics\" | \"logs\")[] | undefined" @@ -5126,8 +5126,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 15, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L15" + "lineNumber": 16, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L16" }, "initialIsOpen": false }, @@ -5163,8 +5163,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 26, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L26" + "lineNumber": 27, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L27" } }, { @@ -5175,8 +5175,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 27, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L27" + "lineNumber": 28, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L28" }, "signature": [ { @@ -5197,8 +5197,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 28, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L28" + "lineNumber": 29, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L29" }, "signature": [ "string[] | ", @@ -5220,8 +5220,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 29, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L29" + "lineNumber": 30, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L30" } }, { @@ -5232,8 +5232,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 30, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L30" + "lineNumber": 31, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L31" } }, { @@ -5244,8 +5244,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 31, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L31" + "lineNumber": 32, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L32" } }, { @@ -5256,15 +5256,15 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 32, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L32" + "lineNumber": 33, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L33" } } ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 25, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L25" + "lineNumber": 26, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L26" }, "initialIsOpen": false }, @@ -5283,8 +5283,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 38, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L38" + "lineNumber": 39, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L39" } }, { @@ -5295,8 +5295,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 39, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L39" + "lineNumber": 40, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L40" }, "signature": [ "{ dataset: string; type: string; }" @@ -5310,8 +5310,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 43, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L43" + "lineNumber": 44, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L44" }, "signature": [ "any" @@ -5320,8 +5320,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 37, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L37" + "lineNumber": 38, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L38" }, "initialIsOpen": false }, @@ -5340,8 +5340,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 47, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L47" + "lineNumber": 48, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L48" } }, { @@ -5352,8 +5352,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 48, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L48" + "lineNumber": 49, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L49" } }, { @@ -5364,8 +5364,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 49, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L49" + "lineNumber": 50, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L50" } }, { @@ -5376,8 +5376,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 50, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L50" + "lineNumber": 51, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L51" } }, { @@ -5388,8 +5388,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 51, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L51" + "lineNumber": 52, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L52" }, "signature": [ "{ namespace: string; }" @@ -5403,8 +5403,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 52, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L52" + "lineNumber": 53, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L53" } }, { @@ -5415,8 +5415,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 53, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L53" + "lineNumber": 54, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L54" }, "signature": [ "{ [key: string]: unknown; package?: Pick<", @@ -5438,8 +5438,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 57, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L57" + "lineNumber": 58, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L58" }, "signature": [ { @@ -5460,8 +5460,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 58, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L58" + "lineNumber": 59, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L59" }, "signature": [ "any" @@ -5470,8 +5470,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 46, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L46" + "lineNumber": 47, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L47" }, "initialIsOpen": false }, @@ -5490,8 +5490,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 62, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L62" + "lineNumber": 63, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L63" } }, { @@ -5502,8 +5502,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 63, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L63" + "lineNumber": 64, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L64" }, "signature": [ "{ [key: string]: Pick<", @@ -5525,8 +5525,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 68, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L68" + "lineNumber": 69, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L69" }, "signature": [ "{ kibana: ", @@ -5548,8 +5548,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 71, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L71" + "lineNumber": 72, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L72" }, "signature": [ { @@ -5570,8 +5570,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 72, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L72" + "lineNumber": 73, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L73" }, "signature": [ "number | undefined" @@ -5585,8 +5585,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 73, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L73" + "lineNumber": 74, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L74" }, "signature": [ "{ monitoring: { use_output?: string | undefined; enabled: boolean; metrics: boolean; logs: boolean; }; } | undefined" @@ -5595,8 +5595,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 61, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L61" + "lineNumber": 62, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L62" }, "initialIsOpen": false }, @@ -5615,8 +5615,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 84, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L84" + "lineNumber": 85, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L85" }, "signature": [ "string[]" @@ -5630,8 +5630,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 85, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L85" + "lineNumber": 86, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L86" } }, { @@ -5642,8 +5642,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 86, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L86" + "lineNumber": 87, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L87" }, "signature": [ "string | undefined" @@ -5652,8 +5652,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 83, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L83" + "lineNumber": 84, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L84" }, "initialIsOpen": false }, @@ -5676,8 +5676,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 98, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L98" + "lineNumber": 99, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L99" }, "signature": [ "string | undefined" @@ -5693,8 +5693,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 102, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L102" + "lineNumber": 103, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L103" } }, { @@ -5707,8 +5707,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 106, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L106" + "lineNumber": 107, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L107" } }, { @@ -5721,8 +5721,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 110, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L110" + "lineNumber": 111, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L111" } }, { @@ -5735,8 +5735,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 114, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L114" + "lineNumber": 115, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L115" }, "signature": [ "{ [k: string]: unknown; }" @@ -5752,15 +5752,15 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 120, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L120" + "lineNumber": 121, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L121" } } ], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 94, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L94" + "lineNumber": 95, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L95" }, "initialIsOpen": false }, @@ -6807,8 +6807,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 111, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L111" + "lineNumber": 113, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L113" } }, { @@ -6819,8 +6819,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 112, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L112" + "lineNumber": 114, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L114" } }, { @@ -6831,8 +6831,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 113, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L113" + "lineNumber": 115, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L115" }, "signature": [ "string | undefined" @@ -6846,8 +6846,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 114, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L114" + "lineNumber": 116, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L116" }, "signature": [ "string | undefined" @@ -6861,8 +6861,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 115, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L115" + "lineNumber": 117, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L117" }, "signature": [ "string | undefined" @@ -6871,8 +6871,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 110, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L110" + "lineNumber": 112, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L112" }, "initialIsOpen": false }, @@ -6891,8 +6891,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 119, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L119" + "lineNumber": 121, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L121" } }, { @@ -6903,8 +6903,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 120, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L120" + "lineNumber": 122, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L122" } }, { @@ -6915,8 +6915,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 121, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L121" + "lineNumber": 123, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L123" } }, { @@ -6927,8 +6927,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 122, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L122" + "lineNumber": 124, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L124" }, "signature": [ { @@ -6949,8 +6949,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 123, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L123" + "lineNumber": 125, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L125" }, "signature": [ "boolean | undefined" @@ -6959,8 +6959,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 118, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L118" + "lineNumber": 120, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L120" }, "initialIsOpen": false }, @@ -6979,8 +6979,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 126, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L126" + "lineNumber": 128, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L128" } }, { @@ -6991,8 +6991,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 127, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L127" + "lineNumber": 129, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L129" } }, { @@ -7003,8 +7003,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 128, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L128" + "lineNumber": 130, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L130" } }, { @@ -7015,8 +7015,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 129, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L129" + "lineNumber": 131, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L131" }, "signature": [ "string | undefined" @@ -7030,8 +7030,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 130, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L130" + "lineNumber": 132, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L132" }, "signature": [ "string | undefined" @@ -7045,8 +7045,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 131, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L131" + "lineNumber": 133, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L133" }, "signature": [ { @@ -7062,8 +7062,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 125, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L125" + "lineNumber": 127, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L127" }, "initialIsOpen": false }, @@ -7082,8 +7082,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 134, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L134" + "lineNumber": 136, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L136" } }, { @@ -7094,8 +7094,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 135, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L135" + "lineNumber": 137, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L137" } }, { @@ -7106,8 +7106,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 136, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L136" + "lineNumber": 138, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L138" }, "signature": [ "string | undefined" @@ -7121,8 +7121,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 137, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L137" + "lineNumber": 139, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L139" }, "signature": [ "boolean | undefined" @@ -7136,8 +7136,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 138, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L138" + "lineNumber": 140, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L140" }, "signature": [ { @@ -7158,15 +7158,15 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 139, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L139" + "lineNumber": 141, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L141" } } ], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 133, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L133" + "lineNumber": 135, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L135" }, "initialIsOpen": false }, @@ -7185,15 +7185,15 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 145, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L145" + "lineNumber": 147, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L147" } } ], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 144, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L144" + "lineNumber": 146, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L146" }, "initialIsOpen": false }, @@ -7212,8 +7212,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 176, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L176" + "lineNumber": 178, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L178" } }, { @@ -7224,8 +7224,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 177, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L177" + "lineNumber": 179, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L179" } }, { @@ -7236,15 +7236,15 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 178, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L178" + "lineNumber": 180, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L180" } } ], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 175, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L175" + "lineNumber": 177, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L177" }, "initialIsOpen": false }, @@ -7263,8 +7263,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 183, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L183" + "lineNumber": 185, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L185" } }, { @@ -7275,8 +7275,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 184, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L184" + "lineNumber": 186, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L186" }, "signature": [ "string | undefined" @@ -7290,8 +7290,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 185, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L185" + "lineNumber": 187, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L187" }, "signature": [ { @@ -7311,8 +7311,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 186, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L186" + "lineNumber": 188, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L188" }, "signature": [ { @@ -7332,15 +7332,15 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 187, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L187" + "lineNumber": 189, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L189" } } ], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 182, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L182" + "lineNumber": 184, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L184" }, "initialIsOpen": false }, @@ -7359,8 +7359,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 213, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L213" + "lineNumber": 215, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L215" } }, { @@ -7371,8 +7371,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 214, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L214" + "lineNumber": 216, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L216" }, "signature": [ "string | undefined" @@ -7386,8 +7386,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 215, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L215" + "lineNumber": 217, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L217" }, "signature": [ "boolean | undefined" @@ -7401,8 +7401,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 216, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L216" + "lineNumber": 218, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L218" } }, { @@ -7413,8 +7413,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 217, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L217" + "lineNumber": 219, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L219" } }, { @@ -7425,8 +7425,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 218, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L218" + "lineNumber": 220, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L220" } }, { @@ -7437,8 +7437,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 219, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L219" + "lineNumber": 221, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L221" }, "signature": [ { @@ -7459,8 +7459,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 220, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L220" + "lineNumber": 222, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L222" } }, { @@ -7471,8 +7471,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 221, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L221" + "lineNumber": 223, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L223" } }, { @@ -7483,8 +7483,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 222, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L222" + "lineNumber": 224, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L224" } }, { @@ -7495,8 +7495,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 223, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L223" + "lineNumber": 225, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L225" }, "signature": [ { @@ -7517,8 +7517,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 224, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L224" + "lineNumber": 226, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L226" }, "signature": [ "boolean | undefined" @@ -7527,8 +7527,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 212, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L212" + "lineNumber": 214, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L214" }, "initialIsOpen": false }, @@ -7547,8 +7547,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 228, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L228" + "lineNumber": 230, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L230" }, "signature": [ "object | undefined" @@ -7562,8 +7562,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 229, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L229" + "lineNumber": 231, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L231" }, "signature": [ "object | undefined" @@ -7572,8 +7572,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 227, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L227" + "lineNumber": 229, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L229" }, "initialIsOpen": false }, @@ -7592,8 +7592,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 237, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L237" + "lineNumber": 239, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L239" } }, { @@ -7604,8 +7604,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 238, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L238" + "lineNumber": 240, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L240" }, "signature": [ "string | undefined" @@ -7619,8 +7619,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 239, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L239" + "lineNumber": 241, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L241" }, "signature": [ "string | undefined" @@ -7634,8 +7634,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 240, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L240" + "lineNumber": 242, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L242" }, "signature": [ { @@ -7655,8 +7655,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 241, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L241" + "lineNumber": 243, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L243" }, "signature": [ "boolean | undefined" @@ -7670,8 +7670,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 242, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L242" + "lineNumber": 244, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L244" }, "signature": [ "boolean | undefined" @@ -7685,8 +7685,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 243, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L243" + "lineNumber": 245, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L245" }, "signature": [ "boolean | undefined" @@ -7700,8 +7700,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 244, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L244" + "lineNumber": 246, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L246" }, "signature": [ "string | string[] | undefined" @@ -7715,8 +7715,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 245, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L245" + "lineNumber": 247, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L247" }, "signature": [ "{ [key: string]: { default: string | string[]; }; } | undefined" @@ -7725,8 +7725,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 236, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L236" + "lineNumber": 238, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L238" }, "initialIsOpen": false }, @@ -7745,8 +7745,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 255, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L255" + "lineNumber": 257, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L257" } }, { @@ -7757,8 +7757,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 256, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L256" + "lineNumber": 258, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L258" } }, { @@ -7769,8 +7769,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 257, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L257" + "lineNumber": 259, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L259" }, "signature": [ { @@ -7790,8 +7790,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 258, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L258" + "lineNumber": 260, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L260" }, "signature": [ "boolean | undefined" @@ -7800,8 +7800,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 254, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L254" + "lineNumber": 256, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L256" }, "initialIsOpen": false }, @@ -7831,8 +7831,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 274, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L274" + "lineNumber": 276, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L276" }, "signature": [ { @@ -7853,8 +7853,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 275, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L275" + "lineNumber": 277, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L277" }, "signature": [ { @@ -7875,8 +7875,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 276, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L276" + "lineNumber": 278, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L278" }, "signature": [ { @@ -7897,8 +7897,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 277, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L277" + "lineNumber": 279, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L279" }, "signature": [ "Record" @@ -7912,8 +7912,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 278, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L278" + "lineNumber": 280, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L280" } }, { @@ -7924,8 +7924,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 279, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L279" + "lineNumber": 281, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L281" } }, { @@ -7936,8 +7936,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 280, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L280" + "lineNumber": 282, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L282" }, "signature": [ { @@ -7957,8 +7957,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 281, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L281" + "lineNumber": 283, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L283" } }, { @@ -7969,8 +7969,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 282, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L282" + "lineNumber": 284, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L284" } }, { @@ -7981,8 +7981,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 283, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L283" + "lineNumber": 285, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L285" }, "signature": [ { @@ -7997,8 +7997,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 273, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L273" + "lineNumber": 275, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L275" }, "initialIsOpen": false }, @@ -8017,15 +8017,15 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 287, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L287" + "lineNumber": 289, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L289" } } ], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 286, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L286" + "lineNumber": 288, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L288" }, "initialIsOpen": false }, @@ -8044,8 +8044,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 319, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L319" + "lineNumber": 321, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L321" }, "signature": [ "any" @@ -8054,8 +8054,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 318, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L318" + "lineNumber": 320, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L320" }, "initialIsOpen": false }, @@ -8074,8 +8074,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 326, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L326" + "lineNumber": 328, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L328" } }, { @@ -8086,8 +8086,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 327, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L327" + "lineNumber": 329, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L329" }, "signature": [ "string[]" @@ -8101,8 +8101,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 328, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L328" + "lineNumber": 330, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L330" }, "signature": [ "{ settings: any; mappings: any; }" @@ -8116,8 +8116,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 332, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L332" + "lineNumber": 334, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L334" }, "signature": [ "{ hidden?: boolean | undefined; }" @@ -8131,8 +8131,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 333, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L333" + "lineNumber": 335, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L335" }, "signature": [ "string[]" @@ -8146,8 +8146,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 334, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L334" + "lineNumber": 336, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L336" }, "signature": [ "object" @@ -8156,8 +8156,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 325, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L325" + "lineNumber": 327, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L327" }, "initialIsOpen": false }, @@ -8176,8 +8176,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 338, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L338" + "lineNumber": 340, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L340" } }, { @@ -8188,8 +8188,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 339, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L339" + "lineNumber": 341, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L341" }, "signature": [ { @@ -8204,8 +8204,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 337, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L337" + "lineNumber": 339, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L339" }, "initialIsOpen": false }, @@ -10617,8 +10617,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 12, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L12" + "lineNumber": 13, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L13" }, "signature": [ { @@ -10634,8 +10634,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 11, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L11" + "lineNumber": 12, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L12" }, "initialIsOpen": false }, @@ -10654,8 +10654,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 20, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L20" + "lineNumber": 21, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L21" }, "signature": [ { @@ -10676,8 +10676,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 21, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L21" + "lineNumber": 22, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L22" } }, { @@ -10688,8 +10688,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 22, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L22" + "lineNumber": 23, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L23" } }, { @@ -10700,15 +10700,15 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 23, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L23" + "lineNumber": 24, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L24" } } ], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 19, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L19" + "lineNumber": 20, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L20" }, "initialIsOpen": false }, @@ -10727,8 +10727,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 27, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L27" + "lineNumber": 28, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L28" }, "signature": [ "{ agentPolicyId: string; }" @@ -10737,8 +10737,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 26, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L26" + "lineNumber": 27, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L27" }, "initialIsOpen": false }, @@ -10757,8 +10757,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 33, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L33" + "lineNumber": 34, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L34" }, "signature": [ { @@ -10773,8 +10773,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 32, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L32" + "lineNumber": 33, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L33" }, "initialIsOpen": false }, @@ -10793,8 +10793,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 37, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L37" + "lineNumber": 38, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L38" }, "signature": [ { @@ -10809,8 +10809,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 36, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L36" + "lineNumber": 37, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L37" }, "initialIsOpen": false }, @@ -10829,8 +10829,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 41, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L41" + "lineNumber": 42, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L42" }, "signature": [ { @@ -10845,8 +10845,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 40, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L40" + "lineNumber": 41, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L41" }, "initialIsOpen": false }, @@ -10865,8 +10865,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 49, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L49" + "lineNumber": 50, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L50" }, "signature": [ { @@ -10881,8 +10881,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 48, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L48" + "lineNumber": 49, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L49" }, "initialIsOpen": false }, @@ -10901,8 +10901,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 53, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L53" + "lineNumber": 54, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L54" }, "signature": [ "Pick<", @@ -10919,8 +10919,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 52, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L52" + "lineNumber": 53, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L53" }, "initialIsOpen": false }, @@ -10939,8 +10939,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 57, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L57" + "lineNumber": 58, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L58" }, "signature": [ { @@ -10955,8 +10955,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 56, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L56" + "lineNumber": 57, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L57" }, "initialIsOpen": false }, @@ -10975,8 +10975,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 61, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L61" + "lineNumber": 62, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L62" }, "signature": [ "{ agentPolicyId: string; }" @@ -10985,8 +10985,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 60, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L60" + "lineNumber": 61, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L61" }, "initialIsOpen": false }, @@ -11005,8 +11005,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 67, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L67" + "lineNumber": 68, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L68" } }, { @@ -11017,15 +11017,15 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 68, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L68" + "lineNumber": 69, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L69" } } ], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 66, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L66" + "lineNumber": 67, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L67" }, "initialIsOpen": false }, @@ -11044,8 +11044,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 72, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L72" + "lineNumber": 73, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L73" }, "signature": [ "{ agentPolicyId: string; }" @@ -11054,8 +11054,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 71, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L71" + "lineNumber": 72, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L72" }, "initialIsOpen": false }, @@ -11074,8 +11074,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 78, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L78" + "lineNumber": 79, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L79" }, "signature": [ { @@ -11090,8 +11090,8 @@ ], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 77, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L77" + "lineNumber": 78, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L78" }, "initialIsOpen": false }, @@ -12607,8 +12607,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 24, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L24" + "lineNumber": 26, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L26" }, "initialIsOpen": false }, @@ -12620,8 +12620,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 44, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L44" + "lineNumber": 46, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L46" }, "initialIsOpen": false }, @@ -12633,8 +12633,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 56, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L56" + "lineNumber": 58, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L58" }, "initialIsOpen": false }, @@ -12646,8 +12646,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 65, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L65" + "lineNumber": 67, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L67" }, "initialIsOpen": false } @@ -13107,8 +13107,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/constants/agent_policy.ts", - "lineNumber": 11, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L11" + "lineNumber": 12, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L12" }, "signature": [ "\"ingest-agent-policies\"" @@ -13123,8 +13123,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/constants/agent_policy.ts", - "lineNumber": 12, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L12" + "lineNumber": 13, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L13" }, "signature": [ "\".fleet-policies\"" @@ -13139,8 +13139,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/constants/agent_policy.ts", - "lineNumber": 47, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L47" + "lineNumber": 48, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L48" }, "signature": [ "\"system\"[]" @@ -13333,8 +13333,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 11, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L11" + "lineNumber": 12, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L12" }, "signature": [ "\"PERMANENT\" | \"EPHEMERAL\" | \"TEMPORARY\"" @@ -13349,8 +13349,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 16, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L16" + "lineNumber": 17, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L17" }, "signature": [ "\"warning\" | \"offline\" | \"online\" | \"error\" | \"inactive\" | \"enrolling\" | \"unenrolling\" | \"updating\" | \"degraded\"" @@ -13365,8 +13365,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 27, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L27" + "lineNumber": 28, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L28" }, "signature": [ "\"offline\" | \"inactive\" | \"updating\" | \"healthy\" | \"unhealthy\"" @@ -13381,8 +13381,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 29, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L29" + "lineNumber": 30, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L30" }, "signature": [ "\"POLICY_CHANGE\" | \"UNENROLL\" | \"UPGRADE\" | \"SETTINGS\" | \"INTERNAL_POLICY_REASSIGN\"" @@ -13397,8 +13397,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 67, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L67" + "lineNumber": 68, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L68" }, "signature": [ "Pick & { type: 'CONFIG_CHANGE'; data: { config: FullAgentPolicy;}; }" @@ -13413,8 +13413,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 83, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L83" + "lineNumber": 84, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L84" }, "signature": [ "CommonAgentActionSOAttributes & { agent_id: string; }" @@ -13429,8 +13429,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 86, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L86" + "lineNumber": 87, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L87" }, "signature": [ "CommonAgentActionSOAttributes & { policy_id: string; policy_revision: number; }" @@ -13445,8 +13445,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 90, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L90" + "lineNumber": 91, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L91" }, "signature": [ { @@ -13475,8 +13475,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent.ts", - "lineNumber": 122, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L122" + "lineNumber": 123, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent.ts#L123" }, "signature": [ "NewAgentEvent" @@ -13491,8 +13491,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 13, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L13" + "lineNumber": 14, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L14" }, "signature": [ "{ readonly Active: \"active\"; readonly Inactive: \"inactive\"; }" @@ -13507,8 +13507,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", - "lineNumber": 35, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L35" + "lineNumber": 36, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/agent_policy.ts#L36" }, "signature": [ "{ status: ValueOf<{ readonly Active: \"active\"; readonly Inactive: \"inactive\"; }>; description?: string | undefined; name: string; updated_at: string; namespace: string; is_default?: boolean | undefined; updated_by: string; revision: number; package_policies: string[] | PackagePolicy[]; is_managed: boolean; is_default_fleet_server?: boolean | undefined; monitoring_enabled?: (\"metrics\" | \"logs\")[] | undefined; }" @@ -13603,8 +13603,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 22, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L22" + "lineNumber": 24, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L24" }, "signature": [ "{ readonly Installed: \"installed\"; readonly NotInstalled: \"not_installed\"; }" @@ -13619,8 +13619,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 31, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L31" + "lineNumber": 33, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L33" }, "signature": [ "\"update\" | \"reinstall\" | \"reupdate\" | \"rollback\" | \"install\"" @@ -13635,8 +13635,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 32, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L32" + "lineNumber": 34, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L34" }, "signature": [ "\"registry\" | \"upload\"" @@ -13651,8 +13651,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 34, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L34" + "lineNumber": 36, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L36" }, "signature": [ "\"installed\" | \"installing\"" @@ -13667,8 +13667,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 36, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L36" + "lineNumber": 38, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L38" }, "signature": [ "\"custom\" | \"overview\" | \"policies\" | \"settings\"" @@ -13683,8 +13683,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 37, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L37" + "lineNumber": 39, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L39" }, "signature": [ "\"kibana\" | \"elasticsearch\"" @@ -13699,8 +13699,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 38, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L38" + "lineNumber": 40, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L40" }, "signature": [ "{ readonly Input: \"input\"; }" @@ -13715,8 +13715,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 39, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L39" + "lineNumber": 41, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L41" }, "signature": [ "\"input\" | ", @@ -13770,8 +13770,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 74, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L74" + "lineNumber": 76, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L76" }, "signature": [ "{ readonly Logs: \"logs\"; readonly Metrics: \"metrics\"; }" @@ -13786,8 +13786,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 76, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L76" + "lineNumber": 78, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L78" }, "signature": [ { @@ -13816,8 +13816,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 78, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L78" + "lineNumber": 80, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L80" }, "signature": [ "PackageSpecManifest & Pick" @@ -13832,8 +13832,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 82, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L82" + "lineNumber": 84, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L84" }, "signature": [ "PackageSpecManifest & Partial> & RegistryAdditionalProperties & RegistryOverridePropertyValue" @@ -13848,8 +13848,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 109, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L109" + "lineNumber": 111, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L111" }, "signature": [ "\"experimental\" | \"beta\" | \"ga\"" @@ -13864,8 +13864,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 142, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L142" + "lineNumber": 144, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L144" }, "signature": [ "string" @@ -13880,8 +13880,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 143, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L143" + "lineNumber": 145, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L145" }, "signature": [ "string" @@ -13896,8 +13896,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 151, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L151" + "lineNumber": 153, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L153" }, "signature": [ "Pick[]" @@ -13912,8 +13912,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 153, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L153" + "lineNumber": 155, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L155" }, "signature": [ "{ type?: \"integration\" | undefined; description: string; title: string; name: string; version: string; path: string; download: string; data_streams?: RegistryDataStream[] | undefined; release: \"experimental\" | \"beta\" | \"ga\"; icons?: (", @@ -13936,8 +13936,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 169, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L169" + "lineNumber": 171, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L171" }, "signature": [ { @@ -13966,8 +13966,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 173, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L173" + "lineNumber": 175, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L175" }, "signature": [ "CategorySummaryItem[]" @@ -13982,8 +13982,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 174, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L174" + "lineNumber": 176, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L176" }, "signature": [ "string" @@ -13998,8 +13998,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 181, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L181" + "lineNumber": 183, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L183" }, "signature": [ "undefined | Record<\"kibana\", { version: string; }>" @@ -14014,8 +14014,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 189, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L189" + "lineNumber": 191, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L191" }, "signature": [ "Record & Record" @@ -14030,8 +14030,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 190, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L190" + "lineNumber": 192, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L192" }, "signature": [ "Record<\"kibana\", Record> & Record<\"elasticsearch\", Record>" @@ -14046,8 +14046,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 196, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L196" + "lineNumber": 198, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L198" }, "signature": [ "AssetParts & { service: Extract; type: KibanaAssetType; }" @@ -14062,8 +14062,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 201, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L201" + "lineNumber": 203, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L203" }, "signature": [ "AssetParts & { service: Extract; type: ElasticsearchAssetType; }" @@ -14078,8 +14078,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 206, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L206" + "lineNumber": 208, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L208" }, "signature": [ "{ dashboard: KibanaAssetParts[]; visualization: KibanaAssetParts[]; search: KibanaAssetParts[]; index_pattern: KibanaAssetParts[]; map: KibanaAssetParts[]; lens: KibanaAssetParts[]; }" @@ -14094,8 +14094,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 207, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L207" + "lineNumber": 209, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L209" }, "signature": [ "{ component_template: ElasticsearchAssetParts[]; ingest_pipeline: ElasticsearchAssetParts[]; index_template: ElasticsearchAssetParts[]; ilm_policy: ElasticsearchAssetParts[]; transform: ElasticsearchAssetParts[]; data_stream_ilm_policy: ElasticsearchAssetParts[]; }" @@ -14110,11 +14110,11 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 232, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L232" + "lineNumber": 234, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L234" }, "signature": [ - "\"text\" | \"password\" | \"integer\" | \"bool\" | \"yaml\"" + "\"string\" | \"text\" | \"password\" | \"integer\" | \"bool\" | \"yaml\"" ], "initialIsOpen": false }, @@ -14126,8 +14126,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 265, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L265" + "lineNumber": 267, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L267" }, "signature": [ "Installable>[]" @@ -14142,8 +14142,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 267, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L267" + "lineNumber": 269, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L269" }, "signature": [ { @@ -14189,8 +14189,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 268, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L268" + "lineNumber": 270, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L270" }, "signature": [ "{ installed: PackageList; not_installed: PackageList; }" @@ -14205,8 +14205,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 269, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L269" + "lineNumber": 271, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L271" }, "signature": [ { @@ -14259,8 +14259,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 290, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L290" + "lineNumber": 292, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L292" }, "signature": [ { @@ -14290,8 +14290,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 292, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L292" + "lineNumber": 294, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L294" }, "signature": [ "T & { status: InstallationStatus['Installed']; savedObject: SavedObject; }" @@ -14306,8 +14306,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 297, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L297" + "lineNumber": 299, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L299" }, "signature": [ "T & { status: InstallationStatus['NotInstalled']; }" @@ -14322,8 +14322,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 301, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L301" + "lineNumber": 303, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L303" }, "signature": [ { @@ -14352,8 +14352,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 303, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L303" + "lineNumber": 305, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L305" }, "signature": [ "Pick & { type: KibanaSavedObjectType; }" @@ -14368,8 +14368,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 306, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L306" + "lineNumber": 308, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L308" }, "signature": [ "Pick & { type: ElasticsearchAssetType; }" @@ -14384,8 +14384,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 310, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L310" + "lineNumber": 312, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L312" }, "signature": [ "Pick & { type: typeof ASSETS_SAVED_OBJECT_TYPE; }" @@ -14400,8 +14400,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 314, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L314" + "lineNumber": 316, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L316" }, "signature": [ "{ readonly System: \"system\"; readonly Endpoint: \"endpoint\"; readonly ElasticAgent: \"elastic_agent\"; }" @@ -14416,8 +14416,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/models/epm.ts", - "lineNumber": 316, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L316" + "lineNumber": 318, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/models/epm.ts#L318" }, "signature": [ "{ readonly System: \"system\"; readonly Endpoint: \"endpoint\"; readonly ElasticAgent: \"elastic_agent\"; }" @@ -14528,8 +14528,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 17, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L17" + "lineNumber": 18, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L18" }, "signature": [ "AgentPolicy & { agents?: number | undefined; }" @@ -14544,8 +14544,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts", - "lineNumber": 44, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L44" + "lineNumber": 45, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts#L45" }, "signature": [ "GetOneAgentPolicyRequest & { body: NewAgentPolicy; }" @@ -15387,8 +15387,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/constants/agent_policy.ts", - "lineNumber": 13, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L13" + "lineNumber": 14, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L14" }, "signature": [ "{ readonly Active: \"active\"; readonly Inactive: \"inactive\"; }" @@ -15408,8 +15408,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/constants/agent_policy.ts", - "lineNumber": 22, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L22" + "lineNumber": 23, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L23" } }, { @@ -15420,8 +15420,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/constants/agent_policy.ts", - "lineNumber": 23, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L23" + "lineNumber": 24, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L24" } }, { @@ -15432,8 +15432,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/constants/agent_policy.ts", - "lineNumber": 24, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L24" + "lineNumber": 25, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L25" } }, { @@ -15444,8 +15444,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/constants/agent_policy.ts", - "lineNumber": 25, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L25" + "lineNumber": 26, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L26" }, "signature": [ "\"active\"" @@ -15459,8 +15459,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/constants/agent_policy.ts", - "lineNumber": 26, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L26" + "lineNumber": 27, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L27" }, "signature": [ "never[]" @@ -15474,8 +15474,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/constants/agent_policy.ts", - "lineNumber": 27, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L27" + "lineNumber": 28, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L28" }, "signature": [ "true" @@ -15489,8 +15489,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/constants/agent_policy.ts", - "lineNumber": 28, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L28" + "lineNumber": 29, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L29" }, "signature": [ "false" @@ -15504,8 +15504,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/constants/agent_policy.ts", - "lineNumber": 29, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L29" + "lineNumber": 30, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L30" }, "signature": [ "(\"metrics\" | \"logs\")[]" @@ -15516,8 +15516,8 @@ "label": "DEFAULT_AGENT_POLICY", "source": { "path": "x-pack/plugins/fleet/common/constants/agent_policy.ts", - "lineNumber": 18, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L18" + "lineNumber": 19, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L19" }, "initialIsOpen": false }, @@ -15534,8 +15534,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/constants/agent_policy.ts", - "lineNumber": 36, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L36" + "lineNumber": 37, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L37" } }, { @@ -15546,8 +15546,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/constants/agent_policy.ts", - "lineNumber": 37, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L37" + "lineNumber": 38, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L38" } }, { @@ -15558,8 +15558,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/constants/agent_policy.ts", - "lineNumber": 38, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L38" + "lineNumber": 39, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L39" } }, { @@ -15570,8 +15570,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/constants/agent_policy.ts", - "lineNumber": 39, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L39" + "lineNumber": 40, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L40" }, "signature": [ "\"active\"" @@ -15585,8 +15585,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/constants/agent_policy.ts", - "lineNumber": 40, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L40" + "lineNumber": 41, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L41" }, "signature": [ "never[]" @@ -15600,8 +15600,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/constants/agent_policy.ts", - "lineNumber": 41, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L41" + "lineNumber": 42, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L42" }, "signature": [ "false" @@ -15615,8 +15615,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/constants/agent_policy.ts", - "lineNumber": 42, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L42" + "lineNumber": 43, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L43" }, "signature": [ "true" @@ -15630,8 +15630,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/constants/agent_policy.ts", - "lineNumber": 43, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L43" + "lineNumber": 44, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L44" }, "signature": [ "false" @@ -15645,8 +15645,8 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/common/constants/agent_policy.ts", - "lineNumber": 44, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L44" + "lineNumber": 45, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L45" }, "signature": [ "(\"metrics\" | \"logs\")[]" @@ -15657,8 +15657,8 @@ "label": "DEFAULT_FLEET_SERVER_AGENT_POLICY", "source": { "path": "x-pack/plugins/fleet/common/constants/agent_policy.ts", - "lineNumber": 32, - "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L32" + "lineNumber": 33, + "link": "https://github.com/elastic/kibana/tree/masterx-pack/plugins/fleet/common/constants/agent_policy.ts#L33" }, "initialIsOpen": false }, diff --git a/api_docs/index_pattern_field_editor.json b/api_docs/index_pattern_field_editor.json index aafb91d89df27..6d6e55eaf6193 100644 --- a/api_docs/index_pattern_field_editor.json +++ b/api_docs/index_pattern_field_editor.json @@ -31,8 +31,8 @@ "description": [], "source": { "path": "src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx", - "lineNumber": 77, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx#L77" + "lineNumber": 75, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx#L75" } }, { @@ -43,8 +43,8 @@ "description": [], "source": { "path": "src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx", - "lineNumber": 78, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx#L78" + "lineNumber": 76, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx#L76" }, "signature": [ { @@ -91,8 +91,8 @@ "description": [], "source": { "path": "src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx", - "lineNumber": 80, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx#L80" + "lineNumber": 78, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx#L78" } }, { @@ -111,8 +111,8 @@ "description": [], "source": { "path": "src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx", - "lineNumber": 80, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx#L80" + "lineNumber": 78, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx#L78" } } ], @@ -120,8 +120,8 @@ "returnComment": [], "source": { "path": "src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx", - "lineNumber": 80, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx#L80" + "lineNumber": 78, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx#L78" } }, { @@ -138,8 +138,8 @@ "description": [], "source": { "path": "src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx", - "lineNumber": 92, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx#L92" + "lineNumber": 90, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx#L90" } } ], @@ -150,8 +150,8 @@ "label": "onChange", "source": { "path": "src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx", - "lineNumber": 92, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx#L92" + "lineNumber": 90, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx#L90" }, "tags": [], "returnComment": [] @@ -169,15 +169,15 @@ "returnComment": [], "source": { "path": "src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx", - "lineNumber": 101, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx#L101" + "lineNumber": 99, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx#L99" } } ], "source": { "path": "src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx", - "lineNumber": 73, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx#L73" + "lineNumber": 71, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx#L71" }, "initialIsOpen": false } diff --git a/api_docs/telemetry_collection_manager.json b/api_docs/telemetry_collection_manager.json index 0c2069228fe1f..e05635506568e 100644 --- a/api_docs/telemetry_collection_manager.json +++ b/api_docs/telemetry_collection_manager.json @@ -27,8 +27,8 @@ "description": [], "source": { "path": "src/plugins/telemetry_collection_manager/server/types.ts", - "lineNumber": 58, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L58" + "lineNumber": 57, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L57" }, "signature": [ "Pick<", @@ -50,8 +50,8 @@ "description": [], "source": { "path": "src/plugins/telemetry_collection_manager/server/types.ts", - "lineNumber": 59, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L59" + "lineNumber": 58, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L58" }, "signature": [ { @@ -66,13 +66,13 @@ { "tags": [], "id": "def-server.StatsCollectionConfig.soClient", - "type": "CompoundType", + "type": "Object", "label": "soClient", "description": [], "source": { "path": "src/plugins/telemetry_collection_manager/server/types.ts", - "lineNumber": 60, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L60" + "lineNumber": 59, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L59" }, "signature": [ "Pick<", @@ -83,15 +83,7 @@ "section": "def-server.SavedObjectsClient", "text": "SavedObjectsClient" }, - ", \"get\" | \"delete\" | \"create\" | \"find\" | \"update\" | \"bulkCreate\" | \"bulkGet\" | \"bulkUpdate\" | \"errors\" | \"checkConflicts\" | \"resolve\" | \"addToNamespaces\" | \"deleteFromNamespaces\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\"> | Pick<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsRepository", - "text": "SavedObjectsRepository" - }, - ", \"get\" | \"delete\" | \"create\" | \"find\" | \"update\" | \"bulkCreate\" | \"bulkGet\" | \"bulkUpdate\" | \"checkConflicts\" | \"resolve\" | \"addToNamespaces\" | \"deleteFromNamespaces\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\" | \"deleteByNamespace\" | \"incrementCounter\">" + ", \"get\" | \"delete\" | \"create\" | \"find\" | \"update\" | \"bulkCreate\" | \"bulkGet\" | \"bulkUpdate\" | \"errors\" | \"checkConflicts\" | \"resolve\" | \"addToNamespaces\" | \"deleteFromNamespaces\" | \"removeReferencesTo\" | \"openPointInTimeForType\" | \"closePointInTime\">" ] }, { @@ -102,8 +94,8 @@ "description": [], "source": { "path": "src/plugins/telemetry_collection_manager/server/types.ts", - "lineNumber": 61, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L61" + "lineNumber": 60, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L60" }, "signature": [ { @@ -119,8 +111,8 @@ ], "source": { "path": "src/plugins/telemetry_collection_manager/server/types.ts", - "lineNumber": 57, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L57" + "lineNumber": 56, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L56" }, "initialIsOpen": false }, @@ -139,8 +131,8 @@ "description": [], "source": { "path": "src/plugins/telemetry_collection_manager/server/types.ts", - "lineNumber": 79, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L79" + "lineNumber": 78, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L78" }, "signature": [ "Logger", @@ -155,15 +147,15 @@ "description": [], "source": { "path": "src/plugins/telemetry_collection_manager/server/types.ts", - "lineNumber": 80, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L80" + "lineNumber": 79, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L79" } } ], "source": { "path": "src/plugins/telemetry_collection_manager/server/types.ts", - "lineNumber": 78, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L78" + "lineNumber": 77, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L77" }, "initialIsOpen": false }, @@ -182,15 +174,15 @@ "description": [], "source": { "path": "src/plugins/telemetry_collection_manager/server/types.ts", - "lineNumber": 54, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L54" + "lineNumber": 53, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L53" } } ], "source": { "path": "src/plugins/telemetry_collection_manager/server/types.ts", - "lineNumber": 53, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L53" + "lineNumber": 52, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L52" }, "initialIsOpen": false }, @@ -214,15 +206,15 @@ "description": [], "source": { "path": "src/plugins/telemetry_collection_manager/server/types.ts", - "lineNumber": 75, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L75" + "lineNumber": 74, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L74" } } ], "source": { "path": "src/plugins/telemetry_collection_manager/server/types.ts", - "lineNumber": 74, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L74" + "lineNumber": 73, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L73" }, "initialIsOpen": false } @@ -237,8 +229,8 @@ "description": [], "source": { "path": "src/plugins/telemetry_collection_manager/server/types.ts", - "lineNumber": 88, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L88" + "lineNumber": 87, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L87" }, "signature": [ "(clustersDetails: ", @@ -259,8 +251,8 @@ "description": [], "source": { "path": "src/plugins/telemetry_collection_manager/server/types.ts", - "lineNumber": 83, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L83" + "lineNumber": 82, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L82" }, "signature": [ "UnencryptedStatsGetterConfig", @@ -277,8 +269,8 @@ "description": [], "source": { "path": "src/plugins/telemetry_collection_manager/server/types.ts", - "lineNumber": 84, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L84" + "lineNumber": 83, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L83" }, "signature": [ "(config: ", @@ -308,8 +300,8 @@ "description": [], "source": { "path": "src/plugins/telemetry_collection_manager/server/types.ts", - "lineNumber": 20, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L20" + "lineNumber": 19, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L19" }, "signature": [ " Promise" @@ -403,8 +395,8 @@ ], "source": { "path": "src/plugins/telemetry_collection_manager/server/types.ts", - "lineNumber": 19, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L19" + "lineNumber": 18, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L18" }, "lifecycle": "setup", "initialIsOpen": true @@ -424,8 +416,8 @@ "description": [], "source": { "path": "src/plugins/telemetry_collection_manager/server/types.ts", - "lineNumber": 29, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L29" + "lineNumber": 28, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L28" }, "signature": [ "(optInStatus: boolean, config: ", @@ -447,8 +439,8 @@ "description": [], "source": { "path": "src/plugins/telemetry_collection_manager/server/types.ts", - "lineNumber": 30, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L30" + "lineNumber": 29, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L29" }, "signature": [ "(config: ", @@ -478,8 +470,8 @@ "description": [], "source": { "path": "src/plugins/telemetry_collection_manager/server/types.ts", - "lineNumber": 31, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L31" + "lineNumber": 30, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L30" }, "signature": [ "() => Promise" @@ -488,8 +480,8 @@ ], "source": { "path": "src/plugins/telemetry_collection_manager/server/types.ts", - "lineNumber": 28, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L28" + "lineNumber": 27, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/telemetry_collection_manager/server/types.ts#L27" }, "lifecycle": "start", "initialIsOpen": true diff --git a/api_docs/usage_collection.json b/api_docs/usage_collection.json index 113c0776ab1ef..d2af1d5b5fb2c 100644 --- a/api_docs/usage_collection.json +++ b/api_docs/usage_collection.json @@ -182,8 +182,8 @@ "description": [], "source": { "path": "src/plugins/usage_collection/server/collector/collector.ts", - "lineNumber": 145, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/usage_collection/server/collector/collector.ts#L145" + "lineNumber": 144, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/usage_collection/server/collector/collector.ts#L144" }, "signature": [ { @@ -204,8 +204,8 @@ "description": [], "source": { "path": "src/plugins/usage_collection/server/collector/collector.ts", - "lineNumber": 146, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/usage_collection/server/collector/collector.ts#L146" + "lineNumber": 145, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/usage_collection/server/collector/collector.ts#L145" } }, { @@ -216,8 +216,8 @@ "description": [], "source": { "path": "src/plugins/usage_collection/server/collector/collector.ts", - "lineNumber": 147, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/usage_collection/server/collector/collector.ts#L147" + "lineNumber": 146, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/usage_collection/server/collector/collector.ts#L146" }, "signature": [ "Function | undefined" @@ -231,8 +231,8 @@ "description": [], "source": { "path": "src/plugins/usage_collection/server/collector/collector.ts", - "lineNumber": 148, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/usage_collection/server/collector/collector.ts#L148" + "lineNumber": 147, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/usage_collection/server/collector/collector.ts#L147" }, "signature": [ { @@ -253,8 +253,8 @@ "description": [], "source": { "path": "src/plugins/usage_collection/server/collector/collector.ts", - "lineNumber": 149, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/usage_collection/server/collector/collector.ts#L149" + "lineNumber": 148, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/usage_collection/server/collector/collector.ts#L148" }, "signature": [ "() => boolean | Promise" @@ -279,8 +279,8 @@ "description": [], "source": { "path": "src/plugins/usage_collection/server/collector/collector.ts", - "lineNumber": 156, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/usage_collection/server/collector/collector.ts#L156" + "lineNumber": 155, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/usage_collection/server/collector/collector.ts#L155" } }, { @@ -300,8 +300,8 @@ "description": [], "source": { "path": "src/plugins/usage_collection/server/collector/collector.ts", - "lineNumber": 157, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/usage_collection/server/collector/collector.ts#L157" + "lineNumber": 156, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/usage_collection/server/collector/collector.ts#L156" } } ], @@ -313,15 +313,15 @@ "returnComment": [], "source": { "path": "src/plugins/usage_collection/server/collector/collector.ts", - "lineNumber": 155, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/usage_collection/server/collector/collector.ts#L155" + "lineNumber": 154, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/usage_collection/server/collector/collector.ts#L154" } } ], "source": { "path": "src/plugins/usage_collection/server/collector/collector.ts", - "lineNumber": 144, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/usage_collection/server/collector/collector.ts#L144" + "lineNumber": 143, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/usage_collection/server/collector/collector.ts#L143" }, "initialIsOpen": false } @@ -343,15 +343,15 @@ "description": [], "source": { "path": "src/plugins/usage_collection/server/collector/collector.ts", - "lineNumber": 34, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/usage_collection/server/collector/collector.ts#L34" + "lineNumber": 33, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/usage_collection/server/collector/collector.ts#L33" } } ], "source": { "path": "src/plugins/usage_collection/server/collector/collector.ts", - "lineNumber": 33, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/usage_collection/server/collector/collector.ts#L33" + "lineNumber": 32, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/usage_collection/server/collector/collector.ts#L32" }, "initialIsOpen": false } @@ -366,8 +366,8 @@ "description": [], "source": { "path": "src/plugins/usage_collection/server/collector/collector.ts", - "lineNumber": 28, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/usage_collection/server/collector/collector.ts#L28" + "lineNumber": 27, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/usage_collection/server/collector/collector.ts#L27" }, "signature": [ "\"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"short\" | \"integer\" | \"byte\" | \"float\"" @@ -382,8 +382,8 @@ "description": [], "source": { "path": "src/plugins/usage_collection/server/collector/collector.ts", - "lineNumber": 51, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/usage_collection/server/collector/collector.ts#L51" + "lineNumber": 50, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/usage_collection/server/collector/collector.ts#L50" }, "signature": [ "{ [Key in keyof Required]: Required[Key] extends (infer U)[] ? { type: 'array'; items: RecursiveMakeSchemaFrom; } : RecursiveMakeSchemaFrom[Key]>; }" @@ -398,8 +398,8 @@ "description": [], "source": { "path": "src/plugins/usage_collection/server/collector/collector.ts", - "lineNumber": 112, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/usage_collection/server/collector/collector.ts#L112" + "lineNumber": 111, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/usage_collection/server/collector/collector.ts#L111" }, "signature": [ "{ type: string; init?: Function | undefined; isReady: () => Promise | boolean; schema?: MakeSchemaFrom | undefined; fetch: CollectorFetchMethod; } & ExtraOptions & (WithKibanaRequest extends true ? { extendFetchContext: CollectorOptionsFetchExtendedContext; } : { extendFetchContext?: CollectorOptionsFetchExtendedContext | undefined; })" @@ -448,11 +448,11 @@ ], "source": { "path": "src/plugins/usage_collection/server/collector/collector.ts", - "lineNumber": 65, - "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/usage_collection/server/collector/collector.ts#L65" + "lineNumber": 64, + "link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/usage_collection/server/collector/collector.ts#L64" }, "signature": [ - "{ esClient: ElasticsearchClient; soClient: SavedObjectsClientContract | ISavedObjectsRepository; } & (WithKibanaRequest extends true ? { kibanaRequest?: KibanaRequest | undefined; } : {})" + "{ esClient: ElasticsearchClient; soClient: SavedObjectsClientContract; } & (WithKibanaRequest extends true ? { kibanaRequest?: KibanaRequest | undefined; } : {})" ], "initialIsOpen": false }, diff --git a/dev_docs/kibana_platform_plugin_intro.mdx b/dev_docs/kibana_platform_plugin_intro.mdx index bf009a3c5251d..f70c42cb520cc 100644 --- a/dev_docs/kibana_platform_plugin_intro.mdx +++ b/dev_docs/kibana_platform_plugin_intro.mdx @@ -68,7 +68,7 @@ We will continue to focus on adding clarity around these types of services and w ### Core services -Sometimes referred to just as Core, Core services provide the most basic and fundamental tools neccessary for building a plugin, like creating saved objects, +Sometimes referred to just as provide the most basic and fundamental tools neccessary for building a plugin, like creating saved objects, routing, application registration, notifications and . The Core platform is not a plugin itself, although there are some plugins that provide platform functionality. We call these . @@ -141,4 +141,4 @@ plugins to customize the Kibana experience. Examples of extension points are: ## Follow up material -Learn how to build your own plugin by following +Learn how to build your own plugin by following . diff --git a/dev_docs/kibana_server_core_components.mdx b/dev_docs/kibana_server_core_components.mdx new file mode 100644 index 0000000000000..503d8401d4492 --- /dev/null +++ b/dev_docs/kibana_server_core_components.mdx @@ -0,0 +1,16 @@ +--- +id: kibServerAndCoreComponents +slug: /kibana-dev-docs/core-intro +title: Kibana Server and Core components +summary: An introduction to the Kibana server and core components. +date: 2021-02-26 +tags: ['kibana','onboarding', 'dev', 'architecture'] +--- + +Core is a set of systems (frontend, backend etc.) that Kibana and its plugins are built on top of. + +### Logging +`core` has its own and will output log records directly (e.g. to file or terminal) when configured. When no specific configuration is provided, logs are forwarded to the "legacy" Kibana so that they look the same as the rest of the +log records throughout Kibana. + +Other components diff --git a/docs/api/actions-and-connectors.asciidoc b/docs/api/actions-and-connectors.asciidoc index 17e7ea1b7672a..5480cdd57f691 100644 --- a/docs/api/actions-and-connectors.asciidoc +++ b/docs/api/actions-and-connectors.asciidoc @@ -3,21 +3,23 @@ Manage Actions and Connectors. -The following action APIs are available: +The following connector APIs are available: -* <> to retrieve a single action by ID +* <> to retrieve a single connector by ID -* <> to retrieve all actions +* <> to retrieve all connectors -* <> to retrieve a list of all action types +* <> to retrieve a list of all connector types -* <> to create actions +* <> to create connectors -* <> to update the attributes for an existing action +* <> to update the attributes for an existing connector -* <> to execute an action by ID +* <> to execute a connector by ID -* <> to delete an action by ID +* <> to delete a connector by ID + +For deprecated APIs, refer to <>. For information about the actions and connectors that {kib} supports, refer to <>. @@ -28,3 +30,11 @@ include::actions-and-connectors/create.asciidoc[] include::actions-and-connectors/update.asciidoc[] include::actions-and-connectors/execute.asciidoc[] include::actions-and-connectors/delete.asciidoc[] +include::actions-and-connectors/legacy/index.asciidoc[] +include::actions-and-connectors/legacy/get.asciidoc[] +include::actions-and-connectors/legacy/get_all.asciidoc[] +include::actions-and-connectors/legacy/list.asciidoc[] +include::actions-and-connectors/legacy/create.asciidoc[] +include::actions-and-connectors/legacy/update.asciidoc[] +include::actions-and-connectors/legacy/execute.asciidoc[] +include::actions-and-connectors/legacy/delete.asciidoc[] diff --git a/docs/api/actions-and-connectors/create.asciidoc b/docs/api/actions-and-connectors/create.asciidoc index 230dad22d3bed..c9a09e890ea6d 100644 --- a/docs/api/actions-and-connectors/create.asciidoc +++ b/docs/api/actions-and-connectors/create.asciidoc @@ -1,17 +1,17 @@ [[actions-and-connectors-api-create]] -=== Create action API +=== Create connector API ++++ -Create action API +Create connector API ++++ -Creates an action. +Creates a connector. [[actions-and-connectors-api-create-request]] ==== Request -`POST :/api/actions/action` +`POST :/api/actions/connector` -`POST :/s//api/actions/action` +`POST :/s//api/actions/connector` [[actions-and-connectors-api-create-path-params]] ==== Path parameters @@ -23,18 +23,18 @@ Creates an action. ==== Request body `name`:: - (Required, string) The display name for the action. + (Required, string) The display name for the connector. -`actionTypeId`:: - (Required, string) The action type ID for the action. +`connector_type_id`:: + (Required, string) The connector type ID for the connector. `config`:: - (Required, object) The configuration for the action. Configuration properties vary depending on - the action type. For information about the configuration properties, refer to <>. + (Required, object) The configuration for the connector. Configuration properties vary depending on + the connector type. For information about the configuration properties, refer to <>. `secrets`:: - (Required, object) The secrets configuration for the action. Secrets configuration properties vary - depending on the action type. For information about the secrets configuration properties, refer to <>. + (Required, object) The secrets configuration for the connector. Secrets configuration properties vary + depending on the connector type. For information about the secrets configuration properties, refer to <>. + WARNING: Remember these values. You must provide them each time you call the <> API. @@ -49,10 +49,10 @@ WARNING: Remember these values. You must provide them each time you call the <Delete action API +Delete connector API ++++ -Deletes an action by ID. +Deletes an connector by ID. -WARNING: When you delete an action, _it cannot be recovered_. +WARNING: When you delete a connector, _it cannot be recovered_. [[actions-and-connectors-api-delete-request]] ==== Request -`DELETE :/api/actions/action/` +`DELETE :/api/actions/connector/` -`DELETE :/s//api/actions/action/` +`DELETE :/s//api/actions/connector/` [[actions-and-connectors-api-delete-path-params]] ==== Path parameters `id`:: - (Required, string) The ID of the action. + (Required, string) The ID of the connector. `space_id`:: (Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used. @@ -34,6 +34,6 @@ WARNING: When you delete an action, _it cannot be recovered_. [source,sh] -------------------------------------------------- -$ curl -X DELETE api/actions/action/c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad +$ curl -X DELETE api/actions/connector/c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad -------------------------------------------------- // KIBANA diff --git a/docs/api/actions-and-connectors/execute.asciidoc b/docs/api/actions-and-connectors/execute.asciidoc index 05a27988578ff..b87380907f7bb 100644 --- a/docs/api/actions-and-connectors/execute.asciidoc +++ b/docs/api/actions-and-connectors/execute.asciidoc @@ -1,23 +1,23 @@ [[actions-and-connectors-api-execute]] -=== Execute action API +=== Execute connector API ++++ -Execute action API +Execute connector API ++++ -Executes an action by ID. +Executes a connector by ID. [[actions-and-connectors-api-execute-request]] ==== Request -`POST :/api/actions/action//_execute` +`POST :/api/actions/connector//_execute` -`POST :/s//api/actions/action//_execute` +`POST :/s//api/actions/connector//_execute` [[actions-and-connectors-api-execute-params]] ==== Path parameters `id`:: - (Required, string) The ID of the action. + (Required, string) The ID of the connector. `space_id`:: (Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used. @@ -26,8 +26,8 @@ Executes an action by ID. ==== Request body `params`:: - (Required, object) The parameters of the action. Parameter properties vary depending on - the action type. For information about the parameter properties, refer to <>. + (Required, object) The parameters of the connector. Parameter properties vary depending on + the connector type. For information about the parameter properties, refer to <>. [[actions-and-connectors-api-execute-codes]] ==== Response code @@ -40,7 +40,7 @@ Executes an action by ID. [source,sh] -------------------------------------------------- -$ curl -X POST api/actions/action/c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad/_execute -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d ' +$ curl -X POST api/actions/connector/c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad/_execute -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d ' { "params": { "documents": [ @@ -83,6 +83,6 @@ The API returns the following: } ] }, - "actionId": "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad" + "connector_id": "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad" } -------------------------------------------------- diff --git a/docs/api/actions-and-connectors/get.asciidoc b/docs/api/actions-and-connectors/get.asciidoc index 51af187257d42..33d37a4add4dd 100644 --- a/docs/api/actions-and-connectors/get.asciidoc +++ b/docs/api/actions-and-connectors/get.asciidoc @@ -1,23 +1,23 @@ [[actions-and-connectors-api-get]] -=== Get action API +=== Get connector API ++++ -Get action API +Get connector API ++++ -Retrieves an action by ID. +Retrieves a connector by ID. [[actions-and-connectors-api-get-request]] ==== Request -`GET :/api/actions/action/` +`GET :/api/actions/connector/` -`GET :/s//api/actions/action/` +`GET :/s//api/actions/connector/` [[actions-and-connectors-api-get-params]] ==== Path parameters `id`:: - (Required, string) The ID of the action. + (Required, string) The ID of the connector. `space_id`:: (Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used. @@ -33,7 +33,7 @@ Retrieves an action by ID. [source,sh] -------------------------------------------------- -$ curl -X GET api/actions/action/c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad +$ curl -X GET api/actions/connector/c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad -------------------------------------------------- // KIBANA @@ -43,13 +43,13 @@ The API returns the following: -------------------------------------------------- { "id": "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad", - "actionTypeId": ".index", - "name": "my-action", + "connector_type_id": ".index", + "name": "my-connector", "config": { "index": "test-index", "refresh": false, "executionTimeField": null }, - "isPreconfigured": false + "is_preconfigured": false } -------------------------------------------------- diff --git a/docs/api/actions-and-connectors/get_all.asciidoc b/docs/api/actions-and-connectors/get_all.asciidoc index 7a8025d0d215e..8b4977d61e741 100644 --- a/docs/api/actions-and-connectors/get_all.asciidoc +++ b/docs/api/actions-and-connectors/get_all.asciidoc @@ -4,14 +4,14 @@ Get all actions API ++++ -Retrieves all actions. +Retrieves all connectors. [[actions-and-connectors-api-get-all-request]] ==== Request -`GET :/api/actions` +`GET :/api/actions/connectors` -`GET :/s//api/actions` +`GET :/s//api/actions/connectors` [[actions-and-connectors-api-get-all-path-params]] ==== Path parameters @@ -30,7 +30,7 @@ Retrieves all actions. [source,sh] -------------------------------------------------- -$ curl -X GET api/actions +$ curl -X GET api/actions/connectors -------------------------------------------------- // KIBANA @@ -40,21 +40,23 @@ The API returns the following: -------------------------------------------------- [ { - "id": "preconfigured-mail-action", - "actionTypeId": ".email", - "name": "email: preconfigured-mail-action", - "isPreconfigured": true + "id": "preconfigured-mail-connector", + "connector_type_id": ".email", + "name": "email: preconfigured-mail-connector", + "is_preconfigured": true, + "referenced_by_count": 1 }, { "id": "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad", - "actionTypeId": ".index", - "name": "my-action", + "connector_type_id": ".index", + "name": "my-connector", "config": { "index": "test-index", "refresh": false, "executionTimeField": null }, - "isPreconfigured": false + "is_preconfigured": false, + "referenced_by_count": 3 } ] -------------------------------------------------- diff --git a/docs/api/actions-and-connectors/legacy/create.asciidoc b/docs/api/actions-and-connectors/legacy/create.asciidoc new file mode 100644 index 0000000000000..faf6227f01947 --- /dev/null +++ b/docs/api/actions-and-connectors/legacy/create.asciidoc @@ -0,0 +1,82 @@ +[[actions-and-connectors-legacy-api-create]] +==== Legacy Create connector API +++++ +Legacy Create connector API +++++ + +deprecated::[7.13.0] + +Please use the <> instead. + +Creates a connector. + +[[actions-and-connectors-legacy-api-create-request]] +===== Request + +`POST :/api/actions/action` + +`POST :/s//api/actions/action` + +[[actions-and-connectors-legacy-api-create-path-params]] +===== Path parameters + +`space_id`:: + (Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used. + +[[actions-and-connectors-legacy-api-create-request-body]] +===== Request body + +`name`:: + (Required, string) The display name for the connector. + +`actionTypeId`:: + (Required, string) The connector type ID for the connector. + +`config`:: + (Required, object) The configuration for the connector. Configuration properties vary depending on + the connector type. For information about the configuration properties, refer to <>. + +`secrets`:: + (Required, object) The secrets configuration for the connector. Secrets configuration properties vary + depending on the connector type. For information about the secrets configuration properties, refer to <>. ++ +WARNING: Remember these values. You must provide them each time you call the <> API. + +[[actions-and-connectors-legacy-api-create-request-codes]] +===== Response code + +`200`:: + Indicates a successful call. + +[[actions-and-connectors-legacy-api-create-example]] +===== Example + +[source,sh] +-------------------------------------------------- +$ curl -X POST api/actions/action -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d ' +{ + "name": "my-connector", + "actionTypeId": ".index", + "config": { + "index": "test-index" + } +}' +-------------------------------------------------- +// KIBANA + +The API returns the following: + +[source,sh] +-------------------------------------------------- +{ + "id": "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad", + "actionTypeId": ".index", + "name": "my-connector", + "config": { + "index": "test-index", + "refresh": false, + "executionTimeField": null + }, + "isPreconfigured": false +} +-------------------------------------------------- diff --git a/docs/api/actions-and-connectors/legacy/delete.asciidoc b/docs/api/actions-and-connectors/legacy/delete.asciidoc new file mode 100644 index 0000000000000..b02f1011fd9b4 --- /dev/null +++ b/docs/api/actions-and-connectors/legacy/delete.asciidoc @@ -0,0 +1,43 @@ +[[actions-and-connectors-legacy-api-delete]] +==== Legacy Delete connector API +++++ +Legacy Delete connector API +++++ + +deprecated::[7.13.0] + +Please use the <> instead. + +Deletes a connector by ID. + +WARNING: When you delete an connector, _it cannot be recovered_. + +[[actions-and-connectors-legacy-api-delete-request]] +===== Request + +`DELETE :/api/actions/action/` + +`DELETE :/s//api/actions/action/` + +[[actions-and-connectors-legacy-api-delete-path-params]] +===== Path parameters + +`id`:: + (Required, string) The ID of the connector. + +`space_id`:: + (Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used. + +[[actions-and-connectors-legacy-api-delete-response-codes]] +===== Response code + +`200`:: + Indicates a successful call. + +===== Example + +[source,sh] +-------------------------------------------------- +$ curl -X DELETE api/actions/action/c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad +-------------------------------------------------- +// KIBANA diff --git a/docs/api/actions-and-connectors/legacy/execute.asciidoc b/docs/api/actions-and-connectors/legacy/execute.asciidoc new file mode 100644 index 0000000000000..30cb18c54aa69 --- /dev/null +++ b/docs/api/actions-and-connectors/legacy/execute.asciidoc @@ -0,0 +1,92 @@ +[[actions-and-connectors-legacy-api-execute]] +==== Legacy Execute connector API +++++ +Legacy Execute connector API +++++ + +deprecated::[7.13.0] + +Please use the <> instead. + +Executes a connector by ID. + +[[actions-and-connectors-legacy-api-execute-request]] +===== Request + +`POST :/api/actions/action//_execute` + +`POST :/s//api/actions/action//_execute` + +[[actions-and-connectors-legacy-api-execute-params]] +===== Path parameters + +`id`:: + (Required, string) The ID of the connector. + +`space_id`:: + (Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used. + +[[actions-and-connectors-legacy-api-execute-request-body]] +===== Request body + +`params`:: + (Required, object) The parameters of the connector. Parameter properties vary depending on + the connector type. For information about the parameter properties, refer to <>. + +[[actions-and-connectors-legacy-api-execute-codes]] +===== Response code + +`200`:: + Indicates a successful call. + +[[actions-and-connectors-legacy-api-execute-example]] +===== Example + +[source,sh] +-------------------------------------------------- +$ curl -X POST api/actions/action/c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad/_execute -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d ' +{ + "params": { + "documents": [ + { + "id": "test_doc_id", + "name": "test_doc_name", + "message": "hello, world" + } + ] + } +}' +-------------------------------------------------- +// KIBANA + +The API returns the following: + +[source,sh] +-------------------------------------------------- +{ + "status": "ok", + "data": { + "took": 197, + "errors": false, + "items": [ + { + "index": { + "_index": "updated-index", + "_id": "iKyijHcBKCsmXNFrQe3T", + "_version": 1, + "result": "created", + "_shards": { + "total": 2, + "successful": 1, + "failed": 0 + }, + "_seq_no": 0, + "_primary_term": 1, + "status": 201 + } + } + ] + }, + "actionId": "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad" +} +-------------------------------------------------- diff --git a/docs/api/actions-and-connectors/legacy/get.asciidoc b/docs/api/actions-and-connectors/legacy/get.asciidoc new file mode 100644 index 0000000000000..cf8cc1b6b677e --- /dev/null +++ b/docs/api/actions-and-connectors/legacy/get.asciidoc @@ -0,0 +1,59 @@ +[[actions-and-connectors-legacy-api-get]] +==== Legacy Get connector API +++++ +Legacy Get connector API +++++ + +deprecated::[7.13.0] + +Please use the <> instead. + +Retrieves a connector by ID. + +[[actions-and-connectors-legacy-api-get-request]] +===== Request + +`GET :/api/actions/action/` + +`GET :/s//api/actions/action/` + +[[actions-and-connectors-legacy-api-get-params]] +===== Path parameters + +`id`:: + (Required, string) The ID of the action. + +`space_id`:: + (Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used. + +[[actions-and-connectors-legacy-api-get-codes]] +===== Response code + +`200`:: + Indicates a successful call. + +[[actions-and-connectors-legacy-api-get-example]] +===== Example + +[source,sh] +-------------------------------------------------- +$ curl -X GET api/actions/action/c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad +-------------------------------------------------- +// KIBANA + +The API returns the following: + +[source,sh] +-------------------------------------------------- +{ + "id": "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad", + "actionTypeId": ".index", + "name": "my-connector", + "config": { + "index": "test-index", + "refresh": false, + "executionTimeField": null + }, + "isPreconfigured": false +} +-------------------------------------------------- diff --git a/docs/api/actions-and-connectors/legacy/get_all.asciidoc b/docs/api/actions-and-connectors/legacy/get_all.asciidoc new file mode 100644 index 0000000000000..24ad446d95d95 --- /dev/null +++ b/docs/api/actions-and-connectors/legacy/get_all.asciidoc @@ -0,0 +1,64 @@ +[[actions-and-connectors-legacy-api-get-all]] +==== Legacy Get all connector API +++++ +Legacy Get all connector API +++++ + +deprecated::[7.13.0] + +Please use the <> instead. + +Retrieves all connectors. + +[[actions-and-connectors-legacy-api-get-all-request]] +===== Request + +`GET :/api/actions` + +`GET :/s//api/actions` + +[[actions-and-connectors-legacy-api-get-all-path-params]] +===== Path parameters + +`space_id`:: + (Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used. + +[[actions-and-connectors-legacy-api-get-all-codes]] +===== Response code + +`200`:: + Indicates a successful call. + +[[actions-and-connectors-legacy-api-get-all-example]] +===== Example + +[source,sh] +-------------------------------------------------- +$ curl -X GET api/actions +-------------------------------------------------- +// KIBANA + +The API returns the following: + +[source,sh] +-------------------------------------------------- +[ + { + "id": "preconfigured-mail-action", + "actionTypeId": ".email", + "name": "email: preconfigured-mail-action", + "isPreconfigured": true + }, + { + "id": "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad", + "actionTypeId": ".index", + "name": "my-action", + "config": { + "index": "test-index", + "refresh": false, + "executionTimeField": null + }, + "isPreconfigured": false + } +] +-------------------------------------------------- diff --git a/docs/api/actions-and-connectors/legacy/index.asciidoc b/docs/api/actions-and-connectors/legacy/index.asciidoc new file mode 100644 index 0000000000000..859dd652de984 --- /dev/null +++ b/docs/api/actions-and-connectors/legacy/index.asciidoc @@ -0,0 +1,4 @@ +[[actions-and-connectors-legacy-apis]] +=== Deprecated 7.x APIs + +These APIs are deprecated and will be removed as of 8.0. diff --git a/docs/api/actions-and-connectors/legacy/list.asciidoc b/docs/api/actions-and-connectors/legacy/list.asciidoc new file mode 100644 index 0000000000000..86026f332d917 --- /dev/null +++ b/docs/api/actions-and-connectors/legacy/list.asciidoc @@ -0,0 +1,71 @@ +[[actions-and-connectors-legacy-api-list]] +==== Legacy List connector types API +++++ +Legacy List all connector types API +++++ + +deprecated::[7.13.0] + +Please use the <> instead. + +Retrieves a list of all connector types. + +[[actions-and-connectors-legacy-api-list-request]] +===== Request + +`GET :/api/actions/list_action_types` + +`GET :/s//api/actions/list_action_types` + +[[actions-and-connectors-legacy-api-list-path-params]] +===== Path parameters + +`space_id`:: + (Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used. + +[[actions-and-connectors-legacy-api-list-codes]] +===== Response code + +`200`:: + Indicates a successful call. + +[[actions-and-connectors-legacy-api-list-example]] +===== Example + +[source,sh] +-------------------------------------------------- +$ curl -X GET api/actions/list_action_types +-------------------------------------------------- +// KIBANA + +The API returns the following: + +[source,sh] +-------------------------------------------------- +[ + { + "id": ".email", <1> + "name": "Email", <2> + "minimumLicenseRequired": "gold", <3> + "enabled": false, <4> + "enabledInConfig": true, <5> + "enabledInLicense": false <6> + }, + { + "id": ".index", + "name": "Index", + "minimumLicenseRequired": "basic", + "enabled": true, + "enabledInConfig": true, + "enabledInLicense": true + } +] +-------------------------------------------------- + + +<1> `id` - The unique ID of the connector type. +<2> `name` - The name of the connector type. +<3> `minimumLicenseRequired` - The license required to use the connector type. +<4> `enabled` - Specifies if the connector type is enabled or disabled in {kib}. +<5> `enabledInConfig` - Specifies if the connector type is enabled or enabled in the {kib} .yml file. +<6> `enabledInLicense` - Specifies if the connector type is enabled or disabled in the license. diff --git a/docs/api/actions-and-connectors/legacy/update.asciidoc b/docs/api/actions-and-connectors/legacy/update.asciidoc new file mode 100644 index 0000000000000..c2e841988717a --- /dev/null +++ b/docs/api/actions-and-connectors/legacy/update.asciidoc @@ -0,0 +1,77 @@ +[[actions-and-connectors-legacy-api-update]] +==== Legacy Update connector API +++++ +Legacy Update connector API +++++ + +deprecated::[7.13.0] + +Please use the <> instead. + +Updates the attributes for an existing connector. + +[[actions-and-connectors-legacy-api-update-request]] +===== Request + +`PUT :/api/actions/action/` + +`PUT :/s//api/actions/action/` + +[[actions-and-connectors-legacy-api-update-params]] +===== Path parameters + +`id`:: + (Required, string) The ID of the connector. + +`space_id`:: + (Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used. + +[[actions-and-connectors-legacy-api-update-request-body]] +===== Request body + +`name`:: + (Required, string) The new name of the connector. + +`config`:: + (Required, object) The new connector configuration. Configuration properties vary depending on the connector type. For information about the configuration properties, refer to <>. + +`secrets`:: + (Required, object) The updated secrets configuration for the connector. Secrets properties vary depending on the connector type. For information about the secrets configuration properties, refer to <>. + +[[actions-and-connectors-legacy-api-update-codes]] +===== Response code + +`200`:: + Indicates a successful call. + +[[actions-and-connectors-legacy-api-update-example]] +===== Example + +[source,sh] +-------------------------------------------------- +$ curl -X PUT api/actions/action/c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d ' +{ + "name": "updated-connector", + "config": { + "index": "updated-index" + } +}' +-------------------------------------------------- +// KIBANA + +The API returns the following: + +[source,sh] +-------------------------------------------------- +{ + "id": "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad", + "actionTypeId": ".index", + "name": "updated-connector", + "config": { + "index": "updated-index", + "refresh": false, + "executionTimeField": null + }, + "isPreconfigured": false +} +-------------------------------------------------- diff --git a/docs/api/actions-and-connectors/list.asciidoc b/docs/api/actions-and-connectors/list.asciidoc index 3647bf06c98e0..941f7b4376e91 100644 --- a/docs/api/actions-and-connectors/list.asciidoc +++ b/docs/api/actions-and-connectors/list.asciidoc @@ -1,17 +1,17 @@ [[actions-and-connectors-api-list]] -=== List action types API +=== List connector types API ++++ -List all action types API +List all connector types API ++++ -Retrieves a list of all action types. +Retrieves a list of all connector types. [[actions-and-connectors-api-list-request]] ==== Request -`GET :/api/actions/list_action_types` +`GET :/api/actions/connector_types` -`GET :/s//api/actions/list_action_types` +`GET :/s//api/actions/connector_types` [[actions-and-connectors-api-list-path-params]] ==== Path parameters @@ -30,7 +30,7 @@ Retrieves a list of all action types. [source,sh] -------------------------------------------------- -$ curl -X GET api/actions/list_action_types +$ curl -X GET api/actions/connector_types -------------------------------------------------- // KIBANA @@ -42,26 +42,26 @@ The API returns the following: { "id": ".email", <1> "name": "Email", <2> - "minimumLicenseRequired": "gold", <3> + "minimum_license_required": "gold", <3> "enabled": false, <4> - "enabledInConfig": true, <5> - "enabledInLicense": false <6> + "enabled_in_config": true, <5> + "enabled_in_license": false <6> }, { "id": ".index", "name": "Index", - "minimumLicenseRequired": "basic", + "minimum_license_required": "basic", "enabled": true, - "enabledInConfig": true, - "enabledInLicense": true + "enabled_in_config": true, + "enabled_in_license": true } ] -------------------------------------------------- -<1> `id` - The unique ID of the action type. -<2> `name` - The name of the action type. -<3> `minimumLicenseRequired` - The license required to use the action type. -<4> `enabled` - Specifies if the action type is enabled or disabled in {kib}. -<5> `enabledInConfig` - Specifies if the action type is enabled or enabled in the {kib} .yml file. -<6> `enabledInLicense` - Specifies if the action type is enabled or disabled in the license. +<1> `id` - The unique ID of the connector type. +<2> `name` - The name of the connector type. +<3> `minimum_license_required` - The license required to use the connector type. +<4> `enabled` - Specifies if the connector type is enabled or disabled in {kib}. +<5> `enabled_in_config` - Specifies if the connector type is enabled or enabled in the {kib} .yml file. +<6> `enabled_in_license` - Specifies if the connector type is enabled or disabled in the license. diff --git a/docs/api/actions-and-connectors/update.asciidoc b/docs/api/actions-and-connectors/update.asciidoc index 46e6d91cf9e97..6c4e6040bdfb5 100644 --- a/docs/api/actions-and-connectors/update.asciidoc +++ b/docs/api/actions-and-connectors/update.asciidoc @@ -1,23 +1,23 @@ [[actions-and-connectors-api-update]] -=== Update action API +=== Update connector API ++++ -Update action API +Update connector API ++++ -Updates the attributes for an existing action. +Updates the attributes for an existing connector. [[actions-and-connectors-api-update-request]] ==== Request -`PUT :/api/actions/action/` +`PUT :/api/actions/connector/` -`PUT :/s//api/actions/action/` +`PUT :/s//api/actions/connector/` [[actions-and-connectors-api-update-params]] ==== Path parameters `id`:: - (Required, string) The ID of the action. + (Required, string) The ID of the connector. `space_id`:: (Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used. @@ -26,13 +26,13 @@ Updates the attributes for an existing action. ==== Request body `name`:: - (Required, string) The new name of the action. + (Required, string) The new name of the connector. `config`:: - (Required, object) The new action configuration. Configuration properties vary depending on the action type. For information about the configuration properties, refer to <>. + (Required, object) The new connector configuration. Configuration properties vary depending on the connector type. For information about the configuration properties, refer to <>. `secrets`:: - (Required, object) The updated secrets configuration for the action. Secrets properties vary depending on the action type. For information about the secrets configuration properties, refer to <>. + (Required, object) The updated secrets configuration for the connector. Secrets properties vary depending on the connector type. For information about the secrets configuration properties, refer to <>. [[actions-and-connectors-api-update-codes]] ==== Response code @@ -45,9 +45,9 @@ Updates the attributes for an existing action. [source,sh] -------------------------------------------------- -$ curl -X PUT api/actions/action/c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d ' +$ curl -X PUT api/actions/connector/c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d ' { - "name": "updated-action", + "name": "updated-connector", "config": { "index": "updated-index" } @@ -61,13 +61,13 @@ The API returns the following: -------------------------------------------------- { "id": "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad", - "actionTypeId": ".index", - "name": "updated-action", + "connector_type_id": ".index", + "name": "updated-connector", "config": { "index": "updated-index", "refresh": false, "executionTimeField": null }, - "isPreconfigured": false + "is_preconfigured": false } -------------------------------------------------- diff --git a/docs/api/task-manager/health.asciidoc b/docs/api/task-manager/health.asciidoc new file mode 100644 index 0000000000000..22006725da00c --- /dev/null +++ b/docs/api/task-manager/health.asciidoc @@ -0,0 +1,133 @@ +[[task-manager-api-health]] +=== Get Task Manager health API +++++ +Get Task Manager health +++++ + +Retrieve the health status of the {kib} Task Manager. + +[[task-manager-api-health-request]] +==== Request + +`GET :/api/task_manager/_health` + +[[task-manager-api-health-codes]] +==== Response code + +`200`:: + Indicates a successful call. + +[[task-manager-api-health-example]] +==== Example + +Retrieve the health status of the {kib} Task Manager: + +[source,sh] +-------------------------------------------------- +$ curl -X GET api/task_manager/_health +-------------------------------------------------- +// KIBANA + +The API returns the following: + +[source,sh] +-------------------------------------------------- +{ + "id": "15415ecf-cdb0-4fef-950a-f824bd277fe4", + "timestamp": "2021-02-16T11:38:10.077Z", + "status": "OK", + "last_update": "2021-02-16T11:38:09.934Z", + "stats": { + "configuration": { + "timestamp": "2021-02-16T11:29:05.055Z", + "value": { + "request_capacity": 1000, + "max_poll_inactivity_cycles": 10, + "monitored_aggregated_stats_refresh_rate": 60000, + "monitored_stats_running_average_window": 50, + "monitored_task_execution_thresholds": { + "default": { + "error_threshold": 90, + "warn_threshold": 80 + }, + "custom": {} + }, + "poll_interval": 3000, + "max_workers": 10 + }, + "status": "OK" + }, + "runtime": { + "timestamp": "2021-02-16T11:38:09.934Z", + "value": { + "polling": { + "last_successful_poll": "2021-02-16T11:38:09.934Z", + "last_polling_delay": "2021-02-16T11:29:05.053Z", + "duration": { + "p50": 0, + "p90": 0, + "p95": 0, + "p99": 0 + }, + "claim_conflicts": { + "p50": 0, + "p90": 0, + "p95": 0, + "p99": 0 + }, + "claim_mismatches": { + "p50": 0, + "p90": 0, + "p95": 0, + "p99": 0 + }, + "result_frequency_percent_as_number": { + "Failed": 0, + "NoAvailableWorkers": 0, + "NoTasksClaimed": 0, + "RanOutOfCapacity": 0, + "RunningAtCapacity": 0, + "PoolFilled": 0 + } + }, + "drift": { + "p50": 0, + "p90": 0, + "p95": 0, + "p99": 0 + }, + "load": { + "p50": 0, + "p90": 0, + "p95": 0, + "p99": 0 + }, + "execution": { + "duration": {}, + "result_frequency_percent_as_number": {} + } + }, + "status": "OK" + }, + "workload": { + "timestamp": "2021-02-16T11:38:05.826Z", + "value": { + "count": 26, + "task_types": {}, + "schedule": [], + "overdue": 0, + "estimated_schedule_density": [] + }, + "status": "OK" + } + } +} +-------------------------------------------------- + +The health API response is described in <>. + +The health monitoring API exposes three sections: + +* `configuration` is described in detail under <> +* `workload` is described in detail under <> +* `runtime` is described in detail under <> diff --git a/docs/developer/getting-started/index.asciidoc b/docs/developer/getting-started/index.asciidoc index c116dfa510bc9..5a16dac66c822 100644 --- a/docs/developer/getting-started/index.asciidoc +++ b/docs/developer/getting-started/index.asciidoc @@ -47,6 +47,23 @@ https://github.com/nodejs/node-gyp#installation[https://github.com/nodejs/node-g and follow the guide according your platform. ____ +In case you don't have an internet connection, the `yarn kbn bootstrap` command will +fail. As it is likely you have the required node_modules in the +offline mirror, you can try to run the step in offline mode by using: + +[source,bash] +---- +yarn kbn bootstrap --offline +---- + +In any other circumstance where you want to force the node_modules install step +you can use: + +[source,bash] +---- +yarn kbn bootstrap --force-install +---- + (You can also run `yarn kbn` to see the other available commands. For more info about this tool, see {kib-repo}tree/{branch}/packages/kbn-pm[{kib-repo}tree/{branch}/packages/kbn-pm].) diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index 7cedd56badb71..f175c50939771 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -367,9 +367,8 @@ security and spaces filtering as well as performing audit logging. |{kib-repo}blob/{branch}/x-pack/plugins/event_log/README.md[eventLog] -|The purpose of this plugin is to provide a way to persist a history of events -occuring in Kibana, initially just for the Make It Action project - alerts -and actions. +|The event log plugin provides a persistent history of alerting and action +actitivies. |{kib-repo}blob/{branch}/x-pack/plugins/features/README.md[features] @@ -527,6 +526,7 @@ routes, etc. |{kib-repo}blob/{branch}/x-pack/plugins/task_manager/README.md[taskManager] |The task manager is a generic system for running background tasks. +Documentation: https://www.elastic.co/guide/en/kibana/master/task-manager-production-considerations.html |{kib-repo}blob/{branch}/x-pack/plugins/telemetry_collection_xpack/README.md[telemetryCollectionXpack] diff --git a/docs/development/core/server/kibana-plugin-core-server.contextsetup.createcontextcontainer.md b/docs/development/core/server/kibana-plugin-core-server.contextsetup.createcontextcontainer.md index d19eec9ae5015..0d12fc16af423 100644 --- a/docs/development/core/server/kibana-plugin-core-server.contextsetup.createcontextcontainer.md +++ b/docs/development/core/server/kibana-plugin-core-server.contextsetup.createcontextcontainer.md @@ -9,9 +9,9 @@ Creates a new [IContextContainer](./kibana-plugin-core-server.icontextcontainer. Signature: ```typescript -createContextContainer>(): IContextContainer; +createContextContainer(): IContextContainer; ``` Returns: -`IContextContainer` +`IContextContainer` diff --git a/docs/development/core/server/kibana-plugin-core-server.explanation.description.md b/docs/development/core/server/kibana-plugin-core-server.explanation.description.md deleted file mode 100644 index 37fc90f5ac5d8..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.explanation.description.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [Explanation](./kibana-plugin-core-server.explanation.md) > [description](./kibana-plugin-core-server.explanation.description.md) - -## Explanation.description property - -Signature: - -```typescript -description: string; -``` diff --git a/docs/development/core/server/kibana-plugin-core-server.explanation.details.md b/docs/development/core/server/kibana-plugin-core-server.explanation.details.md deleted file mode 100644 index afba9175d86cf..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.explanation.details.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [Explanation](./kibana-plugin-core-server.explanation.md) > [details](./kibana-plugin-core-server.explanation.details.md) - -## Explanation.details property - -Signature: - -```typescript -details: Explanation[]; -``` diff --git a/docs/development/core/server/kibana-plugin-core-server.explanation.md b/docs/development/core/server/kibana-plugin-core-server.explanation.md deleted file mode 100644 index eb18910c4795b..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.explanation.md +++ /dev/null @@ -1,21 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [Explanation](./kibana-plugin-core-server.explanation.md) - -## Explanation interface - - -Signature: - -```typescript -export interface Explanation -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [description](./kibana-plugin-core-server.explanation.description.md) | string | | -| [details](./kibana-plugin-core-server.explanation.details.md) | Explanation[] | | -| [value](./kibana-plugin-core-server.explanation.value.md) | number | | - diff --git a/docs/development/core/server/kibana-plugin-core-server.explanation.value.md b/docs/development/core/server/kibana-plugin-core-server.explanation.value.md deleted file mode 100644 index b10f60176b0c8..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.explanation.value.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [Explanation](./kibana-plugin-core-server.explanation.md) > [value](./kibana-plugin-core-server.explanation.value.md) - -## Explanation.value property - -Signature: - -```typescript -value: number; -``` diff --git a/docs/development/core/server/kibana-plugin-core-server.icontextcontainer.createhandler.md b/docs/development/core/server/kibana-plugin-core-server.icontextcontainer.createhandler.md index 8fbc6b8b73697..7d7368426b1c2 100644 --- a/docs/development/core/server/kibana-plugin-core-server.icontextcontainer.createhandler.md +++ b/docs/development/core/server/kibana-plugin-core-server.icontextcontainer.createhandler.md @@ -9,7 +9,7 @@ Create a new handler function pre-wired to context for the plugin. Signature: ```typescript -createHandler(pluginOpaqueId: PluginOpaqueId, handler: THandler): (...rest: HandlerParameters) => ShallowPromise>; +createHandler(pluginOpaqueId: PluginOpaqueId, handler: RequestHandler): (...rest: HandlerParameters) => ShallowPromise>; ``` ## Parameters @@ -17,11 +17,11 @@ createHandler(pluginOpaqueId: PluginOpaqueId, handler: THandler): (...rest: Hand | Parameter | Type | Description | | --- | --- | --- | | pluginOpaqueId | PluginOpaqueId | The plugin opaque ID for the plugin that registers this handler. | -| handler | THandler | Handler function to pass context object to. | +| handler | RequestHandler | Handler function to pass context object to. | Returns: -`(...rest: HandlerParameters) => ShallowPromise>` +`(...rest: HandlerParameters) => ShallowPromise>` -A function that takes `THandlerParameters`, calls `handler` with a new context, and returns a Promise of the `handler` return value. +A function that takes `RequestHandler` parameters, calls `handler` with a new context, and returns a Promise of the `handler` return value. diff --git a/docs/development/core/server/kibana-plugin-core-server.icontextcontainer.md b/docs/development/core/server/kibana-plugin-core-server.icontextcontainer.md index 3b390e3aaa117..8b4d3f39e345e 100644 --- a/docs/development/core/server/kibana-plugin-core-server.icontextcontainer.md +++ b/docs/development/core/server/kibana-plugin-core-server.icontextcontainer.md @@ -9,7 +9,7 @@ An object that handles registration of context providers and configuring handler Signature: ```typescript -export interface IContextContainer +export interface IContextContainer ``` ## Remarks diff --git a/docs/development/core/server/kibana-plugin-core-server.md b/docs/development/core/server/kibana-plugin-core-server.md index d14e41cfb56ec..8dd4667002ead 100644 --- a/docs/development/core/server/kibana-plugin-core-server.md +++ b/docs/development/core/server/kibana-plugin-core-server.md @@ -75,7 +75,6 @@ The plugin integrates with the core system via lifecycle events: `setup` | [ElasticsearchServiceStart](./kibana-plugin-core-server.elasticsearchservicestart.md) | | | [ElasticsearchStatusMeta](./kibana-plugin-core-server.elasticsearchstatusmeta.md) | | | [ErrorHttpResponseOptions](./kibana-plugin-core-server.errorhttpresponseoptions.md) | HTTP response parameters | -| [Explanation](./kibana-plugin-core-server.explanation.md) | | | [FakeRequest](./kibana-plugin-core-server.fakerequest.md) | Fake request object created manually by Kibana plugins. | | [GetResponse](./kibana-plugin-core-server.getresponse.md) | | | [HttpAuth](./kibana-plugin-core-server.httpauth.md) | | diff --git a/docs/development/core/server/kibana-plugin-core-server.requesthandlercontextcontainer.md b/docs/development/core/server/kibana-plugin-core-server.requesthandlercontextcontainer.md index 6966deb9d7cc7..09e7ff261b795 100644 --- a/docs/development/core/server/kibana-plugin-core-server.requesthandlercontextcontainer.md +++ b/docs/development/core/server/kibana-plugin-core-server.requesthandlercontextcontainer.md @@ -9,5 +9,5 @@ An object that handles registration of http request context providers. Signature: ```typescript -export declare type RequestHandlerContextContainer = IContextContainer; +export declare type RequestHandlerContextContainer = IContextContainer; ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.incrementcounter.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.incrementcounter.md index 92f5f4e2aff24..eb18e064c84e2 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.incrementcounter.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.incrementcounter.md @@ -31,7 +31,7 @@ The saved object after the specified fields were incremented When supplying a field name like `stats.api.counter` the field name will be used as-is to create a document like: `{attributes: {'stats.api.counter': 1}}` It will not create a nested structure like: `{attributes: {stats: {api: {counter: 1}}}}` -When using incrementCounter for collecting usage data, you need to ensure that usage collection happens on a best-effort basis and doesn't negatively affect your plugin or users. See https://github.com/elastic/kibana/blob/master/src/plugins/usage\_collection/README.md\#tracking-interactions-with-incrementcounter) +When using incrementCounter for collecting usage data, you need to ensure that usage collection happens on a best-effort basis and doesn't negatively affect your plugin or users. See https://github.com/elastic/kibana/blob/master/src/plugins/usage\_collection/README.mdx\#tracking-interactions-with-incrementcounter) ## Example diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformats.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformats.md index b51421741933a..838ea2b5d9f3a 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformats.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformats.md @@ -34,5 +34,6 @@ fieldFormats: { UrlFormat: typeof UrlFormat; StringFormat: typeof StringFormat; TruncateFormat: typeof TruncateFormat; + HistogramFormat: typeof HistogramFormat; } ``` diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fieldformats.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fieldformats.md index 0dddc65f4db92..42563051bcdc4 100644 --- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fieldformats.md +++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fieldformats.md @@ -23,5 +23,6 @@ fieldFormats: { UrlFormat: typeof UrlFormat; StringFormat: typeof StringFormat; TruncateFormat: typeof TruncateFormat; + HistogramFormat: typeof HistogramFormat; } ``` diff --git a/docs/discover/context.asciidoc b/docs/discover/context.asciidoc new file mode 100644 index 0000000000000..9131c81781fc8 --- /dev/null +++ b/docs/discover/context.asciidoc @@ -0,0 +1,60 @@ +[[discover-document-context]] +== View surrounding documents + +Once you've narrowed your search to a specific event in *Discover*, +you can inspect the documents that occurred +immediately before and after the event. +To view the surrounding documents, your index pattern must contain time-based events. + +. In the document table, click the expand icon (>). +. Click *View surrounding documents.* ++ +In the context view, documents are sorted by the time field specified in the index pattern +and displayed using the same set of columns as the *Discover* view from which +the context was opened. The anchor document is highlighted in blue. ++ +[role="screenshot"] +image::images/discover-context.png[Image showing context view feature, with anchor documents highlighted in blue] ++ +The filters you applied in *Discover* are carried over to the context view. Pinned +filters remain active, while normal filters are copied in a disabled state. + ++ +[role="screenshot"] +image::images/discover-context-filters-inactive.png[Filter in context view] + +. To find the documents of interest, add filters. + +. To increase the number of documents that surround the anchor document, click *Load*. +By default, five documents are added with each click. ++ +[role="screenshot"] +image::images/discover-context-load-newer-documents.png[Load button and the number of documents to load] + + +[float] +[[configure-context-ContextView]] +=== Configure the context view + +Configure the appearance and behavior in *Advanced Settings*. + +. Open the main menu, then click *Stack Management > Advanced Settings*. +. Search for `context`, then edit the settings. ++ +[horizontal] +`context:defaultSize`:: The number of documents to display by default. +`context:step`:: The default number of documents to load with each button click. The default is 5. +`context:tieBreakerFields`:: The field to use for tiebreaking in case of equal time field values. +The default is the `_doc` field. ++ +You can enter a comma-separated list of field +names, which is checked in sequence for suitability when a context is +displayed. The first suitable field is used as the tiebreaking +field. A field is suitable if the field exists and is sortable in the index +pattern the context is based on. ++ +Although not required, it is recommended to only +use fields that have {ref}/doc-values.html[doc values] enabled to achieve +good performance and avoid unnecessary {ref}/modules-fielddata.html[field +data] usage. Common examples for suitable fields include log line numbers, +monotonically increasing counters and high-precision timestamps. \ No newline at end of file diff --git a/docs/discover/images/Discover-ContextView.png b/docs/discover/images/Discover-ContextView.png deleted file mode 100644 index b9682764f4575..0000000000000 Binary files a/docs/discover/images/Discover-ContextView.png and /dev/null differ diff --git a/docs/discover/images/discover-add-filter.png b/docs/discover/images/discover-add-filter.png new file mode 100644 index 0000000000000..e6f4685d31d60 Binary files /dev/null and b/docs/discover/images/discover-add-filter.png differ diff --git a/docs/discover/images/discover-context-filters-active.png b/docs/discover/images/discover-context-filters-active.png new file mode 100644 index 0000000000000..9aa70ab138b03 Binary files /dev/null and b/docs/discover/images/discover-context-filters-active.png differ diff --git a/docs/discover/images/discover-context-filters-inactive.png b/docs/discover/images/discover-context-filters-inactive.png new file mode 100644 index 0000000000000..c53a8cedff336 Binary files /dev/null and b/docs/discover/images/discover-context-filters-inactive.png differ diff --git a/docs/discover/images/discover-context-load-newer-documents.png b/docs/discover/images/discover-context-load-newer-documents.png new file mode 100644 index 0000000000000..9c4a74d39b3c9 Binary files /dev/null and b/docs/discover/images/discover-context-load-newer-documents.png differ diff --git a/docs/discover/images/discover-context.png b/docs/discover/images/discover-context.png new file mode 100644 index 0000000000000..8ce68047e0d76 Binary files /dev/null and b/docs/discover/images/discover-context.png differ diff --git a/docs/discover/images/discover-maps.png b/docs/discover/images/discover-maps.png new file mode 100644 index 0000000000000..42a17d6102b5c Binary files /dev/null and b/docs/discover/images/discover-maps.png differ diff --git a/docs/discover/images/discover-save-saved-search.png b/docs/discover/images/discover-save-saved-search.png new file mode 100644 index 0000000000000..bf22408729b08 Binary files /dev/null and b/docs/discover/images/discover-save-saved-search.png differ diff --git a/docs/discover/images/discover-search-field.png b/docs/discover/images/discover-search-field.png new file mode 100644 index 0000000000000..9acbf86067fb4 Binary files /dev/null and b/docs/discover/images/discover-search-field.png differ diff --git a/docs/discover/images/discover-sidebar-available-fields.png b/docs/discover/images/discover-sidebar-available-fields.png new file mode 100644 index 0000000000000..7f3514757eed5 Binary files /dev/null and b/docs/discover/images/discover-sidebar-available-fields.png differ diff --git a/docs/discover/images/discover-visualize.png b/docs/discover/images/discover-visualize.png new file mode 100644 index 0000000000000..f4bcaf8aca028 Binary files /dev/null and b/docs/discover/images/discover-visualize.png differ diff --git a/docs/discover/images/geoip-icon.png b/docs/discover/images/geoip-icon.png new file mode 100644 index 0000000000000..d3317451be3ea Binary files /dev/null and b/docs/discover/images/geoip-icon.png differ diff --git a/docs/management/managing-fields.asciidoc b/docs/management/managing-fields.asciidoc index 97cd184a4db88..5cd5c1ffd6248 100644 --- a/docs/management/managing-fields.asciidoc +++ b/docs/management/managing-fields.asciidoc @@ -57,11 +57,17 @@ include::field-formatters/string-formatter.asciidoc[] [[field-formatters-numeric]] === Numeric field formatters -Numeric fields support the `Url`, `Bytes`, `Duration`, `Number`, `Percentage`, `String`, and `Color` formatters. +Numeric fields support the `Url`, `Bytes`, `Duration`, `Number`, `Percentage`, `Histogram`, `String`, and `Color` formatters. The `Bytes`, `Number`, and `Percentage` formatters enable you to choose the display formats of numbers in this field using the <> syntax that {kib} maintains. +The `Histogram` formatter is only used for the {ref}/histogram.html[histogram field type]. When using the `Histogram` formatter, +you can apply the `Number`, `Bytes`, or `Percentage` format to the aggregated data. + +`Number`, and `Percentage` formatters enable you to choose the display formats of numbers in this field using +the <> syntax that {kib} maintains. + include::field-formatters/url-formatter.asciidoc[] include::field-formatters/string-formatter.asciidoc[] diff --git a/docs/settings/task-manager-settings.asciidoc b/docs/settings/task-manager-settings.asciidoc index 507e54349276b..12c958c9e8683 100644 --- a/docs/settings/task-manager-settings.asciidoc +++ b/docs/settings/task-manager-settings.asciidoc @@ -27,6 +27,19 @@ Task Manager runs background tasks by polling for work on an interval. You can | `xpack.task_manager.max_workers` | The maximum number of tasks that this Kibana instance will run simultaneously. Defaults to 10. - + Starting in 8.0, it will not be possible to set the value greater than 100. +|=== + +[float] +[[task-manager-health-settings]] +==== Task Manager Health settings + +Settings that configure the <> endpoint. + +[cols="2*<"] +|=== +| `xpack.task_manager.` +`monitored_task_execution_thresholds` + | Configures the threshold of failed task executions at which point the `warn` or `error` health status is set under each task type execution status (under `stats.runtime.value.excution.result_frequency_percent_as_number[${task type}].status`). This setting allows configuration of both the default level and a custom task type specific level. By default, this setting is configured to mark the health of every task type as `warning` when it exceeds 80% failed executions, and as `error` at 90%. Custom configurations allow you to reduce this threshold to catch failures sooner for task types that you might consider critical, such as alerting tasks. This value can be set to any number between 0 to 100, and a threshold is hit when the value *exceeds* this number. This means that you can avoid setting the status to `error` by setting the threshold at 100, or hit `error` the moment any task fails by setting the threshold to 0 (as it will exceed 0 once a single failure occurs). |=== diff --git a/docs/setup/settings.asciidoc b/docs/setup/settings.asciidoc index 52966bf5ac8c9..070bf03b39e4b 100644 --- a/docs/setup/settings.asciidoc +++ b/docs/setup/settings.asciidoc @@ -683,5 +683,5 @@ include::{kib-repo-dir}/settings/reporting-settings.asciidoc[] include::secure-settings.asciidoc[] include::{kib-repo-dir}/settings/security-settings.asciidoc[] include::{kib-repo-dir}/settings/spaces-settings.asciidoc[] -include::{kib-repo-dir}/settings/telemetry-settings.asciidoc[] include::{kib-repo-dir}/settings/task-manager-settings.asciidoc[] +include::{kib-repo-dir}/settings/telemetry-settings.asciidoc[] diff --git a/docs/user/alerting/alerting-getting-started.asciidoc b/docs/user/alerting/alerting-getting-started.asciidoc index 6c6e7e6305c81..7eae7d9a3b6e4 100644 --- a/docs/user/alerting/alerting-getting-started.asciidoc +++ b/docs/user/alerting/alerting-getting-started.asciidoc @@ -164,6 +164,14 @@ If you are using an *on-premises* Elastic Stack deployment with <>. {kib} alerting uses <> to secure background alert checks and actions, and API keys require {ref}/configuring-tls.html#tls-http[TLS on the HTTP interface]. A proxy will not suffice. +[float] +[[alerting-setup-production]] +== Production considerations and scaling guidance + +When relying on alerts and actions as mission critical services, make sure you follow the <>. + +See <> for more information on the scalability of {kib} alerting. + [float] [[alerting-security]] == Security diff --git a/docs/user/alerting/alerting-production-considerations.asciidoc b/docs/user/alerting/alerting-production-considerations.asciidoc deleted file mode 100644 index 58b4a263459b3..0000000000000 --- a/docs/user/alerting/alerting-production-considerations.asciidoc +++ /dev/null @@ -1,35 +0,0 @@ -[role="xpack"] -[[alerting-production-considerations]] -== Production considerations - -{kib} alerting runs both alert checks and actions as persistent background tasks managed by the Kibana Task Manager. This has two major benefits: - -* *Persistence*: all task state and scheduling is stored in {es}, so if you restart {kib}, alerts and actions will pick up where they left off. Task definitions for alerts and actions are stored in the index specified by <>. The default is `.kibana_task_manager`. You must have at least one replica of this index for production deployments. If you lose this index, all scheduled alerts and actions are lost. -* *Scaling*: multiple {kib} instances can read from and update the same task queue in {es}, allowing the alerting and action load to be distributed across instances. In cases where a {kib} instance no longer has capacity to run alert checks or actions, capacity can be increased by adding additional {kib} instances. - -[float] -=== Running background alert checks and actions - -{kib} background tasks are managed by: - -* Polling an {es} task index for overdue tasks at 3 second intervals. You can change this interval using the <> setting. -* Tasks are then claiming them by updating them in the {es} index, using optimistic concurrency control to prevent conflicts. Each {kib} instance can run a maximum of 10 concurrent tasks, so a maximum of 10 tasks are claimed each interval. -* Tasks are run on the {kib} server. -* In the case of alerts which are recurring background checks, upon completion the task is scheduled again according to the <>. - -[IMPORTANT] -============================================== -Because by default tasks are polled at 3 second intervals and only 10 tasks can run concurrently per {kib} instance, it is possible for alert and action tasks to be run late. This can happen if: - -* Alerts use a small *check interval*. The lowest interval possible is 3 seconds, though intervals of 30 seconds or higher are recommended. -* Many alerts or actions must be *run at once*. In this case pending tasks will queue in {es}, and be pulled 10 at a time from the queue at 3 second intervals. -* *Long running tasks* occupy slots for an extended time, leaving fewer slots for other tasks. - -For details on the settings that can influence the performance and throughput of Task Manager, see <>. - -============================================== - -[float] -=== Deployment considerations - -{es} and {kib} instances use the system clock to determine the current time. To ensure schedules are triggered when expected, you should synchronize the clocks of all nodes in the cluster using a time service such as http://www.ntp.org/[Network Time Protocol]. diff --git a/docs/user/alerting/alerting-troubleshooting.asciidoc b/docs/user/alerting/alerting-troubleshooting.asciidoc new file mode 100644 index 0000000000000..84bbeaf126a3b --- /dev/null +++ b/docs/user/alerting/alerting-troubleshooting.asciidoc @@ -0,0 +1,55 @@ +[role="xpack"] +[[alerting-troubleshooting]] +== Alerting Troubleshooting + +This page describes how to resolve common problems you might encounter with Alerting. +If your problem isn’t described here, please review open issues in the following GitHub repositories: + +* https://github.com/elastic/kibana/issues[kibana] (https://github.com/elastic/kibana/issues?q=is%3Aopen+is%3Aissue+label%3AFeature%3AAlerting[Alerting issues]) + +Have a question? Contact us in the https://discuss.elastic.co/[discuss forum]. + +[float] +[[alerts-small-check-interval-run-late]] +=== Alerts with small check intervals run late + +*Problem*: + +Alerts with a small check interval, such as every two seconds, run later than scheduled. + +*Resolution*: + +Alerts run as background tasks at a cadence defined by their *check interval*. +When an Alert *check interval* is smaller than the Task Manager <> the alert will run late. + +Either tweak the <> or increase the *check interval* of the alerts in question. + +For more details, see <>. + + +[float] +[[scheduled-alerts-run-late]] +=== Alerts run late + +*Problem*: + +Scheduled alerts run at an inconsistent cadence, often running late. + +Actions run long after the status of an alert changes, sending a notification of the change too late. + +*Solution*: + +Alerts and actions run as background tasks by each {kib} instance at a default rate of ten tasks every three seconds. + +If many alerts or actions are scheduled to run at the same time, pending tasks will queue in {es}. Each {kib} instance then polls for pending tasks at a rate of up to ten tasks at a time, at three second intervals. Because alerts and actions are backed by tasks, it is possible for pending tasks in the queue to exceed this capacity and run late. + +For details on diagnosing the underlying causes of such delays, see <>. + +Alerting and action tasks are identified by their type. + +* Alert tasks always begin with `alerting:`. For example, the `alerting:.index-threshold` tasks back the <>. +* Action tasks always begin with `actions:`. For example, the `actions:.index` tasks back the <>. + +When diagnosing issues related to Alerting, focus on the thats that begin with `alerting:` and `actions:`. + +For more details on monitoring and diagnosing task execution in Task Manager, see <>. diff --git a/docs/user/alerting/defining-alerts.asciidoc b/docs/user/alerting/defining-alerts.asciidoc index 27f3a6c7309cb..8f1a0f06f75ae 100644 --- a/docs/user/alerting/defining-alerts.asciidoc +++ b/docs/user/alerting/defining-alerts.asciidoc @@ -95,6 +95,10 @@ Some cases exist where the variable values will be "escaped", when used in a con Mustache also supports "triple braces" of the form `{{{variable name}}}`, which indicates no escaping should be done at all. Care should be used when using this form, as it could end up rendering the variable content in such a way as to make the resulting parameter invalid or formatted incorrectly. +Each alert type defines additional variables as properties of the variable `context`. For example, if an alert type defines a variable `value`, it can be used in an action parameter as `{{context.value}}`. + +For diagnostic or exploratory purposes, action variables whose values are objects, such as `context`, can be referenced directly as variables. The resulting value will be a JSON representation of the object. For example, if an action parameter includes `{{context}}`, it will expand to the JSON representation of all the variables and values provided by the alert type. + You can attach more than one action. Clicking the "Add action" button will prompt you to select another alert type and repeat the above steps again. [role="screenshot"] diff --git a/docs/user/alerting/images/alert-types-es-query-conditions.png b/docs/user/alerting/images/alert-types-es-query-conditions.png index 3cbba5eb4950e..bfb549f5df20e 100644 Binary files a/docs/user/alerting/images/alert-types-es-query-conditions.png and b/docs/user/alerting/images/alert-types-es-query-conditions.png differ diff --git a/docs/user/alerting/index.asciidoc b/docs/user/alerting/index.asciidoc index caef0c6e7332d..be95fe0ef0f86 100644 --- a/docs/user/alerting/index.asciidoc +++ b/docs/user/alerting/index.asciidoc @@ -2,4 +2,4 @@ include::alerting-getting-started.asciidoc[] include::defining-alerts.asciidoc[] include::action-types.asciidoc[] include::alert-types.asciidoc[] -include::alerting-production-considerations.asciidoc[] +include::alerting-troubleshooting.asciidoc[] diff --git a/docs/user/alerting/stack-alerts/es-query.asciidoc b/docs/user/alerting/stack-alerts/es-query.asciidoc index d25b7267ed18f..cac53f6600163 100644 --- a/docs/user/alerting/stack-alerts/es-query.asciidoc +++ b/docs/user/alerting/stack-alerts/es-query.asciidoc @@ -1,13 +1,13 @@ [role="xpack"] [[alert-type-es-query]] -=== ES query +=== {es} query -The ES query alert type runs a user-configured {es} query, compares the number of matches to a configured threshold, and schedules actions to run when the threshold condition is met. +The {es} query alert type runs a user-configured {es} query, compares the number of matches to a configured threshold, and schedules actions to run when the threshold condition is met. [float] ==== Create the alert -Fill in the <>, then select *ES query*. +Fill in the <>, then select *{es} query*. [float] ==== Define the conditions @@ -19,7 +19,7 @@ image::user/alerting/images/alert-types-es-query-conditions.png[Five clauses def Index:: This clause requires an *index or index pattern* and a *time field* that will be used for the *time window*. Size:: This clause specifies the number of documents to pass to the configured actions when the the threshold condition is met. -ES query:: This clause specifies the ES DSL query to execute. The number of documents that match this query will be evaulated against the threshold +{es} query:: This clause specifies the ES DSL query to execute. The number of documents that match this query will be evaulated against the threshold condition. Aggregations are not supported at this time. Threshold:: This clause defines a threshold value and a comparison operator (`is above`, `is above or equals`, `is below`, `is below or equals`, or `is between`). The number of documents that match the specified query is compared to this threshold. Time window:: This clause determines how far back to search for documents, using the *time field* set in the *index* clause. Generally this value should be set to a value higher than the *check every* value in the <>, to avoid gaps in detection. @@ -27,7 +27,7 @@ Time window:: This clause determines how far back to search for documents, using [float] ==== Add action variables -<> to run when the alert condition is met. The following variables are specific to the ES query alert. You can also specify <>. +<> to run when the alert condition is met. The following variables are specific to the {es} query alert. You can also specify <>. `context.title`:: A preconstructed title for the alert. Example: `alert term match alert query matched`. `context.message`:: A preconstructed message for the alert. Example: + @@ -55,9 +55,9 @@ Use the *Test query* feature to verify that your query DSL is valid. match the query will be displayed. + [role="screenshot"] -image::user/alerting/images/alert-types-es-query-valid.png[Test ES query returns number of matches when valid] +image::user/alerting/images/alert-types-es-query-valid.png[Test {es} query returns number of matches when valid] * An error message is shown if the query is invalid. + [role="screenshot"] -image::user/alerting/images/alert-types-es-query-invalid.png[Test ES query shows error when invalid] \ No newline at end of file +image::user/alerting/images/alert-types-es-query-invalid.png[Test {es} query shows error when invalid] \ No newline at end of file diff --git a/docs/user/discover.asciidoc b/docs/user/discover.asciidoc index 42ac1e22ce167..39e3a8e41ea6a 100644 --- a/docs/user/discover.asciidoc +++ b/docs/user/discover.asciidoc @@ -3,9 +3,29 @@ [partintro] -- -**_Tell {kib} where to find your data, then search and filter it for hidden insights and relationships._** +**_Gain insight to your data._** + +*Discover* enables you to quickly search and filter your data, get information +about structure of the fields, and visualize your data with *Lens* and *Maps*. +You can customize and save your searches and place them on a dashboard. + +++++ + + +++++ -You’ve added your data, and now you’re ready to dig in. You have questions about your data. +[float] +=== Explore and query your data + +You have questions about your data. What pages on your website contain a specific word or phrase? What events were logged most recently? What processes take longer than 500 milliseconds to respond? @@ -23,9 +43,6 @@ that summarize the contents of the data. At the end of this tutorial, you’ll be ready to start exploring with your own data in *Discover*. -[role="screenshot"] -image::images/Discover-Start.png[Discover] - [float] === Prerequisites @@ -36,24 +53,6 @@ image::images/Discover-Start.png[Discover] - You should have an understanding of {ref}/documents-indices.html[{es} documents and indices]. -[float] -[[whats-you-goal-in-discover]] -=== Define your goal - -When you explore your data in **Discover**, it's common to start with one or two goals: - -- **Get an overview of what is happening.** -For example, you might look for -information on the overall health and performance of your ecommerce business, -and then share your findings in a report. - -- **Find an answer to a specific question.** You want -to determine your customers' shopping preferences, -and then visualize your findings on a dashboard. - -For this tutorial, your goal is to better manage your product inventory. You want to -know the top-selling products and on what day of the week these products sell the most. - [float] [[find-the-data-you-want-to-use]] === Find your data @@ -90,6 +89,9 @@ which can be overwhelming. You’ll modify this table to display only your field . Scan through the list of **Available fields** to see what’s in your data. You can also search for a field by name. ++ +[role="screenshot"] +image:images/discover-sidebar-available-fields.png[Fields list that displays the top five search results, width=50%] . Find the `manufacturer` field, and then click it to view the five most popular values for that field. + @@ -114,7 +116,13 @@ column header, and then use the move and sort controls. One of the unique capabilities of **Discover** is the ability to combine free text search with filtering based on structured data. -To search all fields, enter a simple string in the **Search** field. To search particular fields and +To search all fields, enter a simple string in the **Search** field. + +[role="screenshot"] +image:images/discover-search-field.png[Search field in Discover] + + +To search particular fields and build more complex queries, use the <>. As you type, KQL prompts you with the fields you can search and the operators you can use to build a structured query. @@ -137,6 +145,9 @@ You can filter results to include or exclude specific fields, filter for a value and more. The **Add filter** popup prompts you with the fields you can filter and the operators you can use. +[role="screenshot"] +image:images/discover-add-filter.png[Add filter dialog in Discover] + Exclude documents where day of week is not Wednesday: . Click **Add filter**. @@ -161,7 +172,8 @@ image:images/document-table-expanded.png[Table view with document expanded] . Scan through the fields and their values. If you find a field of interest, hover of its name for filters and other controls. -. To view documents that occurred before or after the event you are looking at, click **View surrounding documents**. +. To view documents that occurred before or after the event you are looking at, click +<>. . For direct access to a particular document, click **View single document**. + @@ -177,6 +189,9 @@ Saving a search saves the query and the filters. . In the toolbar, click **Save**. . Give your search a title, and then click **Save**. ++ +[role="screenshot"] +image:images/discover-save-saved-search.png[Save saved search in Discover, width=50%] [float] === Visualize your findings @@ -185,6 +200,9 @@ visualize it from **Discover**. . From the **Selected fields** list, click `day_of_week`, and then click **Visualize**. + +[role="screenshot"] +image:images/discover-visualize.png[Discover sidebar field popover with visualize button, width=75%] ++ {kib} creates a visualization best suited for this field. . Drag `manufacturer.keyword` from the field list and drop it on @@ -195,11 +213,26 @@ image:images/visualize-from-discover.png[Visualization that opens from Discover . Save your visualization for use on a dashboard. +If your documents contain geo point fields (image:images/geoip-icon.png[Geo point field icon, width=20px]), you can visualize them in **Maps**. + +. Make sure the index pattern is set to **kibana_sample_data_ecommerce** and the configured time range +contains data. + +. From the **Available fields** list, click `geoip.location`, and then click **Visualize**. ++ +[role="screenshot"] +image:images/discover-maps.png[Map containing documents] + +. Save your map for use on a dashboard. + + [float] === What’s next? * <>. +* <>. + * <> to better meet your needs. In **Advanced Settings**, you can configure the number of documents to show, the table columns that display by default, and more. @@ -208,8 +241,6 @@ the table columns that display by default, and more. * <>. -* <>. - -- include::{kib-repo-dir}/management/index-patterns.asciidoc[] @@ -218,4 +249,6 @@ include::{kib-repo-dir}/discover/set-time-filter.asciidoc[] include::{kib-repo-dir}/discover/search.asciidoc[] +include::{kib-repo-dir}/discover/context.asciidoc[] + include::{kib-repo-dir}/discover/search-for-relevance.asciidoc[] diff --git a/docs/user/index.asciidoc b/docs/user/index.asciidoc index d375b6f425e54..d7e15258bf29b 100644 --- a/docs/user/index.asciidoc +++ b/docs/user/index.asciidoc @@ -13,6 +13,8 @@ include::monitoring/monitoring-kibana.asciidoc[leveloffset=+2] include::security/securing-kibana.asciidoc[] +include::production-considerations/index.asciidoc[] + include::discover.asciidoc[] include::dashboard/dashboard.asciidoc[] diff --git a/docs/user/production-considerations/alerting-production-considerations.asciidoc b/docs/user/production-considerations/alerting-production-considerations.asciidoc new file mode 100644 index 0000000000000..77c24becef8ef --- /dev/null +++ b/docs/user/production-considerations/alerting-production-considerations.asciidoc @@ -0,0 +1,51 @@ +[role="xpack"] +[[alerting-production-considerations]] +== Alerting production considerations + +++++ +Alerting +++++ + +Alerting runs both alert checks and actions as persistent background tasks managed by the Task Manager. + +When relying on alerts and actions as mission critical services, make sure you follow the <> for Task Manager. + +[float] +[[alerting-background-tasks]] +=== Running background alert checks and actions + +{kib} uses background tasks to run alerts and actions, distributed across all {kib} instances in the cluster. + +By default, each {kib} instance polls for work at three second intervals, and can run a maximum of ten concurrent tasks. +These tasks are then run on the {kib} server. + +Alerts are recurring background tasks which are rescheduled according to the <> on completion. +Actions are non-recurring background tasks which are deleted on completion. + +For more details on Task Manager, see <>. + +[IMPORTANT] +============================================== +Alert and action tasks can run late or at an inconsistent schedule. +This is typically a symptom of the specific usage of the cluster in question. + +You can address such issues by tweaking the <> or scaling the deployment to better suit your use case. + +For detailed guidance, see <>. +============================================== + +[float] +[[alerting-scaling-guidance]] +=== Scaling Guidance + +As alerts and actions leverage background tasks to perform the majority of work, scaling Alerting is possible by following the <>. + +When estimating the required task throughput, keep the following in mind: + +* Each alert uses a single recurring task that is scheduled to run at the cadence defined by its <>. +* Each action uses a single task. However, because <>, alerts can generate a large number of non-recurring tasks. + +It is difficult to predict how much throughput is needed to ensure all alerts and actions are executed at consistent schedules. +By counting alerts as recurring tasks and actions as non-recurring tasks, a rough throughput <> as a _tasks per minute_ measurement. + +Predicting the buffer required to account for actions depends heavily on the alert types you use, the amount of alert Instances they might detect, and the number of actions you might choose to assign to action groups. With that in mind, regularly <> of your Task Manager instances. diff --git a/docs/user/production-considerations/index.asciidoc b/docs/user/production-considerations/index.asciidoc new file mode 100644 index 0000000000000..c52aade575968 --- /dev/null +++ b/docs/user/production-considerations/index.asciidoc @@ -0,0 +1,5 @@ +include::production.asciidoc[] +include::alerting-production-considerations.asciidoc[] +include::task-manager-production-considerations.asciidoc[] +include::task-manager-health-monitoring.asciidoc[] +include::task-manager-troubleshooting.asciidoc[] diff --git a/docs/setup/production.asciidoc b/docs/user/production-considerations/production.asciidoc similarity index 98% rename from docs/setup/production.asciidoc rename to docs/user/production-considerations/production.asciidoc index e097704e05d40..8802719f95a95 100644 --- a/docs/setup/production.asciidoc +++ b/docs/user/production-considerations/production.asciidoc @@ -1,5 +1,9 @@ [[production]] -== Use {kib} in a production environment += Use {kib} in a production environment + +++++ +Production considerations +++++ * <> * <> diff --git a/docs/user/production-considerations/task-manager-health-monitoring.asciidoc b/docs/user/production-considerations/task-manager-health-monitoring.asciidoc new file mode 100644 index 0000000000000..f64c120f61298 --- /dev/null +++ b/docs/user/production-considerations/task-manager-health-monitoring.asciidoc @@ -0,0 +1,99 @@ +[role="xpack"] +[[task-manager-health-monitoring]] +=== Task Manager health monitoring + +++++ +Health monitoring +++++ + +The Task Manager has an internal monitoring mechanism to keep track of a variety of metrics, which can be consumed with either the health monitoring API or the {kib} server log. + +The health monitoring API provides a reliable endpoint that can be monitored. +Consuming this endpoint doesn't cause additional load, but rather returns the latest health checks made by the system. This design enables consumption by external monitoring services at a regular cadence without additional load to the system. + +Each {kib} instance exposes its own endpoint at: + +[source,sh] +-------------------------------------------------- +$ curl -X GET api/task_manager/_health +-------------------------------------------------- +// KIBANA + +Monitoring the `_health` endpoint of each {kib} instance in the cluster is the recommended method of ensuring confidence in mission critical services such as Alerting and Actions. + +[float] +[[task-manager-configuring-health-monitoring]] +==== Configuring the monitored health statistics + +The health monitoring API monitors the performance of Task Manager out of the box. However, certain performance considerations are deployment specific and you can configure them. + +A health threshold is the threshold for failed task executions. Once a task exceeds this threshold, a status of `warn` or `error` is set on the task type execution. To configure a health threshold, use the <> setting. You can apply this this setting to all task types in the system, or to a custom task type. + +By default, this setting marks the health of every task type as `warning` when it exceeds 80% failed executions, and as `error` at 90%. +Set this value to a number between 0 to 100. The threshold is hit when the value *exceeds* this number. +To avoid a status of `error`, set the threshold at 100. To hit `error` the moment any task fails, set the threshold to 0. + +Create a custom configuration to set lower thresholds for task types you consider critical, such as alerting tasks that you want to detect sooner in an external monitoring service. + +[source,yml] +---- +xpack.task_manager.monitored_task_execution_thresholds: + default: # <1> + error_threshold: 70 + warn_threshold: 50 + custom: + "alerting:.index-threshold": # <2> + error_threshold: 50 + warn_threshold: 0 +---- +<1> A default configuration that sets the system-wide `warn` threshold at a 50% failure rate, and `error` at 70% failure rate. +<2> A custom configuration for the `alerting:.index-threshold` task type that sets a system wide `warn` threshold at 0% (which sets a `warn` status the moment any task of that type fails), and `error` at a 50% failure rate. + +[float] +[[task-manager-consuming-health-stats]] +==== Consuming health stats + +The health API is best consumed by via the `/api/task_manager/_health` endpoint. + +Additionally, the metrics are logged in the {kib} `DEBUG` logger at a regular cadence. +To enable Task Manager DEBUG logging in your {kib} instance, add the following to your `kibana.yml`: + +[source,yml] +---- +logging: + loggers: + - context: plugins.taskManager + appenders: [console] + level: debug +---- + +These stats are logged based the number of milliseconds set in your <> setting, which means it could add substantial noise to your logs. Only enable this level of logging temporarily. + +[float] +[[making-sense-of-task-manager-health-stats]] +==== Making sense of Task Manager health stats + +The health monitoring API exposes three sections: `configuration`, `workload` and `runtime`: + +[cols="2"] +|=== + +a| Configuration + +| This section summarizes the current configuration of Task Manager. This includes dynamic configurations that change over time, such as `poll_interval` and `max_workers`, which can adjust in reaction to changing load on the system. + +a| Workload + +| This section summarizes the work load across the cluster, including the tasks in the system, their types, and current status. + +a| Runtime + +| This section tracks excution performance of Task Manager, tracking task _drift_, worker _load_, and execution stats broken down by type, including duration and execution results. + +|=== + +Each section has a `timestamp` and a `status` that indicates when the last update to this section took place and whether the health of this section was evaluated as `OK`, `Warning` or `Error`. + +The root `status` indicates the `status` of the system overall. + +By monitoring the `status` of the system overall, and the `status` of specific task types of interest, you can evaluate the health of the {kib} Task Management system. diff --git a/docs/user/production-considerations/task-manager-production-considerations.asciidoc b/docs/user/production-considerations/task-manager-production-considerations.asciidoc new file mode 100644 index 0000000000000..39835919a7fd4 --- /dev/null +++ b/docs/user/production-considerations/task-manager-production-considerations.asciidoc @@ -0,0 +1,143 @@ +[role="xpack"] +[[task-manager-production-considerations]] +== Task Manager + +{kib} Task Manager is leveraged by features such as Alerting, Actions, and Reporting to run mission critical work as persistent background tasks. +These background tasks distribute work across multiple {kib} instances. +This has three major benefits: + +* *Persistence*: All task state and scheduling is stored in {es}, so if you restart {kib}, tasks will pick up where they left off. +* *Scaling*: Multiple {kib} instances can read from and update the same task queue in {es}, allowing the work load to be distributed across instances. If a {kib} instance no longer has capacity to run tasks, you can increase capacity by adding additional {kib} instances. +* *Load Balancing*: Task Manager is equipped with a reactive self-healing mechanism, which allows it to reduce the amount of work it executes in reaction to an increased load related error rate in {es}. Additionally, when Task Manager experiences an increase in recurring tasks, it attempts to space out the work to better balance the load. + +[IMPORTANT] +============================================== + Task definitions for alerts and actions are stored in the index specified by <>. + The default is `.kibana_task_manager`. + + You must have at least one replica of this index for production deployments. + If you lose this index, all scheduled alerts and actions are lost. +============================================== + +[float] +[[task-manager-background-tasks]] +=== Running background tasks + +{kib} background tasks are managed as follows: + +* An {es} task index is polled for overdue tasks at 3-second intervals. You can change this interval using the <> setting. +* Tasks are claimed by updating them in the {es} index, using optimistic concurrency control to prevent conflicts. Each {kib} instance can run a maximum of 10 concurrent tasks, so a maximum of 10 tasks are claimed each interval. +* Tasks are run on the {kib} server. +* Task Manager ensures that tasks: +** Are only executed once +** Are retried when they fail (if configured to do so) +** Are rescheduled to run again at a future point in time (if configured to do so) + +[IMPORTANT] +============================================== +It is possible for tasks to run late or at an inconsistent schedule. + +This is usually a symptom of the specific usage or scaling strategy of the cluster in question. + +To address these issues, tweak the {kib} Task Manager settings or the cluster scaling strategy to better suit the unique use case. + +For details on the settings that can influence the performance and throughput of Task Manager, see <>. + +For detailed troubleshooting guidance, see <>. +============================================== + +[float] +=== Deployment considerations + +{es} and {kib} instances use the system clock to determine the current time. To ensure schedules are triggered when expected, synchronize the clocks of all nodes in the cluster using a time service such as http://www.ntp.org/[Network Time Protocol]. + +[float] +[[task-manager-scaling-guidance]] +=== Scaling guidance + +How you deploy {kib} largely depends on your use case. Predicting the throughout a deployment might require to support Task Management is difficult because features can schedule an unpredictable number of tasks at a variety of scheduled cadences. + +However, there is a relatively straight forward method you can follow to produce a rough estimate based on your expected usage. + +[float] +[[task-manager-default-scaling]] +==== Default scale + +By default, {kib} polls for tasks at a rate of 10 tasks every 3 seconds. +This means that you can expect a single {kib} instance to support up to 200 _tasks per minute_ (`200/tpm`). + +In practice, a {kib} instance will only achieve the upper bound of `200/tpm` if the duration of task execution is below the polling rate of 3 seconds. For the most part, the duration of tasks is below that threshold, but it can vary greatly as {es} and {kib} usage grow and task complexity increases (such as alerts executing heavy queries across large datasets). + +By <>, you can make a rough estimate as to the required throughput as a _tasks per minute_ measurement. + +For example, suppose your current workload reveals a required throughput of `440/tpm`. You can address this scale by provisioning 3 {kib} instances, with an upper throughput of `600/tpm`. This scale would provide aproximately 25% additional capacity to handle ad-hoc non-recurring tasks and potential growth in recurring tasks. + +It is highly recommended that you maintain at least 20% additional capacity, beyond your expected workload, as spikes in ad-hoc tasks is possible at times of high activity (such as a spike in actions in response to an active alert). + +For details on monitoring the health of {kib} Task Manager, follow the guidance in <>. + +[float] +[[task-manager-scaling-horizontally]] +==== Scaling horizontally + +At times, the sustainable approach might be to expand the throughput of your cluster by provisioning additional {kib} instances. +By default, each additional {kib} instance will add an additional 10 tasks that your cluster can run concurrently, but you can also scale each {kib} instance vertically, if your diagnosis indicates that they can handle the additional workload. + +[float] +[[task-manager-scaling-vertically]] +==== Scaling vertically + +Other times it, might be preferable to increase the throughput of individual {kib} instances. + +Tweak the *Max Workers* via the <> setting, which allows each {kib} to pull a higher number of tasks per interval. This could impact the performance of each {kib} instance as the workload will be higher. + +Tweak the *Poll Interval* via the <> setting, which allows each {kib} to pull scheduled tasks at a higher rate. This could impact the performance of the {es} cluster as the workload will be higher. + +[float] +[[task-manager-choosing-scaling-strategy]] +==== Choosing a scaling strategy + +Each scaling strategy comes with its own considerations, and the appropriate strategy largely depends on your use case. + +Scaling {kib} instances vertically causes higher resource usage in each {kib} instance, as it will perform more concurrent work. +Scaling {kib} instances horizontally requires a higher degree of coordination, which can impact overall performance. + +A recommended strategy is to follow these steps: + +1. Produce a <> as a guide to provisioning as many {kib} instances as needed. Include any growth in tasks that you predict experiencing in the near future, and a buffer to better address ad-hoc tasks. +2. After provisioning a deployment, assess whether the provisioned {kib} instances achieve the required throughput by evaluating the <> as described in <>. +3. If the throughput is insufficient, and {kib} instances exhibit low resource usage, incrementally scale vertically while <> the impact of these changes. +4. If the throughput is insufficient, and {kib} instances are exhibiting high resource usage, incrementally scale horizontally by provisioning new {kib} instances and reassess. + +Task Manager, like the rest of the Elastic Stack, is designed to scale horizontally. Take advantage of this ability to ensure mission critical services, such as Alerting and Reporting, always have the capacity they need. + +Scaling horizontally requires a higher degree of coordination between {kib} instances. One way Task Manager coordinates with other instances is by delaying its polling schedule to avoid conflicts with other instances. +By using <> to evaluate the <> across a deployment, you can estimate the frequency at which Task Manager resets its delay mechanism. +A higher frequency suggests {kib} instances conflict at a high rate, which you can address by scaling vertically rather than horizontally, reducing the required coordination. + +[float] +[[task-manager-rough-throughput-estimation]] +==== Rough throughput estimation + +Predicting the required throughput a deployment might need to support Task Management is difficult, as features can schedule an unpredictable number of tasks at a variety of scheduled cadences. +However, a rough lower bound can be estimated, which is then used as a guide. + +Throughput is best thought of as a measurements in tasks per minute. + +A default {kib} instance can support up to `200/tpm`. + +Given a deployment of 100 recurring tasks, estimating the required throughput depends on the scheduled cadence. +Suppose you expect to run 50 tasks at a cadence of `10s`, the other 50 tasks at `20m`. In addition, you expect a couple dozen non-recurring tasks every minute. + +A non-recurring task requires a single execution, which means that a single {kib} instance could execute all 100 tasks in less than a minute, using only half of its capacity. As these tasks are only executed once, the {kib} instance will sit idle once all tasks are executed. +For that reason, don't include non-recurring tasks in your _tasks per minute_ calculation. Instead, include a buffer in the final _lower bound_ to incur the cost of ad-hoc non-recurring tasks. + +A recurring task requires as many executions as its cadence can fit in a minute. A recurring task with a `10s` schedule will require `6/tpm`, as it will execute 6 times per minute. A recurring task with a `20m` schedule only executes 3 times per hour and only requires a throughput of `0.05/tpm`, a number so small it that is difficult to take it into account. + +For this reason, we recommend grouping tasks by _tasks per minute_ and _tasks per hour_, as demonstrated in <>, averaging the _per hour_ measurement across all minutes. + +Given the predicted workload, you can estimate a lower bound throughput of `340/tpm` (`6/tpm` * 50 + `3/tph` * 50 + 20% buffer). +As a default, a {kib} instance provides a throughput of `200/tpm`. A good starting point for your deployment is to provision 2 {kib} instances. You could then monitor their performance and reassess as the required throughput becomes clearer. + +Although this is a _rough_ estimate, the _tasks per minute_ provides the lower bound needed to execute tasks on time. +Once you calculate the rough _tasks per minute_ estimate, add a 20% buffer for non-recurring tasks. How much of a buffer is required largely depends on your use case, so <> as it grows to ensure enough of a buffer is provisioned. diff --git a/docs/user/production-considerations/task-manager-troubleshooting.asciidoc b/docs/user/production-considerations/task-manager-troubleshooting.asciidoc new file mode 100644 index 0000000000000..c96b294c0c50d --- /dev/null +++ b/docs/user/production-considerations/task-manager-troubleshooting.asciidoc @@ -0,0 +1,708 @@ +[role="xpack"] +[[task-manager-troubleshooting]] +=== Task Manager troubleshooting + +++++ +Troubleshooting +++++ + +Task Manager is used by a wide range of services in {kib}, such as <>, Reporting, and Telemetry. +Unexpected behavior in these services might be a downstream issue originating in Task Manager. + +This page describes how to resolve common problems you might encounter with Task Manager. +If your problem isn’t described here, please review open issues in the following GitHub repositories: + +* https://github.com/elastic/kibana/issues[{kib}] (https://github.com/elastic/kibana/issues?q=is%3Aopen+is%3Aissue+label%3A%22Feature%3ATask+Manager%22[Task Manager issues]) + +Have a question? Contact us in the https://discuss.elastic.co/[discuss forum]. + +[float] +[[task-manager-health-scheduled-tasks-small-schedule-interval-run-late]] +==== Tasks with small schedule intervals run late + +*Problem*: + +Tasks are scheduled to run every 2 seconds, but seem to be running late. + +*Solution*: + +Task Manager polls for tasks at the cadence specified by the <> setting, which is 3 seconds by default. This means that a task could run late if it uses a schedule that is smaller than this setting. + +You can adjust the <> setting. However, this will add additional load to both {kib} and {es} instances in the cluster, as they will perform more queries. + +[float] +[[task-manager-health-tasks-run-late]] +==== Tasks run late + +*Problem*: + +The most common symptom of an underlying problem in Task Manager is that tasks appear to run late. +For instance, recurring tasks might run at an inconsistent cadence, or long after their scheduled time. + +*Solution*: + +By default, {kib} polls for tasks at a rate of 10 tasks every 3 seconds. + +If many tasks are scheduled to run at the same time, pending tasks will queue in {es}. Each {kib} instance then polls for pending tasks at a rate of up to 10 tasks at a time, at 3 second intervals. It is possible for pending tasks in the queue to exceed this capacity and run late as a result. + +This type of delay is known as _drift_.The root cause for drift depends on the specific usage, and there are no hard and fast rules for addressing drift. + +For example: + +* If drift is caused by *an excess of concurrent tasks* relative to the available capacity of {kib} instances in the cluster, expand the throughput of the cluster. +* If drift is caused by *long running tasks* that overrun their scheduled cadence, reconfigure the tasks in question. + +Refer to <> for step-by-step instructions on identifying the correct resolution. + +_Drift_ is often addressed by adjusting the scaling the deployment to better suit your usage. +For details on scaling Task Manager, see <>. + +[[task-manager-diagnosing-root-cause]] +==== Diagnose a root cause for drift + +The following guide helps you identify a root cause for _drift_ by making sense of the output from the <> endpoint. + +By analyzing the different sections of the output, you can evaluate different theories that explain the drift in a deployment. + +* <> +** <> +* <> +** <> +** <> +** <> +** <> +* <> + +Retrieve the latest monitored health stats of a {kib} instance Task Manager: + +[source,sh] +-------------------------------------------------- +$ curl -X GET api/task_manager/_health +-------------------------------------------------- +// KIBANA + +The API returns the following: + +[source,json] +-------------------------------------------------- +{ + "id": "15415ecf-cdb0-4fef-950a-f824bd277fe4", + "timestamp": "2021-02-16T11:38:10.077Z", + "status": "OK", + "last_update": "2021-02-16T11:38:09.934Z", + "stats": { + "configuration": { + "timestamp": "2021-02-16T11:29:05.055Z", + "value": { + "request_capacity": 1000, + "max_poll_inactivity_cycles": 10, + "monitored_aggregated_stats_refresh_rate": 60000, + "monitored_stats_running_average_window": 50, + "monitored_task_execution_thresholds": { + "default": { + "error_threshold": 90, + "warn_threshold": 80 + }, + "custom": {} + }, + "poll_interval": 3000, + "max_workers": 10 + }, + "status": "OK" + }, + "runtime": { + "timestamp": "2021-02-16T11:38:09.934Z", + "value": { + "polling": { + "last_successful_poll": "2021-02-16T11:38:09.934Z", + "last_polling_delay": "2021-02-16T11:29:05.053Z", + "duration": { + "p50": 13, + "p90": 128, + "p95": 143, + "p99": 168 + }, + "claim_conflicts": { + "p50": 0, + "p90": 0, + "p95": 0, + "p99": 0 + }, + "claim_mismatches": { + "p50": 0, + "p90": 0, + "p95": 0, + "p99": 0 + }, + "result_frequency_percent_as_number": { + "Failed": 0, + "NoAvailableWorkers": 0, + "NoTasksClaimed": 80, + "RanOutOfCapacity": 0, + "RunningAtCapacity": 0, + "PoolFilled": 20 + } + }, + "drift": { + "p50": 99, + "p90": 1245, + "p95": 1845, + "p99": 2878 + }, + "load": { + "p50": 0, + "p90": 0, + "p95": 10, + "p99": 20 + }, + "execution": { + "duration": { + "alerting:.index-threshold": { + "p50": 95, + "p90": 1725, + "p95": 2761, + "p99": 2761 + }, + "alerting:xpack.uptime.alerts.monitorStatus": { + "p50": 149, + "p90": 1071, + "p95": 1171, + "p99": 1171 + }, + "actions:.index": { + "p50": 166, + "p90": 166, + "p95": 166, + "p99": 166 + } + }, + "result_frequency_percent_as_number": { + "alerting:.index-threshold": { + "Success": 100, + "RetryScheduled": 0, + "Failed": 0, + "status": "OK" + }, + "alerting:xpack.uptime.alerts.monitorStatus": { + "Success": 100, + "RetryScheduled": 0, + "Failed": 0, + "status": "OK" + }, + "actions:.index": { + "Success": 10, + "RetryScheduled": 0, + "Failed": 90, + "status": "error" + } + } + } + }, + "status": "OK" + }, + "workload": { + "timestamp": "2021-02-16T11:38:05.826Z", + "value": { + "count": 26, + "task_types": { + "alerting:.index-threshold": { + "count": 2, + "status": { + "idle": 2 + } + }, + "actions:.index": { + "count": 14, + "status": { + "idle": 2, + "running": 2, + "failed": 10 + } + }, + "alerting:xpack.uptime.alerts.monitorStatus": { + "count": 10, + "status": { + "idle": 10 + } + }, + }, + "schedule": [ + ["10s", 2], + ["1m", 2], + ["60s", 2], + ["5m", 2], + ["60m", 4] + ], + "overdue": 0, + "estimated_schedule_density": [0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 3, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0] + }, + "status": "OK" + } + } +} +-------------------------------------------------- + + +[[task-manager-health-evaluate-the-configuration]] +===== Evaluate the Configuration + +[[task-manager-theory-reduced-polling-rate]] +*Theory*: +{kib} is configured to poll for tasks at a reduced rate. + +*Diagnosis*: +Evaluating the health stats, you can see the following output under `stats.configuration.value`: + +[source,json] +-------------------------------------------------- +{ + "request_capacity": 1000, + "max_poll_inactivity_cycles": 10, + "monitored_aggregated_stats_refresh_rate": 60000, + "monitored_stats_running_average_window": 50, + "monitored_task_execution_thresholds": { + "default": { + "error_threshold": 90, + "warn_threshold": 80 + }, + "custom": {} + }, + "poll_interval": 3000, # <1> + "max_workers": 10 # <2> +} +-------------------------------------------------- +<1> `poll_interval` is set to the default value of 3000 milliseconds +<2> `max_workers` is set to the default value of 10 workers + +You can infer from this output that the {kib} instance polls for work every 3 seconds and can run 10 concurrent tasks. + +Now suppose the output under `stats.configuration.value` is the following: + +[source,json] +-------------------------------------------------- +{ + "request_capacity": 1000, + "max_poll_inactivity_cycles": 10, + "monitored_aggregated_stats_refresh_rate": 60000, + "monitored_stats_running_average_window": 50, + "monitored_task_execution_thresholds": { + "default": { + "error_threshold": 90, + "warn_threshold": 80 + }, + "custom": {} + }, + "poll_interval": 60000, # <1> + "max_workers": 1 # <2> +} +-------------------------------------------------- +<1> `poll_interval` is set to 60000 milliseconds, far higher than the default +<2> `max_workers` is set to 1 worker, far lower than the default + +You can infer from this output that the {kib} instance only polls for work once a minute and only picks up one task at a time. This throughput is unlikely to support mission critical services, such as Alerting or Reporting, and tasks will usually run late. + +There are two possible reasons for such a configuration: + +* These settings have been configured manually, which can be resolved by reconfiguring these settings. +For details, see <>. + +* {kib} has reduced its own throughput in reaction to excessive load on the {es} cluster. ++ +Task Manager is equipped with a reactive self-healing mechanism in response to an increase in load related errors in {es}. This mechanism will increase the `poll_interval` setting (reducing the rate at which it queries {es}), and decrease the `max_workers` (reducing the amount of operations it executes against {es}). Once the error rate reduces, these settings are incrementally dialed up again, returning them to the configured settings. ++ +This scenario can be identified by searching the {kib} Server Log for messages such as: ++ +[source, txt] +-------------------------------------------------- +Max workers configuration is temporarily reduced after Elasticsearch returned 25 "too many request" error(s). +-------------------------------------------------- ++ +Deeper investigation into the high error rate experienced by the {es} cluster is required. + +[[task-manager-health-evaluate-the-runtime]] +===== Evaluate the Runtime + +[[task-manager-theory-actual-polling-frequently]] +*Theory*: +{kib} is not polling as frequently as it should + +*Diagnosis*: +Evaluating the health stats, you see the following output under `stats.runtime.value.polling`: + +[source,json] +-------------------------------------------------- +{ + "last_successful_poll": "2021-02-16T11:38:09.934Z", # <1> + "last_polling_delay": "2021-02-14T11:29:05.053Z", + "duration": { # <2> + "p50": 13, + "p90": 128, + "p95": 143, + "p99": 168 + }, + "claim_conflicts": { # <3> + "p50": 0, + "p90": 0, + "p95": 0, + "p99": 2 + }, + "claim_mismatches": { + "p50": 0, + "p90": 0, + "p95": 0, + "p99": 0 + }, + "result_frequency_percent_as_number": { # <4> + "Failed": 0, + "NoAvailableWorkers": 0, + "NoTasksClaimed": 80, + "RanOutOfCapacity": 0, + "RunningAtCapacity": 0, + "PoolFilled": 20 + } +} +-------------------------------------------------- +<1> Ensure the last successful polling cycle was completed no more than a couple of multiples of `poll_interval` in the past. +<2> Ensure the duration of polling cycles is usually below 100ms. Longer durations are possible, but unexpected. +<3> Ensure {kib} instances in the cluster are not encountering a high rate of version conflicts. +<4> Ensure the majority of polling cycles result in positive outcomes, such as `RunningAtCapacity` or `PoolFilled`. + +You can infer from this output that the {kib} instance is polling regularly. +This assessment is based on the following: + +* Comparing the `last_successful_poll` to the `timestamp` (value of `2021-02-16T11:38:10.077Z`) at the root, where you can see the last polling cycle took place 1 second before the monitoring stats were exposed by the health monitoring API. +* Comparing the `last_polling_delay` to the `timestamp` (value of `2021-02-16T11:38:10.077Z`) at the root, where you can see the last polling cycle delay took place 2 days ago, suggesting {kib} instances are not conflicting often. +* The `p50` of the `duration` shows that at least 50% of polling cycles take, at most, 13 millisconds to complete. +* Evaluating the `result_frequency_percent_as_number`: +** 80% of the polling cycles completed without claiming any tasks (suggesting that there aren't any overdue tasks). +** 20% completed with Task Manager claiming tasks that were then executed. +** None of the polling cycles ended up occupying all of the available workers, as `RunningAtCapacity` has a frequency of 0%, suggesting there is enough capacity in Task Manager to handle the workload. + +All of these stats are tracked as a running average, which means that they give a snapshot of a period of time (by default {kib} tracks up to 50 cycles), rather than giving a complete history. + +Suppose the output under `stats.runtime.value.polling.result_frequency_percent_as_number` was the following: + +[source,json] +-------------------------------------------------- +{ + "Failed": 30, # <1> + "NoAvailableWorkers": 20, # <2> + "NoTasksClaimed": 10, + "RanOutOfCapacity": 10, # <3> + "RunningAtCapacity": 10, # <4> + "PoolFilled": 20 +} +-------------------------------------------------- +<1> 30% of polling cycles failed, which is a high rate. +<2> 20% of polling cycles are skipped as Task Manager has no capacity left to run tasks. +<3> 10% of polling cycles result in Task Manager claiming more tasks than it has capacity to run. +<4> 10% of polling cycles result in Task Manager claiming precisely as many tasks as it has capacity to run. + +You can infer from this output that Task Manager is not healthy, as the failure rate is high, and Task Manager is fetching tasks it has no capacity to run. +Analyzing the {kib} Server Log should reveal the underlying issue causing the high error rate and capacity issues. + +The high `NoAvailableWorkers` rate of 20% suggests that there are many tasks running for durations longer than the `poll_interval`. +For details on analyzing long task execution durations, see the <> theory. + +[[task-manager-theory-insufficient-throughput]] +*Theory*: +{kib} is polling as frequently as it should, but that isn't often enough to keep up with the workload + +*Diagnosis*: +Evaluating the health stats, you can see the following output of `drift` and `load` under `stats.runtime.value`: + +[source,json] +-------------------------------------------------- +{ + "drift": { # <1> + "p50": 99, + "p90": 1245, + "p95": 1845, + "p99": 2878 + }, + "load": { # <2> + "p50": 0, + "p90": 0, + "p95": 10, + "p99": 20 + }, +} +-------------------------------------------------- +<1> `drift` shows us that at least 95% of tasks are running within 2 seconds of their scheduled time. +<2> `load` shows us that Task Manager is idle at least 90% of the time, and never uses more than 20% of its available workers. + +You can infer from these stats that this {kib} has plenty of capacity, and any delays you might be experiencing are unlikely to be addressed by expanding the throughput. + +Suppose the output of `drift` and `load` was the following: + +[source,json] +-------------------------------------------------- +{ + "drift": { # <1> + "p50": 2999, + "p90": 3845, + "p95": 3845.75, + "p99": 4078 + }, + "load": { # <2> + "p50": 80, + "p90": 100, + "p95": 100, + "p99": 100 + } +} +-------------------------------------------------- +<1> `drift` shows us that all tasks are running 3 to 4 seconds after their scheduled time. +<2> `load` shows us that at least half of the time Task Manager is running at a load of 80%. + +You can infer from these stats that this {kib} is using most of its capacity, but seems to keep up with the work most of the time. +This assessment is based on the following: + +* The `p90` of `load` is at 100%, and `p50` is also quite high at 80%. This means that there is little to no room for maneuvering, and a spike of work might cause Task Manager to exceed its capacity. +* Tasks run soon after their scheduled time, which is to be expected. A `poll_interval` of `3000` milliseconds would often experience a consistent drift of somewhere between `0` and `3000` milliseconds. A `p50 drift` of `2999` suggests that there is room for improvement, and you could benefit from a higher throughput. + +For details on achieving higher throughput by adjusting your scaling strategy, see <>. + +[[task-manager-theory-long-running-tasks]] +*Theory*: +Tasks run for too long, overrunning their schedule + +*Diagnosis*: +The <> theory analyzed a hypothetical scenario where both drift and load were unusually high. + +Suppose an alternate scenario, where `drift` is high, but `load` is not, such as the following: + +[source,json] +-------------------------------------------------- +{ + "drift": { # <1> + "p50": 9799, + "p90": 83845, + "p95": 90328, + "p99": 123845 + }, + "load": { # <2> + "p50": 40, + "p90": 75, + "p95": 80, + "p99": 100 + } +} +-------------------------------------------------- +<1> `drift` shows that most (if not all) tasks are running at least 32 seconds too late. +<2> `load` shows that, for the most part, you have capacity to run more concurrent tasks. + +In the preceding scenario, the tasks are running far too late, but you have sufficient capacity to run more concurrent tasks. +A high capacity allows {kib} to run multiple different tasks concurrently. If a task is already running when its next schedule run is due, {kib} will avoid running it a second time, and instead wait for the first execution to complete. + +If a task takes longer to execute than the cadence of its schedule, then that task will always overrun and experience a high drift. For example, suppose a task is scheduled to execute every 3 seconds, but takes 6 seconds to complete. It will consistently suffer from a drift of, at least, 3 seconds. + +Evaluating the health stats in this hypothetical scenario, you see the following output under `stats.runtime.value.execution.duration`: + +[source,json] +-------------------------------------------------- +{ + "alerting:.index-threshold": { # <1> + "p50": 95, + "p90": 1725, + "p95": 2761, + "p99": 2761 + }, + "alerting:.es-query": { # <2> + "p50": 7149, + "p90": 40071, + "p95": 45282, + "p99": 121845 + }, + "actions:.index": { + "p50": 166, + "p90": 166, + "p95": 166, + "p99": 166 + } +} +-------------------------------------------------- +<1> 50% of the tasks backing index threshold alerts complete in less than 100 milliseconds. +<2> 50% of the tasks backing Elasticsearch query alerts complete in 7 seconds, but at least 10% take longer than 40 seconds. + +You can infer from these stats that the high drift the Task Manager is experiencing is most likely due to Elasticsearch query alerts that are running for a long time. + +Resolving this issue is context dependent and changes from case to case. +In the preceding example above, this would be resolved by modifying the queries in these alerts to make them faster, or improving the {es} throughput to speed up the exiting query. + +[[task-manager-theory-high-fail-rate]] +*Theory*: +Tasks take multiple attempts to succeed + +*Diagnosis*: +A high error rate could cause a task to appear to run late, when in fact it runs on time, but experiences a high failure rate. + +Evaluating the preceding health stats, you see the following output under `stats.runtime.value.execution.result_frequency_percent_as_number`: + +[source,json] +-------------------------------------------------- +{ + "alerting:.index-threshold": { # <1> + "Success": 100, + "RetryScheduled": 0, + "Failed": 0, + "status": "OK" + }, + "alerting:xpack.uptime.alerts.monitorStatus": { + "Success": 100, + "RetryScheduled": 0, + "Failed": 0, + "status": "OK" + }, + "actions:.index": { # <2> + "Success": 8, + "RetryScheduled": 0, + "Failed": 92, + "status": "error" # <3> + } +} +-------------------------------------------------- +<1> 100% of the tasks backing index threshold alerts successfully complete. +<2> 92% of the tasks backing ES index actions fail to complete. +<3> The tasks backing ES index actions have exceeded the default `monitored_task_execution_thresholds` _error_ configuration. + +You can infer from these stats that most `actions:.index` tasks, which back the ES Index {kib} action, fail. +Resolving that would require deeper investigation into the {kib} Server Log, where the exact errors are logged, and addressing these specific errors. + +[[task-manager-health-evaluate-the-workload]] +===== Evaluate the Workload + +Predicting the required throughput a deplyment might need to support Task Manager is difficult, as features can schedule an unpredictable number of tasks at a variety of scheduled cadences. + +<> provides statistics that make it easier to monitor the adequacy of the existing throughput. +By evaluating the workload, the required throughput can be estimated, which is used when following the Task Manager <>. + +Evaluating the preceding health stats above, you see the following output under `stats.workload.value`: + +[source,json] +-------------------------------------------------- +{ + "count": 26, # <1> + "task_types": { + "alerting:.index-threshold": { + "count": 2, # <2> + "status": { + "idle": 2 + } + }, + "actions:.index": { + "count": 14, + "status": { + "idle": 2, + "running": 2, + "failed": 10 # <3> + } + }, + "alerting:xpack.uptime.alerts.monitorStatus": { + "count": 10, + "status": { + "idle": 10 + } + }, + }, + "schedule": [ # <4> + ["10s", 2], + ["1m", 2], + ["90s", 2], + ["5m", 8] + ], + "overdue": 0, # <5> + "estimated_schedule_density": [ # <6> + 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, + 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, + 0, 3, 0, 0, 0, 1, 0, 1, 0, 1, + 0, 0, 0, 1, 0, 0, 1, 1, 1, 0 + ] +} +-------------------------------------------------- +<1> There are 26 tasks in the system, including regular tasks, recurring tasks, and failed tasks. +<2> There are 2 `idle` index threshold alert tasks, meaning they are scheduled to run at some point in the future. +<3> Of the 14 tasks backing the ES index action, 10 have failed and 2 are running. +<4> A histogram of all scheduled recurring tasks shows that 2 tasks are scheduled to run every 10 seconds, 2 tasks are scheduled to run once a minute, and so on. +<5> There are no tasks overdue, which means that all tasks that *should* have run by now *have* run. +<6> This histogram shows the tasks scheduled to run throughout the upcoming 20 polling cycles. The histogram represents the entire deployment, rather than just this {kib} instance + +The `workload` section summarizes the work load across the cluster, listing the tasks in the system, their types, schedules, and current status. + +You can infer from these stats that a default deployment should suffice. +This assessment is based on the following: + +* The estimated schedule density is low. +* There aren't many tasks in the system relative to the default capacity. + +Suppose the output of `stats.workload.value` looked something like this: + +[source,json] +-------------------------------------------------- +{ + "count": 2191, # <1> + "task_types": { + "alerting:.index-threshold": { + "count": 202, + "status": { + "idle": 183, + "claiming": 2, + "running": 19 + } + }, + "alerting:.es-query": { + "count": 225, + "status": { + "idle": 225, + } + }, + "actions:.index": { + "count": 89, + "status": { + "idle": 24, + "running": 2, + "failed": 63 + } + }, + "alerting:xpack.uptime.alerts.monitorStatus": { + "count": 87, + "status": { + "idle": 74, + "running": 13 + } + }, + }, + "schedule": [ # <2> + ["10s", 38], + ["1m", 101], + ["90s", 55], + ["5m", 89], + ["20m", 62], + ["60m", 106], + ["1d", 61] + ], + "overdue": 0, # <5> + "estimated_schedule_density": [ # <3> + 10, 1, 0, 10, 0, 20, 0, 1, 0, 1, + 9, 0, 3, 10, 0, 0, 10, 10, 7, 0, + 0, 31, 0, 12, 16, 31, 0, 10, 0, 10, + 3, 22, 0, 10, 0, 2, 10, 10, 1, 0 + ] +} +-------------------------------------------------- +<1> There are 2,191 tasks in the system. +<2> The scheduled tasks are distributed across a variety of cadences. +<3> The schedule density shows that you expect to exceed the default 10 concurrent tasks. + +You can infer several important attributes of your workload from this output: + +* There are many tasks in your system and ensuring these tasks run on their scheduled cadence will require attention to the Task Manager throughput. +* Assessing the high frequency tasks (tasks that recur at a cadence of a couple of minutes or less), you must support a throughput of approximately 400 tasks per minute (38 every 10 seconds + 101 every minute + 55 every 90 seconds). +* Assessing the medium frequency tasks (tasks that recur at a cadence of an hour or less), you must support an additional throughput of over 2000 tasks per hour (89 every 5 minutes, + 62 every 20 minutes + 106 each hour). You can average the needed throughput for the hour by counting these tasks as an additional 30 to 40 tasks per minute. +* Assessing the estimated schedule density, there are cycles that are due to run upwards of 31 tasks concurrently, and along side these cycles, there are empty cycles. You can expect Task Manager to load balance these tasks throughout the empty cycles, but this won't leave much capacity to handle spikes in fresh tasks that might be scheduled in the future. + +These rough calculations give you a lower bound to the required throughput, which is _at least_ 440 tasks per minute to ensure recurring tasks are executed, at their scheduled time. This throughput doesn't account for nonrecurring tasks that might have been scheduled, nor does it account for tasks (recurring or otherwise) that might be scheduled in the future. + +Given these inferred attributes, it would be safe to assume that a single {kib} instance with default settings **would not** provide the required throughput. It is possible that scaling horizontally by adding a couple more {kib} instances will. + +For details on scaling Task Manager, see <>. diff --git a/docs/user/setup.asciidoc b/docs/user/setup.asciidoc index ba848681689b6..a38bf699c1db8 100644 --- a/docs/user/setup.asciidoc +++ b/docs/user/setup.asciidoc @@ -56,8 +56,6 @@ include::{kib-repo-dir}/setup/access.asciidoc[] include::{kib-repo-dir}/setup/connect-to-elasticsearch.asciidoc[] -include::{kib-repo-dir}/setup/production.asciidoc[] - include::{kib-repo-dir}/setup/upgrade.asciidoc[] include::{kib-repo-dir}/setup/embedding.asciidoc[] diff --git a/package.json b/package.json index 6e5feac8a16a9..1dd1375ac092b 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "kbn:watch": "node scripts/kibana --dev --logging.json=false", "build:types": "rm -rf ./target/types && tsc --p tsconfig.types.json", "docs:acceptApiChanges": "node --max-old-space-size=6144 scripts/check_published_api_changes.js --accept", - "kbn:bootstrap": "node scripts/build_ts_refs", + "kbn:bootstrap": "node scripts/build_ts_refs --ignore-type-failures", "spec_to_console": "node scripts/spec_to_console", "backport-skip-ci": "backport --prDescription \"[skip-ci]\"", "storybook": "node scripts/storybook", @@ -82,7 +82,7 @@ "**/load-grunt-config/lodash": "^4.17.21", "**/minimist": "^1.2.5", "**/node-jose/node-forge": "^0.10.0", - "**/prismjs": "1.22.0", + "**/prismjs": "1.23.0", "**/react-syntax-highlighter": "^15.3.1", "**/react-syntax-highlighter/**/highlight.js": "^10.4.1", "**/request": "^2.88.2", @@ -114,7 +114,6 @@ "@hapi/hoek": "^9.1.1", "@hapi/inert": "^6.0.3", "@hapi/podium": "^4.1.1", - "@hapi/statehood": "^7.0.3", "@hapi/vision": "^6.0.1", "@hapi/wreck": "^17.1.0", "@kbn/ace": "link:packages/kbn-ace", @@ -300,7 +299,6 @@ "set-value": "^3.0.2", "source-map-support": "^0.5.19", "squel": "^5.13.0", - "statehood": "6.0.6", "stats-lite": "^2.2.0", "strip-ansi": "^6.0.0", "style-it": "^2.1.3", @@ -327,7 +325,6 @@ "@babel/cli": "^7.12.10", "@babel/core": "^7.12.10", "@babel/parser": "^7.12.11", - "@babel/runtime": "^7.12.5", "@babel/plugin-proposal-class-properties": "^7.12.1", "@babel/plugin-proposal-export-namespace-from": "^7.12.1", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1", @@ -340,6 +337,7 @@ "@babel/preset-react": "^7.12.10", "@babel/preset-typescript": "^7.12.7", "@babel/register": "^7.12.10", + "@babel/runtime": "^7.12.5", "@babel/traverse": "^7.12.12", "@babel/types": "^7.12.12", "@bazel/ibazel": "^0.14.0", @@ -359,6 +357,7 @@ "@kbn/babel-code-parser": "link:packages/kbn-babel-code-parser", "@kbn/babel-preset": "link:packages/kbn-babel-preset", "@kbn/dev-utils": "link:packages/kbn-dev-utils", + "@kbn/docs-utils": "link:packages/kbn-docs-utils", "@kbn/es": "link:packages/kbn-es", "@kbn/es-archiver": "link:packages/kbn-es-archiver", "@kbn/eslint-import-resolver-kibana": "link:packages/kbn-eslint-import-resolver-kibana", @@ -368,7 +367,6 @@ "@kbn/plugin-generator": "link:packages/kbn-plugin-generator", "@kbn/plugin-helpers": "link:packages/kbn-plugin-helpers", "@kbn/pm": "link:packages/kbn-pm", - "@kbn/docs-utils": "link:packages/kbn-docs-utils", "@kbn/storybook": "link:packages/kbn-storybook", "@kbn/telemetry-tools": "link:packages/kbn-telemetry-tools", "@kbn/test": "link:packages/kbn-test", @@ -384,13 +382,13 @@ "@octokit/rest": "^16.35.0", "@percy/agent": "^0.28.6", "@scant/router": "^0.1.0", - "@storybook/addons": "^6.0.16", "@storybook/addon-a11y": "^6.0.26", "@storybook/addon-actions": "^6.0.26", "@storybook/addon-docs": "^6.0.26", "@storybook/addon-essentials": "^6.0.26", "@storybook/addon-knobs": "^6.0.26", "@storybook/addon-storyshots": "^6.0.26", + "@storybook/addons": "^6.0.16", "@storybook/components": "^6.0.26", "@storybook/core": "^6.0.26", "@storybook/core-events": "^6.0.26", @@ -608,11 +606,11 @@ "cpy": "^8.1.1", "cronstrue": "^1.51.0", "css-loader": "^3.4.2", + "cypress": "^6.2.1", "cypress-cucumber-preprocessor": "^2.5.2", "cypress-multi-reporters": "^1.4.0", "cypress-pipe": "^2.0.0", "cypress-promise": "^1.1.0", - "cypress": "^6.2.1", "d3": "3.5.17", "d3-cloud": "1.2.5", "d3-scale": "1.0.7", diff --git a/packages/BUILD.bazel b/packages/BUILD.bazel index 3c579f1b76a93..1f1eba0747ab7 100644 --- a/packages/BUILD.bazel +++ b/packages/BUILD.bazel @@ -1,4 +1,5 @@ -# Call each package final target +# Grouping target to call all underlying packages build +# targets so we can build them all at once filegroup( name = "build", srcs = [], diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index 1ebd0a9b83bd0..57a24c6dc06bc 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -14,7 +14,7 @@ pageLoadAssetSize: dashboard: 374194 dashboardEnhanced: 65646 dashboardMode: 22716 - data: 1319839 + data: 900000 dataEnhanced: 50420 devTools: 38637 discover: 105145 diff --git a/packages/kbn-optimizer/src/node/cache.ts b/packages/kbn-optimizer/src/node/cache.ts index b3a76b7bf3d51..1320d275022a9 100644 --- a/packages/kbn-optimizer/src/node/cache.ts +++ b/packages/kbn-optimizer/src/node/cache.ts @@ -6,6 +6,7 @@ * Side Public License, v 1. */ +import Path from 'path'; import { Writable } from 'stream'; import chalk from 'chalk'; @@ -25,11 +26,17 @@ export class Cache { private readonly atimes: LmdbStore.Database; private readonly mtimes: LmdbStore.Database; private readonly sourceMaps: LmdbStore.Database; + private readonly pathRoot: string; private readonly prefix: string; private readonly log?: Writable; private readonly timer: NodeJS.Timer; - constructor(config: { dir: string; prefix: string; log?: Writable }) { + constructor(config: { pathRoot: string; dir: string; prefix: string; log?: Writable }) { + if (!Path.isAbsolute(config.pathRoot)) { + throw new Error('cache requires an absolute path to resolve paths relative to'); + } + + this.pathRoot = config.pathRoot; this.prefix = config.prefix; this.log = config.log; @@ -110,7 +117,12 @@ export class Cache { } private getKey(path: string) { - return `${this.prefix}${path}`; + const normalizedPath = + Path.sep !== '/' + ? Path.relative(this.pathRoot, path).split(Path.sep).join('/') + : Path.relative(this.pathRoot, path); + + return `${this.prefix}${normalizedPath}`; } private safeGet(db: LmdbStore.Database, key: string) { diff --git a/packages/kbn-optimizer/src/node/integration_tests/cache.test.ts b/packages/kbn-optimizer/src/node/integration_tests/cache.test.ts index f84472bb4d496..8ce58aa74214f 100644 --- a/packages/kbn-optimizer/src/node/integration_tests/cache.test.ts +++ b/packages/kbn-optimizer/src/node/integration_tests/cache.test.ts @@ -53,8 +53,9 @@ it('returns undefined until values are set', async () => { const log = makeTestLog(); const cache = makeCache({ dir: DIR, - prefix: 'foo', + prefix: 'prefix:', log, + pathRoot: '/foo/', }); expect(cache.getMtime(path)).toBe(undefined); @@ -71,16 +72,16 @@ it('returns undefined until values are set', async () => { expect(cache.getCode(path)).toBe('var x = 1'); expect(cache.getSourceMap(path)).toEqual({ foo: 'bar' }); expect(log.output).toMatchInlineSnapshot(` - "MISS [mtimes] foo/foo/bar.js - MISS [codes] foo/foo/bar.js - MISS [sourceMaps] foo/foo/bar.js - PUT [atimes] foo/foo/bar.js - PUT [mtimes] foo/foo/bar.js - PUT [codes] foo/foo/bar.js - PUT [sourceMaps] foo/foo/bar.js - HIT [mtimes] foo/foo/bar.js - HIT [codes] foo/foo/bar.js - HIT [sourceMaps] foo/foo/bar.js + "MISS [mtimes] prefix:bar.js + MISS [codes] prefix:bar.js + MISS [sourceMaps] prefix:bar.js + PUT [atimes] prefix:bar.js + PUT [mtimes] prefix:bar.js + PUT [codes] prefix:bar.js + PUT [sourceMaps] prefix:bar.js + HIT [mtimes] prefix:bar.js + HIT [codes] prefix:bar.js + HIT [sourceMaps] prefix:bar.js " `); }); diff --git a/packages/kbn-optimizer/src/node/node_auto_tranpilation.ts b/packages/kbn-optimizer/src/node/node_auto_tranpilation.ts index cc53294109412..6f5dabf410ffa 100644 --- a/packages/kbn-optimizer/src/node/node_auto_tranpilation.ts +++ b/packages/kbn-optimizer/src/node/node_auto_tranpilation.ts @@ -91,7 +91,7 @@ function determineCachePrefix() { tsx: getBabelOptions(Path.resolve(REPO_ROOT, 'foo.tsx')), }); - const checksum = Crypto.createHash('sha256').update(json).digest('hex'); + const checksum = Crypto.createHash('sha256').update(json).digest('hex').slice(0, 8); return `${checksum}:`; } @@ -134,7 +134,8 @@ export function registerNodeAutoTranspilation() { installed = true; const cache = new Cache({ - dir: Path.resolve(REPO_ROOT, 'data/node_auto_transpilation_cache_v2', UPSTREAM_BRANCH), + pathRoot: REPO_ROOT, + dir: Path.resolve(REPO_ROOT, 'data/node_auto_transpilation_cache_v3', UPSTREAM_BRANCH), prefix: determineCachePrefix(), log: process.env.DEBUG_NODE_TRANSPILER_CACHE ? Fs.createWriteStream(Path.resolve(REPO_ROOT, 'node_auto_transpilation_cache.log'), { diff --git a/packages/kbn-pm/dist/index.js b/packages/kbn-pm/dist/index.js index 58b3a24fa6572..1e80e09ecd310 100644 --- a/packages/kbn-pm/dist/index.js +++ b/packages/kbn-pm/dist/index.js @@ -94,7 +94,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _cli__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "run", function() { return _cli__WEBPACK_IMPORTED_MODULE_0__["run"]; }); -/* harmony import */ var _production__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(518); +/* harmony import */ var _production__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(519); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buildBazelProductionProjects", function() { return _production__WEBPACK_IMPORTED_MODULE_1__["buildBazelProductionProjects"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buildNonBazelProductionProjects", function() { return _production__WEBPACK_IMPORTED_MODULE_1__["buildNonBazelProductionProjects"]; }); @@ -108,7 +108,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils_package_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(251); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transformDependencies", function() { return _utils_package_json__WEBPACK_IMPORTED_MODULE_4__["transformDependencies"]; }); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(517); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(518); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getProjectPaths", function() { return _config__WEBPACK_IMPORTED_MODULE_5__["getProjectPaths"]; }); /* @@ -141,7 +141,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _kbn_dev_utils_tooling_log__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5); /* harmony import */ var _kbn_dev_utils_tooling_log__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_kbn_dev_utils_tooling_log__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _commands__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(128); -/* harmony import */ var _run__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(512); +/* harmony import */ var _run__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(513); /* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(246); /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one @@ -177,6 +177,8 @@ function help() { --skip-kibana-plugins Filter all plugins in ./plugins and ../kibana-extra when running command. --no-cache Disable the kbn packages bootstrap cache --no-validate Disable the bootstrap yarn.lock validation + --force-install Forces yarn install to run on bootstrap + --offline Run in offline mode --verbose Set log level to verbose --debug Set log level to debug --quiet Set log level to error @@ -207,9 +209,11 @@ async function run(argv) { }, default: { cache: true, + 'force-install': true, + offline: false, validate: true }, - boolean: ['cache', 'validate'] + boolean: ['cache', 'force-install', 'offline', 'validate'] }); const args = options._; @@ -8829,10 +8833,10 @@ exports.ToolingLogCollectingWriter = ToolingLogCollectingWriter; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "commands", function() { return commands; }); /* harmony import */ var _bootstrap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(129); -/* harmony import */ var _clean__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(476); -/* harmony import */ var _reset__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(508); -/* harmony import */ var _run__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(509); -/* harmony import */ var _watch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(510); +/* harmony import */ var _clean__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(477); +/* harmony import */ var _reset__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(509); +/* harmony import */ var _run__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(510); +/* harmony import */ var _watch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(511); /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License @@ -8901,9 +8905,31 @@ const BootstrapCommand = { const nonBazelProjectsOnly = await Object(_utils_projects__WEBPACK_IMPORTED_MODULE_4__["getNonBazelProjectsOnly"])(projects); const batchedNonBazelProjects = Object(_utils_projects__WEBPACK_IMPORTED_MODULE_4__["topologicallyBatchProjects"])(nonBazelProjectsOnly, projectGraph); - const kibanaProjectPath = (_projects$get = projects.get('kibana')) === null || _projects$get === void 0 ? void 0 : _projects$get.path; // Install bazel machinery tools if needed + const kibanaProjectPath = ((_projects$get = projects.get('kibana')) === null || _projects$get === void 0 ? void 0 : _projects$get.path) || ''; + const runOffline = (options === null || options === void 0 ? void 0 : options.offline) === true; + const forceInstall = !!options && options['force-install'] === true; // Ensure we have a `node_modules/.yarn-integrity` file as we depend on it + // for bazel to know it has to re-install the node_modules after a reset or a clean - await Object(_utils_bazel__WEBPACK_IMPORTED_MODULE_9__["installBazelTools"])(rootPath); // Install monorepo npm dependencies + await Object(_utils_bazel__WEBPACK_IMPORTED_MODULE_9__["ensureYarnIntegrityFileExists"])(Object(path__WEBPACK_IMPORTED_MODULE_0__["resolve"])(kibanaProjectPath, 'node_modules')); // Install bazel machinery tools if needed + + await Object(_utils_bazel__WEBPACK_IMPORTED_MODULE_9__["installBazelTools"])(rootPath); // Bootstrap process for Bazel packages + // Bazel is now managing dependencies so yarn install + // will happen as part of this + // + // NOTE: Bazel projects will be introduced incrementally + // And should begin from the ones with none dependencies forward. + // That way non bazel projects could depend on bazel projects but not the other way around + // That is only intended during the migration process while non Bazel projects are not removed at all. + // + // Until we have our first package build within Bazel we will always need to directly call the yarn rule + // otherwise yarn install won't trigger as we don't have any npm dependency within Bazel + // TODO: Change CLI default in order to not force install as soon as we have our first Bazel package being built + + if (forceInstall) { + await Object(_utils_bazel__WEBPACK_IMPORTED_MODULE_9__["runBazel"])(['run', '@nodejs//:yarn'], runOffline); + } + + await Object(_utils_bazel__WEBPACK_IMPORTED_MODULE_9__["runBazel"])(['build', '//packages:build'], runOffline); // Install monorepo npm dependencies outside of the Bazel managed ones for (const batch of batchedNonBazelProjects) { for (const project of batch) { @@ -8913,12 +8939,12 @@ const BootstrapCommand = { continue; } - if (project.isSinglePackageJsonProject || isExternalPlugin) { + if (isExternalPlugin) { await project.installDependencies(); continue; } - if (!project.isEveryDependencyLocal() && !isExternalPlugin) { + if (!project.isSinglePackageJsonProject && !project.isEveryDependencyLocal() && !isExternalPlugin) { throw new Error(`[${project.name}] is not eligible to hold non local dependencies. Move the non local dependencies into the top level package.json.`); } } @@ -8930,16 +8956,11 @@ const BootstrapCommand = { await Object(_utils_validate_dependencies__WEBPACK_IMPORTED_MODULE_8__["validateDependencies"])(kbn, yarnLock); } // Assure all kbn projects with bin defined scripts // copy those scripts into the top level node_modules folder - - - await Object(_utils_link_project_executables__WEBPACK_IMPORTED_MODULE_1__["linkProjectExecutables"])(projects, projectGraph); // Bootstrap process for Bazel packages // - // NOTE: Bazel projects will be introduced incrementally - // And should begin from the ones with none dependencies forward. - // That way non bazel projects could depend on bazel projects but not the other way around - // That is only intended during the migration process while non Bazel projects are not removed at all. + // NOTE: We don't probably need this anymore, is actually not being used - await Object(_utils_bazel__WEBPACK_IMPORTED_MODULE_9__["runBazel"])(['build', '//packages:build']); // Bootstrap process for non Bazel packages + + await Object(_utils_link_project_executables__WEBPACK_IMPORTED_MODULE_1__["linkProjectExecutables"])(projects, projectGraph); // Bootstrap process for non Bazel packages /** * At the end of the bootstrapping process we call all `kbn:bootstrap` scripts @@ -48016,18 +48037,21 @@ function addProjectToTree(tree, pathParts, project) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _get_cache_folders__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(372); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getBazelDiskCacheFolder", function() { return _get_cache_folders__WEBPACK_IMPORTED_MODULE_0__["getBazelDiskCacheFolder"]; }); +/* harmony import */ var _ensure_yarn_integrity_exists__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(372); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ensureYarnIntegrityFileExists", function() { return _ensure_yarn_integrity_exists__WEBPACK_IMPORTED_MODULE_0__["ensureYarnIntegrityFileExists"]; }); + +/* harmony import */ var _get_cache_folders__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(373); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getBazelDiskCacheFolder", function() { return _get_cache_folders__WEBPACK_IMPORTED_MODULE_1__["getBazelDiskCacheFolder"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getBazelRepositoryCacheFolder", function() { return _get_cache_folders__WEBPACK_IMPORTED_MODULE_0__["getBazelRepositoryCacheFolder"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getBazelRepositoryCacheFolder", function() { return _get_cache_folders__WEBPACK_IMPORTED_MODULE_1__["getBazelRepositoryCacheFolder"]; }); -/* harmony import */ var _install_tools__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(373); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isBazelBinAvailable", function() { return _install_tools__WEBPACK_IMPORTED_MODULE_1__["isBazelBinAvailable"]; }); +/* harmony import */ var _install_tools__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(374); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isBazelBinAvailable", function() { return _install_tools__WEBPACK_IMPORTED_MODULE_2__["isBazelBinAvailable"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "installBazelTools", function() { return _install_tools__WEBPACK_IMPORTED_MODULE_1__["installBazelTools"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "installBazelTools", function() { return _install_tools__WEBPACK_IMPORTED_MODULE_2__["installBazelTools"]; }); -/* harmony import */ var _run__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(374); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "runBazel", function() { return _run__WEBPACK_IMPORTED_MODULE_2__["runBazel"]; }); +/* harmony import */ var _run__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(375); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "runBazel", function() { return _run__WEBPACK_IMPORTED_MODULE_3__["runBazel"]; }); /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one @@ -48040,10 +48064,39 @@ __webpack_require__.r(__webpack_exports__); + /***/ }), /* 372 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ensureYarnIntegrityFileExists", function() { return ensureYarnIntegrityFileExists; }); +/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4); +/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(131); +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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. + */ + + +async function ensureYarnIntegrityFileExists(nodeModulesPath) { + try { + await Object(_fs__WEBPACK_IMPORTED_MODULE_1__["writeFile"])(Object(path__WEBPACK_IMPORTED_MODULE_0__["join"])(nodeModulesPath, '.yarn-integrity'), '', { + flag: 'wx' + }); + } catch {// no-op + } +} + +/***/ }), +/* 373 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getBazelDiskCacheFolder", function() { return getBazelDiskCacheFolder; }); @@ -48078,7 +48131,7 @@ async function getBazelRepositoryCacheFolder() { } /***/ }), -/* 373 */ +/* 374 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -48197,7 +48250,7 @@ async function installBazelTools(repoRootPath) { } /***/ }), -/* 374 */ +/* 375 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -48206,8 +48259,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(113); /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8); -/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(375); -/* harmony import */ var _kbn_dev_utils_stdio__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(473); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(376); +/* harmony import */ var _kbn_dev_utils_stdio__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(474); /* harmony import */ var _kbn_dev_utils_stdio__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_kbn_dev_utils_stdio__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _child_process__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(319); /* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(246); @@ -48230,12 +48283,16 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope -async function runBazel(bazelArgs, runOpts = {}) { +async function runBazel(bazelArgs, offline = false, runOpts = {}) { // Force logs to pipe in order to control the output of them const bazelOpts = _objectSpread(_objectSpread({}, runOpts), {}, { stdio: 'pipe' }); + if (offline) { + bazelArgs.push('--config=offline'); + } + const bazelProc = Object(_child_process__WEBPACK_IMPORTED_MODULE_4__["spawn"])('bazel', bazelArgs, bazelOpts); const bazelLogs$ = new rxjs__WEBPACK_IMPORTED_MODULE_1__["Subject"](); // Bazel outputs machine readable output into stdout and human readable output goes to stderr. // Therefore we need to get both. In order to get errors we need to parse the actual text line @@ -48248,141 +48305,141 @@ async function runBazel(bazelArgs, runOpts = {}) { } /***/ }), -/* 375 */ +/* 376 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(376); +/* harmony import */ var _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(377); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "audit", function() { return _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__["audit"]; }); -/* harmony import */ var _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(377); +/* harmony import */ var _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(378); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__["auditTime"]; }); -/* harmony import */ var _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(378); +/* harmony import */ var _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(379); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__["buffer"]; }); -/* harmony import */ var _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(379); +/* harmony import */ var _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(380); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferCount", function() { return _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__["bufferCount"]; }); -/* harmony import */ var _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(380); +/* harmony import */ var _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(381); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferTime", function() { return _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__["bufferTime"]; }); -/* harmony import */ var _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(381); +/* harmony import */ var _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(382); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferToggle", function() { return _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__["bufferToggle"]; }); -/* harmony import */ var _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(382); +/* harmony import */ var _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(383); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferWhen", function() { return _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__["bufferWhen"]; }); -/* harmony import */ var _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(383); +/* harmony import */ var _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(384); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "catchError", function() { return _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__["catchError"]; }); -/* harmony import */ var _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(384); +/* harmony import */ var _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(385); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineAll", function() { return _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__["combineAll"]; }); -/* harmony import */ var _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(385); +/* harmony import */ var _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(386); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__["combineLatest"]; }); -/* harmony import */ var _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(386); +/* harmony import */ var _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(387); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__["concat"]; }); /* harmony import */ var _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(80); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatAll", function() { return _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__["concatAll"]; }); -/* harmony import */ var _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(387); +/* harmony import */ var _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(388); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMap", function() { return _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__["concatMap"]; }); -/* harmony import */ var _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(388); +/* harmony import */ var _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(389); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__["concatMapTo"]; }); -/* harmony import */ var _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(389); +/* harmony import */ var _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(390); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "count", function() { return _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__["count"]; }); -/* harmony import */ var _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(390); +/* harmony import */ var _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(391); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__["debounce"]; }); -/* harmony import */ var _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(391); +/* harmony import */ var _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(392); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__["debounceTime"]; }); -/* harmony import */ var _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(392); +/* harmony import */ var _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(393); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__["defaultIfEmpty"]; }); -/* harmony import */ var _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(393); +/* harmony import */ var _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(394); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__["delay"]; }); -/* harmony import */ var _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(395); +/* harmony import */ var _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(396); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delayWhen", function() { return _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__["delayWhen"]; }); -/* harmony import */ var _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(396); +/* harmony import */ var _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(397); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dematerialize", function() { return _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__["dematerialize"]; }); -/* harmony import */ var _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(397); +/* harmony import */ var _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(398); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinct", function() { return _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__["distinct"]; }); -/* harmony import */ var _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(398); +/* harmony import */ var _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(399); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function() { return _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__["distinctUntilChanged"]; }); -/* harmony import */ var _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(399); +/* harmony import */ var _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(400); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__["distinctUntilKeyChanged"]; }); -/* harmony import */ var _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(400); +/* harmony import */ var _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(401); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__["elementAt"]; }); -/* harmony import */ var _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(403); +/* harmony import */ var _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(404); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endWith", function() { return _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__["endWith"]; }); -/* harmony import */ var _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(404); +/* harmony import */ var _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(405); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "every", function() { return _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__["every"]; }); -/* harmony import */ var _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(405); +/* harmony import */ var _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(406); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaust", function() { return _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__["exhaust"]; }); -/* harmony import */ var _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(406); +/* harmony import */ var _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(407); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__["exhaustMap"]; }); -/* harmony import */ var _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(407); +/* harmony import */ var _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(408); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__["expand"]; }); /* harmony import */ var _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(105); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__["filter"]; }); -/* harmony import */ var _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(408); +/* harmony import */ var _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(409); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "finalize", function() { return _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__["finalize"]; }); -/* harmony import */ var _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(409); +/* harmony import */ var _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(410); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "find", function() { return _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__["find"]; }); -/* harmony import */ var _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(410); +/* harmony import */ var _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(411); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__["findIndex"]; }); -/* harmony import */ var _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(411); +/* harmony import */ var _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(412); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "first", function() { return _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__["first"]; }); /* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(31); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__["groupBy"]; }); -/* harmony import */ var _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(412); +/* harmony import */ var _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(413); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ignoreElements", function() { return _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__["ignoreElements"]; }); -/* harmony import */ var _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(413); +/* harmony import */ var _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(414); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__["isEmpty"]; }); -/* harmony import */ var _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(414); +/* harmony import */ var _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(415); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "last", function() { return _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__["last"]; }); /* harmony import */ var _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(66); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "map", function() { return _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__["map"]; }); -/* harmony import */ var _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(416); +/* harmony import */ var _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(417); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__["mapTo"]; }); -/* harmony import */ var _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(417); +/* harmony import */ var _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(418); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "materialize", function() { return _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__["materialize"]; }); -/* harmony import */ var _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(418); +/* harmony import */ var _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(419); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "max", function() { return _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__["max"]; }); -/* harmony import */ var _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(421); +/* harmony import */ var _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(422); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__["merge"]; }); /* harmony import */ var _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(81); @@ -48393,175 +48450,175 @@ __webpack_require__.r(__webpack_exports__); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flatMap", function() { return _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__["flatMap"]; }); -/* harmony import */ var _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(422); +/* harmony import */ var _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(423); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeMapTo", function() { return _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__["mergeMapTo"]; }); -/* harmony import */ var _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(423); +/* harmony import */ var _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(424); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__["mergeScan"]; }); -/* harmony import */ var _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(424); +/* harmony import */ var _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(425); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "min", function() { return _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__["min"]; }); -/* harmony import */ var _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(425); +/* harmony import */ var _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(426); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "multicast", function() { return _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__["multicast"]; }); /* harmony import */ var _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(41); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "observeOn", function() { return _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__["observeOn"]; }); -/* harmony import */ var _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(426); +/* harmony import */ var _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(427); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__["onErrorResumeNext"]; }); -/* harmony import */ var _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(427); +/* harmony import */ var _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(428); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairwise", function() { return _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__["pairwise"]; }); -/* harmony import */ var _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(428); +/* harmony import */ var _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(429); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__["partition"]; }); -/* harmony import */ var _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(429); +/* harmony import */ var _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(430); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__["pluck"]; }); -/* harmony import */ var _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(430); +/* harmony import */ var _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(431); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__["publish"]; }); -/* harmony import */ var _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(431); +/* harmony import */ var _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(432); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__["publishBehavior"]; }); -/* harmony import */ var _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(432); +/* harmony import */ var _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(433); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__["publishLast"]; }); -/* harmony import */ var _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(433); +/* harmony import */ var _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(434); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__["publishReplay"]; }); -/* harmony import */ var _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(434); +/* harmony import */ var _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(435); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "race", function() { return _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__["race"]; }); -/* harmony import */ var _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(419); +/* harmony import */ var _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(420); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__["reduce"]; }); -/* harmony import */ var _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(435); +/* harmony import */ var _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(436); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__["repeat"]; }); -/* harmony import */ var _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(436); +/* harmony import */ var _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(437); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeatWhen", function() { return _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__["repeatWhen"]; }); -/* harmony import */ var _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(437); +/* harmony import */ var _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(438); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retry", function() { return _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__["retry"]; }); -/* harmony import */ var _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(438); +/* harmony import */ var _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(439); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__["retryWhen"]; }); /* harmony import */ var _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(30); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refCount", function() { return _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__["refCount"]; }); -/* harmony import */ var _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(439); +/* harmony import */ var _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(440); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__["sample"]; }); -/* harmony import */ var _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(440); +/* harmony import */ var _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(441); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__["sampleTime"]; }); -/* harmony import */ var _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(420); +/* harmony import */ var _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(421); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__["scan"]; }); -/* harmony import */ var _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(441); +/* harmony import */ var _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(442); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__["sequenceEqual"]; }); -/* harmony import */ var _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(442); +/* harmony import */ var _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(443); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "share", function() { return _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__["share"]; }); -/* harmony import */ var _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(443); +/* harmony import */ var _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(444); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shareReplay", function() { return _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__["shareReplay"]; }); -/* harmony import */ var _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(444); +/* harmony import */ var _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(445); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "single", function() { return _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__["single"]; }); -/* harmony import */ var _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(445); +/* harmony import */ var _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(446); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skip", function() { return _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__["skip"]; }); -/* harmony import */ var _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(446); +/* harmony import */ var _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(447); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipLast", function() { return _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__["skipLast"]; }); -/* harmony import */ var _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(447); +/* harmony import */ var _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(448); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipUntil", function() { return _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__["skipUntil"]; }); -/* harmony import */ var _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(448); +/* harmony import */ var _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(449); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipWhile", function() { return _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__["skipWhile"]; }); -/* harmony import */ var _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(449); +/* harmony import */ var _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(450); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startWith", function() { return _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__["startWith"]; }); -/* harmony import */ var _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(450); +/* harmony import */ var _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(451); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__["subscribeOn"]; }); -/* harmony import */ var _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(452); +/* harmony import */ var _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(453); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__["switchAll"]; }); -/* harmony import */ var _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(453); +/* harmony import */ var _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(454); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__["switchMap"]; }); -/* harmony import */ var _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(454); +/* harmony import */ var _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(455); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__["switchMapTo"]; }); -/* harmony import */ var _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(402); +/* harmony import */ var _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(403); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "take", function() { return _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__["take"]; }); -/* harmony import */ var _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(415); +/* harmony import */ var _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(416); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__["takeLast"]; }); -/* harmony import */ var _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(455); +/* harmony import */ var _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(456); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__["takeUntil"]; }); -/* harmony import */ var _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(456); +/* harmony import */ var _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(457); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__["takeWhile"]; }); -/* harmony import */ var _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(457); +/* harmony import */ var _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(458); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__["tap"]; }); -/* harmony import */ var _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(458); +/* harmony import */ var _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(459); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__["throttle"]; }); -/* harmony import */ var _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(459); +/* harmony import */ var _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(460); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttleTime", function() { return _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__["throttleTime"]; }); -/* harmony import */ var _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(401); +/* harmony import */ var _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(402); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__["throwIfEmpty"]; }); -/* harmony import */ var _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(460); +/* harmony import */ var _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(461); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__["timeInterval"]; }); -/* harmony import */ var _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(461); +/* harmony import */ var _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(462); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__["timeout"]; }); -/* harmony import */ var _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(462); +/* harmony import */ var _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(463); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__["timeoutWith"]; }); -/* harmony import */ var _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(463); +/* harmony import */ var _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(464); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timestamp", function() { return _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__["timestamp"]; }); -/* harmony import */ var _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(464); +/* harmony import */ var _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(465); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__["toArray"]; }); -/* harmony import */ var _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(465); +/* harmony import */ var _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(466); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "window", function() { return _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__["window"]; }); -/* harmony import */ var _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(466); +/* harmony import */ var _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(467); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowCount", function() { return _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__["windowCount"]; }); -/* harmony import */ var _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(467); +/* harmony import */ var _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(468); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowTime", function() { return _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__["windowTime"]; }); -/* harmony import */ var _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(468); +/* harmony import */ var _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(469); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowToggle", function() { return _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__["windowToggle"]; }); -/* harmony import */ var _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(469); +/* harmony import */ var _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(470); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowWhen", function() { return _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__["windowWhen"]; }); -/* harmony import */ var _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(470); +/* harmony import */ var _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(471); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withLatestFrom", function() { return _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__["withLatestFrom"]; }); -/* harmony import */ var _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(471); +/* harmony import */ var _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(472); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__["zip"]; }); -/* harmony import */ var _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(472); +/* harmony import */ var _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(473); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zipAll", function() { return _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__["zipAll"]; }); /** PURE_IMPORTS_START PURE_IMPORTS_END */ @@ -48672,7 +48729,7 @@ __webpack_require__.r(__webpack_exports__); /***/ }), -/* 376 */ +/* 377 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -48751,14 +48808,14 @@ var AuditSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 377 */ +/* 378 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return auditTime; }); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55); -/* harmony import */ var _audit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(376); +/* harmony import */ var _audit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(377); /* harmony import */ var _observable_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(108); /** PURE_IMPORTS_START _scheduler_async,_audit,_observable_timer PURE_IMPORTS_END */ @@ -48774,7 +48831,7 @@ function auditTime(duration, scheduler) { /***/ }), -/* 378 */ +/* 379 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -48821,7 +48878,7 @@ var BufferSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 379 */ +/* 380 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -48922,7 +48979,7 @@ var BufferSkipCountSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 380 */ +/* 381 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -49083,7 +49140,7 @@ function dispatchBufferClose(arg) { /***/ }), -/* 381 */ +/* 382 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -49202,7 +49259,7 @@ var BufferToggleSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 382 */ +/* 383 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -49295,7 +49352,7 @@ var BufferWhenSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 383 */ +/* 384 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -49355,7 +49412,7 @@ var CatchSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 384 */ +/* 385 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -49371,7 +49428,7 @@ function combineAll(project) { /***/ }), -/* 385 */ +/* 386 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -49403,7 +49460,7 @@ function combineLatest() { /***/ }), -/* 386 */ +/* 387 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -49423,7 +49480,7 @@ function concat() { /***/ }), -/* 387 */ +/* 388 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -49439,13 +49496,13 @@ function concatMap(project, resultSelector) { /***/ }), -/* 388 */ +/* 389 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return concatMapTo; }); -/* harmony import */ var _concatMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(387); +/* harmony import */ var _concatMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(388); /** PURE_IMPORTS_START _concatMap PURE_IMPORTS_END */ function concatMapTo(innerObservable, resultSelector) { @@ -49455,7 +49512,7 @@ function concatMapTo(innerObservable, resultSelector) { /***/ }), -/* 389 */ +/* 390 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -49520,7 +49577,7 @@ var CountSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 390 */ +/* 391 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -49605,7 +49662,7 @@ var DebounceSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 391 */ +/* 392 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -49681,7 +49738,7 @@ function dispatchNext(subscriber) { /***/ }), -/* 392 */ +/* 393 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -49731,7 +49788,7 @@ var DefaultIfEmptySubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 393 */ +/* 394 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -49739,7 +49796,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return delay; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55); -/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(394); +/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(395); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(11); /* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(42); /** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_Subscriber,_Notification PURE_IMPORTS_END */ @@ -49838,7 +49895,7 @@ var DelayMessage = /*@__PURE__*/ (function () { /***/ }), -/* 394 */ +/* 395 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -49852,7 +49909,7 @@ function isDate(value) { /***/ }), -/* 395 */ +/* 396 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -49998,7 +50055,7 @@ var SubscriptionDelaySubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 396 */ +/* 397 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -50036,7 +50093,7 @@ var DeMaterializeSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 397 */ +/* 398 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -50112,7 +50169,7 @@ var DistinctSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 398 */ +/* 399 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -50183,13 +50240,13 @@ var DistinctUntilChangedSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 399 */ +/* 400 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return distinctUntilKeyChanged; }); -/* harmony import */ var _distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(398); +/* harmony import */ var _distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(399); /** PURE_IMPORTS_START _distinctUntilChanged PURE_IMPORTS_END */ function distinctUntilKeyChanged(key, compare) { @@ -50199,7 +50256,7 @@ function distinctUntilKeyChanged(key, compare) { /***/ }), -/* 400 */ +/* 401 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -50207,9 +50264,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return elementAt; }); /* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62); /* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(105); -/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(401); -/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(392); -/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(402); +/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(402); +/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(393); +/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(403); /** PURE_IMPORTS_START _util_ArgumentOutOfRangeError,_filter,_throwIfEmpty,_defaultIfEmpty,_take PURE_IMPORTS_END */ @@ -50231,7 +50288,7 @@ function elementAt(index, defaultValue) { /***/ }), -/* 401 */ +/* 402 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -50297,7 +50354,7 @@ function defaultErrorFactory() { /***/ }), -/* 402 */ +/* 403 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -50359,7 +50416,7 @@ var TakeSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 403 */ +/* 404 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -50381,7 +50438,7 @@ function endWith() { /***/ }), -/* 404 */ +/* 405 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -50443,7 +50500,7 @@ var EverySubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 405 */ +/* 406 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -50497,7 +50554,7 @@ var SwitchFirstSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 406 */ +/* 407 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -50591,7 +50648,7 @@ var ExhaustMapSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 407 */ +/* 408 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -50703,7 +50760,7 @@ var ExpandSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 408 */ +/* 409 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -50741,7 +50798,7 @@ var FinallySubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 409 */ +/* 410 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -50813,13 +50870,13 @@ var FindValueSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 410 */ +/* 411 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return findIndex; }); -/* harmony import */ var _operators_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(409); +/* harmony import */ var _operators_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(410); /** PURE_IMPORTS_START _operators_find PURE_IMPORTS_END */ function findIndex(predicate, thisArg) { @@ -50829,7 +50886,7 @@ function findIndex(predicate, thisArg) { /***/ }), -/* 411 */ +/* 412 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -50837,9 +50894,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "first", function() { return first; }); /* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63); /* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(105); -/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(402); -/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(392); -/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(401); +/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(403); +/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(393); +/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(402); /* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(25); /** PURE_IMPORTS_START _util_EmptyError,_filter,_take,_defaultIfEmpty,_throwIfEmpty,_util_identity PURE_IMPORTS_END */ @@ -50856,7 +50913,7 @@ function first(predicate, defaultValue) { /***/ }), -/* 412 */ +/* 413 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -50893,7 +50950,7 @@ var IgnoreElementsSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 413 */ +/* 414 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -50937,7 +50994,7 @@ var IsEmptySubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 414 */ +/* 415 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -50945,9 +51002,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "last", function() { return last; }); /* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63); /* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(105); -/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(415); -/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(401); -/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(392); +/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(416); +/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(402); +/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(393); /* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(25); /** PURE_IMPORTS_START _util_EmptyError,_filter,_takeLast,_throwIfEmpty,_defaultIfEmpty,_util_identity PURE_IMPORTS_END */ @@ -50964,7 +51021,7 @@ function last(predicate, defaultValue) { /***/ }), -/* 415 */ +/* 416 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -51041,7 +51098,7 @@ var TakeLastSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 416 */ +/* 417 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -51080,7 +51137,7 @@ var MapToSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 417 */ +/* 418 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -51130,13 +51187,13 @@ var MaterializeSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 418 */ +/* 419 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return max; }); -/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(419); +/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(420); /** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */ function max(comparer) { @@ -51149,15 +51206,15 @@ function max(comparer) { /***/ }), -/* 419 */ +/* 420 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return reduce; }); -/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(420); -/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(415); -/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(392); +/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(421); +/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(416); +/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(393); /* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(24); /** PURE_IMPORTS_START _scan,_takeLast,_defaultIfEmpty,_util_pipe PURE_IMPORTS_END */ @@ -51178,7 +51235,7 @@ function reduce(accumulator, seed) { /***/ }), -/* 420 */ +/* 421 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -51260,7 +51317,7 @@ var ScanSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 421 */ +/* 422 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -51280,7 +51337,7 @@ function merge() { /***/ }), -/* 422 */ +/* 423 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -51305,7 +51362,7 @@ function mergeMapTo(innerObservable, resultSelector, concurrent) { /***/ }), -/* 423 */ +/* 424 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -51414,13 +51471,13 @@ var MergeScanSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 424 */ +/* 425 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "min", function() { return min; }); -/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(419); +/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(420); /** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */ function min(comparer) { @@ -51433,7 +51490,7 @@ function min(comparer) { /***/ }), -/* 425 */ +/* 426 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -51482,7 +51539,7 @@ var MulticastOperator = /*@__PURE__*/ (function () { /***/ }), -/* 426 */ +/* 427 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -51572,7 +51629,7 @@ var OnErrorResumeNextSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 427 */ +/* 428 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -51620,7 +51677,7 @@ var PairwiseSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 428 */ +/* 429 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -51643,7 +51700,7 @@ function partition(predicate, thisArg) { /***/ }), -/* 429 */ +/* 430 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -51683,14 +51740,14 @@ function plucker(props, length) { /***/ }), -/* 430 */ +/* 431 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return publish; }); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27); -/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(425); +/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(426); /** PURE_IMPORTS_START _Subject,_multicast PURE_IMPORTS_END */ @@ -51703,14 +51760,14 @@ function publish(selector) { /***/ }), -/* 431 */ +/* 432 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return publishBehavior; }); /* harmony import */ var _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(32); -/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(425); +/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(426); /** PURE_IMPORTS_START _BehaviorSubject,_multicast PURE_IMPORTS_END */ @@ -51721,14 +51778,14 @@ function publishBehavior(value) { /***/ }), -/* 432 */ +/* 433 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return publishLast; }); /* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50); -/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(425); +/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(426); /** PURE_IMPORTS_START _AsyncSubject,_multicast PURE_IMPORTS_END */ @@ -51739,14 +51796,14 @@ function publishLast() { /***/ }), -/* 433 */ +/* 434 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return publishReplay; }); /* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(33); -/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(425); +/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(426); /** PURE_IMPORTS_START _ReplaySubject,_multicast PURE_IMPORTS_END */ @@ -51762,7 +51819,7 @@ function publishReplay(bufferSize, windowTime, selectorOrScheduler, scheduler) { /***/ }), -/* 434 */ +/* 435 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -51789,7 +51846,7 @@ function race() { /***/ }), -/* 435 */ +/* 436 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -51854,7 +51911,7 @@ var RepeatSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 436 */ +/* 437 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -51948,7 +52005,7 @@ var RepeatWhenSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 437 */ +/* 438 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -52001,7 +52058,7 @@ var RetrySubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 438 */ +/* 439 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -52087,7 +52144,7 @@ var RetryWhenSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 439 */ +/* 440 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -52142,7 +52199,7 @@ var SampleSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 440 */ +/* 441 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -52202,7 +52259,7 @@ function dispatchNotification(state) { /***/ }), -/* 441 */ +/* 442 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -52325,13 +52382,13 @@ var SequenceEqualCompareToSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 442 */ +/* 443 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "share", function() { return share; }); -/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(425); +/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(426); /* harmony import */ var _refCount__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27); /** PURE_IMPORTS_START _multicast,_refCount,_Subject PURE_IMPORTS_END */ @@ -52348,7 +52405,7 @@ function share() { /***/ }), -/* 443 */ +/* 444 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -52417,7 +52474,7 @@ function shareReplayOperator(_a) { /***/ }), -/* 444 */ +/* 445 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -52497,7 +52554,7 @@ var SingleSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 445 */ +/* 446 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -52539,7 +52596,7 @@ var SkipSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 446 */ +/* 447 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -52601,7 +52658,7 @@ var SkipLastSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 447 */ +/* 448 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -52658,7 +52715,7 @@ var SkipUntilSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 448 */ +/* 449 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -52714,7 +52771,7 @@ var SkipWhileSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 449 */ +/* 450 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -52743,13 +52800,13 @@ function startWith() { /***/ }), -/* 450 */ +/* 451 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return subscribeOn; }); -/* harmony import */ var _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(451); +/* harmony import */ var _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(452); /** PURE_IMPORTS_START _observable_SubscribeOnObservable PURE_IMPORTS_END */ function subscribeOn(scheduler, delay) { @@ -52774,7 +52831,7 @@ var SubscribeOnOperator = /*@__PURE__*/ (function () { /***/ }), -/* 451 */ +/* 452 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -52838,13 +52895,13 @@ var SubscribeOnObservable = /*@__PURE__*/ (function (_super) { /***/ }), -/* 452 */ +/* 453 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return switchAll; }); -/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(453); +/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(454); /* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(25); /** PURE_IMPORTS_START _switchMap,_util_identity PURE_IMPORTS_END */ @@ -52856,7 +52913,7 @@ function switchAll() { /***/ }), -/* 453 */ +/* 454 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -52944,13 +53001,13 @@ var SwitchMapSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 454 */ +/* 455 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return switchMapTo; }); -/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(453); +/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(454); /** PURE_IMPORTS_START _switchMap PURE_IMPORTS_END */ function switchMapTo(innerObservable, resultSelector) { @@ -52960,7 +53017,7 @@ function switchMapTo(innerObservable, resultSelector) { /***/ }), -/* 455 */ +/* 456 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -53008,7 +53065,7 @@ var TakeUntilSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 456 */ +/* 457 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -53076,7 +53133,7 @@ var TakeWhileSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 457 */ +/* 458 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -53164,7 +53221,7 @@ var TapSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 458 */ +/* 459 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -53266,7 +53323,7 @@ var ThrottleSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 459 */ +/* 460 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -53275,7 +53332,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55); -/* harmony import */ var _throttle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(458); +/* harmony import */ var _throttle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(459); /** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async,_throttle PURE_IMPORTS_END */ @@ -53364,7 +53421,7 @@ function dispatchNext(arg) { /***/ }), -/* 460 */ +/* 461 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -53372,7 +53429,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return timeInterval; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeInterval", function() { return TimeInterval; }); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55); -/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(420); +/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(421); /* harmony import */ var _observable_defer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(91); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(66); /** PURE_IMPORTS_START _scheduler_async,_scan,_observable_defer,_map PURE_IMPORTS_END */ @@ -53408,7 +53465,7 @@ var TimeInterval = /*@__PURE__*/ (function () { /***/ }), -/* 461 */ +/* 462 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -53416,7 +53473,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return timeout; }); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55); /* harmony import */ var _util_TimeoutError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(64); -/* harmony import */ var _timeoutWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(462); +/* harmony import */ var _timeoutWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(463); /* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49); /** PURE_IMPORTS_START _scheduler_async,_util_TimeoutError,_timeoutWith,_observable_throwError PURE_IMPORTS_END */ @@ -53433,7 +53490,7 @@ function timeout(due, scheduler) { /***/ }), -/* 462 */ +/* 463 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -53441,7 +53498,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return timeoutWith; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55); -/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(394); +/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(395); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(90); /** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_innerSubscribe PURE_IMPORTS_END */ @@ -53512,7 +53569,7 @@ var TimeoutWithSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 463 */ +/* 464 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -53542,13 +53599,13 @@ var Timestamp = /*@__PURE__*/ (function () { /***/ }), -/* 464 */ +/* 465 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return toArray; }); -/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(419); +/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(420); /** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */ function toArrayReducer(arr, item, index) { @@ -53565,7 +53622,7 @@ function toArray() { /***/ }), -/* 465 */ +/* 466 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -53643,7 +53700,7 @@ var WindowSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 466 */ +/* 467 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -53733,7 +53790,7 @@ var WindowCountSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 467 */ +/* 468 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -53903,7 +53960,7 @@ function dispatchWindowClose(state) { /***/ }), -/* 468 */ +/* 469 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -54046,7 +54103,7 @@ var WindowToggleSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 469 */ +/* 470 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -54143,7 +54200,7 @@ var WindowSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 470 */ +/* 471 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -54238,7 +54295,7 @@ var WithLatestFromSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 471 */ +/* 472 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -54260,7 +54317,7 @@ function zip() { /***/ }), -/* 472 */ +/* 473 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -54276,7 +54333,7 @@ function zipAll(project) { /***/ }), -/* 473 */ +/* 474 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -54290,12 +54347,12 @@ function zipAll(project) { */ Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = __webpack_require__(7); -tslib_1.__exportStar(__webpack_require__(474), exports); tslib_1.__exportStar(__webpack_require__(475), exports); +tslib_1.__exportStar(__webpack_require__(476), exports); /***/ }), -/* 474 */ +/* 475 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -54311,9 +54368,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.observeLines = void 0; const tslib_1 = __webpack_require__(7); const Rx = tslib_1.__importStar(__webpack_require__(8)); -const operators_1 = __webpack_require__(375); +const operators_1 = __webpack_require__(376); const SEP = /\r?\n/; -const observe_readable_1 = __webpack_require__(475); +const observe_readable_1 = __webpack_require__(476); /** * Creates an Observable from a Readable Stream that: * - splits data from `readable` into lines @@ -54354,7 +54411,7 @@ exports.observeLines = observeLines; /***/ }), -/* 475 */ +/* 476 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -54370,7 +54427,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.observeReadable = void 0; const tslib_1 = __webpack_require__(7); const Rx = tslib_1.__importStar(__webpack_require__(8)); -const operators_1 = __webpack_require__(375); +const operators_1 = __webpack_require__(376); /** * Produces an Observable from a ReadableSteam that: * - completes on the first "end" event @@ -54383,7 +54440,7 @@ exports.observeReadable = observeReadable; /***/ }), -/* 476 */ +/* 477 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -54393,7 +54450,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var dedent__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dedent__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(143); /* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(del__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var ora__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(477); +/* harmony import */ var ora__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(478); /* harmony import */ var ora__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ora__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_3__); @@ -54496,20 +54553,20 @@ const CleanCommand = { }; /***/ }), -/* 477 */ +/* 478 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const readline = __webpack_require__(478); -const chalk = __webpack_require__(479); -const cliCursor = __webpack_require__(486); -const cliSpinners = __webpack_require__(488); -const logSymbols = __webpack_require__(490); -const stripAnsi = __webpack_require__(500); -const wcwidth = __webpack_require__(502); -const isInteractive = __webpack_require__(506); -const MuteStream = __webpack_require__(507); +const readline = __webpack_require__(479); +const chalk = __webpack_require__(480); +const cliCursor = __webpack_require__(487); +const cliSpinners = __webpack_require__(489); +const logSymbols = __webpack_require__(491); +const stripAnsi = __webpack_require__(501); +const wcwidth = __webpack_require__(503); +const isInteractive = __webpack_require__(507); +const MuteStream = __webpack_require__(508); const TEXT = Symbol('text'); const PREFIX_TEXT = Symbol('prefixText'); @@ -54862,23 +54919,23 @@ module.exports.promise = (action, options) => { /***/ }), -/* 478 */ +/* 479 */ /***/ (function(module, exports) { module.exports = require("readline"); /***/ }), -/* 479 */ +/* 480 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const ansiStyles = __webpack_require__(480); +const ansiStyles = __webpack_require__(481); const {stdout: stdoutColor, stderr: stderrColor} = __webpack_require__(120); const { stringReplaceAll, stringEncaseCRLFWithFirstIndex -} = __webpack_require__(484); +} = __webpack_require__(485); // `supportsColor.level` → `ansiStyles.color[name]` mapping const levelMapping = [ @@ -55079,7 +55136,7 @@ const chalkTag = (chalk, ...strings) => { } if (template === undefined) { - template = __webpack_require__(485); + template = __webpack_require__(486); } return template(chalk, parts.join('')); @@ -55108,7 +55165,7 @@ module.exports = chalk; /***/ }), -/* 480 */ +/* 481 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -55154,7 +55211,7 @@ const setLazyProperty = (object, property, get) => { let colorConvert; const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => { if (colorConvert === undefined) { - colorConvert = __webpack_require__(481); + colorConvert = __webpack_require__(482); } const offset = isBackground ? 10 : 0; @@ -55279,11 +55336,11 @@ Object.defineProperty(module, 'exports', { /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(115)(module))) /***/ }), -/* 481 */ +/* 482 */ /***/ (function(module, exports, __webpack_require__) { -const conversions = __webpack_require__(482); -const route = __webpack_require__(483); +const conversions = __webpack_require__(483); +const route = __webpack_require__(484); const convert = {}; @@ -55366,7 +55423,7 @@ module.exports = convert; /***/ }), -/* 482 */ +/* 483 */ /***/ (function(module, exports, __webpack_require__) { /* MIT license */ @@ -56211,10 +56268,10 @@ convert.rgb.gray = function (rgb) { /***/ }), -/* 483 */ +/* 484 */ /***/ (function(module, exports, __webpack_require__) { -const conversions = __webpack_require__(482); +const conversions = __webpack_require__(483); /* This function routes a model to all other models. @@ -56314,7 +56371,7 @@ module.exports = function (fromModel) { /***/ }), -/* 484 */ +/* 485 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -56360,7 +56417,7 @@ module.exports = { /***/ }), -/* 485 */ +/* 486 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -56501,12 +56558,12 @@ module.exports = (chalk, temporary) => { /***/ }), -/* 486 */ +/* 487 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const restoreCursor = __webpack_require__(487); +const restoreCursor = __webpack_require__(488); let isHidden = false; @@ -56543,7 +56600,7 @@ exports.toggle = (force, writableStream) => { /***/ }), -/* 487 */ +/* 488 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -56559,13 +56616,13 @@ module.exports = onetime(() => { /***/ }), -/* 488 */ +/* 489 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const spinners = Object.assign({}, __webpack_require__(489)); +const spinners = Object.assign({}, __webpack_require__(490)); const spinnersList = Object.keys(spinners); @@ -56583,18 +56640,18 @@ module.exports.default = spinners; /***/ }), -/* 489 */ +/* 490 */ /***/ (function(module) { module.exports = JSON.parse("{\"dots\":{\"interval\":80,\"frames\":[\"⠋\",\"⠙\",\"⠹\",\"⠸\",\"⠼\",\"⠴\",\"⠦\",\"⠧\",\"⠇\",\"⠏\"]},\"dots2\":{\"interval\":80,\"frames\":[\"⣾\",\"⣽\",\"⣻\",\"⢿\",\"⡿\",\"⣟\",\"⣯\",\"⣷\"]},\"dots3\":{\"interval\":80,\"frames\":[\"⠋\",\"⠙\",\"⠚\",\"⠞\",\"⠖\",\"⠦\",\"⠴\",\"⠲\",\"⠳\",\"⠓\"]},\"dots4\":{\"interval\":80,\"frames\":[\"⠄\",\"⠆\",\"⠇\",\"⠋\",\"⠙\",\"⠸\",\"⠰\",\"⠠\",\"⠰\",\"⠸\",\"⠙\",\"⠋\",\"⠇\",\"⠆\"]},\"dots5\":{\"interval\":80,\"frames\":[\"⠋\",\"⠙\",\"⠚\",\"⠒\",\"⠂\",\"⠂\",\"⠒\",\"⠲\",\"⠴\",\"⠦\",\"⠖\",\"⠒\",\"⠐\",\"⠐\",\"⠒\",\"⠓\",\"⠋\"]},\"dots6\":{\"interval\":80,\"frames\":[\"⠁\",\"⠉\",\"⠙\",\"⠚\",\"⠒\",\"⠂\",\"⠂\",\"⠒\",\"⠲\",\"⠴\",\"⠤\",\"⠄\",\"⠄\",\"⠤\",\"⠴\",\"⠲\",\"⠒\",\"⠂\",\"⠂\",\"⠒\",\"⠚\",\"⠙\",\"⠉\",\"⠁\"]},\"dots7\":{\"interval\":80,\"frames\":[\"⠈\",\"⠉\",\"⠋\",\"⠓\",\"⠒\",\"⠐\",\"⠐\",\"⠒\",\"⠖\",\"⠦\",\"⠤\",\"⠠\",\"⠠\",\"⠤\",\"⠦\",\"⠖\",\"⠒\",\"⠐\",\"⠐\",\"⠒\",\"⠓\",\"⠋\",\"⠉\",\"⠈\"]},\"dots8\":{\"interval\":80,\"frames\":[\"⠁\",\"⠁\",\"⠉\",\"⠙\",\"⠚\",\"⠒\",\"⠂\",\"⠂\",\"⠒\",\"⠲\",\"⠴\",\"⠤\",\"⠄\",\"⠄\",\"⠤\",\"⠠\",\"⠠\",\"⠤\",\"⠦\",\"⠖\",\"⠒\",\"⠐\",\"⠐\",\"⠒\",\"⠓\",\"⠋\",\"⠉\",\"⠈\",\"⠈\"]},\"dots9\":{\"interval\":80,\"frames\":[\"⢹\",\"⢺\",\"⢼\",\"⣸\",\"⣇\",\"⡧\",\"⡗\",\"⡏\"]},\"dots10\":{\"interval\":80,\"frames\":[\"⢄\",\"⢂\",\"⢁\",\"⡁\",\"⡈\",\"⡐\",\"⡠\"]},\"dots11\":{\"interval\":100,\"frames\":[\"⠁\",\"⠂\",\"⠄\",\"⡀\",\"⢀\",\"⠠\",\"⠐\",\"⠈\"]},\"dots12\":{\"interval\":80,\"frames\":[\"⢀⠀\",\"⡀⠀\",\"⠄⠀\",\"⢂⠀\",\"⡂⠀\",\"⠅⠀\",\"⢃⠀\",\"⡃⠀\",\"⠍⠀\",\"⢋⠀\",\"⡋⠀\",\"⠍⠁\",\"⢋⠁\",\"⡋⠁\",\"⠍⠉\",\"⠋⠉\",\"⠋⠉\",\"⠉⠙\",\"⠉⠙\",\"⠉⠩\",\"⠈⢙\",\"⠈⡙\",\"⢈⠩\",\"⡀⢙\",\"⠄⡙\",\"⢂⠩\",\"⡂⢘\",\"⠅⡘\",\"⢃⠨\",\"⡃⢐\",\"⠍⡐\",\"⢋⠠\",\"⡋⢀\",\"⠍⡁\",\"⢋⠁\",\"⡋⠁\",\"⠍⠉\",\"⠋⠉\",\"⠋⠉\",\"⠉⠙\",\"⠉⠙\",\"⠉⠩\",\"⠈⢙\",\"⠈⡙\",\"⠈⠩\",\"⠀⢙\",\"⠀⡙\",\"⠀⠩\",\"⠀⢘\",\"⠀⡘\",\"⠀⠨\",\"⠀⢐\",\"⠀⡐\",\"⠀⠠\",\"⠀⢀\",\"⠀⡀\"]},\"dots8Bit\":{\"interval\":80,\"frames\":[\"⠀\",\"⠁\",\"⠂\",\"⠃\",\"⠄\",\"⠅\",\"⠆\",\"⠇\",\"⡀\",\"⡁\",\"⡂\",\"⡃\",\"⡄\",\"⡅\",\"⡆\",\"⡇\",\"⠈\",\"⠉\",\"⠊\",\"⠋\",\"⠌\",\"⠍\",\"⠎\",\"⠏\",\"⡈\",\"⡉\",\"⡊\",\"⡋\",\"⡌\",\"⡍\",\"⡎\",\"⡏\",\"⠐\",\"⠑\",\"⠒\",\"⠓\",\"⠔\",\"⠕\",\"⠖\",\"⠗\",\"⡐\",\"⡑\",\"⡒\",\"⡓\",\"⡔\",\"⡕\",\"⡖\",\"⡗\",\"⠘\",\"⠙\",\"⠚\",\"⠛\",\"⠜\",\"⠝\",\"⠞\",\"⠟\",\"⡘\",\"⡙\",\"⡚\",\"⡛\",\"⡜\",\"⡝\",\"⡞\",\"⡟\",\"⠠\",\"⠡\",\"⠢\",\"⠣\",\"⠤\",\"⠥\",\"⠦\",\"⠧\",\"⡠\",\"⡡\",\"⡢\",\"⡣\",\"⡤\",\"⡥\",\"⡦\",\"⡧\",\"⠨\",\"⠩\",\"⠪\",\"⠫\",\"⠬\",\"⠭\",\"⠮\",\"⠯\",\"⡨\",\"⡩\",\"⡪\",\"⡫\",\"⡬\",\"⡭\",\"⡮\",\"⡯\",\"⠰\",\"⠱\",\"⠲\",\"⠳\",\"⠴\",\"⠵\",\"⠶\",\"⠷\",\"⡰\",\"⡱\",\"⡲\",\"⡳\",\"⡴\",\"⡵\",\"⡶\",\"⡷\",\"⠸\",\"⠹\",\"⠺\",\"⠻\",\"⠼\",\"⠽\",\"⠾\",\"⠿\",\"⡸\",\"⡹\",\"⡺\",\"⡻\",\"⡼\",\"⡽\",\"⡾\",\"⡿\",\"⢀\",\"⢁\",\"⢂\",\"⢃\",\"⢄\",\"⢅\",\"⢆\",\"⢇\",\"⣀\",\"⣁\",\"⣂\",\"⣃\",\"⣄\",\"⣅\",\"⣆\",\"⣇\",\"⢈\",\"⢉\",\"⢊\",\"⢋\",\"⢌\",\"⢍\",\"⢎\",\"⢏\",\"⣈\",\"⣉\",\"⣊\",\"⣋\",\"⣌\",\"⣍\",\"⣎\",\"⣏\",\"⢐\",\"⢑\",\"⢒\",\"⢓\",\"⢔\",\"⢕\",\"⢖\",\"⢗\",\"⣐\",\"⣑\",\"⣒\",\"⣓\",\"⣔\",\"⣕\",\"⣖\",\"⣗\",\"⢘\",\"⢙\",\"⢚\",\"⢛\",\"⢜\",\"⢝\",\"⢞\",\"⢟\",\"⣘\",\"⣙\",\"⣚\",\"⣛\",\"⣜\",\"⣝\",\"⣞\",\"⣟\",\"⢠\",\"⢡\",\"⢢\",\"⢣\",\"⢤\",\"⢥\",\"⢦\",\"⢧\",\"⣠\",\"⣡\",\"⣢\",\"⣣\",\"⣤\",\"⣥\",\"⣦\",\"⣧\",\"⢨\",\"⢩\",\"⢪\",\"⢫\",\"⢬\",\"⢭\",\"⢮\",\"⢯\",\"⣨\",\"⣩\",\"⣪\",\"⣫\",\"⣬\",\"⣭\",\"⣮\",\"⣯\",\"⢰\",\"⢱\",\"⢲\",\"⢳\",\"⢴\",\"⢵\",\"⢶\",\"⢷\",\"⣰\",\"⣱\",\"⣲\",\"⣳\",\"⣴\",\"⣵\",\"⣶\",\"⣷\",\"⢸\",\"⢹\",\"⢺\",\"⢻\",\"⢼\",\"⢽\",\"⢾\",\"⢿\",\"⣸\",\"⣹\",\"⣺\",\"⣻\",\"⣼\",\"⣽\",\"⣾\",\"⣿\"]},\"line\":{\"interval\":130,\"frames\":[\"-\",\"\\\\\",\"|\",\"/\"]},\"line2\":{\"interval\":100,\"frames\":[\"⠂\",\"-\",\"–\",\"—\",\"–\",\"-\"]},\"pipe\":{\"interval\":100,\"frames\":[\"┤\",\"┘\",\"┴\",\"└\",\"├\",\"┌\",\"┬\",\"┐\"]},\"simpleDots\":{\"interval\":400,\"frames\":[\". \",\".. \",\"...\",\" \"]},\"simpleDotsScrolling\":{\"interval\":200,\"frames\":[\". \",\".. \",\"...\",\" ..\",\" .\",\" \"]},\"star\":{\"interval\":70,\"frames\":[\"✶\",\"✸\",\"✹\",\"✺\",\"✹\",\"✷\"]},\"star2\":{\"interval\":80,\"frames\":[\"+\",\"x\",\"*\"]},\"flip\":{\"interval\":70,\"frames\":[\"_\",\"_\",\"_\",\"-\",\"`\",\"`\",\"'\",\"´\",\"-\",\"_\",\"_\",\"_\"]},\"hamburger\":{\"interval\":100,\"frames\":[\"☱\",\"☲\",\"☴\"]},\"growVertical\":{\"interval\":120,\"frames\":[\"▁\",\"▃\",\"▄\",\"▅\",\"▆\",\"▇\",\"▆\",\"▅\",\"▄\",\"▃\"]},\"growHorizontal\":{\"interval\":120,\"frames\":[\"▏\",\"▎\",\"▍\",\"▌\",\"▋\",\"▊\",\"▉\",\"▊\",\"▋\",\"▌\",\"▍\",\"▎\"]},\"balloon\":{\"interval\":140,\"frames\":[\" \",\".\",\"o\",\"O\",\"@\",\"*\",\" \"]},\"balloon2\":{\"interval\":120,\"frames\":[\".\",\"o\",\"O\",\"°\",\"O\",\"o\",\".\"]},\"noise\":{\"interval\":100,\"frames\":[\"▓\",\"▒\",\"░\"]},\"bounce\":{\"interval\":120,\"frames\":[\"⠁\",\"⠂\",\"⠄\",\"⠂\"]},\"boxBounce\":{\"interval\":120,\"frames\":[\"▖\",\"▘\",\"▝\",\"▗\"]},\"boxBounce2\":{\"interval\":100,\"frames\":[\"▌\",\"▀\",\"▐\",\"▄\"]},\"triangle\":{\"interval\":50,\"frames\":[\"◢\",\"◣\",\"◤\",\"◥\"]},\"arc\":{\"interval\":100,\"frames\":[\"◜\",\"◠\",\"◝\",\"◞\",\"◡\",\"◟\"]},\"circle\":{\"interval\":120,\"frames\":[\"◡\",\"⊙\",\"◠\"]},\"squareCorners\":{\"interval\":180,\"frames\":[\"◰\",\"◳\",\"◲\",\"◱\"]},\"circleQuarters\":{\"interval\":120,\"frames\":[\"◴\",\"◷\",\"◶\",\"◵\"]},\"circleHalves\":{\"interval\":50,\"frames\":[\"◐\",\"◓\",\"◑\",\"◒\"]},\"squish\":{\"interval\":100,\"frames\":[\"╫\",\"╪\"]},\"toggle\":{\"interval\":250,\"frames\":[\"⊶\",\"⊷\"]},\"toggle2\":{\"interval\":80,\"frames\":[\"▫\",\"▪\"]},\"toggle3\":{\"interval\":120,\"frames\":[\"□\",\"■\"]},\"toggle4\":{\"interval\":100,\"frames\":[\"■\",\"□\",\"▪\",\"▫\"]},\"toggle5\":{\"interval\":100,\"frames\":[\"▮\",\"▯\"]},\"toggle6\":{\"interval\":300,\"frames\":[\"ဝ\",\"၀\"]},\"toggle7\":{\"interval\":80,\"frames\":[\"⦾\",\"⦿\"]},\"toggle8\":{\"interval\":100,\"frames\":[\"◍\",\"◌\"]},\"toggle9\":{\"interval\":100,\"frames\":[\"◉\",\"◎\"]},\"toggle10\":{\"interval\":100,\"frames\":[\"㊂\",\"㊀\",\"㊁\"]},\"toggle11\":{\"interval\":50,\"frames\":[\"⧇\",\"⧆\"]},\"toggle12\":{\"interval\":120,\"frames\":[\"☗\",\"☖\"]},\"toggle13\":{\"interval\":80,\"frames\":[\"=\",\"*\",\"-\"]},\"arrow\":{\"interval\":100,\"frames\":[\"←\",\"↖\",\"↑\",\"↗\",\"→\",\"↘\",\"↓\",\"↙\"]},\"arrow2\":{\"interval\":80,\"frames\":[\"⬆️ \",\"↗️ \",\"➡️ \",\"↘️ \",\"⬇️ \",\"↙️ \",\"⬅️ \",\"↖️ \"]},\"arrow3\":{\"interval\":120,\"frames\":[\"▹▹▹▹▹\",\"▸▹▹▹▹\",\"▹▸▹▹▹\",\"▹▹▸▹▹\",\"▹▹▹▸▹\",\"▹▹▹▹▸\"]},\"bouncingBar\":{\"interval\":80,\"frames\":[\"[ ]\",\"[= ]\",\"[== ]\",\"[=== ]\",\"[ ===]\",\"[ ==]\",\"[ =]\",\"[ ]\",\"[ =]\",\"[ ==]\",\"[ ===]\",\"[====]\",\"[=== ]\",\"[== ]\",\"[= ]\"]},\"bouncingBall\":{\"interval\":80,\"frames\":[\"( ● )\",\"( ● )\",\"( ● )\",\"( ● )\",\"( ●)\",\"( ● )\",\"( ● )\",\"( ● )\",\"( ● )\",\"(● )\"]},\"smiley\":{\"interval\":200,\"frames\":[\"😄 \",\"😝 \"]},\"monkey\":{\"interval\":300,\"frames\":[\"🙈 \",\"🙈 \",\"🙉 \",\"🙊 \"]},\"hearts\":{\"interval\":100,\"frames\":[\"💛 \",\"💙 \",\"💜 \",\"💚 \",\"❤️ \"]},\"clock\":{\"interval\":100,\"frames\":[\"🕛 \",\"🕐 \",\"🕑 \",\"🕒 \",\"🕓 \",\"🕔 \",\"🕕 \",\"🕖 \",\"🕗 \",\"🕘 \",\"🕙 \",\"🕚 \"]},\"earth\":{\"interval\":180,\"frames\":[\"🌍 \",\"🌎 \",\"🌏 \"]},\"material\":{\"interval\":17,\"frames\":[\"█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"███████▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"████████▁▁▁▁▁▁▁▁▁▁▁▁\",\"█████████▁▁▁▁▁▁▁▁▁▁▁\",\"█████████▁▁▁▁▁▁▁▁▁▁▁\",\"██████████▁▁▁▁▁▁▁▁▁▁\",\"███████████▁▁▁▁▁▁▁▁▁\",\"█████████████▁▁▁▁▁▁▁\",\"██████████████▁▁▁▁▁▁\",\"██████████████▁▁▁▁▁▁\",\"▁██████████████▁▁▁▁▁\",\"▁██████████████▁▁▁▁▁\",\"▁██████████████▁▁▁▁▁\",\"▁▁██████████████▁▁▁▁\",\"▁▁▁██████████████▁▁▁\",\"▁▁▁▁█████████████▁▁▁\",\"▁▁▁▁██████████████▁▁\",\"▁▁▁▁██████████████▁▁\",\"▁▁▁▁▁██████████████▁\",\"▁▁▁▁▁██████████████▁\",\"▁▁▁▁▁██████████████▁\",\"▁▁▁▁▁▁██████████████\",\"▁▁▁▁▁▁██████████████\",\"▁▁▁▁▁▁▁█████████████\",\"▁▁▁▁▁▁▁█████████████\",\"▁▁▁▁▁▁▁▁████████████\",\"▁▁▁▁▁▁▁▁████████████\",\"▁▁▁▁▁▁▁▁▁███████████\",\"▁▁▁▁▁▁▁▁▁███████████\",\"▁▁▁▁▁▁▁▁▁▁██████████\",\"▁▁▁▁▁▁▁▁▁▁██████████\",\"▁▁▁▁▁▁▁▁▁▁▁▁████████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁███████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████\",\"█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████\",\"██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███\",\"██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███\",\"███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███\",\"████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██\",\"█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█\",\"█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█\",\"██████▁▁▁▁▁▁▁▁▁▁▁▁▁█\",\"████████▁▁▁▁▁▁▁▁▁▁▁▁\",\"█████████▁▁▁▁▁▁▁▁▁▁▁\",\"█████████▁▁▁▁▁▁▁▁▁▁▁\",\"█████████▁▁▁▁▁▁▁▁▁▁▁\",\"█████████▁▁▁▁▁▁▁▁▁▁▁\",\"███████████▁▁▁▁▁▁▁▁▁\",\"████████████▁▁▁▁▁▁▁▁\",\"████████████▁▁▁▁▁▁▁▁\",\"██████████████▁▁▁▁▁▁\",\"██████████████▁▁▁▁▁▁\",\"▁██████████████▁▁▁▁▁\",\"▁██████████████▁▁▁▁▁\",\"▁▁▁█████████████▁▁▁▁\",\"▁▁▁▁▁████████████▁▁▁\",\"▁▁▁▁▁████████████▁▁▁\",\"▁▁▁▁▁▁███████████▁▁▁\",\"▁▁▁▁▁▁▁▁█████████▁▁▁\",\"▁▁▁▁▁▁▁▁█████████▁▁▁\",\"▁▁▁▁▁▁▁▁▁█████████▁▁\",\"▁▁▁▁▁▁▁▁▁█████████▁▁\",\"▁▁▁▁▁▁▁▁▁▁█████████▁\",\"▁▁▁▁▁▁▁▁▁▁▁████████▁\",\"▁▁▁▁▁▁▁▁▁▁▁████████▁\",\"▁▁▁▁▁▁▁▁▁▁▁▁███████▁\",\"▁▁▁▁▁▁▁▁▁▁▁▁███████▁\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁███████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁███████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\"]},\"moon\":{\"interval\":80,\"frames\":[\"🌑 \",\"🌒 \",\"🌓 \",\"🌔 \",\"🌕 \",\"🌖 \",\"🌗 \",\"🌘 \"]},\"runner\":{\"interval\":140,\"frames\":[\"🚶 \",\"🏃 \"]},\"pong\":{\"interval\":80,\"frames\":[\"▐⠂ ▌\",\"▐⠈ ▌\",\"▐ ⠂ ▌\",\"▐ ⠠ ▌\",\"▐ ⡀ ▌\",\"▐ ⠠ ▌\",\"▐ ⠂ ▌\",\"▐ ⠈ ▌\",\"▐ ⠂ ▌\",\"▐ ⠠ ▌\",\"▐ ⡀ ▌\",\"▐ ⠠ ▌\",\"▐ ⠂ ▌\",\"▐ ⠈ ▌\",\"▐ ⠂▌\",\"▐ ⠠▌\",\"▐ ⡀▌\",\"▐ ⠠ ▌\",\"▐ ⠂ ▌\",\"▐ ⠈ ▌\",\"▐ ⠂ ▌\",\"▐ ⠠ ▌\",\"▐ ⡀ ▌\",\"▐ ⠠ ▌\",\"▐ ⠂ ▌\",\"▐ ⠈ ▌\",\"▐ ⠂ ▌\",\"▐ ⠠ ▌\",\"▐ ⡀ ▌\",\"▐⠠ ▌\"]},\"shark\":{\"interval\":120,\"frames\":[\"▐|\\\\____________▌\",\"▐_|\\\\___________▌\",\"▐__|\\\\__________▌\",\"▐___|\\\\_________▌\",\"▐____|\\\\________▌\",\"▐_____|\\\\_______▌\",\"▐______|\\\\______▌\",\"▐_______|\\\\_____▌\",\"▐________|\\\\____▌\",\"▐_________|\\\\___▌\",\"▐__________|\\\\__▌\",\"▐___________|\\\\_▌\",\"▐____________|\\\\▌\",\"▐____________/|▌\",\"▐___________/|_▌\",\"▐__________/|__▌\",\"▐_________/|___▌\",\"▐________/|____▌\",\"▐_______/|_____▌\",\"▐______/|______▌\",\"▐_____/|_______▌\",\"▐____/|________▌\",\"▐___/|_________▌\",\"▐__/|__________▌\",\"▐_/|___________▌\",\"▐/|____________▌\"]},\"dqpb\":{\"interval\":100,\"frames\":[\"d\",\"q\",\"p\",\"b\"]},\"weather\":{\"interval\":100,\"frames\":[\"☀️ \",\"☀️ \",\"☀️ \",\"🌤 \",\"⛅️ \",\"🌥 \",\"☁️ \",\"🌧 \",\"🌨 \",\"🌧 \",\"🌨 \",\"🌧 \",\"🌨 \",\"⛈ \",\"🌨 \",\"🌧 \",\"🌨 \",\"☁️ \",\"🌥 \",\"⛅️ \",\"🌤 \",\"☀️ \",\"☀️ \"]},\"christmas\":{\"interval\":400,\"frames\":[\"🌲\",\"🎄\"]},\"grenade\":{\"interval\":80,\"frames\":[\"، \",\"′ \",\" ´ \",\" ‾ \",\" ⸌\",\" ⸊\",\" |\",\" ⁎\",\" ⁕\",\" ෴ \",\" ⁓\",\" \",\" \",\" \"]},\"point\":{\"interval\":125,\"frames\":[\"∙∙∙\",\"●∙∙\",\"∙●∙\",\"∙∙●\",\"∙∙∙\"]},\"layer\":{\"interval\":150,\"frames\":[\"-\",\"=\",\"≡\"]},\"betaWave\":{\"interval\":80,\"frames\":[\"ρββββββ\",\"βρβββββ\",\"ββρββββ\",\"βββρβββ\",\"ββββρββ\",\"βββββρβ\",\"ββββββρ\"]},\"aesthetic\":{\"interval\":80,\"frames\":[\"▰▱▱▱▱▱▱\",\"▰▰▱▱▱▱▱\",\"▰▰▰▱▱▱▱\",\"▰▰▰▰▱▱▱\",\"▰▰▰▰▰▱▱\",\"▰▰▰▰▰▰▱\",\"▰▰▰▰▰▰▰\",\"▰▱▱▱▱▱▱\"]}}"); /***/ }), -/* 490 */ +/* 491 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const chalk = __webpack_require__(491); +const chalk = __webpack_require__(492); const isSupported = process.platform !== 'win32' || process.env.CI || process.env.TERM === 'xterm-256color'; @@ -56616,16 +56673,16 @@ module.exports = isSupported ? main : fallbacks; /***/ }), -/* 491 */ +/* 492 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const escapeStringRegexp = __webpack_require__(265); -const ansiStyles = __webpack_require__(492); -const stdoutColor = __webpack_require__(497).stdout; +const ansiStyles = __webpack_require__(493); +const stdoutColor = __webpack_require__(498).stdout; -const template = __webpack_require__(499); +const template = __webpack_require__(500); const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); @@ -56851,12 +56908,12 @@ module.exports.default = module.exports; // For TypeScript /***/ }), -/* 492 */ +/* 493 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(module) { -const colorConvert = __webpack_require__(493); +const colorConvert = __webpack_require__(494); const wrapAnsi16 = (fn, offset) => function () { const code = fn.apply(colorConvert, arguments); @@ -57024,11 +57081,11 @@ Object.defineProperty(module, 'exports', { /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(115)(module))) /***/ }), -/* 493 */ +/* 494 */ /***/ (function(module, exports, __webpack_require__) { -var conversions = __webpack_require__(494); -var route = __webpack_require__(496); +var conversions = __webpack_require__(495); +var route = __webpack_require__(497); var convert = {}; @@ -57108,11 +57165,11 @@ module.exports = convert; /***/ }), -/* 494 */ +/* 495 */ /***/ (function(module, exports, __webpack_require__) { /* MIT license */ -var cssKeywords = __webpack_require__(495); +var cssKeywords = __webpack_require__(496); // NOTE: conversions should only return primitive values (i.e. arrays, or // values that give correct `typeof` results). @@ -57982,7 +58039,7 @@ convert.rgb.gray = function (rgb) { /***/ }), -/* 495 */ +/* 496 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -58141,10 +58198,10 @@ module.exports = { /***/ }), -/* 496 */ +/* 497 */ /***/ (function(module, exports, __webpack_require__) { -var conversions = __webpack_require__(494); +var conversions = __webpack_require__(495); /* this function routes a model to all other models. @@ -58244,13 +58301,13 @@ module.exports = function (fromModel) { /***/ }), -/* 497 */ +/* 498 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const os = __webpack_require__(121); -const hasFlag = __webpack_require__(498); +const hasFlag = __webpack_require__(499); const env = process.env; @@ -58382,7 +58439,7 @@ module.exports = { /***/ }), -/* 498 */ +/* 499 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -58397,7 +58454,7 @@ module.exports = (flag, argv) => { /***/ }), -/* 499 */ +/* 500 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -58532,18 +58589,18 @@ module.exports = (chalk, tmp) => { /***/ }), -/* 500 */ +/* 501 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const ansiRegex = __webpack_require__(501); +const ansiRegex = __webpack_require__(502); module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; /***/ }), -/* 501 */ +/* 502 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -58560,14 +58617,14 @@ module.exports = ({onlyFirst = false} = {}) => { /***/ }), -/* 502 */ +/* 503 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var defaults = __webpack_require__(503) -var combining = __webpack_require__(505) +var defaults = __webpack_require__(504) +var combining = __webpack_require__(506) var DEFAULTS = { nul: 0, @@ -58666,10 +58723,10 @@ function bisearch(ucs) { /***/ }), -/* 503 */ +/* 504 */ /***/ (function(module, exports, __webpack_require__) { -var clone = __webpack_require__(504); +var clone = __webpack_require__(505); module.exports = function(options, defaults) { options = options || {}; @@ -58684,7 +58741,7 @@ module.exports = function(options, defaults) { }; /***/ }), -/* 504 */ +/* 505 */ /***/ (function(module, exports, __webpack_require__) { var clone = (function() { @@ -58856,7 +58913,7 @@ if ( true && module.exports) { /***/ }), -/* 505 */ +/* 506 */ /***/ (function(module, exports) { module.exports = [ @@ -58912,7 +58969,7 @@ module.exports = [ /***/ }), -/* 506 */ +/* 507 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -58928,7 +58985,7 @@ module.exports = ({stream = process.stdout} = {}) => { /***/ }), -/* 507 */ +/* 508 */ /***/ (function(module, exports, __webpack_require__) { var Stream = __webpack_require__(138) @@ -59079,7 +59136,7 @@ MuteStream.prototype.close = proxy('close') /***/ }), -/* 508 */ +/* 509 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -59089,7 +59146,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var dedent__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dedent__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(143); /* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(del__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var ora__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(477); +/* harmony import */ var ora__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(478); /* harmony import */ var ora__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ora__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_3__); @@ -59198,7 +59255,7 @@ const ResetCommand = { }; /***/ }), -/* 509 */ +/* 510 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -59255,7 +59312,7 @@ const RunCommand = { }; /***/ }), -/* 510 */ +/* 511 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -59265,7 +59322,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(246); /* harmony import */ var _utils_parallelize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(247); /* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(248); -/* harmony import */ var _utils_watch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(511); +/* harmony import */ var _utils_watch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(512); /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License @@ -59340,14 +59397,14 @@ const WatchCommand = { }; /***/ }), -/* 511 */ +/* 512 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "waitUntilWatchIsReady", function() { return waitUntilWatchIsReady; }); /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8); -/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(375); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(376); /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License @@ -59403,7 +59460,7 @@ function waitUntilWatchIsReady(stream, opts = {}) { } /***/ }), -/* 512 */ +/* 513 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -59413,7 +59470,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(246); /* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(248); /* harmony import */ var _utils_projects_tree__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(370); -/* harmony import */ var _utils_kibana__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(513); +/* harmony import */ var _utils_kibana__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(514); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } @@ -59484,7 +59541,7 @@ function toArray(value) { } /***/ }), -/* 513 */ +/* 514 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -59492,13 +59549,13 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Kibana", function() { return Kibana; }); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var multimatch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(514); +/* harmony import */ var multimatch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(515); /* harmony import */ var multimatch__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(multimatch__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var is_path_inside__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(239); /* harmony import */ var is_path_inside__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(is_path_inside__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _yarn_lock__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(365); /* harmony import */ var _projects__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(248); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(517); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(518); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } @@ -59649,15 +59706,15 @@ class Kibana { } /***/ }), -/* 514 */ +/* 515 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const minimatch = __webpack_require__(150); const arrayUnion = __webpack_require__(145); -const arrayDiffer = __webpack_require__(515); -const arrify = __webpack_require__(516); +const arrayDiffer = __webpack_require__(516); +const arrify = __webpack_require__(517); module.exports = (list, patterns, options = {}) => { list = arrify(list); @@ -59681,7 +59738,7 @@ module.exports = (list, patterns, options = {}) => { /***/ }), -/* 515 */ +/* 516 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -59696,7 +59753,7 @@ module.exports = arrayDiffer; /***/ }), -/* 516 */ +/* 517 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -59726,7 +59783,7 @@ module.exports = arrify; /***/ }), -/* 517 */ +/* 518 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -59785,15 +59842,15 @@ function getProjectPaths({ } /***/ }), -/* 518 */ +/* 519 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _build_bazel_production_projects__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(519); +/* harmony import */ var _build_bazel_production_projects__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(520); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buildBazelProductionProjects", function() { return _build_bazel_production_projects__WEBPACK_IMPORTED_MODULE_0__["buildBazelProductionProjects"]; }); -/* harmony import */ var _build_non_bazel_production_projects__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(745); +/* harmony import */ var _build_non_bazel_production_projects__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(746); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buildNonBazelProductionProjects", function() { return _build_non_bazel_production_projects__WEBPACK_IMPORTED_MODULE_1__["buildNonBazelProductionProjects"]; }); /* @@ -59807,19 +59864,19 @@ __webpack_require__.r(__webpack_exports__); /***/ }), -/* 519 */ +/* 520 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buildBazelProductionProjects", function() { return buildBazelProductionProjects; }); -/* harmony import */ var cpy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(520); +/* harmony import */ var cpy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(521); /* harmony import */ var cpy__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(cpy__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var globby__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(736); +/* harmony import */ var globby__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(737); /* harmony import */ var globby__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(globby__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _build_non_bazel_production_projects__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(745); +/* harmony import */ var _build_non_bazel_production_projects__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(746); /* harmony import */ var _utils_bazel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(371); /* harmony import */ var _utils_fs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(131); /* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(246); @@ -59914,7 +59971,7 @@ async function applyCorrectPermissions(project, kibanaRoot, buildRoot) { } /***/ }), -/* 520 */ +/* 521 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -59922,14 +59979,14 @@ async function applyCorrectPermissions(project, kibanaRoot, buildRoot) { const EventEmitter = __webpack_require__(156); const path = __webpack_require__(4); const os = __webpack_require__(121); -const pMap = __webpack_require__(521); -const arrify = __webpack_require__(516); -const globby = __webpack_require__(524); -const hasGlob = __webpack_require__(720); -const cpFile = __webpack_require__(722); -const junk = __webpack_require__(732); -const pFilter = __webpack_require__(733); -const CpyError = __webpack_require__(735); +const pMap = __webpack_require__(522); +const arrify = __webpack_require__(517); +const globby = __webpack_require__(525); +const hasGlob = __webpack_require__(721); +const cpFile = __webpack_require__(723); +const junk = __webpack_require__(733); +const pFilter = __webpack_require__(734); +const CpyError = __webpack_require__(736); const defaultOptions = { ignoreJunk: true @@ -60080,12 +60137,12 @@ module.exports = (source, destination, { /***/ }), -/* 521 */ +/* 522 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const AggregateError = __webpack_require__(522); +const AggregateError = __webpack_require__(523); module.exports = async ( iterable, @@ -60168,12 +60225,12 @@ module.exports = async ( /***/ }), -/* 522 */ +/* 523 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const indentString = __webpack_require__(523); +const indentString = __webpack_require__(524); const cleanStack = __webpack_require__(244); const cleanInternalStack = stack => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, ''); @@ -60222,7 +60279,7 @@ module.exports = AggregateError; /***/ }), -/* 523 */ +/* 524 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -60264,17 +60321,17 @@ module.exports = (string, count = 1, options) => { /***/ }), -/* 524 */ +/* 525 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const fs = __webpack_require__(134); -const arrayUnion = __webpack_require__(525); +const arrayUnion = __webpack_require__(526); const glob = __webpack_require__(147); -const fastGlob = __webpack_require__(527); -const dirGlob = __webpack_require__(713); -const gitignore = __webpack_require__(716); +const fastGlob = __webpack_require__(528); +const dirGlob = __webpack_require__(714); +const gitignore = __webpack_require__(717); const DEFAULT_FILTER = () => false; @@ -60419,12 +60476,12 @@ module.exports.gitignore = gitignore; /***/ }), -/* 525 */ +/* 526 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var arrayUniq = __webpack_require__(526); +var arrayUniq = __webpack_require__(527); module.exports = function () { return arrayUniq([].concat.apply([], arguments)); @@ -60432,7 +60489,7 @@ module.exports = function () { /***/ }), -/* 526 */ +/* 527 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -60501,10 +60558,10 @@ if ('Set' in global) { /***/ }), -/* 527 */ +/* 528 */ /***/ (function(module, exports, __webpack_require__) { -const pkg = __webpack_require__(528); +const pkg = __webpack_require__(529); module.exports = pkg.async; module.exports.default = pkg.async; @@ -60517,19 +60574,19 @@ module.exports.generateTasks = pkg.generateTasks; /***/ }), -/* 528 */ +/* 529 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var optionsManager = __webpack_require__(529); -var taskManager = __webpack_require__(530); -var reader_async_1 = __webpack_require__(684); -var reader_stream_1 = __webpack_require__(708); -var reader_sync_1 = __webpack_require__(709); -var arrayUtils = __webpack_require__(711); -var streamUtils = __webpack_require__(712); +var optionsManager = __webpack_require__(530); +var taskManager = __webpack_require__(531); +var reader_async_1 = __webpack_require__(685); +var reader_stream_1 = __webpack_require__(709); +var reader_sync_1 = __webpack_require__(710); +var arrayUtils = __webpack_require__(712); +var streamUtils = __webpack_require__(713); /** * Synchronous API. */ @@ -60595,7 +60652,7 @@ function isString(source) { /***/ }), -/* 529 */ +/* 530 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -60633,13 +60690,13 @@ exports.prepare = prepare; /***/ }), -/* 530 */ +/* 531 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var patternUtils = __webpack_require__(531); +var patternUtils = __webpack_require__(532); /** * Generate tasks based on parent directory of each pattern. */ @@ -60730,16 +60787,16 @@ exports.convertPatternGroupToTask = convertPatternGroupToTask; /***/ }), -/* 531 */ +/* 532 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var path = __webpack_require__(4); -var globParent = __webpack_require__(532); +var globParent = __webpack_require__(533); var isGlob = __webpack_require__(172); -var micromatch = __webpack_require__(535); +var micromatch = __webpack_require__(536); var GLOBSTAR = '**'; /** * Return true for static pattern. @@ -60885,15 +60942,15 @@ exports.matchAny = matchAny; /***/ }), -/* 532 */ +/* 533 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var path = __webpack_require__(4); -var isglob = __webpack_require__(533); -var pathDirname = __webpack_require__(534); +var isglob = __webpack_require__(534); +var pathDirname = __webpack_require__(535); var isWin32 = __webpack_require__(121).platform() === 'win32'; module.exports = function globParent(str) { @@ -60916,7 +60973,7 @@ module.exports = function globParent(str) { /***/ }), -/* 533 */ +/* 534 */ /***/ (function(module, exports, __webpack_require__) { /*! @@ -60947,7 +61004,7 @@ module.exports = function isGlob(str) { /***/ }), -/* 534 */ +/* 535 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -61097,7 +61154,7 @@ module.exports.win32 = win32; /***/ }), -/* 535 */ +/* 536 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -61108,18 +61165,18 @@ module.exports.win32 = win32; */ var util = __webpack_require__(112); -var braces = __webpack_require__(536); -var toRegex = __webpack_require__(537); -var extend = __webpack_require__(650); +var braces = __webpack_require__(537); +var toRegex = __webpack_require__(538); +var extend = __webpack_require__(651); /** * Local dependencies */ -var compilers = __webpack_require__(652); -var parsers = __webpack_require__(679); -var cache = __webpack_require__(680); -var utils = __webpack_require__(681); +var compilers = __webpack_require__(653); +var parsers = __webpack_require__(680); +var cache = __webpack_require__(681); +var utils = __webpack_require__(682); var MAX_LENGTH = 1024 * 64; /** @@ -61981,7 +62038,7 @@ module.exports = micromatch; /***/ }), -/* 536 */ +/* 537 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -61991,18 +62048,18 @@ module.exports = micromatch; * Module dependencies */ -var toRegex = __webpack_require__(537); -var unique = __webpack_require__(559); -var extend = __webpack_require__(560); +var toRegex = __webpack_require__(538); +var unique = __webpack_require__(560); +var extend = __webpack_require__(561); /** * Local dependencies */ -var compilers = __webpack_require__(562); -var parsers = __webpack_require__(575); -var Braces = __webpack_require__(579); -var utils = __webpack_require__(563); +var compilers = __webpack_require__(563); +var parsers = __webpack_require__(576); +var Braces = __webpack_require__(580); +var utils = __webpack_require__(564); var MAX_LENGTH = 1024 * 64; var cache = {}; @@ -62306,16 +62363,16 @@ module.exports = braces; /***/ }), -/* 537 */ +/* 538 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var safe = __webpack_require__(538); -var define = __webpack_require__(544); -var extend = __webpack_require__(552); -var not = __webpack_require__(556); +var safe = __webpack_require__(539); +var define = __webpack_require__(545); +var extend = __webpack_require__(553); +var not = __webpack_require__(557); var MAX_LENGTH = 1024 * 64; /** @@ -62468,10 +62525,10 @@ module.exports.makeRe = makeRe; /***/ }), -/* 538 */ +/* 539 */ /***/ (function(module, exports, __webpack_require__) { -var parse = __webpack_require__(539); +var parse = __webpack_require__(540); var types = parse.types; module.exports = function (re, opts) { @@ -62517,13 +62574,13 @@ function isRegExp (x) { /***/ }), -/* 539 */ +/* 540 */ /***/ (function(module, exports, __webpack_require__) { -var util = __webpack_require__(540); -var types = __webpack_require__(541); -var sets = __webpack_require__(542); -var positions = __webpack_require__(543); +var util = __webpack_require__(541); +var types = __webpack_require__(542); +var sets = __webpack_require__(543); +var positions = __webpack_require__(544); module.exports = function(regexpStr) { @@ -62805,11 +62862,11 @@ module.exports.types = types; /***/ }), -/* 540 */ +/* 541 */ /***/ (function(module, exports, __webpack_require__) { -var types = __webpack_require__(541); -var sets = __webpack_require__(542); +var types = __webpack_require__(542); +var sets = __webpack_require__(543); // All of these are private and only used by randexp. @@ -62922,7 +62979,7 @@ exports.error = function(regexp, msg) { /***/ }), -/* 541 */ +/* 542 */ /***/ (function(module, exports) { module.exports = { @@ -62938,10 +62995,10 @@ module.exports = { /***/ }), -/* 542 */ +/* 543 */ /***/ (function(module, exports, __webpack_require__) { -var types = __webpack_require__(541); +var types = __webpack_require__(542); var INTS = function() { return [{ type: types.RANGE , from: 48, to: 57 }]; @@ -63026,10 +63083,10 @@ exports.anyChar = function() { /***/ }), -/* 543 */ +/* 544 */ /***/ (function(module, exports, __webpack_require__) { -var types = __webpack_require__(541); +var types = __webpack_require__(542); exports.wordBoundary = function() { return { type: types.POSITION, value: 'b' }; @@ -63049,7 +63106,7 @@ exports.end = function() { /***/ }), -/* 544 */ +/* 545 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -63062,8 +63119,8 @@ exports.end = function() { -var isobject = __webpack_require__(545); -var isDescriptor = __webpack_require__(546); +var isobject = __webpack_require__(546); +var isDescriptor = __webpack_require__(547); var define = (typeof Reflect !== 'undefined' && Reflect.defineProperty) ? Reflect.defineProperty : Object.defineProperty; @@ -63094,7 +63151,7 @@ module.exports = function defineProperty(obj, key, val) { /***/ }), -/* 545 */ +/* 546 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -63113,7 +63170,7 @@ module.exports = function isObject(val) { /***/ }), -/* 546 */ +/* 547 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -63126,9 +63183,9 @@ module.exports = function isObject(val) { -var typeOf = __webpack_require__(547); -var isAccessor = __webpack_require__(548); -var isData = __webpack_require__(550); +var typeOf = __webpack_require__(548); +var isAccessor = __webpack_require__(549); +var isData = __webpack_require__(551); module.exports = function isDescriptor(obj, key) { if (typeOf(obj) !== 'object') { @@ -63142,7 +63199,7 @@ module.exports = function isDescriptor(obj, key) { /***/ }), -/* 547 */ +/* 548 */ /***/ (function(module, exports) { var toString = Object.prototype.toString; @@ -63277,7 +63334,7 @@ function isBuffer(val) { /***/ }), -/* 548 */ +/* 549 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -63290,7 +63347,7 @@ function isBuffer(val) { -var typeOf = __webpack_require__(549); +var typeOf = __webpack_require__(550); // accessor descriptor properties var accessor = { @@ -63353,7 +63410,7 @@ module.exports = isAccessorDescriptor; /***/ }), -/* 549 */ +/* 550 */ /***/ (function(module, exports) { var toString = Object.prototype.toString; @@ -63488,7 +63545,7 @@ function isBuffer(val) { /***/ }), -/* 550 */ +/* 551 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -63501,7 +63558,7 @@ function isBuffer(val) { -var typeOf = __webpack_require__(551); +var typeOf = __webpack_require__(552); module.exports = function isDataDescriptor(obj, prop) { // data descriptor properties @@ -63544,7 +63601,7 @@ module.exports = function isDataDescriptor(obj, prop) { /***/ }), -/* 551 */ +/* 552 */ /***/ (function(module, exports) { var toString = Object.prototype.toString; @@ -63679,14 +63736,14 @@ function isBuffer(val) { /***/ }), -/* 552 */ +/* 553 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isExtendable = __webpack_require__(553); -var assignSymbols = __webpack_require__(555); +var isExtendable = __webpack_require__(554); +var assignSymbols = __webpack_require__(556); module.exports = Object.assign || function(obj/*, objects*/) { if (obj === null || typeof obj === 'undefined') { @@ -63746,7 +63803,7 @@ function isEnum(obj, key) { /***/ }), -/* 553 */ +/* 554 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -63759,7 +63816,7 @@ function isEnum(obj, key) { -var isPlainObject = __webpack_require__(554); +var isPlainObject = __webpack_require__(555); module.exports = function isExtendable(val) { return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); @@ -63767,7 +63824,7 @@ module.exports = function isExtendable(val) { /***/ }), -/* 554 */ +/* 555 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -63780,7 +63837,7 @@ module.exports = function isExtendable(val) { -var isObject = __webpack_require__(545); +var isObject = __webpack_require__(546); function isObjectObject(o) { return isObject(o) === true @@ -63811,7 +63868,7 @@ module.exports = function isPlainObject(o) { /***/ }), -/* 555 */ +/* 556 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -63858,14 +63915,14 @@ module.exports = function(receiver, objects) { /***/ }), -/* 556 */ +/* 557 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var extend = __webpack_require__(557); -var safe = __webpack_require__(538); +var extend = __webpack_require__(558); +var safe = __webpack_require__(539); /** * The main export is a function that takes a `pattern` string and an `options` object. @@ -63937,14 +63994,14 @@ module.exports = toRegex; /***/ }), -/* 557 */ +/* 558 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isExtendable = __webpack_require__(558); -var assignSymbols = __webpack_require__(555); +var isExtendable = __webpack_require__(559); +var assignSymbols = __webpack_require__(556); module.exports = Object.assign || function(obj/*, objects*/) { if (obj === null || typeof obj === 'undefined') { @@ -64004,7 +64061,7 @@ function isEnum(obj, key) { /***/ }), -/* 558 */ +/* 559 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -64017,7 +64074,7 @@ function isEnum(obj, key) { -var isPlainObject = __webpack_require__(554); +var isPlainObject = __webpack_require__(555); module.exports = function isExtendable(val) { return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); @@ -64025,7 +64082,7 @@ module.exports = function isExtendable(val) { /***/ }), -/* 559 */ +/* 560 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -64075,13 +64132,13 @@ module.exports.immutable = function uniqueImmutable(arr) { /***/ }), -/* 560 */ +/* 561 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isObject = __webpack_require__(561); +var isObject = __webpack_require__(562); module.exports = function extend(o/*, objects*/) { if (!isObject(o)) { o = {}; } @@ -64115,7 +64172,7 @@ function hasOwn(obj, key) { /***/ }), -/* 561 */ +/* 562 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -64135,13 +64192,13 @@ module.exports = function isExtendable(val) { /***/ }), -/* 562 */ +/* 563 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var utils = __webpack_require__(563); +var utils = __webpack_require__(564); module.exports = function(braces, options) { braces.compiler @@ -64424,25 +64481,25 @@ function hasQueue(node) { /***/ }), -/* 563 */ +/* 564 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var splitString = __webpack_require__(564); +var splitString = __webpack_require__(565); var utils = module.exports; /** * Module dependencies */ -utils.extend = __webpack_require__(560); -utils.flatten = __webpack_require__(567); -utils.isObject = __webpack_require__(545); -utils.fillRange = __webpack_require__(568); -utils.repeat = __webpack_require__(574); -utils.unique = __webpack_require__(559); +utils.extend = __webpack_require__(561); +utils.flatten = __webpack_require__(568); +utils.isObject = __webpack_require__(546); +utils.fillRange = __webpack_require__(569); +utils.repeat = __webpack_require__(575); +utils.unique = __webpack_require__(560); utils.define = function(obj, key, val) { Object.defineProperty(obj, key, { @@ -64774,7 +64831,7 @@ utils.escapeRegex = function(str) { /***/ }), -/* 564 */ +/* 565 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -64787,7 +64844,7 @@ utils.escapeRegex = function(str) { -var extend = __webpack_require__(565); +var extend = __webpack_require__(566); module.exports = function(str, options, fn) { if (typeof str !== 'string') { @@ -64952,14 +65009,14 @@ function keepEscaping(opts, str, idx) { /***/ }), -/* 565 */ +/* 566 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isExtendable = __webpack_require__(566); -var assignSymbols = __webpack_require__(555); +var isExtendable = __webpack_require__(567); +var assignSymbols = __webpack_require__(556); module.exports = Object.assign || function(obj/*, objects*/) { if (obj === null || typeof obj === 'undefined') { @@ -65019,7 +65076,7 @@ function isEnum(obj, key) { /***/ }), -/* 566 */ +/* 567 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65032,7 +65089,7 @@ function isEnum(obj, key) { -var isPlainObject = __webpack_require__(554); +var isPlainObject = __webpack_require__(555); module.exports = function isExtendable(val) { return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); @@ -65040,7 +65097,7 @@ module.exports = function isExtendable(val) { /***/ }), -/* 567 */ +/* 568 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65069,7 +65126,7 @@ function flat(arr, res) { /***/ }), -/* 568 */ +/* 569 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65083,10 +65140,10 @@ function flat(arr, res) { var util = __webpack_require__(112); -var isNumber = __webpack_require__(569); -var extend = __webpack_require__(560); -var repeat = __webpack_require__(572); -var toRegex = __webpack_require__(573); +var isNumber = __webpack_require__(570); +var extend = __webpack_require__(561); +var repeat = __webpack_require__(573); +var toRegex = __webpack_require__(574); /** * Return a range of numbers or letters. @@ -65284,7 +65341,7 @@ module.exports = fillRange; /***/ }), -/* 569 */ +/* 570 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65297,7 +65354,7 @@ module.exports = fillRange; -var typeOf = __webpack_require__(570); +var typeOf = __webpack_require__(571); module.exports = function isNumber(num) { var type = typeOf(num); @@ -65313,10 +65370,10 @@ module.exports = function isNumber(num) { /***/ }), -/* 570 */ +/* 571 */ /***/ (function(module, exports, __webpack_require__) { -var isBuffer = __webpack_require__(571); +var isBuffer = __webpack_require__(572); var toString = Object.prototype.toString; /** @@ -65435,7 +65492,7 @@ module.exports = function kindOf(val) { /***/ }), -/* 571 */ +/* 572 */ /***/ (function(module, exports) { /*! @@ -65462,7 +65519,7 @@ function isSlowBuffer (obj) { /***/ }), -/* 572 */ +/* 573 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65539,7 +65596,7 @@ function repeat(str, num) { /***/ }), -/* 573 */ +/* 574 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65552,8 +65609,8 @@ function repeat(str, num) { -var repeat = __webpack_require__(572); -var isNumber = __webpack_require__(569); +var repeat = __webpack_require__(573); +var isNumber = __webpack_require__(570); var cache = {}; function toRegexRange(min, max, options) { @@ -65840,7 +65897,7 @@ module.exports = toRegexRange; /***/ }), -/* 574 */ +/* 575 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65865,14 +65922,14 @@ module.exports = function repeat(ele, num) { /***/ }), -/* 575 */ +/* 576 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var Node = __webpack_require__(576); -var utils = __webpack_require__(563); +var Node = __webpack_require__(577); +var utils = __webpack_require__(564); /** * Braces parsers @@ -66232,15 +66289,15 @@ function concatNodes(pos, node, parent, options) { /***/ }), -/* 576 */ +/* 577 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isObject = __webpack_require__(545); -var define = __webpack_require__(577); -var utils = __webpack_require__(578); +var isObject = __webpack_require__(546); +var define = __webpack_require__(578); +var utils = __webpack_require__(579); var ownNames; /** @@ -66731,7 +66788,7 @@ exports = module.exports = Node; /***/ }), -/* 577 */ +/* 578 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -66744,7 +66801,7 @@ exports = module.exports = Node; -var isDescriptor = __webpack_require__(546); +var isDescriptor = __webpack_require__(547); module.exports = function defineProperty(obj, prop, val) { if (typeof obj !== 'object' && typeof obj !== 'function') { @@ -66769,13 +66826,13 @@ module.exports = function defineProperty(obj, prop, val) { /***/ }), -/* 578 */ +/* 579 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var typeOf = __webpack_require__(570); +var typeOf = __webpack_require__(571); var utils = module.exports; /** @@ -67795,17 +67852,17 @@ function assert(val, message) { /***/ }), -/* 579 */ +/* 580 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var extend = __webpack_require__(560); -var Snapdragon = __webpack_require__(580); -var compilers = __webpack_require__(562); -var parsers = __webpack_require__(575); -var utils = __webpack_require__(563); +var extend = __webpack_require__(561); +var Snapdragon = __webpack_require__(581); +var compilers = __webpack_require__(563); +var parsers = __webpack_require__(576); +var utils = __webpack_require__(564); /** * Customize Snapdragon parser and renderer @@ -67906,17 +67963,17 @@ module.exports = Braces; /***/ }), -/* 580 */ +/* 581 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var Base = __webpack_require__(581); -var define = __webpack_require__(608); -var Compiler = __webpack_require__(618); -var Parser = __webpack_require__(647); -var utils = __webpack_require__(627); +var Base = __webpack_require__(582); +var define = __webpack_require__(609); +var Compiler = __webpack_require__(619); +var Parser = __webpack_require__(648); +var utils = __webpack_require__(628); var regexCache = {}; var cache = {}; @@ -68087,20 +68144,20 @@ module.exports.Parser = Parser; /***/ }), -/* 581 */ +/* 582 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var util = __webpack_require__(112); -var define = __webpack_require__(582); -var CacheBase = __webpack_require__(583); -var Emitter = __webpack_require__(584); -var isObject = __webpack_require__(545); -var merge = __webpack_require__(602); -var pascal = __webpack_require__(605); -var cu = __webpack_require__(606); +var define = __webpack_require__(583); +var CacheBase = __webpack_require__(584); +var Emitter = __webpack_require__(585); +var isObject = __webpack_require__(546); +var merge = __webpack_require__(603); +var pascal = __webpack_require__(606); +var cu = __webpack_require__(607); /** * Optionally define a custom `cache` namespace to use. @@ -68529,7 +68586,7 @@ module.exports.namespace = namespace; /***/ }), -/* 582 */ +/* 583 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -68542,7 +68599,7 @@ module.exports.namespace = namespace; -var isDescriptor = __webpack_require__(546); +var isDescriptor = __webpack_require__(547); module.exports = function defineProperty(obj, prop, val) { if (typeof obj !== 'object' && typeof obj !== 'function') { @@ -68567,21 +68624,21 @@ module.exports = function defineProperty(obj, prop, val) { /***/ }), -/* 583 */ +/* 584 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isObject = __webpack_require__(545); -var Emitter = __webpack_require__(584); -var visit = __webpack_require__(585); -var toPath = __webpack_require__(588); -var union = __webpack_require__(589); -var del = __webpack_require__(593); -var get = __webpack_require__(591); -var has = __webpack_require__(598); -var set = __webpack_require__(601); +var isObject = __webpack_require__(546); +var Emitter = __webpack_require__(585); +var visit = __webpack_require__(586); +var toPath = __webpack_require__(589); +var union = __webpack_require__(590); +var del = __webpack_require__(594); +var get = __webpack_require__(592); +var has = __webpack_require__(599); +var set = __webpack_require__(602); /** * Create a `Cache` constructor that when instantiated will @@ -68835,7 +68892,7 @@ module.exports.namespace = namespace; /***/ }), -/* 584 */ +/* 585 */ /***/ (function(module, exports, __webpack_require__) { @@ -69004,7 +69061,7 @@ Emitter.prototype.hasListeners = function(event){ /***/ }), -/* 585 */ +/* 586 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69017,8 +69074,8 @@ Emitter.prototype.hasListeners = function(event){ -var visit = __webpack_require__(586); -var mapVisit = __webpack_require__(587); +var visit = __webpack_require__(587); +var mapVisit = __webpack_require__(588); module.exports = function(collection, method, val) { var result; @@ -69041,7 +69098,7 @@ module.exports = function(collection, method, val) { /***/ }), -/* 586 */ +/* 587 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69054,7 +69111,7 @@ module.exports = function(collection, method, val) { -var isObject = __webpack_require__(545); +var isObject = __webpack_require__(546); module.exports = function visit(thisArg, method, target, val) { if (!isObject(thisArg) && typeof thisArg !== 'function') { @@ -69081,14 +69138,14 @@ module.exports = function visit(thisArg, method, target, val) { /***/ }), -/* 587 */ +/* 588 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var util = __webpack_require__(112); -var visit = __webpack_require__(586); +var visit = __webpack_require__(587); /** * Map `visit` over an array of objects. @@ -69125,7 +69182,7 @@ function isObject(val) { /***/ }), -/* 588 */ +/* 589 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69138,7 +69195,7 @@ function isObject(val) { -var typeOf = __webpack_require__(570); +var typeOf = __webpack_require__(571); module.exports = function toPath(args) { if (typeOf(args) !== 'arguments') { @@ -69165,16 +69222,16 @@ function filter(arr) { /***/ }), -/* 589 */ +/* 590 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isObject = __webpack_require__(561); -var union = __webpack_require__(590); -var get = __webpack_require__(591); -var set = __webpack_require__(592); +var isObject = __webpack_require__(562); +var union = __webpack_require__(591); +var get = __webpack_require__(592); +var set = __webpack_require__(593); module.exports = function unionValue(obj, prop, value) { if (!isObject(obj)) { @@ -69202,7 +69259,7 @@ function arrayify(val) { /***/ }), -/* 590 */ +/* 591 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69238,7 +69295,7 @@ module.exports = function union(init) { /***/ }), -/* 591 */ +/* 592 */ /***/ (function(module, exports) { /*! @@ -69294,7 +69351,7 @@ function toString(val) { /***/ }), -/* 592 */ +/* 593 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69307,10 +69364,10 @@ function toString(val) { -var split = __webpack_require__(564); -var extend = __webpack_require__(560); -var isPlainObject = __webpack_require__(554); -var isObject = __webpack_require__(561); +var split = __webpack_require__(565); +var extend = __webpack_require__(561); +var isPlainObject = __webpack_require__(555); +var isObject = __webpack_require__(562); module.exports = function(obj, prop, val) { if (!isObject(obj)) { @@ -69356,7 +69413,7 @@ function isValidKey(key) { /***/ }), -/* 593 */ +/* 594 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69369,8 +69426,8 @@ function isValidKey(key) { -var isObject = __webpack_require__(545); -var has = __webpack_require__(594); +var isObject = __webpack_require__(546); +var has = __webpack_require__(595); module.exports = function unset(obj, prop) { if (!isObject(obj)) { @@ -69395,7 +69452,7 @@ module.exports = function unset(obj, prop) { /***/ }), -/* 594 */ +/* 595 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69408,9 +69465,9 @@ module.exports = function unset(obj, prop) { -var isObject = __webpack_require__(595); -var hasValues = __webpack_require__(597); -var get = __webpack_require__(591); +var isObject = __webpack_require__(596); +var hasValues = __webpack_require__(598); +var get = __webpack_require__(592); module.exports = function(obj, prop, noZero) { if (isObject(obj)) { @@ -69421,7 +69478,7 @@ module.exports = function(obj, prop, noZero) { /***/ }), -/* 595 */ +/* 596 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69434,7 +69491,7 @@ module.exports = function(obj, prop, noZero) { -var isArray = __webpack_require__(596); +var isArray = __webpack_require__(597); module.exports = function isObject(val) { return val != null && typeof val === 'object' && isArray(val) === false; @@ -69442,7 +69499,7 @@ module.exports = function isObject(val) { /***/ }), -/* 596 */ +/* 597 */ /***/ (function(module, exports) { var toString = {}.toString; @@ -69453,7 +69510,7 @@ module.exports = Array.isArray || function (arr) { /***/ }), -/* 597 */ +/* 598 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69496,7 +69553,7 @@ module.exports = function hasValue(o, noZero) { /***/ }), -/* 598 */ +/* 599 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69509,9 +69566,9 @@ module.exports = function hasValue(o, noZero) { -var isObject = __webpack_require__(545); -var hasValues = __webpack_require__(599); -var get = __webpack_require__(591); +var isObject = __webpack_require__(546); +var hasValues = __webpack_require__(600); +var get = __webpack_require__(592); module.exports = function(val, prop) { return hasValues(isObject(val) && prop ? get(val, prop) : val); @@ -69519,7 +69576,7 @@ module.exports = function(val, prop) { /***/ }), -/* 599 */ +/* 600 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69532,8 +69589,8 @@ module.exports = function(val, prop) { -var typeOf = __webpack_require__(600); -var isNumber = __webpack_require__(569); +var typeOf = __webpack_require__(601); +var isNumber = __webpack_require__(570); module.exports = function hasValue(val) { // is-number checks for NaN and other edge cases @@ -69586,10 +69643,10 @@ module.exports = function hasValue(val) { /***/ }), -/* 600 */ +/* 601 */ /***/ (function(module, exports, __webpack_require__) { -var isBuffer = __webpack_require__(571); +var isBuffer = __webpack_require__(572); var toString = Object.prototype.toString; /** @@ -69711,7 +69768,7 @@ module.exports = function kindOf(val) { /***/ }), -/* 601 */ +/* 602 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69724,10 +69781,10 @@ module.exports = function kindOf(val) { -var split = __webpack_require__(564); -var extend = __webpack_require__(560); -var isPlainObject = __webpack_require__(554); -var isObject = __webpack_require__(561); +var split = __webpack_require__(565); +var extend = __webpack_require__(561); +var isPlainObject = __webpack_require__(555); +var isObject = __webpack_require__(562); module.exports = function(obj, prop, val) { if (!isObject(obj)) { @@ -69773,14 +69830,14 @@ function isValidKey(key) { /***/ }), -/* 602 */ +/* 603 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isExtendable = __webpack_require__(603); -var forIn = __webpack_require__(604); +var isExtendable = __webpack_require__(604); +var forIn = __webpack_require__(605); function mixinDeep(target, objects) { var len = arguments.length, i = 0; @@ -69844,7 +69901,7 @@ module.exports = mixinDeep; /***/ }), -/* 603 */ +/* 604 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69857,7 +69914,7 @@ module.exports = mixinDeep; -var isPlainObject = __webpack_require__(554); +var isPlainObject = __webpack_require__(555); module.exports = function isExtendable(val) { return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); @@ -69865,7 +69922,7 @@ module.exports = function isExtendable(val) { /***/ }), -/* 604 */ +/* 605 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69888,7 +69945,7 @@ module.exports = function forIn(obj, fn, thisArg) { /***/ }), -/* 605 */ +/* 606 */ /***/ (function(module, exports) { /*! @@ -69915,14 +69972,14 @@ module.exports = pascalcase; /***/ }), -/* 606 */ +/* 607 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var util = __webpack_require__(112); -var utils = __webpack_require__(607); +var utils = __webpack_require__(608); /** * Expose class utils @@ -70287,7 +70344,7 @@ cu.bubble = function(Parent, events) { /***/ }), -/* 607 */ +/* 608 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -70301,10 +70358,10 @@ var utils = {}; * Lazily required module dependencies */ -utils.union = __webpack_require__(590); -utils.define = __webpack_require__(608); -utils.isObj = __webpack_require__(545); -utils.staticExtend = __webpack_require__(615); +utils.union = __webpack_require__(591); +utils.define = __webpack_require__(609); +utils.isObj = __webpack_require__(546); +utils.staticExtend = __webpack_require__(616); /** @@ -70315,7 +70372,7 @@ module.exports = utils; /***/ }), -/* 608 */ +/* 609 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -70328,7 +70385,7 @@ module.exports = utils; -var isDescriptor = __webpack_require__(609); +var isDescriptor = __webpack_require__(610); module.exports = function defineProperty(obj, prop, val) { if (typeof obj !== 'object' && typeof obj !== 'function') { @@ -70353,7 +70410,7 @@ module.exports = function defineProperty(obj, prop, val) { /***/ }), -/* 609 */ +/* 610 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -70366,9 +70423,9 @@ module.exports = function defineProperty(obj, prop, val) { -var typeOf = __webpack_require__(610); -var isAccessor = __webpack_require__(611); -var isData = __webpack_require__(613); +var typeOf = __webpack_require__(611); +var isAccessor = __webpack_require__(612); +var isData = __webpack_require__(614); module.exports = function isDescriptor(obj, key) { if (typeOf(obj) !== 'object') { @@ -70382,7 +70439,7 @@ module.exports = function isDescriptor(obj, key) { /***/ }), -/* 610 */ +/* 611 */ /***/ (function(module, exports) { var toString = Object.prototype.toString; @@ -70535,7 +70592,7 @@ function isBuffer(val) { /***/ }), -/* 611 */ +/* 612 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -70548,7 +70605,7 @@ function isBuffer(val) { -var typeOf = __webpack_require__(612); +var typeOf = __webpack_require__(613); // accessor descriptor properties var accessor = { @@ -70611,10 +70668,10 @@ module.exports = isAccessorDescriptor; /***/ }), -/* 612 */ +/* 613 */ /***/ (function(module, exports, __webpack_require__) { -var isBuffer = __webpack_require__(571); +var isBuffer = __webpack_require__(572); var toString = Object.prototype.toString; /** @@ -70733,7 +70790,7 @@ module.exports = function kindOf(val) { /***/ }), -/* 613 */ +/* 614 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -70746,7 +70803,7 @@ module.exports = function kindOf(val) { -var typeOf = __webpack_require__(614); +var typeOf = __webpack_require__(615); // data descriptor properties var data = { @@ -70795,10 +70852,10 @@ module.exports = isDataDescriptor; /***/ }), -/* 614 */ +/* 615 */ /***/ (function(module, exports, __webpack_require__) { -var isBuffer = __webpack_require__(571); +var isBuffer = __webpack_require__(572); var toString = Object.prototype.toString; /** @@ -70917,7 +70974,7 @@ module.exports = function kindOf(val) { /***/ }), -/* 615 */ +/* 616 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -70930,8 +70987,8 @@ module.exports = function kindOf(val) { -var copy = __webpack_require__(616); -var define = __webpack_require__(608); +var copy = __webpack_require__(617); +var define = __webpack_require__(609); var util = __webpack_require__(112); /** @@ -71014,15 +71071,15 @@ module.exports = extend; /***/ }), -/* 616 */ +/* 617 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var typeOf = __webpack_require__(570); -var copyDescriptor = __webpack_require__(617); -var define = __webpack_require__(608); +var typeOf = __webpack_require__(571); +var copyDescriptor = __webpack_require__(618); +var define = __webpack_require__(609); /** * Copy static properties, prototype properties, and descriptors from one object to another. @@ -71195,7 +71252,7 @@ module.exports.has = has; /***/ }), -/* 617 */ +/* 618 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -71283,16 +71340,16 @@ function isObject(val) { /***/ }), -/* 618 */ +/* 619 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var use = __webpack_require__(619); -var define = __webpack_require__(608); -var debug = __webpack_require__(621)('snapdragon:compiler'); -var utils = __webpack_require__(627); +var use = __webpack_require__(620); +var define = __webpack_require__(609); +var debug = __webpack_require__(622)('snapdragon:compiler'); +var utils = __webpack_require__(628); /** * Create a new `Compiler` with the given `options`. @@ -71446,7 +71503,7 @@ Compiler.prototype = { // source map support if (opts.sourcemap) { - var sourcemaps = __webpack_require__(646); + var sourcemaps = __webpack_require__(647); sourcemaps(this); this.mapVisit(this.ast.nodes); this.applySourceMaps(); @@ -71467,7 +71524,7 @@ module.exports = Compiler; /***/ }), -/* 619 */ +/* 620 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -71480,7 +71537,7 @@ module.exports = Compiler; -var utils = __webpack_require__(620); +var utils = __webpack_require__(621); module.exports = function base(app, opts) { if (!utils.isObject(app) && typeof app !== 'function') { @@ -71595,7 +71652,7 @@ module.exports = function base(app, opts) { /***/ }), -/* 620 */ +/* 621 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -71609,8 +71666,8 @@ var utils = {}; * Lazily required module dependencies */ -utils.define = __webpack_require__(608); -utils.isObject = __webpack_require__(545); +utils.define = __webpack_require__(609); +utils.isObject = __webpack_require__(546); utils.isString = function(val) { @@ -71625,7 +71682,7 @@ module.exports = utils; /***/ }), -/* 621 */ +/* 622 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71634,14 +71691,14 @@ module.exports = utils; */ if (typeof process !== 'undefined' && process.type === 'renderer') { - module.exports = __webpack_require__(622); + module.exports = __webpack_require__(623); } else { - module.exports = __webpack_require__(625); + module.exports = __webpack_require__(626); } /***/ }), -/* 622 */ +/* 623 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71650,7 +71707,7 @@ if (typeof process !== 'undefined' && process.type === 'renderer') { * Expose `debug()` as the module. */ -exports = module.exports = __webpack_require__(623); +exports = module.exports = __webpack_require__(624); exports.log = log; exports.formatArgs = formatArgs; exports.save = save; @@ -71832,7 +71889,7 @@ function localstorage() { /***/ }), -/* 623 */ +/* 624 */ /***/ (function(module, exports, __webpack_require__) { @@ -71848,7 +71905,7 @@ exports.coerce = coerce; exports.disable = disable; exports.enable = enable; exports.enabled = enabled; -exports.humanize = __webpack_require__(624); +exports.humanize = __webpack_require__(625); /** * The currently active debug mode names, and names to skip. @@ -72040,7 +72097,7 @@ function coerce(val) { /***/ }), -/* 624 */ +/* 625 */ /***/ (function(module, exports) { /** @@ -72198,7 +72255,7 @@ function plural(ms, n, name) { /***/ }), -/* 625 */ +/* 626 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72214,7 +72271,7 @@ var util = __webpack_require__(112); * Expose `debug()` as the module. */ -exports = module.exports = __webpack_require__(623); +exports = module.exports = __webpack_require__(624); exports.init = init; exports.log = log; exports.formatArgs = formatArgs; @@ -72393,7 +72450,7 @@ function createWritableStdioStream (fd) { case 'PIPE': case 'TCP': - var net = __webpack_require__(626); + var net = __webpack_require__(627); stream = new net.Socket({ fd: fd, readable: false, @@ -72452,13 +72509,13 @@ exports.enable(load()); /***/ }), -/* 626 */ +/* 627 */ /***/ (function(module, exports) { module.exports = require("net"); /***/ }), -/* 627 */ +/* 628 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -72468,9 +72525,9 @@ module.exports = require("net"); * Module dependencies */ -exports.extend = __webpack_require__(560); -exports.SourceMap = __webpack_require__(628); -exports.sourceMapResolve = __webpack_require__(639); +exports.extend = __webpack_require__(561); +exports.SourceMap = __webpack_require__(629); +exports.sourceMapResolve = __webpack_require__(640); /** * Convert backslash in the given string to forward slashes @@ -72513,7 +72570,7 @@ exports.last = function(arr, n) { /***/ }), -/* 628 */ +/* 629 */ /***/ (function(module, exports, __webpack_require__) { /* @@ -72521,13 +72578,13 @@ exports.last = function(arr, n) { * Licensed under the New BSD license. See LICENSE.txt or: * http://opensource.org/licenses/BSD-3-Clause */ -exports.SourceMapGenerator = __webpack_require__(629).SourceMapGenerator; -exports.SourceMapConsumer = __webpack_require__(635).SourceMapConsumer; -exports.SourceNode = __webpack_require__(638).SourceNode; +exports.SourceMapGenerator = __webpack_require__(630).SourceMapGenerator; +exports.SourceMapConsumer = __webpack_require__(636).SourceMapConsumer; +exports.SourceNode = __webpack_require__(639).SourceNode; /***/ }), -/* 629 */ +/* 630 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -72537,10 +72594,10 @@ exports.SourceNode = __webpack_require__(638).SourceNode; * http://opensource.org/licenses/BSD-3-Clause */ -var base64VLQ = __webpack_require__(630); -var util = __webpack_require__(632); -var ArraySet = __webpack_require__(633).ArraySet; -var MappingList = __webpack_require__(634).MappingList; +var base64VLQ = __webpack_require__(631); +var util = __webpack_require__(633); +var ArraySet = __webpack_require__(634).ArraySet; +var MappingList = __webpack_require__(635).MappingList; /** * An instance of the SourceMapGenerator represents a source map which is @@ -72949,7 +73006,7 @@ exports.SourceMapGenerator = SourceMapGenerator; /***/ }), -/* 630 */ +/* 631 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -72989,7 +73046,7 @@ exports.SourceMapGenerator = SourceMapGenerator; * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -var base64 = __webpack_require__(631); +var base64 = __webpack_require__(632); // A single base 64 digit can contain 6 bits of data. For the base 64 variable // length quantities we use in the source map spec, the first bit is the sign, @@ -73095,7 +73152,7 @@ exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { /***/ }), -/* 631 */ +/* 632 */ /***/ (function(module, exports) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -73168,7 +73225,7 @@ exports.decode = function (charCode) { /***/ }), -/* 632 */ +/* 633 */ /***/ (function(module, exports) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -73591,7 +73648,7 @@ exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflate /***/ }), -/* 633 */ +/* 634 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -73601,7 +73658,7 @@ exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflate * http://opensource.org/licenses/BSD-3-Clause */ -var util = __webpack_require__(632); +var util = __webpack_require__(633); var has = Object.prototype.hasOwnProperty; var hasNativeMap = typeof Map !== "undefined"; @@ -73718,7 +73775,7 @@ exports.ArraySet = ArraySet; /***/ }), -/* 634 */ +/* 635 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -73728,7 +73785,7 @@ exports.ArraySet = ArraySet; * http://opensource.org/licenses/BSD-3-Clause */ -var util = __webpack_require__(632); +var util = __webpack_require__(633); /** * Determine whether mappingB is after mappingA with respect to generated @@ -73803,7 +73860,7 @@ exports.MappingList = MappingList; /***/ }), -/* 635 */ +/* 636 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -73813,11 +73870,11 @@ exports.MappingList = MappingList; * http://opensource.org/licenses/BSD-3-Clause */ -var util = __webpack_require__(632); -var binarySearch = __webpack_require__(636); -var ArraySet = __webpack_require__(633).ArraySet; -var base64VLQ = __webpack_require__(630); -var quickSort = __webpack_require__(637).quickSort; +var util = __webpack_require__(633); +var binarySearch = __webpack_require__(637); +var ArraySet = __webpack_require__(634).ArraySet; +var base64VLQ = __webpack_require__(631); +var quickSort = __webpack_require__(638).quickSort; function SourceMapConsumer(aSourceMap) { var sourceMap = aSourceMap; @@ -74891,7 +74948,7 @@ exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; /***/ }), -/* 636 */ +/* 637 */ /***/ (function(module, exports) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -75008,7 +75065,7 @@ exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { /***/ }), -/* 637 */ +/* 638 */ /***/ (function(module, exports) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -75128,7 +75185,7 @@ exports.quickSort = function (ary, comparator) { /***/ }), -/* 638 */ +/* 639 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -75138,8 +75195,8 @@ exports.quickSort = function (ary, comparator) { * http://opensource.org/licenses/BSD-3-Clause */ -var SourceMapGenerator = __webpack_require__(629).SourceMapGenerator; -var util = __webpack_require__(632); +var SourceMapGenerator = __webpack_require__(630).SourceMapGenerator; +var util = __webpack_require__(633); // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other // operating systems these days (capturing the result). @@ -75547,17 +75604,17 @@ exports.SourceNode = SourceNode; /***/ }), -/* 639 */ +/* 640 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2014, 2015, 2016, 2017 Simon Lydell // X11 (“MIT”) Licensed. (See LICENSE.) -var sourceMappingURL = __webpack_require__(640) -var resolveUrl = __webpack_require__(641) -var decodeUriComponent = __webpack_require__(642) -var urix = __webpack_require__(644) -var atob = __webpack_require__(645) +var sourceMappingURL = __webpack_require__(641) +var resolveUrl = __webpack_require__(642) +var decodeUriComponent = __webpack_require__(643) +var urix = __webpack_require__(645) +var atob = __webpack_require__(646) @@ -75855,7 +75912,7 @@ module.exports = { /***/ }), -/* 640 */ +/* 641 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;// Copyright 2014 Simon Lydell @@ -75918,7 +75975,7 @@ void (function(root, factory) { /***/ }), -/* 641 */ +/* 642 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2014 Simon Lydell @@ -75936,13 +75993,13 @@ module.exports = resolveUrl /***/ }), -/* 642 */ +/* 643 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2017 Simon Lydell // X11 (“MIT”) Licensed. (See LICENSE.) -var decodeUriComponent = __webpack_require__(643) +var decodeUriComponent = __webpack_require__(644) function customDecodeUriComponent(string) { // `decodeUriComponent` turns `+` into ` `, but that's not wanted. @@ -75953,7 +76010,7 @@ module.exports = customDecodeUriComponent /***/ }), -/* 643 */ +/* 644 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -76054,7 +76111,7 @@ module.exports = function (encodedURI) { /***/ }), -/* 644 */ +/* 645 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2014 Simon Lydell @@ -76077,7 +76134,7 @@ module.exports = urix /***/ }), -/* 645 */ +/* 646 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -76091,7 +76148,7 @@ module.exports = atob.atob = atob; /***/ }), -/* 646 */ +/* 647 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -76099,8 +76156,8 @@ module.exports = atob.atob = atob; var fs = __webpack_require__(134); var path = __webpack_require__(4); -var define = __webpack_require__(608); -var utils = __webpack_require__(627); +var define = __webpack_require__(609); +var utils = __webpack_require__(628); /** * Expose `mixin()`. @@ -76243,19 +76300,19 @@ exports.comment = function(node) { /***/ }), -/* 647 */ +/* 648 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var use = __webpack_require__(619); +var use = __webpack_require__(620); var util = __webpack_require__(112); -var Cache = __webpack_require__(648); -var define = __webpack_require__(608); -var debug = __webpack_require__(621)('snapdragon:parser'); -var Position = __webpack_require__(649); -var utils = __webpack_require__(627); +var Cache = __webpack_require__(649); +var define = __webpack_require__(609); +var debug = __webpack_require__(622)('snapdragon:parser'); +var Position = __webpack_require__(650); +var utils = __webpack_require__(628); /** * Create a new `Parser` with the given `input` and `options`. @@ -76783,7 +76840,7 @@ module.exports = Parser; /***/ }), -/* 648 */ +/* 649 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -76890,13 +76947,13 @@ MapCache.prototype.del = function mapDelete(key) { /***/ }), -/* 649 */ +/* 650 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var define = __webpack_require__(608); +var define = __webpack_require__(609); /** * Store position for a node @@ -76911,14 +76968,14 @@ module.exports = function Position(start, parser) { /***/ }), -/* 650 */ +/* 651 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isExtendable = __webpack_require__(651); -var assignSymbols = __webpack_require__(555); +var isExtendable = __webpack_require__(652); +var assignSymbols = __webpack_require__(556); module.exports = Object.assign || function(obj/*, objects*/) { if (obj === null || typeof obj === 'undefined') { @@ -76978,7 +77035,7 @@ function isEnum(obj, key) { /***/ }), -/* 651 */ +/* 652 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -76991,7 +77048,7 @@ function isEnum(obj, key) { -var isPlainObject = __webpack_require__(554); +var isPlainObject = __webpack_require__(555); module.exports = function isExtendable(val) { return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); @@ -76999,14 +77056,14 @@ module.exports = function isExtendable(val) { /***/ }), -/* 652 */ +/* 653 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var nanomatch = __webpack_require__(653); -var extglob = __webpack_require__(668); +var nanomatch = __webpack_require__(654); +var extglob = __webpack_require__(669); module.exports = function(snapdragon) { var compilers = snapdragon.compiler.compilers; @@ -77083,7 +77140,7 @@ function escapeExtglobs(compiler) { /***/ }), -/* 653 */ +/* 654 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -77094,17 +77151,17 @@ function escapeExtglobs(compiler) { */ var util = __webpack_require__(112); -var toRegex = __webpack_require__(537); -var extend = __webpack_require__(654); +var toRegex = __webpack_require__(538); +var extend = __webpack_require__(655); /** * Local dependencies */ -var compilers = __webpack_require__(656); -var parsers = __webpack_require__(657); -var cache = __webpack_require__(660); -var utils = __webpack_require__(662); +var compilers = __webpack_require__(657); +var parsers = __webpack_require__(658); +var cache = __webpack_require__(661); +var utils = __webpack_require__(663); var MAX_LENGTH = 1024 * 64; /** @@ -77928,14 +77985,14 @@ module.exports = nanomatch; /***/ }), -/* 654 */ +/* 655 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isExtendable = __webpack_require__(655); -var assignSymbols = __webpack_require__(555); +var isExtendable = __webpack_require__(656); +var assignSymbols = __webpack_require__(556); module.exports = Object.assign || function(obj/*, objects*/) { if (obj === null || typeof obj === 'undefined') { @@ -77995,7 +78052,7 @@ function isEnum(obj, key) { /***/ }), -/* 655 */ +/* 656 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78008,7 +78065,7 @@ function isEnum(obj, key) { -var isPlainObject = __webpack_require__(554); +var isPlainObject = __webpack_require__(555); module.exports = function isExtendable(val) { return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); @@ -78016,7 +78073,7 @@ module.exports = function isExtendable(val) { /***/ }), -/* 656 */ +/* 657 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78362,15 +78419,15 @@ module.exports = function(nanomatch, options) { /***/ }), -/* 657 */ +/* 658 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var regexNot = __webpack_require__(556); -var toRegex = __webpack_require__(537); -var isOdd = __webpack_require__(658); +var regexNot = __webpack_require__(557); +var toRegex = __webpack_require__(538); +var isOdd = __webpack_require__(659); /** * Characters to use in negation regex (we want to "not" match @@ -78756,7 +78813,7 @@ module.exports.not = NOT_REGEX; /***/ }), -/* 658 */ +/* 659 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78769,7 +78826,7 @@ module.exports.not = NOT_REGEX; -var isNumber = __webpack_require__(659); +var isNumber = __webpack_require__(660); module.exports = function isOdd(i) { if (!isNumber(i)) { @@ -78783,7 +78840,7 @@ module.exports = function isOdd(i) { /***/ }), -/* 659 */ +/* 660 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78811,14 +78868,14 @@ module.exports = function isNumber(num) { /***/ }), -/* 660 */ +/* 661 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = new (__webpack_require__(661))(); +module.exports = new (__webpack_require__(662))(); /***/ }), -/* 661 */ +/* 662 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78831,7 +78888,7 @@ module.exports = new (__webpack_require__(661))(); -var MapCache = __webpack_require__(648); +var MapCache = __webpack_require__(649); /** * Create a new `FragmentCache` with an optional object to use for `caches`. @@ -78953,7 +79010,7 @@ exports = module.exports = FragmentCache; /***/ }), -/* 662 */ +/* 663 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78966,14 +79023,14 @@ var path = __webpack_require__(4); * Module dependencies */ -var isWindows = __webpack_require__(663)(); -var Snapdragon = __webpack_require__(580); -utils.define = __webpack_require__(664); -utils.diff = __webpack_require__(665); -utils.extend = __webpack_require__(654); -utils.pick = __webpack_require__(666); -utils.typeOf = __webpack_require__(667); -utils.unique = __webpack_require__(559); +var isWindows = __webpack_require__(664)(); +var Snapdragon = __webpack_require__(581); +utils.define = __webpack_require__(665); +utils.diff = __webpack_require__(666); +utils.extend = __webpack_require__(655); +utils.pick = __webpack_require__(667); +utils.typeOf = __webpack_require__(668); +utils.unique = __webpack_require__(560); /** * Returns true if the given value is effectively an empty string @@ -79339,7 +79396,7 @@ utils.unixify = function(options) { /***/ }), -/* 663 */ +/* 664 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! @@ -79367,7 +79424,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/* 664 */ +/* 665 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79380,8 +79437,8 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ -var isobject = __webpack_require__(545); -var isDescriptor = __webpack_require__(546); +var isobject = __webpack_require__(546); +var isDescriptor = __webpack_require__(547); var define = (typeof Reflect !== 'undefined' && Reflect.defineProperty) ? Reflect.defineProperty : Object.defineProperty; @@ -79412,7 +79469,7 @@ module.exports = function defineProperty(obj, key, val) { /***/ }), -/* 665 */ +/* 666 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79466,7 +79523,7 @@ function diffArray(one, two) { /***/ }), -/* 666 */ +/* 667 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79479,7 +79536,7 @@ function diffArray(one, two) { -var isObject = __webpack_require__(545); +var isObject = __webpack_require__(546); module.exports = function pick(obj, keys) { if (!isObject(obj) && typeof obj !== 'function') { @@ -79508,7 +79565,7 @@ module.exports = function pick(obj, keys) { /***/ }), -/* 667 */ +/* 668 */ /***/ (function(module, exports) { var toString = Object.prototype.toString; @@ -79643,7 +79700,7 @@ function isBuffer(val) { /***/ }), -/* 668 */ +/* 669 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79653,18 +79710,18 @@ function isBuffer(val) { * Module dependencies */ -var extend = __webpack_require__(560); -var unique = __webpack_require__(559); -var toRegex = __webpack_require__(537); +var extend = __webpack_require__(561); +var unique = __webpack_require__(560); +var toRegex = __webpack_require__(538); /** * Local dependencies */ -var compilers = __webpack_require__(669); -var parsers = __webpack_require__(675); -var Extglob = __webpack_require__(678); -var utils = __webpack_require__(677); +var compilers = __webpack_require__(670); +var parsers = __webpack_require__(676); +var Extglob = __webpack_require__(679); +var utils = __webpack_require__(678); var MAX_LENGTH = 1024 * 64; /** @@ -79981,13 +80038,13 @@ module.exports = extglob; /***/ }), -/* 669 */ +/* 670 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var brackets = __webpack_require__(670); +var brackets = __webpack_require__(671); /** * Extglob compilers @@ -80157,7 +80214,7 @@ module.exports = function(extglob) { /***/ }), -/* 670 */ +/* 671 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -80167,17 +80224,17 @@ module.exports = function(extglob) { * Local dependencies */ -var compilers = __webpack_require__(671); -var parsers = __webpack_require__(673); +var compilers = __webpack_require__(672); +var parsers = __webpack_require__(674); /** * Module dependencies */ -var debug = __webpack_require__(621)('expand-brackets'); -var extend = __webpack_require__(560); -var Snapdragon = __webpack_require__(580); -var toRegex = __webpack_require__(537); +var debug = __webpack_require__(622)('expand-brackets'); +var extend = __webpack_require__(561); +var Snapdragon = __webpack_require__(581); +var toRegex = __webpack_require__(538); /** * Parses the given POSIX character class `pattern` and returns a @@ -80375,13 +80432,13 @@ module.exports = brackets; /***/ }), -/* 671 */ +/* 672 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var posix = __webpack_require__(672); +var posix = __webpack_require__(673); module.exports = function(brackets) { brackets.compiler @@ -80469,7 +80526,7 @@ module.exports = function(brackets) { /***/ }), -/* 672 */ +/* 673 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -80498,14 +80555,14 @@ module.exports = { /***/ }), -/* 673 */ +/* 674 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var utils = __webpack_require__(674); -var define = __webpack_require__(608); +var utils = __webpack_require__(675); +var define = __webpack_require__(609); /** * Text regex @@ -80724,14 +80781,14 @@ module.exports.TEXT_REGEX = TEXT_REGEX; /***/ }), -/* 674 */ +/* 675 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var toRegex = __webpack_require__(537); -var regexNot = __webpack_require__(556); +var toRegex = __webpack_require__(538); +var regexNot = __webpack_require__(557); var cached; /** @@ -80765,15 +80822,15 @@ exports.createRegex = function(pattern, include) { /***/ }), -/* 675 */ +/* 676 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var brackets = __webpack_require__(670); -var define = __webpack_require__(676); -var utils = __webpack_require__(677); +var brackets = __webpack_require__(671); +var define = __webpack_require__(677); +var utils = __webpack_require__(678); /** * Characters to use in text regex (we want to "not" match @@ -80928,7 +80985,7 @@ module.exports = parsers; /***/ }), -/* 676 */ +/* 677 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -80941,7 +80998,7 @@ module.exports = parsers; -var isDescriptor = __webpack_require__(546); +var isDescriptor = __webpack_require__(547); module.exports = function defineProperty(obj, prop, val) { if (typeof obj !== 'object' && typeof obj !== 'function') { @@ -80966,14 +81023,14 @@ module.exports = function defineProperty(obj, prop, val) { /***/ }), -/* 677 */ +/* 678 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var regex = __webpack_require__(556); -var Cache = __webpack_require__(661); +var regex = __webpack_require__(557); +var Cache = __webpack_require__(662); /** * Utils @@ -81042,7 +81099,7 @@ utils.createRegex = function(str) { /***/ }), -/* 678 */ +/* 679 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -81052,16 +81109,16 @@ utils.createRegex = function(str) { * Module dependencies */ -var Snapdragon = __webpack_require__(580); -var define = __webpack_require__(676); -var extend = __webpack_require__(560); +var Snapdragon = __webpack_require__(581); +var define = __webpack_require__(677); +var extend = __webpack_require__(561); /** * Local dependencies */ -var compilers = __webpack_require__(669); -var parsers = __webpack_require__(675); +var compilers = __webpack_require__(670); +var parsers = __webpack_require__(676); /** * Customize Snapdragon parser and renderer @@ -81127,16 +81184,16 @@ module.exports = Extglob; /***/ }), -/* 679 */ +/* 680 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var extglob = __webpack_require__(668); -var nanomatch = __webpack_require__(653); -var regexNot = __webpack_require__(556); -var toRegex = __webpack_require__(537); +var extglob = __webpack_require__(669); +var nanomatch = __webpack_require__(654); +var regexNot = __webpack_require__(557); +var toRegex = __webpack_require__(538); var not; /** @@ -81217,14 +81274,14 @@ function textRegex(pattern) { /***/ }), -/* 680 */ +/* 681 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = new (__webpack_require__(661))(); +module.exports = new (__webpack_require__(662))(); /***/ }), -/* 681 */ +/* 682 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -81237,13 +81294,13 @@ var path = __webpack_require__(4); * Module dependencies */ -var Snapdragon = __webpack_require__(580); -utils.define = __webpack_require__(682); -utils.diff = __webpack_require__(665); -utils.extend = __webpack_require__(650); -utils.pick = __webpack_require__(666); -utils.typeOf = __webpack_require__(683); -utils.unique = __webpack_require__(559); +var Snapdragon = __webpack_require__(581); +utils.define = __webpack_require__(683); +utils.diff = __webpack_require__(666); +utils.extend = __webpack_require__(651); +utils.pick = __webpack_require__(667); +utils.typeOf = __webpack_require__(684); +utils.unique = __webpack_require__(560); /** * Returns true if the platform is windows, or `path.sep` is `\\`. @@ -81540,7 +81597,7 @@ utils.unixify = function(options) { /***/ }), -/* 682 */ +/* 683 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -81553,8 +81610,8 @@ utils.unixify = function(options) { -var isobject = __webpack_require__(545); -var isDescriptor = __webpack_require__(546); +var isobject = __webpack_require__(546); +var isDescriptor = __webpack_require__(547); var define = (typeof Reflect !== 'undefined' && Reflect.defineProperty) ? Reflect.defineProperty : Object.defineProperty; @@ -81585,7 +81642,7 @@ module.exports = function defineProperty(obj, key, val) { /***/ }), -/* 683 */ +/* 684 */ /***/ (function(module, exports) { var toString = Object.prototype.toString; @@ -81720,7 +81777,7 @@ function isBuffer(val) { /***/ }), -/* 684 */ +/* 685 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -81739,9 +81796,9 @@ var __extends = (this && this.__extends) || (function () { }; })(); Object.defineProperty(exports, "__esModule", { value: true }); -var readdir = __webpack_require__(685); -var reader_1 = __webpack_require__(698); -var fs_stream_1 = __webpack_require__(702); +var readdir = __webpack_require__(686); +var reader_1 = __webpack_require__(699); +var fs_stream_1 = __webpack_require__(703); var ReaderAsync = /** @class */ (function (_super) { __extends(ReaderAsync, _super); function ReaderAsync() { @@ -81802,15 +81859,15 @@ exports.default = ReaderAsync; /***/ }), -/* 685 */ +/* 686 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const readdirSync = __webpack_require__(686); -const readdirAsync = __webpack_require__(694); -const readdirStream = __webpack_require__(697); +const readdirSync = __webpack_require__(687); +const readdirAsync = __webpack_require__(695); +const readdirStream = __webpack_require__(698); module.exports = exports = readdirAsyncPath; exports.readdir = exports.readdirAsync = exports.async = readdirAsyncPath; @@ -81894,7 +81951,7 @@ function readdirStreamStat (dir, options) { /***/ }), -/* 686 */ +/* 687 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -81902,11 +81959,11 @@ function readdirStreamStat (dir, options) { module.exports = readdirSync; -const DirectoryReader = __webpack_require__(687); +const DirectoryReader = __webpack_require__(688); let syncFacade = { - fs: __webpack_require__(692), - forEach: __webpack_require__(693), + fs: __webpack_require__(693), + forEach: __webpack_require__(694), sync: true }; @@ -81935,7 +81992,7 @@ function readdirSync (dir, options, internalOptions) { /***/ }), -/* 687 */ +/* 688 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -81944,9 +82001,9 @@ function readdirSync (dir, options, internalOptions) { const Readable = __webpack_require__(138).Readable; const EventEmitter = __webpack_require__(156).EventEmitter; const path = __webpack_require__(4); -const normalizeOptions = __webpack_require__(688); -const stat = __webpack_require__(690); -const call = __webpack_require__(691); +const normalizeOptions = __webpack_require__(689); +const stat = __webpack_require__(691); +const call = __webpack_require__(692); /** * Asynchronously reads the contents of a directory and streams the results @@ -82322,14 +82379,14 @@ module.exports = DirectoryReader; /***/ }), -/* 688 */ +/* 689 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(4); -const globToRegExp = __webpack_require__(689); +const globToRegExp = __webpack_require__(690); module.exports = normalizeOptions; @@ -82506,7 +82563,7 @@ function normalizeOptions (options, internalOptions) { /***/ }), -/* 689 */ +/* 690 */ /***/ (function(module, exports) { module.exports = function (glob, opts) { @@ -82643,13 +82700,13 @@ module.exports = function (glob, opts) { /***/ }), -/* 690 */ +/* 691 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const call = __webpack_require__(691); +const call = __webpack_require__(692); module.exports = stat; @@ -82724,7 +82781,7 @@ function symlinkStat (fs, path, lstats, callback) { /***/ }), -/* 691 */ +/* 692 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82785,14 +82842,14 @@ function callOnce (fn) { /***/ }), -/* 692 */ +/* 693 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const fs = __webpack_require__(134); -const call = __webpack_require__(691); +const call = __webpack_require__(692); /** * A facade around {@link fs.readdirSync} that allows it to be called @@ -82856,7 +82913,7 @@ exports.lstat = function (path, callback) { /***/ }), -/* 693 */ +/* 694 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82885,7 +82942,7 @@ function syncForEach (array, iterator, done) { /***/ }), -/* 694 */ +/* 695 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82893,12 +82950,12 @@ function syncForEach (array, iterator, done) { module.exports = readdirAsync; -const maybe = __webpack_require__(695); -const DirectoryReader = __webpack_require__(687); +const maybe = __webpack_require__(696); +const DirectoryReader = __webpack_require__(688); let asyncFacade = { fs: __webpack_require__(134), - forEach: __webpack_require__(696), + forEach: __webpack_require__(697), async: true }; @@ -82940,7 +82997,7 @@ function readdirAsync (dir, options, callback, internalOptions) { /***/ }), -/* 695 */ +/* 696 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82967,7 +83024,7 @@ module.exports = function maybe (cb, promise) { /***/ }), -/* 696 */ +/* 697 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83003,7 +83060,7 @@ function asyncForEach (array, iterator, done) { /***/ }), -/* 697 */ +/* 698 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83011,11 +83068,11 @@ function asyncForEach (array, iterator, done) { module.exports = readdirStream; -const DirectoryReader = __webpack_require__(687); +const DirectoryReader = __webpack_require__(688); let streamFacade = { fs: __webpack_require__(134), - forEach: __webpack_require__(696), + forEach: __webpack_require__(697), async: true }; @@ -83035,16 +83092,16 @@ function readdirStream (dir, options, internalOptions) { /***/ }), -/* 698 */ +/* 699 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var path = __webpack_require__(4); -var deep_1 = __webpack_require__(699); -var entry_1 = __webpack_require__(701); -var pathUtil = __webpack_require__(700); +var deep_1 = __webpack_require__(700); +var entry_1 = __webpack_require__(702); +var pathUtil = __webpack_require__(701); var Reader = /** @class */ (function () { function Reader(options) { this.options = options; @@ -83110,14 +83167,14 @@ exports.default = Reader; /***/ }), -/* 699 */ +/* 700 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var pathUtils = __webpack_require__(700); -var patternUtils = __webpack_require__(531); +var pathUtils = __webpack_require__(701); +var patternUtils = __webpack_require__(532); var DeepFilter = /** @class */ (function () { function DeepFilter(options, micromatchOptions) { this.options = options; @@ -83200,7 +83257,7 @@ exports.default = DeepFilter; /***/ }), -/* 700 */ +/* 701 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83231,14 +83288,14 @@ exports.makeAbsolute = makeAbsolute; /***/ }), -/* 701 */ +/* 702 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var pathUtils = __webpack_require__(700); -var patternUtils = __webpack_require__(531); +var pathUtils = __webpack_require__(701); +var patternUtils = __webpack_require__(532); var EntryFilter = /** @class */ (function () { function EntryFilter(options, micromatchOptions) { this.options = options; @@ -83323,7 +83380,7 @@ exports.default = EntryFilter; /***/ }), -/* 702 */ +/* 703 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83343,8 +83400,8 @@ var __extends = (this && this.__extends) || (function () { })(); Object.defineProperty(exports, "__esModule", { value: true }); var stream = __webpack_require__(138); -var fsStat = __webpack_require__(703); -var fs_1 = __webpack_require__(707); +var fsStat = __webpack_require__(704); +var fs_1 = __webpack_require__(708); var FileSystemStream = /** @class */ (function (_super) { __extends(FileSystemStream, _super); function FileSystemStream() { @@ -83394,14 +83451,14 @@ exports.default = FileSystemStream; /***/ }), -/* 703 */ +/* 704 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const optionsManager = __webpack_require__(704); -const statProvider = __webpack_require__(706); +const optionsManager = __webpack_require__(705); +const statProvider = __webpack_require__(707); /** * Asynchronous API. */ @@ -83432,13 +83489,13 @@ exports.statSync = statSync; /***/ }), -/* 704 */ +/* 705 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const fsAdapter = __webpack_require__(705); +const fsAdapter = __webpack_require__(706); function prepare(opts) { const options = Object.assign({ fs: fsAdapter.getFileSystemAdapter(opts ? opts.fs : undefined), @@ -83451,7 +83508,7 @@ exports.prepare = prepare; /***/ }), -/* 705 */ +/* 706 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83474,7 +83531,7 @@ exports.getFileSystemAdapter = getFileSystemAdapter; /***/ }), -/* 706 */ +/* 707 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83526,7 +83583,7 @@ exports.isFollowedSymlink = isFollowedSymlink; /***/ }), -/* 707 */ +/* 708 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83557,7 +83614,7 @@ exports.default = FileSystem; /***/ }), -/* 708 */ +/* 709 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83577,9 +83634,9 @@ var __extends = (this && this.__extends) || (function () { })(); Object.defineProperty(exports, "__esModule", { value: true }); var stream = __webpack_require__(138); -var readdir = __webpack_require__(685); -var reader_1 = __webpack_require__(698); -var fs_stream_1 = __webpack_require__(702); +var readdir = __webpack_require__(686); +var reader_1 = __webpack_require__(699); +var fs_stream_1 = __webpack_require__(703); var TransformStream = /** @class */ (function (_super) { __extends(TransformStream, _super); function TransformStream(reader) { @@ -83647,7 +83704,7 @@ exports.default = ReaderStream; /***/ }), -/* 709 */ +/* 710 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83666,9 +83723,9 @@ var __extends = (this && this.__extends) || (function () { }; })(); Object.defineProperty(exports, "__esModule", { value: true }); -var readdir = __webpack_require__(685); -var reader_1 = __webpack_require__(698); -var fs_sync_1 = __webpack_require__(710); +var readdir = __webpack_require__(686); +var reader_1 = __webpack_require__(699); +var fs_sync_1 = __webpack_require__(711); var ReaderSync = /** @class */ (function (_super) { __extends(ReaderSync, _super); function ReaderSync() { @@ -83728,7 +83785,7 @@ exports.default = ReaderSync; /***/ }), -/* 710 */ +/* 711 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83747,8 +83804,8 @@ var __extends = (this && this.__extends) || (function () { }; })(); Object.defineProperty(exports, "__esModule", { value: true }); -var fsStat = __webpack_require__(703); -var fs_1 = __webpack_require__(707); +var fsStat = __webpack_require__(704); +var fs_1 = __webpack_require__(708); var FileSystemSync = /** @class */ (function (_super) { __extends(FileSystemSync, _super); function FileSystemSync() { @@ -83794,7 +83851,7 @@ exports.default = FileSystemSync; /***/ }), -/* 711 */ +/* 712 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83810,7 +83867,7 @@ exports.flatten = flatten; /***/ }), -/* 712 */ +/* 713 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83831,13 +83888,13 @@ exports.merge = merge; /***/ }), -/* 713 */ +/* 714 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(4); -const pathType = __webpack_require__(714); +const pathType = __webpack_require__(715); const getExtensions = extensions => extensions.length > 1 ? `{${extensions.join(',')}}` : extensions[0]; @@ -83903,13 +83960,13 @@ module.exports.sync = (input, opts) => { /***/ }), -/* 714 */ +/* 715 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const fs = __webpack_require__(134); -const pify = __webpack_require__(715); +const pify = __webpack_require__(716); function type(fn, fn2, fp) { if (typeof fp !== 'string') { @@ -83952,7 +84009,7 @@ exports.symlinkSync = typeSync.bind(null, 'lstatSync', 'isSymbolicLink'); /***/ }), -/* 715 */ +/* 716 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84043,17 +84100,17 @@ module.exports = (obj, opts) => { /***/ }), -/* 716 */ +/* 717 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const fs = __webpack_require__(134); const path = __webpack_require__(4); -const fastGlob = __webpack_require__(527); -const gitIgnore = __webpack_require__(717); -const pify = __webpack_require__(718); -const slash = __webpack_require__(719); +const fastGlob = __webpack_require__(528); +const gitIgnore = __webpack_require__(718); +const pify = __webpack_require__(719); +const slash = __webpack_require__(720); const DEFAULT_IGNORE = [ '**/node_modules/**', @@ -84151,7 +84208,7 @@ module.exports.sync = options => { /***/ }), -/* 717 */ +/* 718 */ /***/ (function(module, exports) { // A simple implementation of make-array @@ -84620,7 +84677,7 @@ module.exports = options => new IgnoreBase(options) /***/ }), -/* 718 */ +/* 719 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84695,7 +84752,7 @@ module.exports = (input, options) => { /***/ }), -/* 719 */ +/* 720 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84713,7 +84770,7 @@ module.exports = input => { /***/ }), -/* 720 */ +/* 721 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84726,7 +84783,7 @@ module.exports = input => { -var isGlob = __webpack_require__(721); +var isGlob = __webpack_require__(722); module.exports = function hasGlob(val) { if (val == null) return false; @@ -84746,7 +84803,7 @@ module.exports = function hasGlob(val) { /***/ }), -/* 721 */ +/* 722 */ /***/ (function(module, exports, __webpack_require__) { /*! @@ -84777,17 +84834,17 @@ module.exports = function isGlob(str) { /***/ }), -/* 722 */ +/* 723 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(4); const {constants: fsConstants} = __webpack_require__(134); -const pEvent = __webpack_require__(723); -const CpFileError = __webpack_require__(726); -const fs = __webpack_require__(728); -const ProgressEmitter = __webpack_require__(731); +const pEvent = __webpack_require__(724); +const CpFileError = __webpack_require__(727); +const fs = __webpack_require__(729); +const ProgressEmitter = __webpack_require__(732); const cpFileAsync = async (source, destination, options, progressEmitter) => { let readError; @@ -84901,12 +84958,12 @@ module.exports.sync = (source, destination, options) => { /***/ }), -/* 723 */ +/* 724 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const pTimeout = __webpack_require__(724); +const pTimeout = __webpack_require__(725); const symbolAsyncIterator = Symbol.asyncIterator || '@@asyncIterator'; @@ -85197,12 +85254,12 @@ module.exports.iterator = (emitter, event, options) => { /***/ }), -/* 724 */ +/* 725 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const pFinally = __webpack_require__(725); +const pFinally = __webpack_require__(726); class TimeoutError extends Error { constructor(message) { @@ -85248,7 +85305,7 @@ module.exports.TimeoutError = TimeoutError; /***/ }), -/* 725 */ +/* 726 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85270,12 +85327,12 @@ module.exports = (promise, onFinally) => { /***/ }), -/* 726 */ +/* 727 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const NestedError = __webpack_require__(727); +const NestedError = __webpack_require__(728); class CpFileError extends NestedError { constructor(message, nested) { @@ -85289,7 +85346,7 @@ module.exports = CpFileError; /***/ }), -/* 727 */ +/* 728 */ /***/ (function(module, exports, __webpack_require__) { var inherits = __webpack_require__(112).inherits; @@ -85345,16 +85402,16 @@ module.exports = NestedError; /***/ }), -/* 728 */ +/* 729 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const {promisify} = __webpack_require__(112); const fs = __webpack_require__(133); -const makeDir = __webpack_require__(729); -const pEvent = __webpack_require__(723); -const CpFileError = __webpack_require__(726); +const makeDir = __webpack_require__(730); +const pEvent = __webpack_require__(724); +const CpFileError = __webpack_require__(727); const stat = promisify(fs.stat); const lstat = promisify(fs.lstat); @@ -85451,7 +85508,7 @@ exports.copyFileSync = (source, destination, flags) => { /***/ }), -/* 729 */ +/* 730 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85459,7 +85516,7 @@ exports.copyFileSync = (source, destination, flags) => { const fs = __webpack_require__(134); const path = __webpack_require__(4); const {promisify} = __webpack_require__(112); -const semver = __webpack_require__(730); +const semver = __webpack_require__(731); const useNativeRecursiveOption = semver.satisfies(process.version, '>=10.12.0'); @@ -85614,7 +85671,7 @@ module.exports.sync = (input, options) => { /***/ }), -/* 730 */ +/* 731 */ /***/ (function(module, exports) { exports = module.exports = SemVer @@ -87216,7 +87273,7 @@ function coerce (version, options) { /***/ }), -/* 731 */ +/* 732 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -87257,7 +87314,7 @@ module.exports = ProgressEmitter; /***/ }), -/* 732 */ +/* 733 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -87303,12 +87360,12 @@ exports.default = module.exports; /***/ }), -/* 733 */ +/* 734 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const pMap = __webpack_require__(734); +const pMap = __webpack_require__(735); const pFilter = async (iterable, filterer, options) => { const values = await pMap( @@ -87325,7 +87382,7 @@ module.exports.default = pFilter; /***/ }), -/* 734 */ +/* 735 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -87404,12 +87461,12 @@ module.exports.default = pMap; /***/ }), -/* 735 */ +/* 736 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const NestedError = __webpack_require__(727); +const NestedError = __webpack_require__(728); class CpyError extends NestedError { constructor(message, nested) { @@ -87423,16 +87480,16 @@ module.exports = CpyError; /***/ }), -/* 736 */ +/* 737 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const arrayUnion = __webpack_require__(737); +const arrayUnion = __webpack_require__(738); const glob = __webpack_require__(147); -const fastGlob = __webpack_require__(527); -const dirGlob = __webpack_require__(738); -const gitignore = __webpack_require__(742); +const fastGlob = __webpack_require__(528); +const dirGlob = __webpack_require__(739); +const gitignore = __webpack_require__(743); const DEFAULT_FILTER = () => false; @@ -87558,12 +87615,12 @@ module.exports.gitignore = gitignore; /***/ }), -/* 737 */ +/* 738 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var arrayUniq = __webpack_require__(526); +var arrayUniq = __webpack_require__(527); module.exports = function () { return arrayUniq([].concat.apply([], arguments)); @@ -87571,14 +87628,14 @@ module.exports = function () { /***/ }), -/* 738 */ +/* 739 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(4); -const arrify = __webpack_require__(739); -const pathType = __webpack_require__(740); +const arrify = __webpack_require__(740); +const pathType = __webpack_require__(741); const getExtensions = extensions => extensions.length > 1 ? `{${extensions.join(',')}}` : extensions[0]; const getPath = filepath => filepath[0] === '!' ? filepath.slice(1) : filepath; @@ -87626,7 +87683,7 @@ module.exports.sync = (input, opts) => { /***/ }), -/* 739 */ +/* 740 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -87641,13 +87698,13 @@ module.exports = function (val) { /***/ }), -/* 740 */ +/* 741 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const fs = __webpack_require__(134); -const pify = __webpack_require__(741); +const pify = __webpack_require__(742); function type(fn, fn2, fp) { if (typeof fp !== 'string') { @@ -87690,7 +87747,7 @@ exports.symlinkSync = typeSync.bind(null, 'lstatSync', 'isSymbolicLink'); /***/ }), -/* 741 */ +/* 742 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -87781,17 +87838,17 @@ module.exports = (obj, opts) => { /***/ }), -/* 742 */ +/* 743 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const fs = __webpack_require__(134); const path = __webpack_require__(4); -const fastGlob = __webpack_require__(527); -const gitIgnore = __webpack_require__(743); -const pify = __webpack_require__(741); -const slash = __webpack_require__(744); +const fastGlob = __webpack_require__(528); +const gitIgnore = __webpack_require__(744); +const pify = __webpack_require__(742); +const slash = __webpack_require__(745); const DEFAULT_IGNORE = [ '**/node_modules/**', @@ -87883,7 +87940,7 @@ module.exports.sync = o => { /***/ }), -/* 743 */ +/* 744 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -88315,7 +88372,7 @@ typeof process !== 'undefined' && (process.env && process.env.IGNORE_TEST_WIN32 /***/ }), -/* 744 */ +/* 745 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -88333,7 +88390,7 @@ module.exports = function (str) { /***/ }), -/* 745 */ +/* 746 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -88341,13 +88398,13 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buildNonBazelProductionProjects", function() { return buildNonBazelProductionProjects; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getProductionProjects", function() { return getProductionProjects; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buildProject", function() { return buildProject; }); -/* harmony import */ var cpy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(520); +/* harmony import */ var cpy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(521); /* harmony import */ var cpy__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(cpy__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(143); /* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(del__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(517); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(518); /* harmony import */ var _utils_fs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(131); /* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(246); /* harmony import */ var _utils_package_json__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(251); diff --git a/packages/kbn-pm/src/cli.ts b/packages/kbn-pm/src/cli.ts index bedd39f88893c..6d033b4121d99 100644 --- a/packages/kbn-pm/src/cli.ts +++ b/packages/kbn-pm/src/cli.ts @@ -37,6 +37,8 @@ function help() { --skip-kibana-plugins Filter all plugins in ./plugins and ../kibana-extra when running command. --no-cache Disable the kbn packages bootstrap cache --no-validate Disable the bootstrap yarn.lock validation + --force-install Forces yarn install to run on bootstrap + --offline Run in offline mode --verbose Set log level to verbose --debug Set log level to debug --quiet Set log level to error @@ -73,9 +75,11 @@ export async function run(argv: string[]) { }, default: { cache: true, + 'force-install': true, + offline: false, validate: true, }, - boolean: ['cache', 'validate'], + boolean: ['cache', 'force-install', 'offline', 'validate'], }); const args = options._; diff --git a/packages/kbn-pm/src/commands/bootstrap.ts b/packages/kbn-pm/src/commands/bootstrap.ts index 98fcd71c3ac38..544bfd5587e00 100644 --- a/packages/kbn-pm/src/commands/bootstrap.ts +++ b/packages/kbn-pm/src/commands/bootstrap.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { sep } from 'path'; +import { resolve, sep } from 'path'; import { linkProjectExecutables } from '../utils/link_project_executables'; import { log } from '../utils/log'; import { parallelizeBatches } from '../utils/parallelize'; @@ -17,7 +17,7 @@ import { getAllChecksums } from '../utils/project_checksums'; import { BootstrapCacheFile } from '../utils/bootstrap_cache_file'; import { readYarnLock } from '../utils/yarn_lock'; import { validateDependencies } from '../utils/validate_dependencies'; -import { installBazelTools, runBazel } from '../utils/bazel'; +import { ensureYarnIntegrityFileExists, installBazelTools, runBazel } from '../utils/bazel'; export const BootstrapCommand: ICommand = { description: 'Install dependencies and crosslink projects', @@ -26,12 +26,36 @@ export const BootstrapCommand: ICommand = { async run(projects, projectGraph, { options, kbn, rootPath }) { const nonBazelProjectsOnly = await getNonBazelProjectsOnly(projects); const batchedNonBazelProjects = topologicallyBatchProjects(nonBazelProjectsOnly, projectGraph); - const kibanaProjectPath = projects.get('kibana')?.path; + const kibanaProjectPath = projects.get('kibana')?.path || ''; + const runOffline = options?.offline === true; + const forceInstall = !!options && options['force-install'] === true; + + // Ensure we have a `node_modules/.yarn-integrity` file as we depend on it + // for bazel to know it has to re-install the node_modules after a reset or a clean + await ensureYarnIntegrityFileExists(resolve(kibanaProjectPath, 'node_modules')); // Install bazel machinery tools if needed await installBazelTools(rootPath); - // Install monorepo npm dependencies + // Bootstrap process for Bazel packages + // Bazel is now managing dependencies so yarn install + // will happen as part of this + // + // NOTE: Bazel projects will be introduced incrementally + // And should begin from the ones with none dependencies forward. + // That way non bazel projects could depend on bazel projects but not the other way around + // That is only intended during the migration process while non Bazel projects are not removed at all. + // + // Until we have our first package build within Bazel we will always need to directly call the yarn rule + // otherwise yarn install won't trigger as we don't have any npm dependency within Bazel + // TODO: Change CLI default in order to not force install as soon as we have our first Bazel package being built + if (forceInstall) { + await runBazel(['run', '@nodejs//:yarn'], runOffline); + } + + await runBazel(['build', '//packages:build'], runOffline); + + // Install monorepo npm dependencies outside of the Bazel managed ones for (const batch of batchedNonBazelProjects) { for (const project of batch) { const isExternalPlugin = project.path.includes(`${kibanaProjectPath}${sep}plugins`); @@ -40,12 +64,16 @@ export const BootstrapCommand: ICommand = { continue; } - if (project.isSinglePackageJsonProject || isExternalPlugin) { + if (isExternalPlugin) { await project.installDependencies(); continue; } - if (!project.isEveryDependencyLocal() && !isExternalPlugin) { + if ( + !project.isSinglePackageJsonProject && + !project.isEveryDependencyLocal() && + !isExternalPlugin + ) { throw new Error( `[${project.name}] is not eligible to hold non local dependencies. Move the non local dependencies into the top level package.json.` ); @@ -61,15 +89,9 @@ export const BootstrapCommand: ICommand = { // Assure all kbn projects with bin defined scripts // copy those scripts into the top level node_modules folder - await linkProjectExecutables(projects, projectGraph); - - // Bootstrap process for Bazel packages // - // NOTE: Bazel projects will be introduced incrementally - // And should begin from the ones with none dependencies forward. - // That way non bazel projects could depend on bazel projects but not the other way around - // That is only intended during the migration process while non Bazel projects are not removed at all. - await runBazel(['build', '//packages:build']); + // NOTE: We don't probably need this anymore, is actually not being used + await linkProjectExecutables(projects, projectGraph); // Bootstrap process for non Bazel packages /** diff --git a/packages/kbn-pm/src/utils/bazel/ensure_yarn_integrity_exists.ts b/packages/kbn-pm/src/utils/bazel/ensure_yarn_integrity_exists.ts new file mode 100644 index 0000000000000..90786bc0ea55e --- /dev/null +++ b/packages/kbn-pm/src/utils/bazel/ensure_yarn_integrity_exists.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 { join } from 'path'; +import { writeFile } from '../fs'; + +export async function ensureYarnIntegrityFileExists(nodeModulesPath: string) { + try { + await writeFile(join(nodeModulesPath, '.yarn-integrity'), '', { flag: 'wx' }); + } catch { + // no-op + } +} diff --git a/packages/kbn-pm/src/utils/bazel/index.ts b/packages/kbn-pm/src/utils/bazel/index.ts index f0e10849fb41a..0b755ba2446a0 100644 --- a/packages/kbn-pm/src/utils/bazel/index.ts +++ b/packages/kbn-pm/src/utils/bazel/index.ts @@ -6,6 +6,7 @@ * Side Public License, v 1. */ +export * from './ensure_yarn_integrity_exists'; export * from './get_cache_folders'; export * from './install_tools'; export * from './run'; diff --git a/packages/kbn-pm/src/utils/bazel/run.ts b/packages/kbn-pm/src/utils/bazel/run.ts index 5309c08d0b2ad..ab20150768b78 100644 --- a/packages/kbn-pm/src/utils/bazel/run.ts +++ b/packages/kbn-pm/src/utils/bazel/run.ts @@ -14,13 +14,21 @@ import { observeLines } from '@kbn/dev-utils/stdio'; import { spawn } from '../child_process'; import { log } from '../log'; -export async function runBazel(bazelArgs: string[], runOpts: execa.Options = {}) { +export async function runBazel( + bazelArgs: string[], + offline: boolean = false, + runOpts: execa.Options = {} +) { // Force logs to pipe in order to control the output of them const bazelOpts: execa.Options = { ...runOpts, stdio: 'pipe', }; + if (offline) { + bazelArgs.push('--config=offline'); + } + const bazelProc = spawn('bazel', bazelArgs, bazelOpts); const bazelLogs$ = new Rx.Subject(); diff --git a/packages/kbn-test/src/functional_test_runner/lib/index.ts b/packages/kbn-test/src/functional_test_runner/lib/index.ts index 69354c4582cdc..eef9e833fe5a8 100644 --- a/packages/kbn-test/src/functional_test_runner/lib/index.ts +++ b/packages/kbn-test/src/functional_test_runner/lib/index.ts @@ -9,8 +9,10 @@ export { Lifecycle } from './lifecycle'; export { LifecyclePhase } from './lifecycle_phase'; export { readConfigFile, Config } from './config'; -export { readProviderSpec, ProviderCollection, Provider } from './providers'; +export { readProviderSpec, ProviderCollection } from './providers'; export { runTests, setupMocha } from './mocha'; export { FailureMetadata } from './failure_metadata'; export * from './docker_servers'; export { SuiteTracker } from './suite_tracker'; + +export type { Provider } from './providers'; diff --git a/packages/kbn-test/src/functional_test_runner/lib/providers/index.ts b/packages/kbn-test/src/functional_test_runner/lib/providers/index.ts index 70abfdc51d757..10aeca19ba45a 100644 --- a/packages/kbn-test/src/functional_test_runner/lib/providers/index.ts +++ b/packages/kbn-test/src/functional_test_runner/lib/providers/index.ts @@ -7,4 +7,5 @@ */ export { ProviderCollection } from './provider_collection'; -export { Provider, readProviderSpec } from './read_provider_spec'; +export { readProviderSpec } from './read_provider_spec'; +export type { Provider } from './read_provider_spec'; diff --git a/packages/kbn-test/src/functional_tests/lib/run_kibana_server.js b/packages/kbn-test/src/functional_tests/lib/run_kibana_server.js index a43d3a09c7d70..2145be4f492f2 100644 --- a/packages/kbn-test/src/functional_tests/lib/run_kibana_server.js +++ b/packages/kbn-test/src/functional_tests/lib/run_kibana_server.js @@ -38,7 +38,7 @@ export async function runKibanaServer({ procs, config, options }) { ...extendNodeOptions(installDir), }, cwd: installDir || KIBANA_ROOT, - wait: /http server running/, + wait: /Kibana is now available/, }); } diff --git a/packages/kbn-test/src/functional_tests/tasks.js b/packages/kbn-test/src/functional_tests/tasks.js index 02c55b6af91dc..099963545a2dc 100644 --- a/packages/kbn-test/src/functional_tests/tasks.js +++ b/packages/kbn-test/src/functional_tests/tasks.js @@ -95,8 +95,6 @@ export async function runTests(options) { try { es = await runElasticsearch({ config, options: opts }); await runKibanaServer({ procs, config, options: opts }); - // workaround until https://github.com/elastic/kibana/issues/89828 is addressed - await delay(5000); await runFtr({ configPath, options: opts }); } finally { try { @@ -162,7 +160,3 @@ async function silence(log, milliseconds) { ) .toPromise(); } - -async function delay(ms) { - await new Promise((resolve) => setTimeout(resolve, ms)); -} diff --git a/src/core/CONVENTIONS.md b/src/core/CONVENTIONS.md index 6a519d44de0d9..67476af87b6de 100644 --- a/src/core/CONVENTIONS.md +++ b/src/core/CONVENTIONS.md @@ -202,14 +202,14 @@ export class MyPlugin implements Plugin { } ``` -Prefer the pattern shown above, using `core.getStartServices()`, rather than store local references retrieved from `start`. +Prefer the pattern shown above, using `core.getStartServices()`, rather than store local references retrieved from `start`. **Bad:** ```ts export class MyPlugin implements Plugin { // Anti pattern private coreStart?: CoreStart; - private depsStart?: DepsStart; + private depsStart?: DepsStart; public setup(core) { core.application.register({ @@ -220,7 +220,7 @@ export class MyPlugin implements Plugin { return renderApp(this.coreStart, this.depsStart, params); } }); - } + } public start(core, deps) { // Anti pattern @@ -361,5 +361,5 @@ Migration example from the legacy format is available in `src/core/MIGRATION_EXA ### Naming conventions -Export start and setup contracts as `MyPluginStart` and `MyPluginSetup`. +Export start and setup contracts as `MyPluginStart` and `MyPluginSetup`. This avoids naming clashes, if everyone exported them simply as `Start` and `Setup`. diff --git a/src/core/CORE_CONVENTIONS.md b/src/core/CORE_CONVENTIONS.md index 76f3be1595258..1cd997d570b6a 100644 --- a/src/core/CORE_CONVENTIONS.md +++ b/src/core/CORE_CONVENTIONS.md @@ -15,7 +15,7 @@ area of Core API's and does not apply to internal types. - 1.1 All API types must be exported from the top-level `server` or `public` directories. - + ```ts // -- good -- import { IRouter } from 'src/core/server'; @@ -23,15 +23,15 @@ area of Core API's and does not apply to internal types. // -- bad -- import { IRouter } from 'src/core/server/http/router.ts'; ``` - + > Why? This is required for generating documentation from our inline > typescript doc comments, makes it easier for API consumers to find the > relevant types and creates a clear distinction between external and > internal types. - + - 1.2 Classes must not be exposed directly. Instead, use a separate type, prefixed with an 'I', to describe the public contract of the class. - + ```ts // -- good (alternative 1) -- /** @@ -66,14 +66,14 @@ area of Core API's and does not apply to internal types. ``` > Why? Classes' private members form part of their type signature making it - > impossible to mock a dependency typed as a `class`. + > impossible to mock a dependency typed as a `class`. > > Until we can use ES private field support in Typescript 3.8 > https://github.com/elastic/kibana/issues/54906 we have two alternatives > each with their own pro's and cons: > > #### Using a derived class (alternative 1) - > + > > Pro's: > - TSDoc comments are located with the source code > - The class acts as a single source of type information @@ -81,12 +81,12 @@ area of Core API's and does not apply to internal types. > Con's: > - "Go to definition" first takes you to where the type gets derived > requiring a second "Go to definition" to navigate to the type source. - > + > > #### Using a separate interface (alternative 2) > Pro's: > - Creates an explicit external API contract > - "Go to definition" will take you directly to the type definition. - > + > > Con's: > - TSDoc comments are located with the interface not next to the > implementation source code. diff --git a/src/core/README.md b/src/core/README.md index 799cdb5c799ae..4dd045f37b483 100644 --- a/src/core/README.md +++ b/src/core/README.md @@ -9,7 +9,7 @@ Core Plugin API Documentation: - [Conventions for Plugins](./CONVENTIONS.md) - [Testing Kibana Plugins](./TESTING.md) - [Kibana Platform Plugin API](./docs/developer/architecture/kibana-platform-plugin-api.asciidoc ) - + Internal Documentation: - [Saved Objects Migrations](./server/saved_objects/migrations/README.md) @@ -18,18 +18,18 @@ Internal Documentation: Most of the existing core functionality is still spread over "legacy" Kibana and it will take some time to upgrade it. Kibana is started using existing "legacy" CLI that bootstraps `core` which in turn creates the "legacy" Kibana server. At the moment `core` manages HTTP connections, handles TLS configuration and base path proxy. All requests to Kibana server -will hit HTTP server exposed by the `core` first and it will decide whether request can be solely handled by the new +will hit HTTP server exposed by the `core` first and it will decide whether request can be solely handled by the new platform or request should be proxied to the "legacy" Kibana. This setup allows `core` to gradually introduce any "pre-route" processing logic, expose new routes or replace old ones handled by the "legacy" Kibana currently. -Once config has been loaded and some of its parts were validated by the `core` it's passed to the "legacy" Kibana where +Once config has been loaded and some of its parts were validated by the `core` it's passed to the "legacy" Kibana where it will be additionally validated so that we can make config validation stricter with the new config validation system. -Even though the new validation system provided by the `core` is also based on Joi internally it is complemented with custom +Even though the new validation system provided by the `core` is also based on Joi internally it is complemented with custom rules tailored to our needs (e.g. `byteSize`, `duration` etc.). That means that config values that were previously accepted by the "legacy" Kibana may be rejected by the `core` now. ### Logging -`core` has its own [logging system](./server/logging/README.mdx) and will output log records directly (e.g. to file or terminal) when configured. When no +`core` has its own [logging system](./server/logging/README.mdx) and will output log records directly (e.g. to file or terminal) when configured. When no specific configuration is provided, logs are forwarded to the "legacy" Kibana so that they look the same as the rest of the log records throughout Kibana. diff --git a/src/core/public/application/capabilities/index.ts b/src/core/public/application/capabilities/index.ts index fa7fafa307a3c..930f748878d2e 100644 --- a/src/core/public/application/capabilities/index.ts +++ b/src/core/public/application/capabilities/index.ts @@ -6,5 +6,5 @@ * Side Public License, v 1. */ -export { Capabilities } from '../../../types/capabilities'; +export type { Capabilities } from '../../../types/capabilities'; export { CapabilitiesService } from './capabilities_service'; diff --git a/src/core/public/application/index.ts b/src/core/public/application/index.ts index 14349e2ace3d9..1e9a91717e81a 100644 --- a/src/core/public/application/index.ts +++ b/src/core/public/application/index.ts @@ -7,15 +7,15 @@ */ export { ApplicationService } from './application_service'; -export { Capabilities } from './capabilities'; export { ScopedHistory } from './scoped_history'; -export { +export { AppNavLinkStatus, AppStatus } from './types'; + +export type { Capabilities } from './capabilities'; +export type { App, AppMount, AppUnmount, AppMountParameters, - AppStatus, - AppNavLinkStatus, AppUpdatableFields, AppUpdater, AppMeta, diff --git a/src/core/public/chrome/chrome_service.tsx b/src/core/public/chrome/chrome_service.tsx index e69bf9025fdb9..5ed447edde75a 100644 --- a/src/core/public/chrome/chrome_service.tsx +++ b/src/core/public/chrome/chrome_service.tsx @@ -24,7 +24,6 @@ import { ChromeNavControls, NavControlsService } from './nav_controls'; import { NavLinksService, ChromeNavLink } from './nav_links'; import { ChromeRecentlyAccessed, RecentlyAccessedService } from './recently_accessed'; import { Header } from './ui'; -export { ChromeNavControls, ChromeRecentlyAccessed, ChromeDocTitle }; import { ChromeBadge, ChromeBrand, @@ -35,6 +34,8 @@ import { ChromeUserBanner, } from './types'; +export type { ChromeNavControls, ChromeRecentlyAccessed, ChromeDocTitle }; + const IS_LOCKED_KEY = 'core.chrome.isLocked'; interface ConstructorParams { diff --git a/src/core/public/chrome/index.ts b/src/core/public/chrome/index.ts index 069d29ca70d01..73499a81f2220 100644 --- a/src/core/public/chrome/index.ts +++ b/src/core/public/chrome/index.ts @@ -7,7 +7,7 @@ */ export { ChromeService } from './chrome_service'; -export { +export type { ChromeHelpExtensionLinkBase, ChromeHelpExtensionMenuLink, ChromeHelpExtensionMenuCustomLink, @@ -15,12 +15,15 @@ export { ChromeHelpExtensionMenuDocumentationLink, ChromeHelpExtensionMenuGitHubLink, } from './ui/header/header_help_menu'; -export { NavType } from './ui'; -export { ChromeNavLink, ChromeNavLinks, ChromeNavLinkUpdateableFields } from './nav_links'; -export { ChromeRecentlyAccessed, ChromeRecentlyAccessedHistoryItem } from './recently_accessed'; -export { ChromeNavControl, ChromeNavControls } from './nav_controls'; -export { ChromeDocTitle } from './doc_title'; -export { +export type { NavType } from './ui'; +export type { ChromeNavLink, ChromeNavLinks, ChromeNavLinkUpdateableFields } from './nav_links'; +export type { + ChromeRecentlyAccessed, + ChromeRecentlyAccessedHistoryItem, +} from './recently_accessed'; +export type { ChromeNavControl, ChromeNavControls } from './nav_controls'; +export type { ChromeDocTitle } from './doc_title'; +export type { InternalChromeStart, ChromeStart, ChromeHelpExtension, diff --git a/src/core/public/chrome/nav_links/index.ts b/src/core/public/chrome/nav_links/index.ts index 7e0f8d851589b..a35a512b2a842 100644 --- a/src/core/public/chrome/nav_links/index.ts +++ b/src/core/public/chrome/nav_links/index.ts @@ -5,6 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ +export { NavLinksService } from './nav_links_service'; -export { ChromeNavLink, ChromeNavLinkUpdateableFields } from './nav_link'; -export { ChromeNavLinks, NavLinksService } from './nav_links_service'; +export type { ChromeNavLink, ChromeNavLinkUpdateableFields } from './nav_link'; +export type { ChromeNavLinks } from './nav_links_service'; diff --git a/src/core/public/chrome/recently_accessed/index.ts b/src/core/public/chrome/recently_accessed/index.ts index 7f8bbef1f038c..d4494edbf9bcf 100644 --- a/src/core/public/chrome/recently_accessed/index.ts +++ b/src/core/public/chrome/recently_accessed/index.ts @@ -5,9 +5,8 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - -export { +export { RecentlyAccessedService } from './recently_accessed_service'; +export type { ChromeRecentlyAccessed, ChromeRecentlyAccessedHistoryItem, - RecentlyAccessedService, } from './recently_accessed_service'; diff --git a/src/core/public/chrome/ui/header/index.ts b/src/core/public/chrome/ui/header/index.ts index 761b26548d641..633555ced16d0 100644 --- a/src/core/public/chrome/ui/header/index.ts +++ b/src/core/public/chrome/ui/header/index.ts @@ -6,9 +6,10 @@ * Side Public License, v 1. */ -export { Header, HeaderProps } from './header'; -export { OnIsLockedUpdate, NavType } from './types'; -export { +export { Header } from './header'; +export type { HeaderProps } from './header'; +export type { OnIsLockedUpdate, NavType } from './types'; +export type { ChromeHelpExtensionLinkBase, ChromeHelpExtensionMenuLink, ChromeHelpExtensionMenuCustomLink, diff --git a/src/core/public/chrome/ui/index.ts b/src/core/public/chrome/ui/index.ts index 6d9d6238738c2..da66d3eeacc75 100644 --- a/src/core/public/chrome/ui/index.ts +++ b/src/core/public/chrome/ui/index.ts @@ -6,9 +6,9 @@ * Side Public License, v 1. */ +export { Header } from './header'; export { LoadingIndicator } from './loading_indicator'; -export { - Header, +export type { ChromeHelpExtensionLinkBase, ChromeHelpExtensionMenuLink, ChromeHelpExtensionMenuCustomLink, diff --git a/src/core/public/core_app/status/lib/index.ts b/src/core/public/core_app/status/lib/index.ts index 52bf17f92091e..c3434e07319b0 100644 --- a/src/core/public/core_app/status/lib/index.ts +++ b/src/core/public/core_app/status/lib/index.ts @@ -6,5 +6,7 @@ * Side Public License, v 1. */ -export { formatNumber, DataType } from './format_number'; -export { loadStatus, Metric, FormattedStatus, ProcessedServerResponse } from './load_status'; +export { formatNumber } from './format_number'; +export { loadStatus } from './load_status'; +export type { DataType } from './format_number'; +export type { Metric, FormattedStatus, ProcessedServerResponse } from './load_status'; diff --git a/src/core/public/doc_links/index.ts b/src/core/public/doc_links/index.ts index 0e7b5e6486dff..e615b5ab8d5d2 100644 --- a/src/core/public/doc_links/index.ts +++ b/src/core/public/doc_links/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { DocLinksService, DocLinksStart } from './doc_links_service'; +export { DocLinksService } from './doc_links_service'; +export type { DocLinksStart } from './doc_links_service'; diff --git a/src/core/public/fatal_errors/index.ts b/src/core/public/fatal_errors/index.ts index a148a42a684ac..bb6590c691296 100644 --- a/src/core/public/fatal_errors/index.ts +++ b/src/core/public/fatal_errors/index.ts @@ -6,5 +6,6 @@ * Side Public License, v 1. */ -export { FatalErrorsSetup, FatalErrorsStart, FatalErrorsService } from './fatal_errors_service'; -export { FatalErrorInfo } from './get_error_info'; +export { FatalErrorsService } from './fatal_errors_service'; +export type { FatalErrorsSetup, FatalErrorsStart } from './fatal_errors_service'; +export type { FatalErrorInfo } from './get_error_info'; diff --git a/src/core/public/i18n/index.ts b/src/core/public/i18n/index.ts index 0e6c99598460a..791920dd31372 100644 --- a/src/core/public/i18n/index.ts +++ b/src/core/public/i18n/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { I18nService, I18nStart } from './i18n_service'; +export { I18nService } from './i18n_service'; +export type { I18nStart } from './i18n_service'; diff --git a/src/core/public/index.ts b/src/core/public/index.ts index 67a7f15fd9241..c7b4c370eb6d7 100644 --- a/src/core/public/index.ts +++ b/src/core/public/index.ts @@ -66,10 +66,10 @@ import { ApplicationSetup, Capabilities, ApplicationStart } from './application' import { DocLinksStart } from './doc_links'; import { SavedObjectsStart } from './saved_objects'; -export { PackageInfo, EnvironmentMode, IExternalUrlPolicy } from '../server/types'; -export { CoreContext, CoreSystem } from './core_system'; +export type { PackageInfo, EnvironmentMode, IExternalUrlPolicy } from '../server/types'; +export type { CoreContext, CoreSystem } from './core_system'; export { DEFAULT_APP_CATEGORIES } from '../utils'; -export { +export type { AppCategory, UiSettingsParams, UserProvidedValues, @@ -80,7 +80,8 @@ export { StringValidationRegexString, } from '../types'; -export { +export { AppNavLinkStatus, AppStatus, ScopedHistory } from './application'; +export type { ApplicationSetup, ApplicationStart, App, @@ -92,8 +93,6 @@ export { AppLeaveAction, AppLeaveDefaultAction, AppLeaveConfirmAction, - AppStatus, - AppNavLinkStatus, AppMeta, AppUpdatableFields, AppUpdater, @@ -101,11 +100,11 @@ export { PublicAppInfo, PublicAppMetaInfo, PublicAppSearchDeepLinkInfo, - ScopedHistory, NavigateToAppOptions, } from './application'; -export { +export { SimpleSavedObject } from './saved_objects'; +export type { SavedObjectsBatchResponse, SavedObjectsBulkCreateObject, SavedObjectsBulkCreateOptions, @@ -126,7 +125,6 @@ export { SavedObjectsMigrationVersion, SavedObjectsClientContract, SavedObjectsClient, - SimpleSavedObject, SavedObjectsImportResponse, SavedObjectsImportSuccess, SavedObjectsImportConflictError, @@ -142,10 +140,11 @@ export { SavedObjectsImportWarning, } from './saved_objects'; -export { +export { HttpFetchError } from './http'; + +export type { HttpHeadersInit, HttpRequestInit, - HttpFetchError, HttpFetchOptions, HttpFetchOptionsWithPath, HttpFetchQuery, @@ -162,7 +161,7 @@ export { IHttpResponseInterceptorOverrides, } from './http'; -export { +export type { OverlayStart, OverlayBannersStart, OverlayRef, @@ -173,7 +172,7 @@ export { OverlayModalStart, } from './overlays'; -export { +export type { Toast, ToastInput, IToasts, @@ -185,7 +184,7 @@ export { ErrorToastOptions, } from './notifications'; -export { MountPoint, UnmountCallback, PublicUiSettingsParams } from './types'; +export type { MountPoint, UnmountCallback, PublicUiSettingsParams } from './types'; export { URL_MAX_LENGTH } from './core_app'; @@ -280,7 +279,7 @@ export interface CoreStart { }; } -export { +export type { Capabilities, ChromeBadge, ChromeBrand, diff --git a/src/core/public/injected_metadata/index.ts b/src/core/public/injected_metadata/index.ts index 8eca95aaa01fb..b2c4413ed5ff3 100644 --- a/src/core/public/injected_metadata/index.ts +++ b/src/core/public/injected_metadata/index.ts @@ -5,9 +5,8 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - -export { - InjectedMetadataService, +export { InjectedMetadataService } from './injected_metadata_service'; +export type { InjectedMetadataParams, InjectedMetadataSetup, InjectedMetadataStart, diff --git a/src/core/public/notifications/index.ts b/src/core/public/notifications/index.ts index f751db62a452a..e93ff5c751399 100644 --- a/src/core/public/notifications/index.ts +++ b/src/core/public/notifications/index.ts @@ -5,8 +5,8 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - -export { +export { NotificationsService } from './notifications_service'; +export type { ErrorToastOptions, ToastOptions, Toast, @@ -17,8 +17,4 @@ export { ToastsSetup, ToastsStart, } from './toasts'; -export { - NotificationsService, - NotificationsSetup, - NotificationsStart, -} from './notifications_service'; +export type { NotificationsSetup, NotificationsStart } from './notifications_service'; diff --git a/src/core/public/notifications/toasts/index.ts b/src/core/public/notifications/toasts/index.ts index 59975ba0ce735..6681ca4a8e8f3 100644 --- a/src/core/public/notifications/toasts/index.ts +++ b/src/core/public/notifications/toasts/index.ts @@ -6,8 +6,9 @@ * Side Public License, v 1. */ -export { ToastsService, ToastsSetup, ToastsStart } from './toasts_service'; -export { +export { ToastsService } from './toasts_service'; +export type { ToastsSetup, ToastsStart } from './toasts_service'; +export type { ErrorToastOptions, ToastOptions, ToastsApi, diff --git a/src/core/public/overlays/banners/index.ts b/src/core/public/overlays/banners/index.ts index 071ff06086a28..18d465d1240c3 100644 --- a/src/core/public/overlays/banners/index.ts +++ b/src/core/public/overlays/banners/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { OverlayBannersStart, OverlayBannersService } from './banners_service'; +export { OverlayBannersService } from './banners_service'; +export type { OverlayBannersStart } from './banners_service'; diff --git a/src/core/public/overlays/flyout/index.ts b/src/core/public/overlays/flyout/index.ts index d433ca10739f1..0945f5a6e5c6d 100644 --- a/src/core/public/overlays/flyout/index.ts +++ b/src/core/public/overlays/flyout/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { FlyoutService, OverlayFlyoutStart, OverlayFlyoutOpenOptions } from './flyout_service'; +export { FlyoutService } from './flyout_service'; +export type { OverlayFlyoutStart, OverlayFlyoutOpenOptions } from './flyout_service'; diff --git a/src/core/public/overlays/index.ts b/src/core/public/overlays/index.ts index f9158c772f8f3..93d1c1c479152 100644 --- a/src/core/public/overlays/index.ts +++ b/src/core/public/overlays/index.ts @@ -5,9 +5,14 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ +export { OverlayService } from './overlay_service'; -export { OverlayRef } from './types'; -export { OverlayBannersStart } from './banners'; -export { OverlayFlyoutStart, OverlayFlyoutOpenOptions } from './flyout'; -export { OverlayModalStart, OverlayModalOpenOptions, OverlayModalConfirmOptions } from './modal'; -export { OverlayService, OverlayStart } from './overlay_service'; +export type { OverlayRef } from './types'; +export type { OverlayBannersStart } from './banners'; +export type { OverlayFlyoutStart, OverlayFlyoutOpenOptions } from './flyout'; +export type { + OverlayModalStart, + OverlayModalOpenOptions, + OverlayModalConfirmOptions, +} from './modal'; +export type { OverlayStart } from './overlay_service'; diff --git a/src/core/public/overlays/modal/index.ts b/src/core/public/overlays/modal/index.ts index 1c467d9d35287..ac8aba588e720 100644 --- a/src/core/public/overlays/modal/index.ts +++ b/src/core/public/overlays/modal/index.ts @@ -6,8 +6,9 @@ * Side Public License, v 1. */ -export { - ModalService, +export { ModalService } from './modal_service'; + +export type { OverlayModalStart, OverlayModalOpenOptions, OverlayModalConfirmOptions, diff --git a/src/core/public/plugins/index.ts b/src/core/public/plugins/index.ts index be805c6a521ce..9d7a61ef47a0d 100644 --- a/src/core/public/plugins/index.ts +++ b/src/core/public/plugins/index.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -export * from './plugins_service'; -export { Plugin, AsyncPlugin, PluginInitializer } from './plugin'; -export { PluginInitializerContext } from './plugin_context'; -export { PluginOpaqueId } from '../../server/types'; +export { PluginsService } from './plugins_service'; +export type { Plugin, AsyncPlugin, PluginInitializer } from './plugin'; +export type { PluginInitializerContext } from './plugin_context'; +export type { PluginOpaqueId } from '../../server/types'; diff --git a/src/core/public/saved_objects/index.ts b/src/core/public/saved_objects/index.ts index d2704b9a01c56..e8aef50376841 100644 --- a/src/core/public/saved_objects/index.ts +++ b/src/core/public/saved_objects/index.ts @@ -5,8 +5,9 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ +export { SavedObjectsService } from './saved_objects_service'; -export { +export type { SavedObjectsBatchResponse, SavedObjectsBulkCreateObject, SavedObjectsBulkCreateOptions, @@ -19,8 +20,8 @@ export { SavedObjectsBulkUpdateOptions, } from './saved_objects_client'; export { SimpleSavedObject } from './simple_saved_object'; -export { SavedObjectsStart, SavedObjectsService } from './saved_objects_service'; -export { +export type { SavedObjectsStart } from './saved_objects_service'; +export type { SavedObjectsBaseOptions, SavedObjectsFindOptions, SavedObjectsFindOptionsReference, @@ -40,7 +41,7 @@ export { SavedObjectsImportWarning, } from '../../server/types'; -export { +export type { SavedObject, SavedObjectAttribute, SavedObjectAttributes, diff --git a/src/core/public/types.ts b/src/core/public/types.ts index c33c64298d6df..2561aefb615d4 100644 --- a/src/core/public/types.ts +++ b/src/core/public/types.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -export { +export type { UiSettingsParams, PublicUiSettingsParams, UserProvidedValues, diff --git a/src/core/public/ui_settings/index.ts b/src/core/public/ui_settings/index.ts index 901d3eed36f0e..7c7bdae34a3c1 100644 --- a/src/core/public/ui_settings/index.ts +++ b/src/core/public/ui_settings/index.ts @@ -7,5 +7,5 @@ */ export { UiSettingsService } from './ui_settings_service'; -export { UiSettingsClient } from './ui_settings_client'; -export { UiSettingsState, IUiSettingsClient } from './types'; +export type { UiSettingsClient } from './ui_settings_client'; +export type { UiSettingsState, IUiSettingsClient } from './types'; diff --git a/src/core/server/capabilities/index.ts b/src/core/server/capabilities/index.ts index ed93112dc0cf7..161357b5c1972 100644 --- a/src/core/server/capabilities/index.ts +++ b/src/core/server/capabilities/index.ts @@ -6,10 +6,10 @@ * Side Public License, v 1. */ -export { - CapabilitiesService, +export { CapabilitiesService } from './capabilities_service'; +export type { CapabilitiesSetup, CapabilitiesStart, ResolveCapabilitiesOptions, } from './capabilities_service'; -export { Capabilities, CapabilitiesSwitcher, CapabilitiesProvider } from './types'; +export type { Capabilities, CapabilitiesSwitcher, CapabilitiesProvider } from './types'; diff --git a/src/core/server/capabilities/types.ts b/src/core/server/capabilities/types.ts index 1dabd0ac080c0..bfff74172cfce 100644 --- a/src/core/server/capabilities/types.ts +++ b/src/core/server/capabilities/types.ts @@ -9,7 +9,7 @@ import { Capabilities } from '../../types/capabilities'; import { KibanaRequest } from '../http'; -export { Capabilities }; +export type { Capabilities }; /** * See {@link CapabilitiesSetup} diff --git a/src/core/server/config/index.ts b/src/core/server/config/index.ts index f40c532b7b06a..bf2ce16e869b7 100644 --- a/src/core/server/config/index.ts +++ b/src/core/server/config/index.ts @@ -10,16 +10,19 @@ export { coreDeprecationProvider } from './deprecation'; export { ConfigService, - IConfigService, + isConfigPath, + hasConfigPathIntersection, + Env, + ObjectToConfigAdapter, RawConfigService, +} from '@kbn/config'; + +export type { + IConfigService, RawConfigurationProvider, Config, ConfigPath, - isConfigPath, - hasConfigPathIntersection, - ObjectToConfigAdapter, CliArgs, - Env, ConfigDeprecation, ConfigDeprecationLogger, ConfigDeprecationProvider, diff --git a/src/core/server/context/container/context.mock.ts b/src/core/server/context/container/context.mock.ts index 0a2530dfc345e..2a43006301c03 100644 --- a/src/core/server/context/container/context.mock.ts +++ b/src/core/server/context/container/context.mock.ts @@ -8,16 +8,16 @@ import { IContextContainer } from './context'; -export type ContextContainerMock = jest.Mocked>; +export type ContextContainerMock = jest.Mocked; -const createContextMock = (mockContext = {}) => { +const createContextMock = (mockContext: any = {}) => { const contextMock: ContextContainerMock = { - // @ts-expect-error tsc cannot infer ContextName and uses never + // @ts-expect-error since ContextContainerMock cannot infer ContextName and fallsback to never registerContext: jest.fn(), createHandler: jest.fn(), }; contextMock.createHandler.mockImplementation((pluginId, handler) => (...args) => - handler(mockContext, ...args) + Promise.resolve(handler(mockContext, ...args)) ); return contextMock; }; diff --git a/src/core/server/context/container/context.test.ts b/src/core/server/context/container/context.test.ts index 693eed7873754..25fab2e3f0bfb 100644 --- a/src/core/server/context/container/context.test.ts +++ b/src/core/server/context/container/context.test.ts @@ -65,6 +65,30 @@ describe('ContextContainer', () => { `"Cannot register context for unknown plugin: Symbol(unknown)"` ); }); + + it('reports a TS error if returned contract does not satisfy the Context interface', async () => { + const contextContainer = new ContextContainer(plugins, coreId); + await expect(() => + contextContainer.registerContext<{ ctxFromA: string; core: any }, 'ctxFromA'>( + pluginA, + 'ctxFromA', + // @ts-expect-error expected string, returned number + async () => 1 + ) + ).not.toThrow(); + }); + + it('reports a TS error if registers a context for unknown property name', async () => { + const contextContainer = new ContextContainer(plugins, coreId); + await expect(() => + // @ts-expect-error expects ctxFromB, but given ctxFromC + contextContainer.registerContext<{ ctxFromB: string; core: any }, 'ctxFromC'>( + pluginB, + 'ctxFromC', + async () => 1 + ) + ).not.toThrow(); + }); }); describe('context building', () => { diff --git a/src/core/server/context/container/context.ts b/src/core/server/context/container/context.ts index 98b87ee888c75..f3d91e268bd1c 100644 --- a/src/core/server/context/container/context.ts +++ b/src/core/server/context/container/context.ts @@ -130,12 +130,9 @@ export type HandlerParameters> = T extends ( * } * ``` * - * @typeParam THandler - the type of {@link HandlerFunction} this container should manage. The first argument of this - * function will be used as the context type. - * * @public */ -export interface IContextContainer { +export interface IContextContainer { /** * Register a new context provider. * @@ -161,18 +158,17 @@ export interface IContextContainer { * * @param pluginOpaqueId - The plugin opaque ID for the plugin that registers this handler. * @param handler - Handler function to pass context object to. - * @returns A function that takes `THandlerParameters`, calls `handler` with a new context, and returns a Promise of + * @returns A function that takes `RequestHandler` parameters, calls `handler` with a new context, and returns a Promise of * the `handler` return value. */ createHandler( pluginOpaqueId: PluginOpaqueId, - handler: THandler - ): (...rest: HandlerParameters) => ShallowPromise>; + handler: RequestHandler + ): (...rest: HandlerParameters) => ShallowPromise>; } /** @internal */ -export class ContextContainer - implements IContextContainer { +export class ContextContainer implements IContextContainer { /** * Used to map contexts to their providers and associated plugin. In registration order which is tightly coupled to * plugin load order. @@ -222,22 +218,23 @@ export class ContextContainer return this; }; - public createHandler = (source: symbol, handler: THandler) => { + public createHandler = (source: symbol, handler: RequestHandler) => { if (source !== this.coreId && !this.pluginDependencies.has(source)) { throw new Error(`Cannot create handler for unknown plugin: ${source.toString()}`); } - return (async (...args: HandlerParameters) => { + return (async (...args: HandlerParameters) => { const context = await this.buildContext(source, ...args); - // @ts-expect-error requires explicit handler arity return handler(context, ...args); - }) as (...args: HandlerParameters) => ShallowPromise>; + }) as ( + ...args: HandlerParameters + ) => ShallowPromise>; }; private async buildContext( source: symbol, - ...contextArgs: HandlerParameters - ): Promise> { + ...contextArgs: HandlerParameters + ): Promise> { const contextsToBuild = new Set(this.getContextNamesForSource(source)); return [...this.contextProviders] @@ -254,10 +251,9 @@ export class ContextContainer return { ...resolvedContext, - // @ts-expect-error requires explicit provider arity [contextName]: await provider(exposedContext, ...contextArgs), }; - }, Promise.resolve({}) as Promise>); + }, Promise.resolve({}) as Promise>); } private getContextNamesForSource(source: symbol): ReadonlySet { diff --git a/src/core/server/context/context_service.ts b/src/core/server/context/context_service.ts index 536b10b750b7b..68a99ed3d4156 100644 --- a/src/core/server/context/context_service.ts +++ b/src/core/server/context/context_service.ts @@ -7,7 +7,7 @@ */ import { PluginOpaqueId } from '../../server'; -import { IContextContainer, ContextContainer, HandlerFunction } from './container'; +import { IContextContainer, ContextContainer } from './container'; import { CoreContext } from '../core_context'; interface SetupDeps { @@ -20,8 +20,8 @@ export class ContextService { public setup({ pluginDependencies }: SetupDeps): ContextSetup { return { - createContextContainer: >() => { - return new ContextContainer(pluginDependencies, this.core.coreId); + createContextContainer: () => { + return new ContextContainer(pluginDependencies, this.core.coreId); }, }; } @@ -93,5 +93,5 @@ export interface ContextSetup { /** * Creates a new {@link IContextContainer} for a service owner. */ - createContextContainer>(): IContextContainer; + createContextContainer(): IContextContainer; } diff --git a/src/core/server/context/index.ts b/src/core/server/context/index.ts index 1d8b2e5463038..84f7ad07da2c3 100644 --- a/src/core/server/context/index.ts +++ b/src/core/server/context/index.ts @@ -6,8 +6,9 @@ * Side Public License, v 1. */ -export { ContextService, ContextSetup } from './context_service'; -export { +export { ContextService } from './context_service'; +export type { ContextSetup } from './context_service'; +export type { IContextContainer, IContextProvider, HandlerFunction, diff --git a/src/core/server/core_usage_data/index.ts b/src/core/server/core_usage_data/index.ts index 4b050b31da325..4e0200ed1e4ea 100644 --- a/src/core/server/core_usage_data/index.ts +++ b/src/core/server/core_usage_data/index.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -export { CoreUsageDataSetup, CoreUsageDataStart } from './types'; +export type { CoreUsageDataSetup, CoreUsageDataStart } from './types'; export { CoreUsageDataService } from './core_usage_data_service'; export { CoreUsageStatsClient } from './core_usage_stats_client'; @@ -20,7 +20,7 @@ import { CoreServicesUsageData, } from './types'; -export { +export type { CoreUsageStats, CoreUsageData, CoreConfigUsageData, diff --git a/src/core/server/csp/index.ts b/src/core/server/csp/index.ts index ed30081ed82b2..94577cf727829 100644 --- a/src/core/server/csp/index.ts +++ b/src/core/server/csp/index.ts @@ -9,4 +9,5 @@ import { CspConfig, ICspConfig } from './csp_config'; import { CspConfigType, config } from './config'; -export { CspConfig, CspConfigType, config, ICspConfig }; +export { CspConfig, config }; +export type { CspConfigType, ICspConfig }; diff --git a/src/core/server/dev/index.ts b/src/core/server/dev/index.ts index cde5dc4363a21..6e0fd343d2ec8 100644 --- a/src/core/server/dev/index.ts +++ b/src/core/server/dev/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { config, DevConfig, DevConfigType } from './dev_config'; +export { config, DevConfig } from './dev_config'; +export type { DevConfigType } from './dev_config'; diff --git a/src/core/server/elasticsearch/client/index.ts b/src/core/server/elasticsearch/client/index.ts index 990aac4b2a95e..c7600b723ade0 100644 --- a/src/core/server/elasticsearch/client/index.ts +++ b/src/core/server/elasticsearch/client/index.ts @@ -6,9 +6,19 @@ * Side Public License, v 1. */ -export * from './types'; -export { IScopedClusterClient, ScopedClusterClient } from './scoped_cluster_client'; -export { ElasticsearchClientConfig } from './client_config'; -export { IClusterClient, ICustomClusterClient, ClusterClient } from './cluster_client'; +export type { + ElasticsearchClient, + ShardsResponse, + ShardsInfo, + CountResponse, + SearchResponse, + GetResponse, + DeleteDocumentResponse, +} from './types'; +export { ScopedClusterClient } from './scoped_cluster_client'; +export type { IScopedClusterClient } from './scoped_cluster_client'; +export type { ElasticsearchClientConfig } from './client_config'; +export { ClusterClient } from './cluster_client'; +export type { IClusterClient, ICustomClusterClient } from './cluster_client'; export { configureClient } from './configure_client'; export { retryCallCluster, migrationRetryCallCluster } from './retry_call_cluster'; diff --git a/src/core/server/elasticsearch/index.ts b/src/core/server/elasticsearch/index.ts index 35d857bf1b1dd..94dc10ff4e863 100644 --- a/src/core/server/elasticsearch/index.ts +++ b/src/core/server/elasticsearch/index.ts @@ -7,9 +7,10 @@ */ export { ElasticsearchService } from './elasticsearch_service'; -export { config, configSchema, ElasticsearchConfig } from './elasticsearch_config'; -export { NodesVersionCompatibility } from './version_check/ensure_es_version'; -export { +export { config, configSchema } from './elasticsearch_config'; +export { ElasticsearchConfig } from './elasticsearch_config'; +export type { NodesVersionCompatibility } from './version_check/ensure_es_version'; +export type { ElasticsearchServiceSetup, ElasticsearchServiceStart, ElasticsearchStatusMeta, @@ -19,7 +20,7 @@ export { ScopeableRequest, } from './types'; export * from './legacy'; -export { +export type { IClusterClient, ICustomClusterClient, ElasticsearchClientConfig, @@ -30,7 +31,6 @@ export { CountResponse, ShardsInfo, ShardsResponse, - Explanation, GetResponse, DeleteDocumentResponse, } from './client'; diff --git a/src/core/server/elasticsearch/legacy/index.ts b/src/core/server/elasticsearch/legacy/index.ts index 377557de14c17..d98b7f16635a1 100644 --- a/src/core/server/elasticsearch/legacy/index.ts +++ b/src/core/server/elasticsearch/legacy/index.ts @@ -6,12 +6,13 @@ * Side Public License, v 1. */ -export { - LegacyClusterClient, - ILegacyClusterClient, - ILegacyCustomClusterClient, -} from './cluster_client'; -export { ILegacyScopedClusterClient, LegacyScopedClusterClient } from './scoped_cluster_client'; -export { LegacyElasticsearchClientConfig } from './elasticsearch_client_config'; -export { LegacyElasticsearchError, LegacyElasticsearchErrorHelpers } from './errors'; +export { LegacyClusterClient } from './cluster_client'; +export type { ILegacyClusterClient, ILegacyCustomClusterClient } from './cluster_client'; +export type { + ILegacyScopedClusterClient, + LegacyScopedClusterClient, +} from './scoped_cluster_client'; +export type { LegacyElasticsearchClientConfig } from './elasticsearch_client_config'; +export { LegacyElasticsearchErrorHelpers } from './errors'; +export type { LegacyElasticsearchError } from './errors'; export * from './api_types'; diff --git a/src/core/server/environment/index.ts b/src/core/server/environment/index.ts index bb0f012732688..01d5097887248 100644 --- a/src/core/server/environment/index.ts +++ b/src/core/server/environment/index.ts @@ -6,5 +6,7 @@ * Side Public License, v 1. */ -export { EnvironmentService, InternalEnvironmentServiceSetup } from './environment_service'; -export { config, PidConfigType } from './pid_config'; +export { EnvironmentService } from './environment_service'; +export type { InternalEnvironmentServiceSetup } from './environment_service'; +export { config } from './pid_config'; +export type { PidConfigType } from './pid_config'; diff --git a/src/core/server/external_url/index.ts b/src/core/server/external_url/index.ts index ee77fa383cbfc..846f8912b8ac9 100644 --- a/src/core/server/external_url/index.ts +++ b/src/core/server/external_url/index.ts @@ -6,5 +6,7 @@ * Side Public License, v 1. */ -export { ExternalUrlConfig, IExternalUrlConfig, IExternalUrlPolicy } from './external_url_config'; -export { ExternalUrlConfigType, config } from './config'; +export { ExternalUrlConfig } from './external_url_config'; +export type { IExternalUrlConfig, IExternalUrlPolicy } from './external_url_config'; +export { config } from './config'; +export type { ExternalUrlConfigType } from './config'; diff --git a/src/core/server/http/index.ts b/src/core/server/http/index.ts index ace6d9b1d1942..c35b7e2fcd042 100644 --- a/src/core/server/http/index.ts +++ b/src/core/server/http/index.ts @@ -6,20 +6,25 @@ * Side Public License, v 1. */ -export { config, HttpConfig, HttpConfigType } from './http_config'; +export { config, HttpConfig } from './http_config'; +export type { HttpConfigType } from './http_config'; export { HttpService } from './http_service'; -export { GetAuthHeaders } from './auth_headers_storage'; -export { AuthStatus, GetAuthState, IsAuthenticated } from './auth_state_storage'; +export type { GetAuthHeaders } from './auth_headers_storage'; +export type { AuthStatus, GetAuthState, IsAuthenticated } from './auth_state_storage'; export { - CustomHttpResponseOptions, - IKibanaSocket, isKibanaRequest, isRealRequest, + KibanaRequest, + kibanaResponseFactory, + validBodyOutput, +} from './router'; +export type { + CustomHttpResponseOptions, + IKibanaSocket, Headers, HttpResponseOptions, HttpResponsePayload, ErrorHttpResponseOptions, - KibanaRequest, KibanaRequestEvents, KibanaRequestRoute, KibanaRequestRouteOptions, @@ -33,7 +38,6 @@ export { ResponseError, ResponseErrorAttributes, ResponseHeaders, - kibanaResponseFactory, KibanaResponseFactory, RouteConfig, IRouter, @@ -42,7 +46,6 @@ export { RouteConfigOptions, RouteConfigOptionsBody, RouteContentType, - validBodyOutput, RouteValidatorConfig, RouteValidationSpec, RouteValidationFunction, @@ -54,8 +57,8 @@ export { SafeRouteMethod, } from './router'; export { BasePathProxyServer } from './base_path_proxy_server'; -export { OnPreRoutingHandler, OnPreRoutingToolkit } from './lifecycle/on_pre_routing'; -export { +export type { OnPreRoutingHandler, OnPreRoutingToolkit } from './lifecycle/on_pre_routing'; +export type { AuthenticationHandler, AuthHeaders, AuthResultParams, @@ -67,19 +70,29 @@ export { AuthNotHandled, AuthResultType, } from './lifecycle/auth'; -export { OnPostAuthHandler, OnPostAuthToolkit } from './lifecycle/on_post_auth'; -export { OnPreAuthHandler, OnPreAuthToolkit } from './lifecycle/on_pre_auth'; -export { +export type { OnPostAuthHandler, OnPostAuthToolkit } from './lifecycle/on_post_auth'; +export type { OnPreAuthHandler, OnPreAuthToolkit } from './lifecycle/on_pre_auth'; +export type { OnPreResponseHandler, OnPreResponseToolkit, OnPreResponseRender, OnPreResponseExtensions, OnPreResponseInfo, } from './lifecycle/on_pre_response'; -export { SessionStorageFactory, SessionStorage } from './session_storage'; -export { +export type { SessionStorageFactory, SessionStorage } from './session_storage'; +export type { SessionStorageCookieOptions, SessionCookieValidationResult, } from './cookie_session_storage'; -export * from './types'; -export { BasePath, IBasePath } from './base_path_service'; +export type { + RequestHandlerContextContainer, + RequestHandlerContextProvider, + HttpAuth, + HttpServiceSetup, + InternalHttpServiceSetup, + HttpServiceStart, + InternalHttpServiceStart, + HttpServerInfo, +} from './types'; +export { BasePath } from './base_path_service'; +export type { IBasePath } from './base_path_service'; diff --git a/src/core/server/http/router/index.ts b/src/core/server/http/router/index.ts index c1733107a49be..a958d330bf24d 100644 --- a/src/core/server/http/router/index.ts +++ b/src/core/server/http/router/index.ts @@ -6,33 +6,37 @@ * Side Public License, v 1. */ -export { Headers, filterHeaders, ResponseHeaders, KnownHeaders } from './headers'; -export { Router, RequestHandler, RequestHandlerWrapper, IRouter, RouteRegistrar } from './router'; -export { - KibanaRequest, +export { filterHeaders } from './headers'; +export type { Headers, ResponseHeaders, KnownHeaders } from './headers'; +export { Router } from './router'; +export type { RequestHandler, RequestHandlerWrapper, IRouter, RouteRegistrar } from './router'; +export { isKibanaRequest, isRealRequest, ensureRawRequest, KibanaRequest } from './request'; +export type { KibanaRequestEvents, KibanaRequestRoute, KibanaRequestRouteOptions, KibanaRouteOptions, KibanaRequestState, - isKibanaRequest, - isRealRequest, LegacyRequest, - ensureRawRequest, } from './request'; -export { +export { isSafeMethod, validBodyOutput } from './route'; +export type { DestructiveRouteMethod, - isSafeMethod, RouteMethod, RouteConfig, RouteConfigOptions, RouteContentType, RouteConfigOptionsBody, SafeRouteMethod, - validBodyOutput, } from './route'; export { HapiResponseAdapter } from './response_adapter'; export { + kibanaResponseFactory, + lifecycleResponseFactory, + isKibanaResponse, + KibanaResponse, +} from './response'; +export type { CustomHttpResponseOptions, HttpResponseOptions, HttpResponsePayload, @@ -40,18 +44,14 @@ export { RedirectResponseOptions, ResponseError, ResponseErrorAttributes, - KibanaResponse, IKibanaResponse, - kibanaResponseFactory, KibanaResponseFactory, - lifecycleResponseFactory, LifecycleResponseFactory, - isKibanaResponse, } from './response'; -export { IKibanaSocket } from './socket'; +export type { IKibanaSocket } from './socket'; -export { +export type { RouteValidatorConfig, RouteValidationSpec, RouteValidationFunction, diff --git a/src/core/server/http/router/request.ts b/src/core/server/http/router/request.ts index 47daf72c9679e..42e342f762e4d 100644 --- a/src/core/server/http/router/request.ts +++ b/src/core/server/http/router/request.ts @@ -131,7 +131,6 @@ export class KibanaRequest< const params = routeValidator.getParams(req.params, 'request params'); const query = routeValidator.getQuery(req.query, 'request query'); const body = routeValidator.getBody(req.payload, 'request body'); - return { query, params, body }; } /** diff --git a/src/core/server/http/router/validator/index.ts b/src/core/server/http/router/validator/index.ts index 6e83b67b76d80..17a4bba02f16a 100644 --- a/src/core/server/http/router/validator/index.ts +++ b/src/core/server/http/router/validator/index.ts @@ -6,8 +6,8 @@ * Side Public License, v 1. */ -export { - RouteValidator, +export { RouteValidator } from './validator'; +export type { RouteValidatorConfig, RouteValidationSpec, RouteValidationFunction, diff --git a/src/core/server/http/types.ts b/src/core/server/http/types.ts index 8cb23e9d67f57..f007a77a2a21a 100644 --- a/src/core/server/http/types.ts +++ b/src/core/server/http/types.ts @@ -10,7 +10,7 @@ import { IContextProvider, IContextContainer } from '../context'; import { ICspConfig } from '../csp'; import { GetAuthState, IsAuthenticated } from './auth_state_storage'; import { GetAuthHeaders } from './auth_headers_storage'; -import { RequestHandler, IRouter } from './router'; +import { IRouter } from './router'; import { HttpServerSetup } from './http_server'; import { SessionStorageCookieOptions } from './cookie_session_storage'; import { SessionStorageFactory } from './session_storage'; @@ -27,7 +27,7 @@ import type { PluginOpaqueId, RequestHandlerContext } from '..'; * An object that handles registration of http request context providers. * @public */ -export type RequestHandlerContextContainer = IContextContainer; +export type RequestHandlerContextContainer = IContextContainer; /** * Context provider for request handler. diff --git a/src/core/server/http_resources/index.ts b/src/core/server/http_resources/index.ts index 6a0940a5fd886..19970553c0a3c 100644 --- a/src/core/server/http_resources/index.ts +++ b/src/core/server/http_resources/index.ts @@ -8,7 +8,7 @@ export { HttpResourcesService } from './http_resources_service'; -export { +export type { HttpResourcesRenderOptions, HttpResourcesResponseOptions, HttpResourcesServiceToolkit, diff --git a/src/core/server/i18n/index.ts b/src/core/server/i18n/index.ts index 3ad4797ece404..8bc01a598e0d0 100644 --- a/src/core/server/i18n/index.ts +++ b/src/core/server/i18n/index.ts @@ -6,5 +6,7 @@ * Side Public License, v 1. */ -export { config, I18nConfigType } from './i18n_config'; -export { I18nService, I18nServiceSetup } from './i18n_service'; +export { config } from './i18n_config'; +export type { I18nConfigType } from './i18n_config'; +export { I18nService } from './i18n_service'; +export type { I18nServiceSetup } from './i18n_service'; diff --git a/src/core/server/index.ts b/src/core/server/index.ts index 8e4cdc7d59e32..3e336dceb83d7 100644 --- a/src/core/server/index.ts +++ b/src/core/server/index.ts @@ -68,7 +68,7 @@ import { CoreServicesUsageData, } from './core_usage_data'; -export { +export type { CoreUsageStats, CoreUsageData, CoreConfigUsageData, @@ -77,13 +77,13 @@ export { }; export { bootstrap } from './bootstrap'; -export { +export type { Capabilities, CapabilitiesProvider, CapabilitiesSwitcher, ResolveCapabilitiesOptions, } from './capabilities'; -export { +export type { ConfigPath, ConfigService, ConfigDeprecation, @@ -93,22 +93,25 @@ export { EnvironmentMode, PackageInfo, } from './config'; -export { +export type { IContextContainer, IContextProvider, HandlerFunction, HandlerContextType, HandlerParameters, } from './context'; -export { CoreId } from './core_context'; -export { CspConfig, ICspConfig } from './csp'; -export { +export type { CoreId } from './core_context'; + +export { CspConfig } from './csp'; +export type { ICspConfig } from './csp'; + +export { ElasticsearchConfig } from './elasticsearch'; +export type { LegacyClusterClient, ILegacyClusterClient, ILegacyCustomClusterClient, LegacyScopedClusterClient, ILegacyScopedClusterClient, - ElasticsearchConfig, LegacyElasticsearchClientConfig, LegacyElasticsearchError, LegacyElasticsearchErrorHelpers, @@ -128,13 +131,23 @@ export { CountResponse, ShardsInfo, ShardsResponse, - Explanation, GetResponse, DeleteDocumentResponse, } from './elasticsearch'; -export * from './elasticsearch/legacy/api_types'; -export { IExternalUrlConfig, IExternalUrlPolicy } from './external_url'; -export { + +export type { + LegacyCallAPIOptions, + AssistantAPIClientParams, + MIGRATION_ASSISTANCE_INDEX_ACTION, + MIGRATION_DEPRECATION_LEVEL, + AssistanceAPIResponse, + DeprecationAPIClientParams, + DeprecationInfo, + IndexSettingsDeprecationInfo, + DeprecationAPIResponse, +} from './elasticsearch/legacy/api_types'; +export type { IExternalUrlConfig, IExternalUrlPolicy } from './external_url'; +export type { AuthenticationHandler, AuthHeaders, AuthResultParams, @@ -161,7 +174,6 @@ export { ErrorHttpResponseOptions, IKibanaSocket, IsAuthenticated, - KibanaRequest, KibanaRequestEvents, KibanaRequestRoute, KibanaRequestRouteOptions, @@ -188,7 +200,6 @@ export { ResponseError, ResponseErrorAttributes, ResponseHeaders, - kibanaResponseFactory, KibanaResponseFactory, RouteConfig, IRouter, @@ -197,7 +208,6 @@ export { RouteConfigOptions, RouteConfigOptionsBody, RouteContentType, - validBodyOutput, RouteValidatorConfig, RouteValidationSpec, RouteValidationFunction, @@ -213,15 +223,17 @@ export { SafeRouteMethod, } from './http'; -export { +export { KibanaRequest, kibanaResponseFactory, validBodyOutput } from './http'; + +export type { HttpResourcesRenderOptions, HttpResourcesResponseOptions, HttpResourcesServiceToolkit, HttpResourcesRequestHandler, } from './http_resources'; -export { IRenderOptions } from './rendering'; -export { +export type { IRenderOptions } from './rendering'; +export type { Logger, LoggerFactory, LogMeta, @@ -233,7 +245,7 @@ export { AppenderConfigType, } from './logging'; -export { +export type { DiscoveredPlugin, Plugin, AsyncPlugin, @@ -247,6 +259,14 @@ export { } from './plugins'; export { + SavedObjectsClient, + SavedObjectsErrorHelpers, + SavedObjectsSerializer, + SavedObjectTypeRegistry, + SavedObjectsUtils, +} from './saved_objects'; + +export type { SavedObjectsBulkCreateObject, SavedObjectsBulkGetObject, SavedObjectsBulkUpdateObject, @@ -255,7 +275,6 @@ export { SavedObjectsBulkUpdateResponse, SavedObjectsCheckConflictsObject, SavedObjectsCheckConflictsResponse, - SavedObjectsClient, SavedObjectsClientProviderOptions, SavedObjectsClientWrapperFactory, SavedObjectsClientWrapperOptions, @@ -264,7 +283,6 @@ export { SavedObjectsClosePointInTimeOptions, SavedObjectsClosePointInTimeResponse, SavedObjectsCreateOptions, - SavedObjectsErrorHelpers, SavedObjectsExportResultDetails, SavedObjectsFindResult, SavedObjectsFindResponse, @@ -289,7 +307,6 @@ export { SavedObjectsRepositoryFactory, SavedObjectsResolveImportErrorsOptions, SavedObjectsResolveResponse, - SavedObjectsSerializer, SavedObjectsUpdateOptions, SavedObjectsUpdateResponse, SavedObjectsAddToNamespacesOptions, @@ -312,14 +329,12 @@ export { SavedObjectsFieldMapping, SavedObjectsTypeMappingDefinition, SavedObjectsMappingProperties, - SavedObjectTypeRegistry, ISavedObjectTypeRegistry, SavedObjectsNamespaceType, SavedObjectsType, SavedObjectsTypeManagementDefinition, SavedObjectMigrationMap, SavedObjectMigrationFn, - SavedObjectsUtils, SavedObjectsExporter, ISavedObjectsExporter, SavedObjectExportBaseOptions, @@ -338,7 +353,7 @@ export { SavedObjectsImportWarning, } from './saved_objects'; -export { +export type { IUiSettingsClient, UiSettingsParams, PublicUiSettingsParams, @@ -353,7 +368,7 @@ export { StringValidationRegexString, } from './ui_settings'; -export { +export type { OpsMetrics, OpsOsMetrics, OpsServerMetrics, @@ -362,12 +377,12 @@ export { MetricsServiceStart, } from './metrics'; -export { I18nServiceSetup } from './i18n'; +export type { I18nServiceSetup } from './i18n'; -export { AppCategory } from '../types'; +export type { AppCategory } from '../types'; export { DEFAULT_APP_CATEGORIES } from '../utils'; -export { +export type { SavedObject, SavedObjectAttribute, SavedObjectAttributes, @@ -382,17 +397,12 @@ export { SavedObjectsMigrationVersion, } from './types'; -export { LegacyServiceSetupDeps, LegacyServiceStartDeps, LegacyConfig } from './legacy'; +export type { LegacyServiceSetupDeps, LegacyServiceStartDeps, LegacyConfig } from './legacy'; -export { - CoreStatus, - ServiceStatus, - ServiceStatusLevel, - ServiceStatusLevels, - StatusServiceSetup, -} from './status'; +export { ServiceStatusLevels } from './status'; +export type { CoreStatus, ServiceStatus, ServiceStatusLevel, StatusServiceSetup } from './status'; -export { CoreUsageDataStart } from './core_usage_data'; +export type { CoreUsageDataStart } from './core_usage_data'; /** * Plugin specific context passed to a route handler. @@ -507,7 +517,7 @@ export interface CoreStart { coreUsageData: CoreUsageDataStart; } -export { +export type { CapabilitiesSetup, CapabilitiesStart, ContextSetup, diff --git a/src/core/server/legacy/index.ts b/src/core/server/legacy/index.ts index 50e646486898f..8614265e4375d 100644 --- a/src/core/server/legacy/index.ts +++ b/src/core/server/legacy/index.ts @@ -9,6 +9,13 @@ /** @internal */ export { ensureValidConfiguration } from './config'; /** @internal */ -export { LegacyService, ILegacyService } from './legacy_service'; +export type { ILegacyService } from './legacy_service'; +export { LegacyService } from './legacy_service'; /** @internal */ -export * from './types'; +export type { + LegacyVars, + LegacyConfig, + LegacyServiceSetupDeps, + LegacyServiceStartDeps, + LegacyServiceSetupConfig, +} from './types'; diff --git a/src/core/server/logging/README.mdx b/src/core/server/logging/README.mdx index 1575e67d7b8ee..63a7d8ecade6c 100644 --- a/src/core/server/logging/README.mdx +++ b/src/core/server/logging/README.mdx @@ -82,7 +82,7 @@ There are two types of layout supported at the moment: `pattern` and `json`. ### Pattern layout With `pattern` layout it's possible to define a string pattern with special placeholders `%conversion_pattern` (see the table below) that -will be replaced with data from the actual log message. By default the following pattern is used: +will be replaced with data from the actual log message. By default the following pattern is used: `[%date][%level][%logger] %message`. Also `highlight` option can be enabled for `pattern` layout so that some parts of the log message are highlighted with different colors that may be quite handy if log messages are forwarded to the terminal with color support. @@ -143,7 +143,7 @@ Example of `%date` output: Outputs the process ID. ### JSON layout -With `json` layout log messages will be formatted as JSON strings that include timestamp, log level, context name, message +With `json` layout log messages will be formatted as JSON strings in [ECS format](https://www.elastic.co/guide/en/ecs/current/ecs-reference.html) that includes a timestamp, log level, context name, message text and any other metadata that may be associated with the log message itself. ## Appenders diff --git a/src/core/server/logging/appenders/rewrite/policies/index.ts b/src/core/server/logging/appenders/rewrite/policies/index.ts index ae3be1e4de916..e4852ae9cde29 100644 --- a/src/core/server/logging/appenders/rewrite/policies/index.ts +++ b/src/core/server/logging/appenders/rewrite/policies/index.ts @@ -10,7 +10,7 @@ import { assertNever } from '@kbn/std'; import { RewritePolicy } from './policy'; import { MetaRewritePolicy, MetaRewritePolicyConfig, metaRewritePolicyConfigSchema } from './meta'; -export { RewritePolicy }; +export type { RewritePolicy }; /** * Available rewrite policies which specify what part of a {@link LogRecord} diff --git a/src/core/server/logging/appenders/rewrite/policies/meta/index.ts b/src/core/server/logging/appenders/rewrite/policies/meta/index.ts index afdfd6fb709d3..1fc2256687fef 100644 --- a/src/core/server/logging/appenders/rewrite/policies/meta/index.ts +++ b/src/core/server/logging/appenders/rewrite/policies/meta/index.ts @@ -6,8 +6,6 @@ * Side Public License, v 1. */ -export { - MetaRewritePolicy, - MetaRewritePolicyConfig, - metaRewritePolicyConfigSchema, -} from './meta_policy'; +export { MetaRewritePolicy, metaRewritePolicyConfigSchema } from './meta_policy'; + +export type { MetaRewritePolicyConfig } from './meta_policy'; diff --git a/src/core/server/logging/appenders/rolling_file/policies/index.ts b/src/core/server/logging/appenders/rolling_file/policies/index.ts index e3e33c6cbfdef..735aac4a68747 100644 --- a/src/core/server/logging/appenders/rolling_file/policies/index.ts +++ b/src/core/server/logging/appenders/rolling_file/policies/index.ts @@ -22,7 +22,7 @@ import { timeIntervalTriggeringPolicyConfigSchema, } from './time_interval'; -export { TriggeringPolicy } from './policy'; +export type { TriggeringPolicy } from './policy'; /** * Any of the existing policy's configuration diff --git a/src/core/server/logging/appenders/rolling_file/policies/size_limit/index.ts b/src/core/server/logging/appenders/rolling_file/policies/size_limit/index.ts index c032407733d38..c6c5d97a74465 100644 --- a/src/core/server/logging/appenders/rolling_file/policies/size_limit/index.ts +++ b/src/core/server/logging/appenders/rolling_file/policies/size_limit/index.ts @@ -8,6 +8,7 @@ export { SizeLimitTriggeringPolicy, - SizeLimitTriggeringPolicyConfig, sizeLimitTriggeringPolicyConfigSchema, } from './size_limit_policy'; + +export type { SizeLimitTriggeringPolicyConfig } from './size_limit_policy'; diff --git a/src/core/server/logging/appenders/rolling_file/policies/time_interval/index.ts b/src/core/server/logging/appenders/rolling_file/policies/time_interval/index.ts index 116a569ac7bfb..152d1bd01c933 100644 --- a/src/core/server/logging/appenders/rolling_file/policies/time_interval/index.ts +++ b/src/core/server/logging/appenders/rolling_file/policies/time_interval/index.ts @@ -8,6 +8,7 @@ export { TimeIntervalTriggeringPolicy, - TimeIntervalTriggeringPolicyConfig, timeIntervalTriggeringPolicyConfigSchema, } from './time_interval_policy'; + +export type { TimeIntervalTriggeringPolicyConfig } from './time_interval_policy'; diff --git a/src/core/server/logging/appenders/rolling_file/strategies/index.ts b/src/core/server/logging/appenders/rolling_file/strategies/index.ts index c8364b0e590c6..d0b960be8883d 100644 --- a/src/core/server/logging/appenders/rolling_file/strategies/index.ts +++ b/src/core/server/logging/appenders/rolling_file/strategies/index.ts @@ -15,7 +15,7 @@ import { } from './numeric'; import { RollingFileContext } from '../rolling_file_context'; -export { RollingStrategy } from './strategy'; +export type { RollingStrategy } from './strategy'; export type RollingStrategyConfig = NumericRollingStrategyConfig; const defaultStrategy: NumericRollingStrategyConfig = { diff --git a/src/core/server/logging/appenders/rolling_file/strategies/numeric/index.ts b/src/core/server/logging/appenders/rolling_file/strategies/numeric/index.ts index 99f8fdebef4fc..d9e2f1b200457 100644 --- a/src/core/server/logging/appenders/rolling_file/strategies/numeric/index.ts +++ b/src/core/server/logging/appenders/rolling_file/strategies/numeric/index.ts @@ -6,8 +6,6 @@ * Side Public License, v 1. */ -export { - NumericRollingStrategy, - NumericRollingStrategyConfig, - numericRollingStrategyConfigSchema, -} from './numeric_strategy'; +export { NumericRollingStrategy, numericRollingStrategyConfigSchema } from './numeric_strategy'; + +export type { NumericRollingStrategyConfig } from './numeric_strategy'; diff --git a/src/core/server/logging/index.ts b/src/core/server/logging/index.ts index 9b3d7747fc560..cef96be54870e 100644 --- a/src/core/server/logging/index.ts +++ b/src/core/server/logging/index.ts @@ -5,8 +5,8 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - -export { +export { LogLevel } from '@kbn/logging'; +export type { DisposableAppender, Appender, LogRecord, @@ -15,21 +15,20 @@ export { LogMeta, Logger, LogLevelId, - LogLevel, } from '@kbn/logging'; -export { EcsEvent, EcsEventKind, EcsEventCategory, EcsEventType } from './ecs'; -export { - config, +export { EcsEventType, EcsEventCategory, EcsEventKind } from './ecs'; +export type { EcsEvent } from './ecs'; +export { config } from './logging_config'; +export type { LoggingConfigType, LoggerContextConfigInput, LoggerConfigType, loggerContextConfigSchema, loggerSchema, } from './logging_config'; -export { LoggingSystem, ILoggingSystem } from './logging_system'; -export { - InternalLoggingServiceSetup, - LoggingServiceSetup, - LoggingService, -} from './logging_service'; -export { appendersSchema, AppenderConfigType } from './appenders/appenders'; +export { LoggingSystem } from './logging_system'; +export type { ILoggingSystem } from './logging_system'; +export { LoggingService } from './logging_service'; +export type { InternalLoggingServiceSetup, LoggingServiceSetup } from './logging_service'; +export { appendersSchema } from './appenders/appenders'; +export type { AppenderConfigType } from './appenders/appenders'; diff --git a/src/core/server/logging/layouts/conversions/index.ts b/src/core/server/logging/layouts/conversions/index.ts index 412a0af7a284a..9203fdd02278c 100644 --- a/src/core/server/logging/layouts/conversions/index.ts +++ b/src/core/server/logging/layouts/conversions/index.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -export { Conversion } from './type'; +export type { Conversion } from './type'; export { LoggerConversion } from './logger'; export { LevelConversion } from './level'; diff --git a/src/core/server/logging/logger.mock.ts b/src/core/server/logging/logger.mock.ts index d33b87552f884..efab15b7bf5f4 100644 --- a/src/core/server/logging/logger.mock.ts +++ b/src/core/server/logging/logger.mock.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { loggerMock, MockedLogger } from '@kbn/logging/target/mocks'; +export { loggerMock } from '@kbn/logging/target/mocks'; +export type { MockedLogger } from '@kbn/logging/target/mocks'; diff --git a/src/core/server/metrics/collectors/index.ts b/src/core/server/metrics/collectors/index.ts index 0e09d0823d9d1..c04a55f9ffaaf 100644 --- a/src/core/server/metrics/collectors/index.ts +++ b/src/core/server/metrics/collectors/index.ts @@ -6,7 +6,8 @@ * Side Public License, v 1. */ -export { OpsProcessMetrics, OpsOsMetrics, OpsServerMetrics, MetricsCollector } from './types'; -export { OsMetricsCollector, OpsMetricsCollectorOptions } from './os'; +export type { OpsProcessMetrics, OpsOsMetrics, OpsServerMetrics, MetricsCollector } from './types'; +export { OsMetricsCollector } from './os'; +export type { OpsMetricsCollectorOptions } from './os'; export { ProcessMetricsCollector } from './process'; export { ServerMetricsCollector } from './server'; diff --git a/src/core/server/metrics/index.ts b/src/core/server/metrics/index.ts index a5c54e316d76d..3e358edf3a01e 100644 --- a/src/core/server/metrics/index.ts +++ b/src/core/server/metrics/index.ts @@ -6,13 +6,13 @@ * Side Public License, v 1. */ -export { +export type { InternalMetricsServiceStart, InternalMetricsServiceSetup, MetricsServiceSetup, MetricsServiceStart, OpsMetrics, } from './types'; -export { OpsProcessMetrics, OpsServerMetrics, OpsOsMetrics } from './collectors'; +export type { OpsProcessMetrics, OpsServerMetrics, OpsOsMetrics } from './collectors'; export { MetricsService } from './metrics_service'; export { opsConfig } from './ops_config'; diff --git a/src/core/server/plugins/index.ts b/src/core/server/plugins/index.ts index e4dd15fa9ff02..a71df00b39c5c 100644 --- a/src/core/server/plugins/index.ts +++ b/src/core/server/plugins/index.ts @@ -6,12 +6,8 @@ * Side Public License, v 1. */ -export { - PluginsService, - PluginsServiceSetup, - PluginsServiceStart, - UiPlugins, -} from './plugins_service'; +export { PluginsService } from './plugins_service'; +export type { PluginsServiceSetup, PluginsServiceStart, UiPlugins } from './plugins_service'; export { config } from './plugins_config'; /** @internal */ export { isNewPlatformPlugin } from './discovery'; diff --git a/src/core/server/saved_objects/export/index.ts b/src/core/server/saved_objects/export/index.ts index dce1c048f252c..4af184e54b49c 100644 --- a/src/core/server/saved_objects/export/index.ts +++ b/src/core/server/saved_objects/export/index.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -export { +export type { SavedObjectsExportByObjectOptions, SavedObjectExportBaseOptions, SavedObjectsExportByTypeOptions, @@ -14,5 +14,6 @@ export { SavedObjectsExportTransformContext, SavedObjectsExportTransform, } from './types'; -export { ISavedObjectsExporter, SavedObjectsExporter } from './saved_objects_exporter'; +export { SavedObjectsExporter } from './saved_objects_exporter'; +export type { ISavedObjectsExporter } from './saved_objects_exporter'; export { SavedObjectsExportError } from './errors'; diff --git a/src/core/server/saved_objects/import/index.ts b/src/core/server/saved_objects/import/index.ts index 2f172deedd110..4832038b342d2 100644 --- a/src/core/server/saved_objects/import/index.ts +++ b/src/core/server/saved_objects/import/index.ts @@ -6,8 +6,9 @@ * Side Public License, v 1. */ -export { ISavedObjectsImporter, SavedObjectsImporter } from './saved_objects_importer'; -export { +export { SavedObjectsImporter } from './saved_objects_importer'; +export type { ISavedObjectsImporter } from './saved_objects_importer'; +export type { SavedObjectsImportResponse, SavedObjectsImportSuccess, SavedObjectsImportFailure, diff --git a/src/core/server/saved_objects/index.ts b/src/core/server/saved_objects/index.ts index 48ae57c509daf..2af25e0cdef3f 100644 --- a/src/core/server/saved_objects/index.ts +++ b/src/core/server/saved_objects/index.ts @@ -8,9 +8,10 @@ export * from './service'; -export { +export { SavedObjectsImporter } from './import'; + +export type { ISavedObjectsImporter, - SavedObjectsImporter, SavedObjectsImportAmbiguousConflictError, SavedObjectsImportConflictError, SavedObjectsImportFailure, @@ -30,7 +31,7 @@ export { SavedObjectsImportWarning, } from './import'; -export { +export type { SavedObjectsExporter, ISavedObjectsExporter, SavedObjectExportBaseOptions, @@ -42,18 +43,20 @@ export { SavedObjectsExportTransform, } from './export'; -export { - SavedObjectsSerializer, +export { SavedObjectsSerializer } from './serialization'; + +export type { SavedObjectsRawDoc, SavedObjectsRawDocParseOptions, SavedObjectSanitizedDoc, SavedObjectUnsanitizedDoc, } from './serialization'; -export { SavedObjectsMigrationLogger } from './migrations/core/migration_logger'; +export type { SavedObjectsMigrationLogger } from './migrations/core/migration_logger'; + +export { SavedObjectsService } from './saved_objects_service'; -export { - SavedObjectsService, +export type { InternalSavedObjectsServiceStart, SavedObjectsServiceStart, SavedObjectsServiceSetup, @@ -61,14 +64,14 @@ export { SavedObjectsRepositoryFactory, } from './saved_objects_service'; -export { +export type { ISavedObjectsRepository, SavedObjectsIncrementCounterOptions, SavedObjectsIncrementCounterField, SavedObjectsDeleteByNamespaceOptions, } from './service/lib/repository'; -export { +export type { SavedObjectsCoreFieldMapping, SavedObjectsComplexFieldMapping, SavedObjectsFieldMapping, @@ -77,13 +80,13 @@ export { SavedObjectsTypeMappingDefinitions, } from './mappings'; -export { +export type { SavedObjectMigrationMap, SavedObjectMigrationFn, SavedObjectMigrationContext, } from './migrations'; -export { +export type { SavedObjectsNamespaceType, SavedObjectStatusMeta, SavedObjectsType, @@ -91,4 +94,5 @@ export { } from './types'; export { savedObjectsConfig, savedObjectsMigrationConfig } from './saved_objects_config'; -export { SavedObjectTypeRegistry, ISavedObjectTypeRegistry } from './saved_objects_type_registry'; +export { SavedObjectTypeRegistry } from './saved_objects_type_registry'; +export type { ISavedObjectTypeRegistry } from './saved_objects_type_registry'; diff --git a/src/core/server/saved_objects/mappings/index.ts b/src/core/server/saved_objects/mappings/index.ts index deb0c213cc0c4..bf1029e9f3b81 100644 --- a/src/core/server/saved_objects/mappings/index.ts +++ b/src/core/server/saved_objects/mappings/index.ts @@ -7,7 +7,7 @@ */ export { getTypes, getProperty, getRootProperties, getRootPropertiesObjects } from './lib'; -export { +export type { SavedObjectsComplexFieldMapping, SavedObjectsCoreFieldMapping, SavedObjectsTypeMappingDefinition, diff --git a/src/core/server/saved_objects/migrations/core/index.ts b/src/core/server/saved_objects/migrations/core/index.ts index b2f616ec31e68..322150e2b850e 100644 --- a/src/core/server/saved_objects/migrations/core/index.ts +++ b/src/core/server/saved_objects/migrations/core/index.ts @@ -9,7 +9,8 @@ export { DocumentMigrator } from './document_migrator'; export { IndexMigrator } from './index_migrator'; export { buildActiveMappings } from './build_active_mappings'; -export { CallCluster } from './call_cluster'; -export { LogFn, SavedObjectsMigrationLogger } from './migration_logger'; -export { MigrationResult, MigrationStatus } from './migration_coordinator'; -export { createMigrationEsClient, MigrationEsClient } from './migration_es_client'; +export type { CallCluster } from './call_cluster'; +export type { LogFn, SavedObjectsMigrationLogger } from './migration_logger'; +export type { MigrationResult, MigrationStatus } from './migration_coordinator'; +export { createMigrationEsClient } from './migration_es_client'; +export type { MigrationEsClient } from './migration_es_client'; diff --git a/src/core/server/saved_objects/migrations/index.ts b/src/core/server/saved_objects/migrations/index.ts index a0eea21c567de..20b86ee6d3739 100644 --- a/src/core/server/saved_objects/migrations/index.ts +++ b/src/core/server/saved_objects/migrations/index.ts @@ -6,9 +6,10 @@ * Side Public License, v 1. */ -export { MigrationResult } from './core'; -export { KibanaMigrator, IKibanaMigrator } from './kibana'; -export { +export type { MigrationResult } from './core'; +export { KibanaMigrator } from './kibana'; +export type { IKibanaMigrator } from './kibana'; +export type { SavedObjectMigrationFn, SavedObjectMigrationMap, SavedObjectMigrationContext, diff --git a/src/core/server/saved_objects/migrations/kibana/index.ts b/src/core/server/saved_objects/migrations/kibana/index.ts index fff72409e7c12..52755ee0aed71 100644 --- a/src/core/server/saved_objects/migrations/kibana/index.ts +++ b/src/core/server/saved_objects/migrations/kibana/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { KibanaMigrator, IKibanaMigrator, KibanaMigratorStatus } from './kibana_migrator'; +export { KibanaMigrator } from './kibana_migrator'; +export type { IKibanaMigrator, KibanaMigratorStatus } from './kibana_migrator'; diff --git a/src/core/server/saved_objects/migrationsv2/actions/index.ts b/src/core/server/saved_objects/migrationsv2/actions/index.ts index b22c326061f66..d025f104c6e3f 100644 --- a/src/core/server/saved_objects/migrationsv2/actions/index.ts +++ b/src/core/server/saved_objects/migrationsv2/actions/index.ts @@ -20,7 +20,7 @@ import { catchRetryableEsClientErrors, RetryableEsClientError, } from './catch_retryable_es_client_errors'; -export { RetryableEsClientError }; +export type { RetryableEsClientError }; export const isRetryableEsClientResponse = ( res: Either.Either diff --git a/src/core/server/saved_objects/object_types/index.ts b/src/core/server/saved_objects/object_types/index.ts index 0907980e8773a..11a2c1973b09a 100644 --- a/src/core/server/saved_objects/object_types/index.ts +++ b/src/core/server/saved_objects/object_types/index.ts @@ -7,5 +7,5 @@ */ export { LEGACY_URL_ALIAS_TYPE } from './constants'; -export { LegacyUrlAlias } from './types'; +export type { LegacyUrlAlias } from './types'; export { registerCoreObjectTypes } from './registration'; diff --git a/src/core/server/saved_objects/serialization/index.ts b/src/core/server/saved_objects/serialization/index.ts index 2a15de494daae..64055f52adebb 100644 --- a/src/core/server/saved_objects/serialization/index.ts +++ b/src/core/server/saved_objects/serialization/index.ts @@ -11,7 +11,7 @@ * the raw document format as stored in ElasticSearch. */ -export { +export type { SavedObjectUnsanitizedDoc, SavedObjectSanitizedDoc, SavedObjectsRawDoc, diff --git a/src/core/server/saved_objects/service/index.ts b/src/core/server/saved_objects/service/index.ts index b7856f7b91204..1186e15cbef4a 100644 --- a/src/core/server/saved_objects/service/index.ts +++ b/src/core/server/saved_objects/service/index.ts @@ -5,18 +5,15 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - -export { +export { SavedObjectsErrorHelpers, SavedObjectsClientProvider, SavedObjectsUtils } from './lib'; +export type { SavedObjectsRepository, - SavedObjectsClientProvider, ISavedObjectsClientProvider, SavedObjectsClientProviderOptions, SavedObjectsClientWrapperFactory, SavedObjectsClientWrapperOptions, - SavedObjectsErrorHelpers, SavedObjectsClientFactory, SavedObjectsClientFactoryProvider, - SavedObjectsUtils, } from './lib'; export * from './saved_objects_client'; diff --git a/src/core/server/saved_objects/service/lib/index.ts b/src/core/server/saved_objects/service/lib/index.ts index 4742f7fed19ab..d05552bc6e55e 100644 --- a/src/core/server/saved_objects/service/lib/index.ts +++ b/src/core/server/saved_objects/service/lib/index.ts @@ -6,13 +6,12 @@ * Side Public License, v 1. */ -export { ISavedObjectsRepository, SavedObjectsRepository } from './repository'; - -export { +export type { ISavedObjectsRepository, SavedObjectsRepository } from './repository'; +export { SavedObjectsClientProvider } from './scoped_client_provider'; +export type { SavedObjectsClientWrapperFactory, SavedObjectsClientWrapperOptions, ISavedObjectsClientProvider, - SavedObjectsClientProvider, SavedObjectsClientProviderOptions, SavedObjectsClientFactory, SavedObjectsClientFactoryProvider, diff --git a/src/core/server/saved_objects/types.ts b/src/core/server/saved_objects/types.ts index 57a77a9ebc525..11a694c72f29f 100644 --- a/src/core/server/saved_objects/types.ts +++ b/src/core/server/saved_objects/types.ts @@ -12,7 +12,7 @@ import { SavedObjectMigrationMap } from './migrations'; import { SavedObjectsExportTransform } from './export'; import { SavedObjectsImportHook } from './import/types'; -export { +export type { SavedObjectsImportResponse, SavedObjectsImportSuccess, SavedObjectsImportConflictError, @@ -31,7 +31,7 @@ import { SavedObject } from '../../types'; type KueryNode = any; -export { +export type { SavedObjectAttributes, SavedObjectAttribute, SavedObjectAttributeSingle, diff --git a/src/core/server/server.api.md b/src/core/server/server.api.md index 72d66bc04f08e..a1a774e8721c8 100644 --- a/src/core/server/server.api.md +++ b/src/core/server/server.api.md @@ -383,7 +383,7 @@ export { ConfigService } // @public export interface ContextSetup { - createContextContainer>(): IContextContainer; + createContextContainer(): IContextContainer; } // @internal @@ -924,16 +924,6 @@ export interface ErrorHttpResponseOptions { headers?: ResponseHeaders; } -// @public (undocumented) -export interface Explanation { - // (undocumented) - description: string; - // (undocumented) - details: Explanation[]; - // (undocumented) - value: number; -} - // @public export interface FakeRequest { headers: Headers; @@ -1073,8 +1063,8 @@ export interface IClusterClient { } // @public -export interface IContextContainer { - createHandler(pluginOpaqueId: PluginOpaqueId, handler: THandler): (...rest: HandlerParameters) => ShallowPromise>; +export interface IContextContainer { + createHandler(pluginOpaqueId: PluginOpaqueId, handler: RequestHandler): (...rest: HandlerParameters) => ShallowPromise>; registerContext(pluginOpaqueId: PluginOpaqueId, contextName: ContextName, provider: IContextProvider): this; } @@ -1942,7 +1932,7 @@ export interface RequestHandlerContext { } // @public -export type RequestHandlerContextContainer = IContextContainer; +export type RequestHandlerContextContainer = IContextContainer; // @public export type RequestHandlerContextProvider = IContextProvider; @@ -3198,6 +3188,7 @@ export const validBodyOutput: readonly ["data", "stream"]; // Warnings were encountered during analysis: // +// src/core/server/elasticsearch/client/types.ts:94:7 - (ae-forgotten-export) The symbol "Explanation" needs to be exported by the entry point index.d.ts // src/core/server/http/router/response.ts:297:3 - (ae-forgotten-export) The symbol "KibanaResponse" needs to be exported by the entry point index.d.ts // src/core/server/plugins/types.ts:286:3 - (ae-forgotten-export) The symbol "KibanaConfigType" needs to be exported by the entry point index.d.ts // src/core/server/plugins/types.ts:286:3 - (ae-forgotten-export) The symbol "SharedGlobalConfigKeys" needs to be exported by the entry point index.d.ts diff --git a/src/core/server/server.ts b/src/core/server/server.ts index 337dfa8824303..45bec58bbae3c 100644 --- a/src/core/server/server.ts +++ b/src/core/server/server.ts @@ -269,6 +269,7 @@ export class Server { plugins: mapToObject(pluginsStart.contracts), }); + this.status.start(); await this.http.start(); startTransaction?.end(); diff --git a/src/core/server/status/log_overall_status.test.ts b/src/core/server/status/log_overall_status.test.ts new file mode 100644 index 0000000000000..b656b16a9e00b --- /dev/null +++ b/src/core/server/status/log_overall_status.test.ts @@ -0,0 +1,103 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { TestScheduler } from 'rxjs/testing'; +import { ServiceStatus, ServiceStatusLevels } from './types'; +import { getOverallStatusChanges } from './log_overall_status'; + +const getTestScheduler = () => + new TestScheduler((actual, expected) => { + expect(actual).toEqual(expected); + }); + +const createStatus = (parts: Partial = {}): ServiceStatus => ({ + level: ServiceStatusLevels.available, + summary: 'summary', + ...parts, +}); + +describe('getOverallStatusChanges', () => { + it('emits an initial message after first overall$ emission', () => { + getTestScheduler().run(({ expectObservable, hot }) => { + const overall$ = hot('--a', { + a: createStatus(), + }); + const stop$ = hot(''); + const expected = '--a'; + + expectObservable(getOverallStatusChanges(overall$, stop$)).toBe(expected, { + a: 'Kibana is now available', + }); + }); + }); + + it('emits a new message every time the status level changes', () => { + getTestScheduler().run(({ expectObservable, hot }) => { + const overall$ = hot('--a--b', { + a: createStatus({ + level: ServiceStatusLevels.degraded, + }), + b: createStatus({ + level: ServiceStatusLevels.available, + }), + }); + const stop$ = hot(''); + const expected = '--a--b'; + + expectObservable(getOverallStatusChanges(overall$, stop$)).toBe(expected, { + a: 'Kibana is now degraded', + b: 'Kibana is now available (was degraded)', + }); + }); + }); + + it('does not emit when the status stays the same', () => { + getTestScheduler().run(({ expectObservable, hot }) => { + const overall$ = hot('--a--b--c', { + a: createStatus({ + level: ServiceStatusLevels.degraded, + summary: 'summary 1', + }), + b: createStatus({ + level: ServiceStatusLevels.degraded, + summary: 'summary 2', + }), + c: createStatus({ + level: ServiceStatusLevels.available, + summary: 'summary 2', + }), + }); + const stop$ = hot(''); + const expected = '--a-----b'; + + expectObservable(getOverallStatusChanges(overall$, stop$)).toBe(expected, { + a: 'Kibana is now degraded', + b: 'Kibana is now available (was degraded)', + }); + }); + }); + + it('stops emitting once `stop$` emits', () => { + getTestScheduler().run(({ expectObservable, hot }) => { + const overall$ = hot('--a--b', { + a: createStatus({ + level: ServiceStatusLevels.degraded, + }), + b: createStatus({ + level: ServiceStatusLevels.available, + }), + }); + const stop$ = hot('----(s|)'); + const expected = '--a-|'; + + expectObservable(getOverallStatusChanges(overall$, stop$)).toBe(expected, { + a: 'Kibana is now degraded', + }); + }); + }); +}); diff --git a/src/core/server/status/log_overall_status.ts b/src/core/server/status/log_overall_status.ts new file mode 100644 index 0000000000000..c77f634046be1 --- /dev/null +++ b/src/core/server/status/log_overall_status.ts @@ -0,0 +1,31 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { Observable } from 'rxjs'; +import { distinctUntilChanged, pairwise, startWith, takeUntil, map } from 'rxjs/operators'; +import { ServiceStatus } from './types'; + +export const getOverallStatusChanges = ( + overall$: Observable, + stop$: Observable +) => { + return overall$.pipe( + takeUntil(stop$), + distinctUntilChanged((previous, next) => { + return previous.level.toString() === next.level.toString(); + }), + startWith(undefined), + pairwise(), + map(([oldStatus, newStatus]) => { + if (oldStatus) { + return `Kibana is now ${newStatus!.level.toString()} (was ${oldStatus!.level.toString()})`; + } + return `Kibana is now ${newStatus!.level.toString()}`; + }) + ); +}; diff --git a/src/core/server/status/status_service.ts b/src/core/server/status/status_service.ts index 09cf5b92b2b8a..911f09278b460 100644 --- a/src/core/server/status/status_service.ts +++ b/src/core/server/status/status_service.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { Observable, combineLatest, Subscription } from 'rxjs'; +import { Observable, combineLatest, Subscription, Subject } from 'rxjs'; import { map, distinctUntilChanged, shareReplay, take, debounceTime } from 'rxjs/operators'; import { isDeepStrictEqual } from 'util'; @@ -25,6 +25,7 @@ import { config, StatusConfigType } from './status_config'; import { ServiceStatus, CoreStatus, InternalStatusServiceSetup } from './types'; import { getSummaryStatus } from './get_summary_status'; import { PluginsStatusService } from './plugins_status'; +import { getOverallStatusChanges } from './log_overall_status'; interface SetupDeps { elasticsearch: Pick; @@ -38,7 +39,9 @@ interface SetupDeps { export class StatusService implements CoreService { private readonly logger: Logger; private readonly config$: Observable; + private readonly stop$ = new Subject(); + private overall$?: Observable; private pluginsStatus?: PluginsStatusService; private overallSubscription?: Subscription; @@ -59,10 +62,7 @@ export class StatusService implements CoreService { const core$ = this.setupCoreStatus({ elasticsearch, savedObjects }); this.pluginsStatus = new PluginsStatusService({ core$, pluginDependencies }); - const overall$: Observable = combineLatest([ - core$, - this.pluginsStatus.getAll$(), - ]).pipe( + this.overall$ = combineLatest([core$, this.pluginsStatus.getAll$()]).pipe( // Prevent many emissions at once from dependency status resolution from making this too noisy debounceTime(500), map(([coreStatus, pluginsStatus]) => { @@ -78,7 +78,7 @@ export class StatusService implements CoreService { ); // Create an unused subscription to ensure all underlying lazy observables are started. - this.overallSubscription = overall$.subscribe(); + this.overallSubscription = this.overall$.subscribe(); const router = http.createRouter(''); registerStatusRoute({ @@ -91,7 +91,7 @@ export class StatusService implements CoreService { }, metrics, status: { - overall$, + overall$: this.overall$, plugins$: this.pluginsStatus.getAll$(), core$, }, @@ -99,7 +99,7 @@ export class StatusService implements CoreService { return { core$, - overall$, + overall$: this.overall$, plugins: { set: this.pluginsStatus.set.bind(this.pluginsStatus), getDependenciesStatus$: this.pluginsStatus.getDependenciesStatus$.bind(this.pluginsStatus), @@ -109,9 +109,19 @@ export class StatusService implements CoreService { }; } - public start() {} + public start() { + if (!this.overall$) { + throw new Error('cannot call `start` before `setup`'); + } + getOverallStatusChanges(this.overall$, this.stop$).subscribe((message) => { + this.logger.info(message); + }); + } public stop() { + this.stop$.next(); + this.stop$.complete(); + if (this.overallSubscription) { this.overallSubscription.unsubscribe(); this.overallSubscription = undefined; diff --git a/src/core/server/types.ts b/src/core/server/types.ts index 2ae51d4452a4e..6bd805d55af1d 100644 --- a/src/core/server/types.ts +++ b/src/core/server/types.ts @@ -7,7 +7,7 @@ */ /** This module is intended for consumption by public to avoid import issues with server-side code */ -export { PluginOpaqueId } from './plugins/types'; +export type { PluginOpaqueId } from './plugins/types'; export type { SavedObjectsImportResponse, SavedObjectsImportSuccess, diff --git a/src/core/server/ui_settings/index.ts b/src/core/server/ui_settings/index.ts index ae03040dd8407..ba5e952ff6fe5 100644 --- a/src/core/server/ui_settings/index.ts +++ b/src/core/server/ui_settings/index.ts @@ -6,12 +6,12 @@ * Side Public License, v 1. */ -export { UiSettingsClient, UiSettingsServiceOptions } from './ui_settings_client'; +export type { UiSettingsClient, UiSettingsServiceOptions } from './ui_settings_client'; export { config } from './ui_settings_config'; export { UiSettingsService } from './ui_settings_service'; -export { +export type { UiSettingsServiceSetup, UiSettingsServiceStart, IUiSettingsClient, diff --git a/src/core/server/ui_settings/saved_objects/migrations.ts b/src/core/server/ui_settings/saved_objects/migrations.ts index b5dc13fcdae3b..16f217352b99a 100644 --- a/src/core/server/ui_settings/saved_objects/migrations.ts +++ b/src/core/server/ui_settings/saved_objects/migrations.ts @@ -28,6 +28,34 @@ export const migrations = { }), references: doc.references || [], }), + '7.12.0': (doc: SavedObjectUnsanitizedDoc): SavedObjectSanitizedDoc => ({ + ...doc, + ...(doc.attributes && { + attributes: Object.keys(doc.attributes).reduce((acc, key) => { + if (key === 'timepicker:quickRanges' && doc.attributes[key].indexOf('section') > -1) { + const ranges = JSON.parse(doc.attributes[key]).map( + ({ from, to, display }: { from: string; to: string; display: string }) => { + return { + from, + to, + display, + }; + } + ); + return { + ...acc, + 'timepicker:quickRanges': JSON.stringify(ranges, null, 2), + }; + } else { + return { + ...acc, + [key]: doc.attributes[key], + }; + } + }, {}), + }), + references: doc.references || [], + }), '7.13.0': (doc: SavedObjectUnsanitizedDoc): SavedObjectSanitizedDoc => ({ ...doc, ...(doc.attributes && { diff --git a/src/core/server/ui_settings/types.ts b/src/core/server/ui_settings/types.ts index 39fecc7f5ecd4..0f13c82eed11a 100644 --- a/src/core/server/ui_settings/types.ts +++ b/src/core/server/ui_settings/types.ts @@ -8,7 +8,7 @@ import { SavedObjectsClientContract } from '../saved_objects/types'; import { UiSettingsParams, UserProvidedValues, PublicUiSettingsParams } from '../../types'; -export { +export type { UiSettingsParams, PublicUiSettingsParams, StringValidationRegexString, diff --git a/src/core/server/utils/crypto/index.ts b/src/core/server/utils/crypto/index.ts index fdea52f9e9782..7254e6a2411ac 100644 --- a/src/core/server/utils/crypto/index.ts +++ b/src/core/server/utils/crypto/index.ts @@ -6,5 +6,6 @@ * Side Public License, v 1. */ -export { Pkcs12ReadResult, readPkcs12Keystore, readPkcs12Truststore } from './pkcs12'; +export { readPkcs12Keystore, readPkcs12Truststore } from './pkcs12'; +export type { Pkcs12ReadResult } from './pkcs12'; export { createSHA256Hash } from './sha256'; diff --git a/src/core/tsconfig.json b/src/core/tsconfig.json index e8a82ee533f11..855962070457e 100644 --- a/src/core/tsconfig.json +++ b/src/core/tsconfig.json @@ -5,7 +5,8 @@ "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, - "declarationMap": true + "declarationMap": true, + "isolatedModules": true, }, "include": [ "public/**/*", diff --git a/src/dev/bazel_workspace_status.js b/src/dev/bazel_workspace_status.js index 3c3ef1574cd8e..c7ae05ce48744 100644 --- a/src/dev/bazel_workspace_status.js +++ b/src/dev/bazel_workspace_status.js @@ -17,13 +17,21 @@ // If the script exits with non-zero code, it's considered as a failure // and the output will be discarded. -(async () => { - const execa = require('execa'); +(() => { + const cp = require('child_process'); const os = require('os'); - async function runCmd(cmd, args) { + function runCmd(cmd, args) { try { - return await execa(cmd, args); + const spawnResult = cp.spawnSync(cmd, args); + const exitCode = spawnResult.status !== null ? spawnResult.status : 1; + const stdoutStr = spawnResult.stdout.toString(); + const stdout = stdoutStr ? stdoutStr.trim() : null; + + return { + exitCode, + stdout, + }; } catch (e) { return { exitCode: 1 }; } @@ -31,29 +39,25 @@ // Git repo const kbnGitOriginName = process.env.KBN_GIT_ORIGIN_NAME || 'origin'; - const repoUrlCmdResult = await runCmd('git', [ - 'config', - '--get', - `remote.${kbnGitOriginName}.url`, - ]); + const repoUrlCmdResult = runCmd('git', ['config', '--get', `remote.${kbnGitOriginName}.url`]); if (repoUrlCmdResult.exitCode === 0) { // Only output REPO_URL when found it console.log(`REPO_URL ${repoUrlCmdResult.stdout}`); } // Commit SHA - const commitSHACmdResult = await runCmd('git', ['rev-parse', 'HEAD']); + const commitSHACmdResult = runCmd('git', ['rev-parse', 'HEAD']); if (commitSHACmdResult.exitCode === 0) { console.log(`COMMIT_SHA ${commitSHACmdResult.stdout}`); // Branch - const gitBranchCmdResult = await runCmd('git', ['rev-parse', '--abbrev-ref', 'HEAD']); + const gitBranchCmdResult = runCmd('git', ['rev-parse', '--abbrev-ref', 'HEAD']); if (gitBranchCmdResult.exitCode === 0) { console.log(`GIT_BRANCH ${gitBranchCmdResult.stdout}`); } // Tree status - const treeStatusCmdResult = await runCmd('git', ['diff-index', '--quiet', 'HEAD', '--']); + const treeStatusCmdResult = runCmd('git', ['diff-index', '--quiet', 'HEAD', '--']); const treeStatusVarStr = 'GIT_TREE_STATUS'; if (treeStatusCmdResult.exitCode === 0) { console.log(`${treeStatusVarStr} Clean`); @@ -64,7 +68,7 @@ // Host if (process.env.CI) { - const hostCmdResult = await runCmd('hostname'); + const hostCmdResult = runCmd('hostname'); const hostStr = hostCmdResult.stdout.split('-').slice(0, -1).join('-'); const coresStr = os.cpus().filter((cpu, index) => { return !cpu.model.includes('Intel') || index % 2 === 1; diff --git a/src/dev/build/args.test.ts b/src/dev/build/args.test.ts index 2397c18c04d07..e749af73241cf 100644 --- a/src/dev/build/args.test.ts +++ b/src/dev/build/args.test.ts @@ -33,8 +33,11 @@ it('build default and oss dist for current platform, without packages, by defaul "createDockerCentOS": false, "createDockerContexts": true, "createDockerUBI": false, + "createGenericFolders": true, + "createPlatformFolders": true, "createRpmPackage": false, "downloadFreshNode": true, + "initialize": true, "isRelease": false, "targetAllPlatforms": false, "versionQualifier": "", @@ -57,8 +60,11 @@ it('builds packages if --all-platforms is passed', () => { "createDockerCentOS": true, "createDockerContexts": true, "createDockerUBI": true, + "createGenericFolders": true, + "createPlatformFolders": true, "createRpmPackage": true, "downloadFreshNode": true, + "initialize": true, "isRelease": false, "targetAllPlatforms": true, "versionQualifier": "", @@ -81,8 +87,11 @@ it('limits packages if --rpm passed with --all-platforms', () => { "createDockerCentOS": false, "createDockerContexts": true, "createDockerUBI": false, + "createGenericFolders": true, + "createPlatformFolders": true, "createRpmPackage": true, "downloadFreshNode": true, + "initialize": true, "isRelease": false, "targetAllPlatforms": true, "versionQualifier": "", @@ -105,8 +114,11 @@ it('limits packages if --deb passed with --all-platforms', () => { "createDockerCentOS": false, "createDockerContexts": true, "createDockerUBI": false, + "createGenericFolders": true, + "createPlatformFolders": true, "createRpmPackage": false, "downloadFreshNode": true, + "initialize": true, "isRelease": false, "targetAllPlatforms": true, "versionQualifier": "", @@ -130,8 +142,11 @@ it('limits packages if --docker passed with --all-platforms', () => { "createDockerCentOS": true, "createDockerContexts": true, "createDockerUBI": true, + "createGenericFolders": true, + "createPlatformFolders": true, "createRpmPackage": false, "downloadFreshNode": true, + "initialize": true, "isRelease": false, "targetAllPlatforms": true, "versionQualifier": "", @@ -162,8 +177,11 @@ it('limits packages if --docker passed with --skip-docker-ubi and --all-platform "createDockerCentOS": true, "createDockerContexts": true, "createDockerUBI": false, + "createGenericFolders": true, + "createPlatformFolders": true, "createRpmPackage": false, "downloadFreshNode": true, + "initialize": true, "isRelease": false, "targetAllPlatforms": true, "versionQualifier": "", @@ -187,8 +205,11 @@ it('limits packages if --all-platforms passed with --skip-docker-centos', () => "createDockerCentOS": false, "createDockerContexts": true, "createDockerUBI": true, + "createGenericFolders": true, + "createPlatformFolders": true, "createRpmPackage": true, "downloadFreshNode": true, + "initialize": true, "isRelease": false, "targetAllPlatforms": true, "versionQualifier": "", diff --git a/src/dev/build/args.ts b/src/dev/build/args.ts index c594eacd08c01..bbfbd3e6f8813 100644 --- a/src/dev/build/args.ts +++ b/src/dev/build/args.ts @@ -18,6 +18,9 @@ export function readCliArgs(argv: string[]) { 'oss', 'no-oss', 'skip-archives', + 'skip-initialize', + 'skip-generic-folders', + 'skip-platform-folders', 'skip-os-packages', 'rpm', 'deb', @@ -93,7 +96,10 @@ export function readCliArgs(argv: string[]) { versionQualifier: flags['version-qualifier'], buildOssDist: flags.oss !== false, buildDefaultDist: !flags.oss, + initialize: !Boolean(flags['skip-initialize']), downloadFreshNode: !Boolean(flags['skip-node-download']), + createGenericFolders: !Boolean(flags['skip-generic-folders']), + createPlatformFolders: !Boolean(flags['skip-platform-folders']), createArchives: !Boolean(flags['skip-archives']), createRpmPackage: isOsPackageDesired('rpm'), createDebPackage: isOsPackageDesired('deb'), diff --git a/src/dev/build/build_distributables.ts b/src/dev/build/build_distributables.ts index 237fc71811a41..f0403fac1e26b 100644 --- a/src/dev/build/build_distributables.ts +++ b/src/dev/build/build_distributables.ts @@ -16,6 +16,9 @@ export interface BuildOptions { buildOssDist: boolean; buildDefaultDist: boolean; downloadFreshNode: boolean; + initialize: boolean; + createGenericFolders: boolean; + createPlatformFolders: boolean; createArchives: boolean; createRpmPackage: boolean; createDebPackage: boolean; @@ -41,45 +44,53 @@ export async function buildDistributables(log: ToolingLog, options: BuildOptions /** * verify, reset, and initialize the build environment */ - await run(Tasks.VerifyEnv); - await run(Tasks.Clean); - await run(options.downloadFreshNode ? Tasks.DownloadNodeBuilds : Tasks.VerifyExistingNodeBuilds); - await run(Tasks.ExtractNodeBuilds); + if (options.initialize) { + await run(Tasks.VerifyEnv); + await run(Tasks.Clean); + await run( + options.downloadFreshNode ? Tasks.DownloadNodeBuilds : Tasks.VerifyExistingNodeBuilds + ); + await run(Tasks.ExtractNodeBuilds); + } /** * run platform-generic build tasks */ - await run(Tasks.CopySource); - await run(Tasks.CopyBinScripts); - await run(Tasks.ReplaceFavicon); - await run(Tasks.CreateEmptyDirsAndFiles); - await run(Tasks.CreateReadme); - await run(Tasks.BuildBazelPackages); - await run(Tasks.BuildPackages); - await run(Tasks.BuildKibanaPlatformPlugins); - await run(Tasks.TranspileBabel); - await run(Tasks.CreatePackageJson); - await run(Tasks.InstallDependencies); - await run(Tasks.CleanPackages); - await run(Tasks.CreateNoticeFile); - await run(Tasks.UpdateLicenseFile); - await run(Tasks.RemovePackageJsonDeps); - await run(Tasks.CleanTypescript); - await run(Tasks.CleanExtraFilesFromModules); - await run(Tasks.CleanEmptyFolders); + if (options.createGenericFolders) { + await run(Tasks.CopySource); + await run(Tasks.CopyBinScripts); + await run(Tasks.ReplaceFavicon); + await run(Tasks.CreateEmptyDirsAndFiles); + await run(Tasks.CreateReadme); + await run(Tasks.BuildBazelPackages); + await run(Tasks.BuildPackages); + await run(Tasks.BuildKibanaPlatformPlugins); + await run(Tasks.TranspileBabel); + await run(Tasks.CreatePackageJson); + await run(Tasks.InstallDependencies); + await run(Tasks.CleanPackages); + await run(Tasks.CreateNoticeFile); + await run(Tasks.UpdateLicenseFile); + await run(Tasks.RemovePackageJsonDeps); + await run(Tasks.CleanTypescript); + await run(Tasks.CleanExtraFilesFromModules); + await run(Tasks.CleanEmptyFolders); + } /** * copy generic build outputs into platform-specific build * directories and perform platform/architecture-specific steps */ - await run(Tasks.CreateArchivesSources); - await run(Tasks.PatchNativeModules); - await run(Tasks.InstallChromium); - await run(Tasks.CleanExtraBinScripts); - await run(Tasks.CleanNodeBuilds); + if (options.createPlatformFolders) { + await run(Tasks.CreateArchivesSources); + await run(Tasks.PatchNativeModules); + await run(Tasks.InstallChromium); + await run(Tasks.CleanExtraBinScripts); + await run(Tasks.CleanNodeBuilds); - await run(Tasks.PathLength); - await run(Tasks.UuidVerification); + await run(Tasks.PathLength); + await run(Tasks.UuidVerification); + } /** * package platform-specific builds into archives diff --git a/src/dev/build/tasks/os_packages/docker_generator/run.ts b/src/dev/build/tasks/os_packages/docker_generator/run.ts index 21d2582f205f3..8bf876b558431 100644 --- a/src/dev/build/tasks/os_packages/docker_generator/run.ts +++ b/src/dev/build/tasks/os_packages/docker_generator/run.ts @@ -83,6 +83,16 @@ export async function runDockerGenerator( revision: config.getBuildSha(), }; + type HostArchitectureToDocker = Record; + const hostTarget: HostArchitectureToDocker = { + x64: 'x64', + arm64: 'aarch64', + }; + const buildArchitectureSupported = hostTarget[process.arch] === flags.architecture; + if (flags.architecture && !buildArchitectureSupported) { + return; + } + // Verify if we have the needed kibana target in order // to build the kibana docker image. // Also create the docker build target folder @@ -132,13 +142,7 @@ export async function runDockerGenerator( await chmodAsync(`${resolve(dockerBuildDir, 'build_docker.sh')}`, '755'); // Only build images on native targets - type HostArchitectureToDocker = Record; - const hostTarget: HostArchitectureToDocker = { - x64: 'x64', - arm64: 'aarch64', - }; - const buildImage = hostTarget[process.arch] === flags.architecture && flags.image; - if (buildImage) { + if (flags.image) { await exec(log, `./build_docker.sh`, [], { cwd: dockerBuildDir, level: 'info', diff --git a/src/dev/build/tasks/os_packages/run_fpm.ts b/src/dev/build/tasks/os_packages/run_fpm.ts index 00f8e0ec75049..933b3e411b286 100644 --- a/src/dev/build/tasks/os_packages/run_fpm.ts +++ b/src/dev/build/tasks/os_packages/run_fpm.ts @@ -87,6 +87,10 @@ export async function runFpm( '--rpm-posttrans', resolve(__dirname, 'package_scripts/post_trans.sh'), + // for RHEL 8+ package verification + '--rpm-digest', + 'sha256', + // tell fpm about the config file so that it is called out in the package definition '--config-files', `/etc/kibana/kibana.yml`, diff --git a/src/dev/ci_setup/bootstrap_validations.sh b/src/dev/ci_setup/bootstrap_validations.sh deleted file mode 100644 index 939269952dea1..0000000000000 --- a/src/dev/ci_setup/bootstrap_validations.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env bash - -set -e - -### -### verify no git modifications caused by bootstrap -### -if [[ $DISABLE_BOOTSTRAP_VALIDATIONS != "true" ]]; then - GIT_CHANGES="$(git ls-files --modified)" - if [ "$GIT_CHANGES" ]; then - echo -e "\n${RED}ERROR: 'yarn kbn bootstrap' caused changes to the following files:${C_RESET}\n" - echo -e "$GIT_CHANGES\n" - exit 1 - fi -fi - - -### -### rebuild kbn-pm distributable to ensure it's not out of date -### -echo " -- building kbn-pm distributable" -yarn kbn run build -i @kbn/pm - -### -### verify no git modifications -### -GIT_CHANGES="$(git ls-files --modified)" -if [ "$GIT_CHANGES" ]; then - echo -e "\n${RED}ERROR: 'yarn kbn run build -i @kbn/pm' caused changes to the following files:${C_RESET}\n" - echo -e "$GIT_CHANGES\n" - exit 1 -fi - -### -### rebuild plugin list to ensure it's not out of date -### -echo " -- building plugin list docs" -node scripts/build_plugin_list_docs - -### -### verify no git modifications -### -GIT_CHANGES="$(git ls-files --modified)" -if [ "$GIT_CHANGES" ]; then - echo -e "\n${RED}ERROR: 'node scripts/build_plugin_list_docs' caused changes to the following files:${C_RESET}\n" - echo -e "$GIT_CHANGES\n" - exit 1 -fi - -### -### rebuild plugin api docs to ensure it's not out of date -### -echo " -- building api docs" -node scripts/build_api_docs - -### -### verify no api changes -### -GIT_CHANGES="$(git ls-files --modified)" -if [ "$GIT_CHANGES" ]; then - echo -e "\n${RED}ERROR: 'node scripts/build_api_docs' caused changes to the following files:${C_RESET}\n" - echo -e "$GIT_CHANGES\n" - exit 1 -fi diff --git a/src/dev/ci_setup/setup.sh b/src/dev/ci_setup/setup.sh index 3c08b336f1628..dde1cb212c536 100755 --- a/src/dev/ci_setup/setup.sh +++ b/src/dev/ci_setup/setup.sh @@ -40,12 +40,20 @@ if [[ "$BUILD_TS_REFS_CACHE_CAPTURE" == "true" ]]; then cd "$KIBANA_DIR" fi -if [[ "$DISABLE_BOOTSTRAP_VALIDATIONS" != "true" ]]; then - source "$KIBANA_DIR/src/dev/ci_setup/bootstrap_validations.sh" -fi - ### ### Download es snapshots ### echo " -- downloading es snapshot" node scripts/es snapshot --download-only; + +### +### verify no git modifications caused by bootstrap +### +if [[ "$DISABLE_BOOTSTRAP_VALIDATION" != "true" ]]; then + GIT_CHANGES="$(git ls-files --modified)" + if [ "$GIT_CHANGES" ]; then + echo -e "\n${RED}ERROR: 'yarn kbn bootstrap' caused changes to the following files:${C_RESET}\n" + echo -e "$GIT_CHANGES\n" + exit 1 + fi +fi diff --git a/src/dev/code_coverage/shell_scripts/merge_functional.sh b/src/dev/code_coverage/shell_scripts/merge_functional.sh index 8bd65c0d8fedb..68370910e6ad7 100755 --- a/src/dev/code_coverage/shell_scripts/merge_functional.sh +++ b/src/dev/code_coverage/shell_scripts/merge_functional.sh @@ -12,11 +12,8 @@ mkdir -p "$coverageBasePath/kibana" rsync -ahSD --ignore-errors --force --delete --stats ./ "$coverageBasePath/kibana/" cd "$coverageBasePath/kibana" -echo "### bootstrap from x-pack folder" -cd x-pack +echo "### bootstrap" yarn kbn bootstrap -# Return to project root -cd .. echo "### Merge coverage reports" yarn nyc report --nycrc-path src/dev/code_coverage/nyc_config/nyc.functional.config.js diff --git a/src/dev/typescript/build_ts_refs_cli.ts b/src/dev/typescript/build_ts_refs_cli.ts index a073e58623278..42b278ce6450c 100644 --- a/src/dev/typescript/build_ts_refs_cli.ts +++ b/src/dev/typescript/build_ts_refs_cli.ts @@ -18,9 +18,24 @@ import { concurrentMap } from './concurrent_map'; const CACHE_WORKING_DIR = Path.resolve(REPO_ROOT, 'data/ts_refs_output_cache'); +const TS_ERROR_REF = /\sTS\d{1,6}:\s/; + +const isTypeFailure = (error: any) => + error.exitCode === 1 && + error.stderr === '' && + typeof error.stdout === 'string' && + TS_ERROR_REF.test(error.stdout); + export async function runBuildRefsCli() { run( async ({ log, flags }) => { + if (process.env.BUILD_TS_REFS_DISABLE === 'true' && !flags.force) { + log.info( + 'Building ts refs is disabled because the BUILD_TS_REFS_DISABLE environment variable is set to "true". Pass `--force` to run the build anyway.' + ); + return; + } + const outDirs = getOutputsDeep(REF_CONFIG_PATHS); const cacheEnabled = process.env.BUILD_TS_REFS_CACHE_ENABLE !== 'false' && !!flags.cache; @@ -48,7 +63,20 @@ export async function runBuildRefsCli() { await outputCache.initCaches(); } - await buildAllTsRefs(log); + try { + await buildAllTsRefs(log); + log.success('ts refs build successfully'); + } catch (error) { + const typeFailure = isTypeFailure(error); + + if (flags['ignore-type-failures'] && typeFailure) { + log.warning( + 'tsc reported type errors but we are ignoring them for now, to see them please run `node scripts/type_check` or `node scripts/build_ts_refs` without the `--ignore-type-failures` flag.' + ); + } else { + throw error; + } + } if (outputCache && doCapture) { await outputCache.captureCache(Path.resolve(REPO_ROOT, 'target/ts_refs_cache')); @@ -61,10 +89,16 @@ export async function runBuildRefsCli() { { description: 'Build TypeScript projects', flags: { - boolean: ['clean', 'cache'], + boolean: ['clean', 'force', 'cache', 'ignore-type-failures'], default: { cache: true, }, + help: ` + --force Run the build even if the BUILD_TS_REFS_DISABLE is set to "true" + --clean Delete outDirs for each ts project before building + --no-cache Disable fetching/extracting outDir caches based on the mergeBase with upstream + --ignore-type-failures If tsc reports type errors, ignore them and just log a small warning. + `, }, log: { defaultLevel: 'debug', diff --git a/src/plugins/dashboard/kibana.json b/src/plugins/dashboard/kibana.json index 8286a4badcbe5..32507cbc5e5f4 100644 --- a/src/plugins/dashboard/kibana.json +++ b/src/plugins/dashboard/kibana.json @@ -15,6 +15,7 @@ ], "optionalPlugins": [ "home", + "spacesOss", "savedObjectsTaggingOss", "usageCollection"], "server": true, diff --git a/src/plugins/dashboard/public/application/dashboard_app.tsx b/src/plugins/dashboard/public/application/dashboard_app.tsx index fd73741cef8cb..3d6f08f321977 100644 --- a/src/plugins/dashboard/public/application/dashboard_app.tsx +++ b/src/plugins/dashboard/public/application/dashboard_app.tsx @@ -218,7 +218,7 @@ export function DashboardApp({ ); dashboardStateManager.registerChangeListener(() => { - setUnsavedChanges(dashboardStateManager?.hasUnsavedPanelState()); + setUnsavedChanges(dashboardStateManager.getIsDirty(data.query.timefilter.timefilter)); // we aren't checking dirty state because there are changes the container needs to know about // that won't make the dashboard "dirty" - like a view mode change. triggerRefresh$.next(); diff --git a/src/plugins/dashboard/public/application/dashboard_router.tsx b/src/plugins/dashboard/public/application/dashboard_router.tsx index 5c849aa960a4c..f981b135c4359 100644 --- a/src/plugins/dashboard/public/application/dashboard_router.tsx +++ b/src/plugins/dashboard/public/application/dashboard_router.tsx @@ -13,6 +13,7 @@ import { parse, ParsedQuery } from 'query-string'; import { render, unmountComponentAtNode } from 'react-dom'; import { Switch, Route, RouteComponentProps, HashRouter, Redirect } from 'react-router-dom'; +import { first } from 'rxjs/operators'; import { DashboardListing } from './listing'; import { DashboardApp } from './dashboard_app'; import { addHelpMenuToAppChrome, DashboardPanelStorage } from './lib'; @@ -47,6 +48,7 @@ export const dashboardUrlParams = { export interface DashboardMountProps { appUnMounted: () => void; restorePreviousUrl: () => void; + scopedHistory: ScopedHistory; element: AppMountParameters['element']; initializerContext: PluginInitializerContext; @@ -80,6 +82,9 @@ export async function mountApp({ savedObjectsTaggingOss, } = pluginsStart; + const spacesApi = pluginsStart.spacesOss?.isSpacesAvailable ? pluginsStart.spacesOss : undefined; + const activeSpaceId = spacesApi && (await spacesApi.activeSpace$.pipe(first()).toPromise())?.id; + const dashboardServices: DashboardAppServices = { navigation, onAppLeave, @@ -99,7 +104,10 @@ export async function mountApp({ indexPatterns: dataStart.indexPatterns, savedQueryService: dataStart.query.savedQueries, savedObjectsClient: coreStart.savedObjects.client, - dashboardPanelStorage: new DashboardPanelStorage(core.notifications.toasts), + dashboardPanelStorage: new DashboardPanelStorage( + core.notifications.toasts, + activeSpaceId || 'default' + ), savedDashboards: dashboardStart.getSavedDashboardLoader(), savedObjectsTagging: savedObjectsTaggingOss?.getTaggingApi(), allowByValueEmbeddables: initializerContext.config.get() diff --git a/src/plugins/dashboard/public/application/dashboard_state_manager.ts b/src/plugins/dashboard/public/application/dashboard_state_manager.ts index d11bdd0399d41..58b413f4303e6 100644 --- a/src/plugins/dashboard/public/application/dashboard_state_manager.ts +++ b/src/plugins/dashboard/public/application/dashboard_state_manager.ts @@ -558,7 +558,10 @@ export class DashboardStateManager { // Filter bar comparison is done manually (see cleanFiltersForComparison for the reason) and time picker // changes are not tracked by the state monitor. const hasTimeFilterChanged = timeFilter ? this.getFiltersChanged(timeFilter) : false; - return this.getIsEditMode() && (this.isDirty || hasTimeFilterChanged); + return ( + this.hasUnsavedPanelState() || + (this.getIsEditMode() && (this.isDirty || hasTimeFilterChanged)) + ); } public getPanels(): SavedDashboardPanel[] { diff --git a/src/plugins/dashboard/public/application/lib/dashboard_panel_storage.ts b/src/plugins/dashboard/public/application/lib/dashboard_panel_storage.ts index fcd3a09dc6b4e..02890f6aaa790 100644 --- a/src/plugins/dashboard/public/application/lib/dashboard_panel_storage.ts +++ b/src/plugins/dashboard/public/application/lib/dashboard_panel_storage.ts @@ -6,6 +6,7 @@ * Side Public License, v 1. */ +import { set } from '@elastic/safer-lodash-set'; import { Storage } from '../../services/kibana_utils'; import { NotificationsStart } from '../../services/core'; import { panelStorageErrorStrings } from '../../dashboard_strings'; @@ -17,16 +18,17 @@ const DASHBOARD_PANELS_SESSION_KEY = 'dashboardStateManagerPanels'; export class DashboardPanelStorage { private sessionStorage: Storage; - constructor(private toasts: NotificationsStart['toasts']) { + constructor(private toasts: NotificationsStart['toasts'], private activeSpaceId: string) { this.sessionStorage = new Storage(sessionStorage); } public clearPanels(id = DASHBOARD_PANELS_UNSAVED_ID) { try { - const sessionStoragePanels = this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY) || {}; - if (sessionStoragePanels[id]) { - delete sessionStoragePanels[id]; - this.sessionStorage.set(DASHBOARD_PANELS_SESSION_KEY, sessionStoragePanels); + const sessionStorage = this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY); + const sessionStorageForSpace = sessionStorage?.[this.activeSpaceId] || {}; + if (sessionStorageForSpace[id]) { + delete sessionStorageForSpace[id]; + this.sessionStorage.set(DASHBOARD_PANELS_SESSION_KEY, sessionStorage); } } catch (e) { this.toasts.addDanger({ @@ -38,7 +40,7 @@ export class DashboardPanelStorage { public getPanels(id = DASHBOARD_PANELS_UNSAVED_ID): SavedDashboardPanel[] | undefined { try { - return this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY)?.[id]; + return this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY)?.[this.activeSpaceId]?.[id]; } catch (e) { this.toasts.addDanger({ title: panelStorageErrorStrings.getPanelsGetError(e.message), @@ -50,7 +52,7 @@ export class DashboardPanelStorage { public setPanels(id = DASHBOARD_PANELS_UNSAVED_ID, newPanels: SavedDashboardPanel[]) { try { const sessionStoragePanels = this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY) || {}; - sessionStoragePanels[id] = newPanels; + set(sessionStoragePanels, [this.activeSpaceId, id], newPanels); this.sessionStorage.set(DASHBOARD_PANELS_SESSION_KEY, sessionStoragePanels); } catch (e) { this.toasts.addDanger({ @@ -62,7 +64,9 @@ export class DashboardPanelStorage { public getDashboardIdsWithUnsavedChanges() { try { - return Object.keys(this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY) || {}); + return Object.keys( + this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY)?.[this.activeSpaceId] || {} + ); } catch (e) { this.toasts.addDanger({ title: panelStorageErrorStrings.getPanelsGetError(e.message), diff --git a/src/plugins/dashboard/public/application/top_nav/dashboard_top_nav.tsx b/src/plugins/dashboard/public/application/top_nav/dashboard_top_nav.tsx index 65cb4db5ad543..4c67acbfc79df 100644 --- a/src/plugins/dashboard/public/application/top_nav/dashboard_top_nav.tsx +++ b/src/plugins/dashboard/public/application/top_nav/dashboard_top_nav.tsx @@ -479,7 +479,7 @@ export function DashboardTopNav({ const topNav = getTopNavConfig(viewMode, dashboardTopNavActions, { hideWriteControls: dashboardCapabilities.hideWriteControls, isNewDashboard: !savedDashboard.id, - isDirty: dashboardStateManager.isDirty, + isDirty: dashboardStateManager.getIsDirty(timefilter), isSaveInProgress, }); diff --git a/src/plugins/dashboard/public/plugin.tsx b/src/plugins/dashboard/public/plugin.tsx index 4385e3e8744c2..ae2d2b5f237c9 100644 --- a/src/plugins/dashboard/public/plugin.tsx +++ b/src/plugins/dashboard/public/plugin.tsx @@ -76,6 +76,7 @@ import { UrlGeneratorState } from '../../share/public'; import { ExportCSVAction } from './application/actions/export_csv_action'; import { dashboardFeatureCatalog } from './dashboard_strings'; import { replaceUrlHashQuery } from '../../kibana_utils/public'; +import { SpacesOssPluginStart } from './services/spaces'; declare module '../../share/public' { export interface UrlGeneratorStateMapping { @@ -113,6 +114,7 @@ export interface DashboardStartDependencies { savedObjects: SavedObjectsStart; presentationUtil: PresentationUtilPluginStart; savedObjectsTaggingOss?: SavedObjectTaggingOssPluginStart; + spacesOss?: SpacesOssPluginStart; } export type DashboardSetup = void; diff --git a/src/plugins/dashboard/public/services/spaces.ts b/src/plugins/dashboard/public/services/spaces.ts new file mode 100644 index 0000000000000..e6d2c6400818f --- /dev/null +++ b/src/plugins/dashboard/public/services/spaces.ts @@ -0,0 +1,9 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export { SpacesOssPluginStart } from '../../../spaces_oss/public'; diff --git a/src/plugins/dashboard/tsconfig.json b/src/plugins/dashboard/tsconfig.json index ddda2f81d1f62..dd99119cfb457 100644 --- a/src/plugins/dashboard/tsconfig.json +++ b/src/plugins/dashboard/tsconfig.json @@ -31,5 +31,6 @@ { "path": "../saved_objects_tagging_oss/tsconfig.json" }, { "path": "../saved_objects/tsconfig.json" }, { "path": "../ui_actions/tsconfig.json" }, + { "path": "../spaces_oss/tsconfig.json" }, ] } diff --git a/src/plugins/data/common/es_query/filters/phrase_filter.ts b/src/plugins/data/common/es_query/filters/phrase_filter.ts index 364e8dc1b035f..2a7f2458a27de 100644 --- a/src/plugins/data/common/es_query/filters/phrase_filter.ts +++ b/src/plugins/data/common/es_query/filters/phrase_filter.ts @@ -97,6 +97,7 @@ export const getPhraseScript = (field: IFieldType, value: string) => { }; /** + * @internal * See issues bellow for the reason behind this change. * Values need to be converted to correct types for boolean \ numeric fields. * https://github.com/elastic/kibana/issues/74301 @@ -122,6 +123,7 @@ export const getConvertedValueForField = (field: IFieldType, value: any) => { }; /** + * @internal * Takes a scripted field and returns an inline script appropriate for use in a script query. * Handles lucene expression and Painless scripts. Other langs aren't guaranteed to generate valid * scripts. diff --git a/src/plugins/data/common/field_formats/constants/base_formatters.ts b/src/plugins/data/common/field_formats/constants/base_formatters.ts index 5029385af2bdc..2fffc3b918482 100644 --- a/src/plugins/data/common/field_formats/constants/base_formatters.ts +++ b/src/plugins/data/common/field_formats/constants/base_formatters.ts @@ -22,6 +22,7 @@ import { StringFormat, TruncateFormat, UrlFormat, + HistogramFormat, } from '../converters'; export const baseFormatters: FieldFormatInstanceType[] = [ @@ -38,4 +39,5 @@ export const baseFormatters: FieldFormatInstanceType[] = [ StringFormat, TruncateFormat, UrlFormat, + HistogramFormat, ]; diff --git a/src/plugins/data/common/field_formats/converters/histogram.ts b/src/plugins/data/common/field_formats/converters/histogram.ts new file mode 100644 index 0000000000000..9f6b8c5cfd1da --- /dev/null +++ b/src/plugins/data/common/field_formats/converters/histogram.ts @@ -0,0 +1,51 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { i18n } from '@kbn/i18n'; +import { FieldFormat } from '../field_format'; +import { KBN_FIELD_TYPES } from '../../kbn_field_types/types'; +import { TextContextTypeConvert, FIELD_FORMAT_IDS } from '../types'; +import { BytesFormat } from './bytes'; +import { NumberFormat } from './number'; +import { PercentFormat } from './percent'; + +export class HistogramFormat extends FieldFormat { + static id = FIELD_FORMAT_IDS.HISTOGRAM; + static fieldType = KBN_FIELD_TYPES.HISTOGRAM; + static title = i18n.translate('data.fieldFormats.histogram.title', { + defaultMessage: 'Histogram', + }); + + id = HistogramFormat.id; + title = HistogramFormat.title; + allowsNumericalAggregations = true; + + // Nested internal formatter + getParamDefaults() { + return { + id: 'number', + params: {}, + }; + } + + textConvert: TextContextTypeConvert = (val) => { + if (typeof val === 'number') { + const subFormatId = this.param('id'); + const SubFormat = + subFormatId === 'bytes' + ? BytesFormat + : subFormatId === 'percent' + ? PercentFormat + : NumberFormat; + const converter = new SubFormat(this.param('params'), this.getConfig); + return converter.textConvert(val); + } else { + return JSON.stringify(val); + } + }; +} diff --git a/src/plugins/data/common/field_formats/converters/index.ts b/src/plugins/data/common/field_formats/converters/index.ts index 6bba52f8b871d..074ae7391659f 100644 --- a/src/plugins/data/common/field_formats/converters/index.ts +++ b/src/plugins/data/common/field_formats/converters/index.ts @@ -19,3 +19,4 @@ export { ColorFormat } from './color'; export { TruncateFormat } from './truncate'; export { BoolFormat } from './boolean'; export { StaticLookupFormat } from './static_lookup'; +export { HistogramFormat } from './histogram'; diff --git a/src/plugins/data/common/field_formats/index.ts b/src/plugins/data/common/field_formats/index.ts index 2e78f24b12352..a3d763196e11f 100644 --- a/src/plugins/data/common/field_formats/index.ts +++ b/src/plugins/data/common/field_formats/index.ts @@ -27,6 +27,7 @@ export { UrlFormat, StringFormat, TruncateFormat, + HistogramFormat, } from './converters'; export { getHighlightRequest } from './utils'; diff --git a/src/plugins/data/common/field_formats/types.ts b/src/plugins/data/common/field_formats/types.ts index 20d3bd48f2ff2..017dca1969fe7 100644 --- a/src/plugins/data/common/field_formats/types.ts +++ b/src/plugins/data/common/field_formats/types.ts @@ -56,6 +56,7 @@ export enum FIELD_FORMAT_IDS { STRING = 'string', TRUNCATE = 'truncate', URL = 'url', + HISTOGRAM = 'histogram', } export interface FieldFormatConfig { diff --git a/src/plugins/data/common/index_patterns/index_patterns/flatten_hit.test.ts b/src/plugins/data/common/index_patterns/index_patterns/flatten_hit.test.ts new file mode 100644 index 0000000000000..9a33b0cfa6f1c --- /dev/null +++ b/src/plugins/data/common/index_patterns/index_patterns/flatten_hit.test.ts @@ -0,0 +1,69 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { IndexPattern } from './index_pattern'; + +// @ts-expect-error +import mockLogStashFields from './fixtures/logstash_fields'; +import { stubbedSavedObjectIndexPattern } from './fixtures/stubbed_saved_object_index_pattern'; + +import { fieldFormatsMock } from '../../field_formats/mocks'; +import { flattenHitWrapper } from './flatten_hit'; + +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 IndexPattern({ + spec: { + id, + type, + version, + timeFieldName, + fields, + title, + runtimeFieldMap: {}, + }, + fieldFormats: fieldFormatsMock, + shortDotsEnable: false, + metaFields: [], + }); +} + +describe('flattenHit', () => { + let indexPattern: IndexPattern; + + // 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 = flattenHitWrapper(indexPattern, ['_id', '_type', '_score', '_routing'])({ + _id: 'a', + _source: { + name: 'first', + }, + fields: { + date: ['1'], + zzz: ['z'], + }, + }); + const expectedOrder = ['date', 'name', 'zzz', '_id', '_routing', '_score', '_type']; + expect(Object.keys(response)).toEqual(expectedOrder); + expect(Object.entries(response).map(([key]) => key)).toEqual(expectedOrder); + }); +}); diff --git a/src/plugins/data/common/index_patterns/index_patterns/flatten_hit.ts b/src/plugins/data/common/index_patterns/index_patterns/flatten_hit.ts index dadf302ec6ebf..7cd88c8a87c19 100644 --- a/src/plugins/data/common/index_patterns/index_patterns/flatten_hit.ts +++ b/src/plugins/data/common/index_patterns/index_patterns/flatten_hit.ts @@ -75,7 +75,26 @@ function decorateFlattenedWrapper(hit: Record, metaFields: Record { + return Reflect.ownKeys(target).sort((a, b) => { + const aIsMeta = _.includes(metaFields, a); + const bIsMeta = _.includes(metaFields, b); + if (aIsMeta && bIsMeta) { + return String(a).localeCompare(String(b)); + } + if (aIsMeta) { + return 1; + } + if (bIsMeta) { + return -1; + } + return String(a).localeCompare(String(b)); + }); + }, + }); }; } diff --git a/src/plugins/data/common/search/aggs/agg_config.test.ts b/src/plugins/data/common/search/aggs/agg_config.test.ts index 5e52779ffa218..818255f6c8bcc 100644 --- a/src/plugins/data/common/search/aggs/agg_config.test.ts +++ b/src/plugins/data/common/search/aggs/agg_config.test.ts @@ -141,6 +141,51 @@ describe('AggConfig', () => { expect(dsl.aggs[avgConfig.id]).toHaveProperty('avg'); expect(dsl.aggs[avgConfig.id].avg).toBe(football); }); + + it('merges subAggs from #write() output to the current subaggs', () => { + const configStates = [ + { + enabled: true, + type: 'avg', + schema: 'metric', + params: {}, + }, + { + enabled: true, + type: 'median', + schema: 'metric', + params: {}, + }, + { + enabled: true, + type: 'date_histogram', + schema: 'segment', + params: {}, + }, + ]; + const ac = new AggConfigs(indexPattern, configStates, { typesRegistry }); + + const histoConfig = ac.byName('date_histogram')[0]; + const avgConfig = ac.byName('avg')[0]; + const medianConfig = ac.byName('median')[0]; + const football = {}; + + jest + .spyOn(histoConfig, 'write') + .mockImplementation(() => ({ params: {}, subAggs: [avgConfig] })); + jest.spyOn(avgConfig, 'write').mockImplementation(() => ({ params: football })); + jest.spyOn(medianConfig, 'write').mockImplementation(() => ({ params: football })); + + (histoConfig as any).subAggs = [medianConfig]; + const dsl = histoConfig.toDsl(); + expect(dsl).toHaveProperty('aggs'); + expect(dsl.aggs).toHaveProperty(avgConfig.id); + expect(dsl.aggs[avgConfig.id]).toHaveProperty('avg'); + expect(dsl.aggs[avgConfig.id].avg).toBe(football); + expect(dsl.aggs).toHaveProperty(medianConfig.id); + expect(dsl.aggs[medianConfig.id]).toHaveProperty('percentiles'); + expect(dsl.aggs[medianConfig.id].percentiles).toBe(football); + }); }); describe('::ensureIds', () => { diff --git a/src/plugins/data/common/search/aggs/agg_config.ts b/src/plugins/data/common/search/aggs/agg_config.ts index 6a5bc64cbdc55..f62fedc13b32a 100644 --- a/src/plugins/data/common/search/aggs/agg_config.ts +++ b/src/plugins/data/common/search/aggs/agg_config.ts @@ -235,7 +235,11 @@ export class AggConfig { configDsl[this.type.dslName || this.type.name] = output.params; // if the config requires subAggs, write them to the dsl as well - if (this.subAggs.length && !output.subAggs) output.subAggs = this.subAggs; + if (this.subAggs.length) { + if (!output.subAggs) output.subAggs = this.subAggs; + else output.subAggs.push(...this.subAggs); + } + if (output.subAggs) { const subDslLvl = configDsl.aggs || (configDsl.aggs = {}); output.subAggs.forEach(function nestAdhocSubAggs(subAggConfig: any) { diff --git a/src/plugins/data/common/search/aggs/metrics/avg.ts b/src/plugins/data/common/search/aggs/metrics/avg.ts index 44a342791a7a5..6ffafbdf37ee9 100644 --- a/src/plugins/data/common/search/aggs/metrics/avg.ts +++ b/src/plugins/data/common/search/aggs/metrics/avg.ts @@ -26,6 +26,7 @@ export const getAvgMetricAgg = () => { name: METRIC_TYPES.AVG, expressionName: aggAvgFnName, title: averageTitle, + valueType: 'number', makeLabel: (aggConfig) => { return i18n.translate('data.search.aggs.metrics.averageLabel', { defaultMessage: 'Average {field}', diff --git a/src/plugins/data/common/search/aggs/metrics/max.ts b/src/plugins/data/common/search/aggs/metrics/max.ts index 5a41cdbb256c8..ce5718a7234ba 100644 --- a/src/plugins/data/common/search/aggs/metrics/max.ts +++ b/src/plugins/data/common/search/aggs/metrics/max.ts @@ -26,6 +26,7 @@ export const getMaxMetricAgg = () => { name: METRIC_TYPES.MAX, expressionName: aggMaxFnName, title: maxTitle, + valueType: 'number', makeLabel(aggConfig) { return i18n.translate('data.search.aggs.metrics.maxLabel', { defaultMessage: 'Max {field}', diff --git a/src/plugins/data/common/search/aggs/metrics/median.ts b/src/plugins/data/common/search/aggs/metrics/median.ts index ad678feaf36d4..626669732a658 100644 --- a/src/plugins/data/common/search/aggs/metrics/median.ts +++ b/src/plugins/data/common/search/aggs/metrics/median.ts @@ -27,6 +27,7 @@ export const getMedianMetricAgg = () => { expressionName: aggMedianFnName, dslName: 'percentiles', title: medianTitle, + valueType: 'number', makeLabel(aggConfig) { return i18n.translate('data.search.aggs.metrics.medianLabel', { defaultMessage: 'Median {field}', diff --git a/src/plugins/data/common/search/aggs/metrics/min.ts b/src/plugins/data/common/search/aggs/metrics/min.ts index 1805546a9fa34..ea95827737b87 100644 --- a/src/plugins/data/common/search/aggs/metrics/min.ts +++ b/src/plugins/data/common/search/aggs/metrics/min.ts @@ -26,6 +26,7 @@ export const getMinMetricAgg = () => { name: METRIC_TYPES.MIN, expressionName: aggMinFnName, title: minTitle, + valueType: 'number', makeLabel(aggConfig) { return i18n.translate('data.search.aggs.metrics.minLabel', { defaultMessage: 'Min {field}', diff --git a/src/plugins/data/common/search/aggs/metrics/percentiles.ts b/src/plugins/data/common/search/aggs/metrics/percentiles.ts index c8e328acb65f9..07c4ac2bf2646 100644 --- a/src/plugins/data/common/search/aggs/metrics/percentiles.ts +++ b/src/plugins/data/common/search/aggs/metrics/percentiles.ts @@ -42,6 +42,7 @@ export const getPercentilesMetricAgg = () => { title: i18n.translate('data.search.aggs.metrics.percentilesTitle', { defaultMessage: 'Percentiles', }), + valueType: 'number', makeLabel(agg) { return i18n.translate('data.search.aggs.metrics.percentilesLabel', { defaultMessage: 'Percentiles of {field}', diff --git a/src/plugins/data/common/search/aggs/metrics/sum.ts b/src/plugins/data/common/search/aggs/metrics/sum.ts index 3d7df7596cd76..fa9f7ba1f66b2 100644 --- a/src/plugins/data/common/search/aggs/metrics/sum.ts +++ b/src/plugins/data/common/search/aggs/metrics/sum.ts @@ -26,6 +26,7 @@ export const getSumMetricAgg = () => { name: METRIC_TYPES.SUM, expressionName: aggSumFnName, title: sumTitle, + valueType: 'number', makeLabel(aggConfig) { return i18n.translate('data.search.aggs.metrics.sumLabel', { defaultMessage: 'Sum of {field}', diff --git a/src/plugins/data/common/search/search_source/search_source.ts b/src/plugins/data/common/search/search_source/search_source.ts index aeeebe312d79e..f11e7f06b6ab9 100644 --- a/src/plugins/data/common/search/search_source/search_source.ts +++ b/src/plugins/data/common/search/search_source/search_source.ts @@ -59,10 +59,9 @@ */ import { setWith } from '@elastic/safer-lodash-set'; -import { uniqueId, keyBy, pick, difference, isFunction, isEqual, uniqWith } from 'lodash'; +import { uniqueId, keyBy, pick, difference, isFunction, isEqual, uniqWith, isObject } from 'lodash'; import { map, switchMap, tap } from 'rxjs/operators'; import { defer, from } from 'rxjs'; -import { isObject } from 'rxjs/internal-compatibility'; import { normalizeSortRequest } from './normalize_sort_request'; import { fieldWildcardFilter } from '../../../../kibana_utils/common'; import { IIndexPattern, IndexPattern, IndexPatternField } from '../../index_patterns'; diff --git a/src/plugins/data/public/index.ts b/src/plugins/data/public/index.ts index 00bf0385487d8..1ab8e29ff2fd1 100644 --- a/src/plugins/data/public/index.ts +++ b/src/plugins/data/public/index.ts @@ -158,6 +158,7 @@ import { UrlFormat, StringFormat, TruncateFormat, + HistogramFormat, } from '../common/field_formats'; import { DateNanosFormat, DateFormat } from './field_formats'; @@ -188,6 +189,7 @@ export const fieldFormats = { UrlFormat, StringFormat, TruncateFormat, + HistogramFormat, }; export { diff --git a/src/plugins/data/public/public.api.md b/src/plugins/data/public/public.api.md index 2859d764ef26f..9720395881ea3 100644 --- a/src/plugins/data/public/public.api.md +++ b/src/plugins/data/public/public.api.md @@ -960,6 +960,7 @@ export const fieldFormats: { UrlFormat: typeof UrlFormat; StringFormat: typeof StringFormat; TruncateFormat: typeof TruncateFormat; + HistogramFormat: typeof HistogramFormat; }; // @public (undocumented) @@ -2638,41 +2639,42 @@ export const UI_SETTINGS: { // src/plugins/data/public/index.ts:127:21 - (ae-forgotten-export) The symbol "getEsQueryConfig" needs to be exported by the entry point index.d.ts // src/plugins/data/public/index.ts:127:21 - (ae-forgotten-export) The symbol "luceneStringToDsl" needs to be exported by the entry point index.d.ts // src/plugins/data/public/index.ts:127:21 - (ae-forgotten-export) The symbol "decorateQuery" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:167:26 - (ae-forgotten-export) The symbol "FieldFormatsRegistry" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:167:26 - (ae-forgotten-export) The symbol "BoolFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:167:26 - (ae-forgotten-export) The symbol "BytesFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:167:26 - (ae-forgotten-export) The symbol "ColorFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:167:26 - (ae-forgotten-export) The symbol "DurationFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:167:26 - (ae-forgotten-export) The symbol "IpFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:167:26 - (ae-forgotten-export) The symbol "NumberFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:167:26 - (ae-forgotten-export) The symbol "PercentFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:167:26 - (ae-forgotten-export) The symbol "RelativeDateFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:167:26 - (ae-forgotten-export) The symbol "SourceFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:167:26 - (ae-forgotten-export) The symbol "StaticLookupFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:167:26 - (ae-forgotten-export) The symbol "UrlFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:167:26 - (ae-forgotten-export) The symbol "StringFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:167:26 - (ae-forgotten-export) The symbol "TruncateFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:209:23 - (ae-forgotten-export) The symbol "datatableToCSV" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:234:27 - (ae-forgotten-export) The symbol "isFilterable" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:234:27 - (ae-forgotten-export) The symbol "isNestedField" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:234:27 - (ae-forgotten-export) The symbol "validateIndexPattern" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:234:27 - (ae-forgotten-export) The symbol "flattenHitWrapper" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:234:27 - (ae-forgotten-export) The symbol "formatHitProvider" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:399:20 - (ae-forgotten-export) The symbol "getRequestInspectorStats" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:399:20 - (ae-forgotten-export) The symbol "getResponseInspectorStats" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:399:20 - (ae-forgotten-export) The symbol "tabifyAggResponse" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:399:20 - (ae-forgotten-export) The symbol "tabifyGetColumns" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:401:1 - (ae-forgotten-export) The symbol "CidrMask" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:402:1 - (ae-forgotten-export) The symbol "dateHistogramInterval" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:411:1 - (ae-forgotten-export) The symbol "InvalidEsCalendarIntervalError" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:412:1 - (ae-forgotten-export) The symbol "InvalidEsIntervalFormatError" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:413:1 - (ae-forgotten-export) The symbol "Ipv4Address" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:414:1 - (ae-forgotten-export) The symbol "isDateHistogramBucketAggConfig" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:418:1 - (ae-forgotten-export) The symbol "isValidEsInterval" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:419:1 - (ae-forgotten-export) The symbol "isValidInterval" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:422:1 - (ae-forgotten-export) The symbol "parseInterval" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:423:1 - (ae-forgotten-export) The symbol "propFilter" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:426:1 - (ae-forgotten-export) The symbol "toAbsoluteDates" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:168:26 - (ae-forgotten-export) The symbol "FieldFormatsRegistry" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:168:26 - (ae-forgotten-export) The symbol "BoolFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:168:26 - (ae-forgotten-export) The symbol "BytesFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:168:26 - (ae-forgotten-export) The symbol "ColorFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:168:26 - (ae-forgotten-export) The symbol "DurationFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:168:26 - (ae-forgotten-export) The symbol "IpFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:168:26 - (ae-forgotten-export) The symbol "NumberFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:168:26 - (ae-forgotten-export) The symbol "PercentFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:168:26 - (ae-forgotten-export) The symbol "RelativeDateFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:168:26 - (ae-forgotten-export) The symbol "SourceFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:168:26 - (ae-forgotten-export) The symbol "StaticLookupFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:168:26 - (ae-forgotten-export) The symbol "UrlFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:168:26 - (ae-forgotten-export) The symbol "StringFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:168:26 - (ae-forgotten-export) The symbol "TruncateFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:168:26 - (ae-forgotten-export) The symbol "HistogramFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:211:23 - (ae-forgotten-export) The symbol "datatableToCSV" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:236:27 - (ae-forgotten-export) The symbol "isFilterable" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:236:27 - (ae-forgotten-export) The symbol "isNestedField" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:236:27 - (ae-forgotten-export) The symbol "validateIndexPattern" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:236:27 - (ae-forgotten-export) The symbol "flattenHitWrapper" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:236:27 - (ae-forgotten-export) The symbol "formatHitProvider" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:401:20 - (ae-forgotten-export) The symbol "getRequestInspectorStats" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:401:20 - (ae-forgotten-export) The symbol "getResponseInspectorStats" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:401:20 - (ae-forgotten-export) The symbol "tabifyAggResponse" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:401:20 - (ae-forgotten-export) The symbol "tabifyGetColumns" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:403:1 - (ae-forgotten-export) The symbol "CidrMask" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:404:1 - (ae-forgotten-export) The symbol "dateHistogramInterval" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:413:1 - (ae-forgotten-export) The symbol "InvalidEsCalendarIntervalError" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:414:1 - (ae-forgotten-export) The symbol "InvalidEsIntervalFormatError" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:415:1 - (ae-forgotten-export) The symbol "Ipv4Address" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:416:1 - (ae-forgotten-export) The symbol "isDateHistogramBucketAggConfig" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:420:1 - (ae-forgotten-export) The symbol "isValidEsInterval" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:421:1 - (ae-forgotten-export) The symbol "isValidInterval" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:424:1 - (ae-forgotten-export) The symbol "parseInterval" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:425:1 - (ae-forgotten-export) The symbol "propFilter" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:428:1 - (ae-forgotten-export) The symbol "toAbsoluteDates" needs to be exported by the entry point index.d.ts // src/plugins/data/public/query/state_sync/connect_to_query_state.ts:34:5 - (ae-forgotten-export) The symbol "FilterStateStore" needs to be exported by the entry point index.d.ts // src/plugins/data/public/search/session/session_service.ts:42:5 - (ae-forgotten-export) The symbol "UrlGeneratorStateMapping" needs to be exported by the entry point index.d.ts diff --git a/src/plugins/data/server/index.ts b/src/plugins/data/server/index.ts index 464cc2b1f54d1..2a21b9e434596 100644 --- a/src/plugins/data/server/index.ts +++ b/src/plugins/data/server/index.ts @@ -95,6 +95,7 @@ import { UrlFormat, StringFormat, TruncateFormat, + HistogramFormat, } from '../common/field_formats'; export const fieldFormats = { @@ -113,6 +114,7 @@ export const fieldFormats = { UrlFormat, StringFormat, TruncateFormat, + HistogramFormat, }; export { IFieldFormatsRegistry, FieldFormatsGetConfigFn, FieldFormatConfig } from '../common'; diff --git a/src/plugins/data/server/server.api.md b/src/plugins/data/server/server.api.md index c33bd15589780..ec5ae2f129057 100644 --- a/src/plugins/data/server/server.api.md +++ b/src/plugins/data/server/server.api.md @@ -533,6 +533,7 @@ export const fieldFormats: { UrlFormat: typeof UrlFormat; StringFormat: typeof StringFormat; TruncateFormat: typeof TruncateFormat; + HistogramFormat: typeof HistogramFormat; }; // Warning: (ae-forgotten-export) The symbol "GetConfigFn" needs to be exported by the entry point index.d.ts @@ -1444,37 +1445,38 @@ export function usageProvider(core: CoreSetup_2): SearchUsage; // src/plugins/data/server/index.ts:46:23 - (ae-forgotten-export) The symbol "datatableToCSV" needs to be exported by the entry point index.d.ts // src/plugins/data/server/index.ts:70:21 - (ae-forgotten-export) The symbol "getEsQueryConfig" needs to be exported by the entry point index.d.ts // src/plugins/data/server/index.ts:70:21 - (ae-forgotten-export) The symbol "buildEsQuery" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:100:26 - (ae-forgotten-export) The symbol "FieldFormatsRegistry" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:100:26 - (ae-forgotten-export) The symbol "FieldFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:100:26 - (ae-forgotten-export) The symbol "BoolFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:100:26 - (ae-forgotten-export) The symbol "BytesFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:100:26 - (ae-forgotten-export) The symbol "ColorFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:100:26 - (ae-forgotten-export) The symbol "DurationFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:100:26 - (ae-forgotten-export) The symbol "IpFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:100:26 - (ae-forgotten-export) The symbol "NumberFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:100:26 - (ae-forgotten-export) The symbol "PercentFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:100:26 - (ae-forgotten-export) The symbol "RelativeDateFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:100:26 - (ae-forgotten-export) The symbol "SourceFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:100:26 - (ae-forgotten-export) The symbol "StaticLookupFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:100:26 - (ae-forgotten-export) The symbol "UrlFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:100:26 - (ae-forgotten-export) The symbol "StringFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:100:26 - (ae-forgotten-export) The symbol "TruncateFormat" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:126:27 - (ae-forgotten-export) The symbol "isFilterable" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:126:27 - (ae-forgotten-export) The symbol "isNestedField" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:241:20 - (ae-forgotten-export) The symbol "getRequestInspectorStats" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:241:20 - (ae-forgotten-export) The symbol "getResponseInspectorStats" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:241:20 - (ae-forgotten-export) The symbol "tabifyAggResponse" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:241:20 - (ae-forgotten-export) The symbol "tabifyGetColumns" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:243:1 - (ae-forgotten-export) The symbol "CidrMask" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:244:1 - (ae-forgotten-export) The symbol "dateHistogramInterval" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:253:1 - (ae-forgotten-export) The symbol "InvalidEsCalendarIntervalError" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:254:1 - (ae-forgotten-export) The symbol "InvalidEsIntervalFormatError" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:255:1 - (ae-forgotten-export) The symbol "Ipv4Address" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:259:1 - (ae-forgotten-export) The symbol "isValidEsInterval" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:260:1 - (ae-forgotten-export) The symbol "isValidInterval" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:264:1 - (ae-forgotten-export) The symbol "propFilter" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:267:1 - (ae-forgotten-export) The symbol "toAbsoluteDates" needs to be exported by the entry point index.d.ts -// src/plugins/data/server/index.ts:268:1 - (ae-forgotten-export) The symbol "calcAutoIntervalLessThan" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:101:26 - (ae-forgotten-export) The symbol "FieldFormatsRegistry" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:101:26 - (ae-forgotten-export) The symbol "FieldFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:101:26 - (ae-forgotten-export) The symbol "BoolFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:101:26 - (ae-forgotten-export) The symbol "BytesFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:101:26 - (ae-forgotten-export) The symbol "ColorFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:101:26 - (ae-forgotten-export) The symbol "DurationFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:101:26 - (ae-forgotten-export) The symbol "IpFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:101:26 - (ae-forgotten-export) The symbol "NumberFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:101:26 - (ae-forgotten-export) The symbol "PercentFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:101:26 - (ae-forgotten-export) The symbol "RelativeDateFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:101:26 - (ae-forgotten-export) The symbol "SourceFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:101:26 - (ae-forgotten-export) The symbol "StaticLookupFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:101:26 - (ae-forgotten-export) The symbol "UrlFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:101:26 - (ae-forgotten-export) The symbol "StringFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:101:26 - (ae-forgotten-export) The symbol "TruncateFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:101:26 - (ae-forgotten-export) The symbol "HistogramFormat" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:128:27 - (ae-forgotten-export) The symbol "isFilterable" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:128:27 - (ae-forgotten-export) The symbol "isNestedField" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:243:20 - (ae-forgotten-export) The symbol "getRequestInspectorStats" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:243:20 - (ae-forgotten-export) The symbol "getResponseInspectorStats" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:243:20 - (ae-forgotten-export) The symbol "tabifyAggResponse" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:243:20 - (ae-forgotten-export) The symbol "tabifyGetColumns" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:245:1 - (ae-forgotten-export) The symbol "CidrMask" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:246:1 - (ae-forgotten-export) The symbol "dateHistogramInterval" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:255:1 - (ae-forgotten-export) The symbol "InvalidEsCalendarIntervalError" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:256:1 - (ae-forgotten-export) The symbol "InvalidEsIntervalFormatError" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:257:1 - (ae-forgotten-export) The symbol "Ipv4Address" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:261:1 - (ae-forgotten-export) The symbol "isValidEsInterval" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:262:1 - (ae-forgotten-export) The symbol "isValidInterval" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:266:1 - (ae-forgotten-export) The symbol "propFilter" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:269:1 - (ae-forgotten-export) The symbol "toAbsoluteDates" needs to be exported by the entry point index.d.ts +// src/plugins/data/server/index.ts:270:1 - (ae-forgotten-export) The symbol "calcAutoIntervalLessThan" needs to be exported by the entry point index.d.ts // src/plugins/data/server/plugin.ts:79:74 - (ae-forgotten-export) The symbol "DataEnhancements" needs to be exported by the entry point index.d.ts // src/plugins/data/server/search/types.ts:114:5 - (ae-forgotten-export) The symbol "ISearchStartSearchSource" needs to be exported by the entry point index.d.ts diff --git a/src/plugins/data/server/ui_settings.ts b/src/plugins/data/server/ui_settings.ts index 2df6e4cc34f10..b1d5b87082696 100644 --- a/src/plugins/data/server/ui_settings.ts +++ b/src/plugins/data/server/ui_settings.ts @@ -93,7 +93,27 @@ export function getUiSettings(): Record> { }), type: 'json', schema: schema.object({ + default_field: schema.nullable(schema.string()), + allow_leading_wildcard: schema.nullable(schema.boolean()), analyze_wildcard: schema.boolean(), + analyzer: schema.nullable(schema.string()), + auto_generate_synonyms_phrase_query: schema.nullable(schema.boolean()), + boost: schema.nullable(schema.number()), + default_operator: schema.nullable(schema.string()), + enable_position_increments: schema.nullable(schema.boolean()), + fields: schema.nullable(schema.arrayOf(schema.string())), + fuzziness: schema.nullable(schema.string()), + fuzzy_max_expansions: schema.nullable(schema.number()), + fuzzy_prefix_length: schema.nullable(schema.number()), + fuzzy_transpositions: schema.nullable(schema.boolean()), + lenient: schema.nullable(schema.boolean()), + max_determinized_states: schema.nullable(schema.number()), + minimum_should_match: schema.nullable(schema.string()), + quote_analyzer: schema.nullable(schema.string()), + phrase_slop: schema.nullable(schema.number()), + quote_field_suffix: schema.nullable(schema.string()), + rewrite: schema.nullable(schema.string()), + time_zone: schema.nullable(schema.string()), }), }, [UI_SETTINGS.QUERY_ALLOW_LEADING_WILDCARDS]: { @@ -335,6 +355,7 @@ export function getUiSettings(): Record> { "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": {} } }`, @@ -369,6 +390,10 @@ export function getUiSettings(): Record> { id: schema.string(), params: schema.object({}), }), + histogram: schema.object({ + id: schema.string(), + params: schema.object({}), + }), _source: schema.object({ id: schema.string(), params: schema.object({}), diff --git a/src/plugins/discover/public/application/angular/doc_table/components/row_headers.test.js b/src/plugins/discover/public/application/angular/doc_table/components/row_headers.test.js index 1824110c85b1a..270f366bddbf2 100644 --- a/src/plugins/discover/public/application/angular/doc_table/components/row_headers.test.js +++ b/src/plugins/discover/public/application/angular/doc_table/components/row_headers.test.js @@ -58,6 +58,7 @@ describe('Doc Table', () => { setServices({ uiSettings: core.uiSettings, filterManager: dataMock.query.filterManager, + addBasePath: (path) => path, }); setDocViewsRegistry({ diff --git a/src/plugins/discover/public/application/angular/doc_table/components/table_row.ts b/src/plugins/discover/public/application/angular/doc_table/components/table_row.ts index 12ec9445f4afc..cf6b507edc070 100644 --- a/src/plugins/discover/public/application/angular/doc_table/components/table_row.ts +++ b/src/plugins/discover/public/application/angular/doc_table/components/table_row.ts @@ -105,7 +105,16 @@ export function createTableRowDirective($compile: ng.ICompileService) { $scope.row._id, $scope.indexPattern.id, $scope.columns, - getServices().filterManager + getServices().filterManager, + getServices().addBasePath + ); + }; + + $scope.getSingleDocHref = () => { + return getServices().addBasePath( + `/app/discover#/doc/${$scope.indexPattern.id}/${ + $scope.row._index + }?id=${encodeURIComponent($scope.row._id)}` ); }; diff --git a/src/plugins/discover/public/application/angular/doc_table/components/table_row/details.html b/src/plugins/discover/public/application/angular/doc_table/components/table_row/details.html index bb443b880e217..faa3d51c19fee 100644 --- a/src/plugins/discover/public/application/angular/doc_table/components/table_row/details.html +++ b/src/plugins/discover/public/application/angular/doc_table/components/table_row/details.html @@ -31,7 +31,7 @@ diff --git a/src/plugins/discover/public/application/angular/doc_table/doc_table.html b/src/plugins/discover/public/application/angular/doc_table/doc_table.html index 427893bd3e6fe..4f297643a28f7 100644 --- a/src/plugins/discover/public/application/angular/doc_table/doc_table.html +++ b/src/plugins/discover/public/application/angular/doc_table/doc_table.html @@ -26,7 +26,7 @@
- +
{ const hit = { - foo: 'bar', - number: 42, - hello: '

World

', - also: 'with "quotes" or \'single quotes\'', + _id: 'a', + _type: 'doc', + _score: 1, + _source: { + foo: 'bar', + number: 42, + hello: '

World

', + also: 'with "quotes" or \'single quotes\'', + }, }; const createIndexPattern = () => { @@ -37,12 +42,17 @@ describe('Row formatter', () => { const indexPattern = createIndexPattern(); + // Realistic response with alphabetical insertion order const formatHitReturnValue = { also: 'with \\"quotes\\" or 'single qoutes'', - number: '42', foo: 'bar', + number: '42', hello: '<h1>World</h1>', + _id: 'a', + _type: 'doc', + _score: 1, }; + const formatHitMock = jest.fn().mockReturnValue(formatHitReturnValue); beforeEach(() => { @@ -52,7 +62,7 @@ describe('Row formatter', () => { it('formats document properly', () => { expect(formatRow(hit, indexPattern).trim()).toMatchInlineSnapshot( - `"
also:
with \\\\"quotes\\\\" or 'single qoutes'
number:
42
foo:
bar
hello:
<h1>World</h1>
"` + `"
also:
with \\\\"quotes\\\\" or 'single qoutes'
foo:
bar
number:
42
hello:
<h1>World</h1>
_id:
a
_type:
doc
_score:
1
"` ); }); @@ -60,7 +70,7 @@ describe('Row formatter', () => { expect( formatRow({ ...hit, highlight: { number: '42' } }, indexPattern).trim() ).toMatchInlineSnapshot( - `"
number:
42
also:
with \\\\"quotes\\\\" or 'single qoutes'
foo:
bar
hello:
<h1>World</h1>
"` + `"
number:
42
also:
with \\\\"quotes\\\\" or 'single qoutes'
foo:
bar
hello:
<h1>World</h1>
_id:
a
_type:
doc
_score:
1
"` ); }); @@ -88,6 +98,21 @@ describe('Row formatter', () => { ); }); + it('formats top level objects in alphabetical order', () => { + indexPattern.getFieldByName = jest.fn().mockReturnValue({ + name: 'subfield', + }); + indexPattern.getFormatterForField = jest.fn().mockReturnValue({ + convert: () => 'formatted', + }); + const formatted = formatTopLevelObject( + { fields: { 'a.zzz': [100], 'a.ccc': [50] } }, + { 'a.zzz': [100], 'a.ccc': [50] }, + indexPattern + ).trim(); + expect(formatted.indexOf('
a.ccc:
')).toBeLessThan(formatted.indexOf('
a.zzz:
')); + }); + it('formats top level objects with subfields and highlights', () => { indexPattern.getFieldByName = jest.fn().mockReturnValue({ name: 'subfield', diff --git a/src/plugins/discover/public/application/angular/helpers/row_formatter.ts b/src/plugins/discover/public/application/angular/helpers/row_formatter.ts index e17e840e40484..a226cefb53960 100644 --- a/src/plugins/discover/public/application/angular/helpers/row_formatter.ts +++ b/src/plugins/discover/public/application/angular/helpers/row_formatter.ts @@ -26,6 +26,7 @@ export const doTemplate = template(noWhiteSpace(templateHtml)); export const formatRow = (hit: Record, indexPattern: IndexPattern) => { const highlights = hit?.highlight ?? {}; + // Keys are sorted in the hits object const formatted = indexPattern.formatHit(hit); const highlightPairs: Array<[string, unknown]> = []; const sourcePairs: Array<[string, unknown]> = []; @@ -44,7 +45,8 @@ export const formatTopLevelObject = ( const highlights = row.highlight ?? {}; const highlightPairs: Array<[string, unknown]> = []; const sourcePairs: Array<[string, unknown]> = []; - Object.entries(fields).forEach(([key, values]) => { + const sorted = Object.entries(fields).sort(([keyA], [keyB]) => keyA.localeCompare(keyB)); + sorted.forEach(([key, values]) => { const field = indexPattern.getFieldByName(key); const formatter = field ? indexPattern.getFormatterForField(field) diff --git a/src/plugins/discover/public/application/components/discover_grid/discover_grid_flyout.test.tsx b/src/plugins/discover/public/application/components/discover_grid/discover_grid_flyout.test.tsx index ea5763e0bd2b8..b63aca85b1ec9 100644 --- a/src/plugins/discover/public/application/components/discover_grid/discover_grid_flyout.test.tsx +++ b/src/plugins/discover/public/application/components/discover_grid/discover_grid_flyout.test.tsx @@ -32,7 +32,12 @@ describe('Discover flyout', function () { onClose={onClose} onFilter={jest.fn()} onRemoveColumn={jest.fn()} - services={({ filterManager: createFilterManagerMock() } as unknown) as DiscoverServices} + services={ + ({ + filterManager: createFilterManagerMock(), + addBasePath: (path: string) => path, + } as unknown) as DiscoverServices + } /> ); @@ -53,17 +58,22 @@ describe('Discover flyout', function () { onClose={onClose} onFilter={jest.fn()} onRemoveColumn={jest.fn()} - services={({ filterManager: createFilterManagerMock() } as unknown) as DiscoverServices} + services={ + ({ + filterManager: createFilterManagerMock(), + addBasePath: (path: string) => `/base${path}`, + } as unknown) as DiscoverServices + } /> ); const actions = findTestSubject(component, 'docTableRowAction'); expect(actions.length).toBe(2); expect(actions.first().prop('href')).toMatchInlineSnapshot( - `"#/doc/index-pattern-with-timefield-id/i?id=1"` + `"/base#/doc/index-pattern-with-timefield-id/i?id=1"` ); expect(actions.last().prop('href')).toMatchInlineSnapshot( - `"#/context/index-pattern-with-timefield-id/1?_g=(filters:!())&_a=(columns:!(date),filters:!())"` + `"/base/app/discover#/context/index-pattern-with-timefield-id/1?_g=(filters:!())&_a=(columns:!(date),filters:!())"` ); findTestSubject(component, 'euiFlyoutCloseButton').simulate('click'); expect(onClose).toHaveBeenCalled(); diff --git a/src/plugins/discover/public/application/components/discover_grid/discover_grid_flyout.tsx b/src/plugins/discover/public/application/components/discover_grid/discover_grid_flyout.tsx index a88cd239e2f04..5994892ca2d40 100644 --- a/src/plugins/discover/public/application/components/discover_grid/discover_grid_flyout.tsx +++ b/src/plugins/discover/public/application/components/discover_grid/discover_grid_flyout.tsx @@ -81,9 +81,11 @@ export function DiscoverGridFlyout({ {i18n.translate('discover.grid.tableRow.viewSingleDocumentLinkTextSimple', { @@ -96,7 +98,13 @@ export function DiscoverGridFlyout({ {i18n.translate('discover.grid.tableRow.viewSurroundingDocumentsLinkTextSimple', { diff --git a/src/plugins/discover/public/application/components/doc_viewer/__snapshots__/doc_viewer.test.tsx.snap b/src/plugins/discover/public/application/components/doc_viewer/__snapshots__/doc_viewer.test.tsx.snap index d02b484a06a49..b0f5dc98a801a 100644 --- a/src/plugins/discover/public/application/components/doc_viewer/__snapshots__/doc_viewer.test.tsx.snap +++ b/src/plugins/discover/public/application/components/doc_viewer/__snapshots__/doc_viewer.test.tsx.snap @@ -3,6 +3,7 @@ exports[`Render with 3 different tabs 1`] = `
+
); diff --git a/src/plugins/discover/public/application/helpers/get_context_url.test.ts b/src/plugins/discover/public/application/helpers/get_context_url.test.ts index 366432a6d6532..4856c98845669 100644 --- a/src/plugins/discover/public/application/helpers/get_context_url.test.ts +++ b/src/plugins/discover/public/application/helpers/get_context_url.test.ts @@ -12,19 +12,32 @@ const filterManager = ({ getGlobalFilters: () => [], getAppFilters: () => [], } as unknown) as FilterManager; +const addBasePath = (path: string) => `/base${path}`; describe('Get context url', () => { test('returning a valid context url', async () => { - const url = await getContextUrl('docId', 'ipId', ['test1', 'test2'], filterManager); + const url = await getContextUrl( + 'docId', + 'ipId', + ['test1', 'test2'], + filterManager, + addBasePath + ); expect(url).toMatchInlineSnapshot( - `"#/context/ipId/docId?_g=(filters:!())&_a=(columns:!(test1,test2),filters:!())"` + `"/base/app/discover#/context/ipId/docId?_g=(filters:!())&_a=(columns:!(test1,test2),filters:!())"` ); }); test('returning a valid context url when docId contains whitespace', async () => { - const url = await getContextUrl('doc Id', 'ipId', ['test1', 'test2'], filterManager); + const url = await getContextUrl( + 'doc Id', + 'ipId', + ['test1', 'test2'], + filterManager, + addBasePath + ); expect(url).toMatchInlineSnapshot( - `"#/context/ipId/doc%20Id?_g=(filters:!())&_a=(columns:!(test1,test2),filters:!())"` + `"/base/app/discover#/context/ipId/doc%20Id?_g=(filters:!())&_a=(columns:!(test1,test2),filters:!())"` ); }); }); diff --git a/src/plugins/discover/public/application/helpers/get_context_url.tsx b/src/plugins/discover/public/application/helpers/get_context_url.tsx index caed16edabb1d..057f8bc2afc52 100644 --- a/src/plugins/discover/public/application/helpers/get_context_url.tsx +++ b/src/plugins/discover/public/application/helpers/get_context_url.tsx @@ -10,6 +10,7 @@ import { stringify } from 'query-string'; import rison from 'rison-node'; import { url } from '../../../../kibana_utils/common'; import { esFilters, FilterManager } from '../../../../data/public'; +import { DiscoverServices } from '../../build_services'; /** * Helper function to generate an URL to a document in Discover's context view @@ -18,7 +19,8 @@ export function getContextUrl( documentId: string, indexPatternId: string, columns: string[], - filterManager: FilterManager + filterManager: FilterManager, + addBasePath: DiscoverServices['addBasePath'] ) { const globalFilters = filterManager.getGlobalFilters(); const appFilters = filterManager.getAppFilters(); @@ -36,7 +38,9 @@ export function getContextUrl( { encode: false, sort: false } ); - return `#/context/${encodeURIComponent(indexPatternId)}/${encodeURIComponent( - documentId - )}?${hash}`; + return addBasePath( + `/app/discover#/context/${encodeURIComponent(indexPatternId)}/${encodeURIComponent( + documentId + )}?${hash}` + ); } diff --git a/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.test.tsx b/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.test.tsx index e1e1890fffb6b..90f1d43fa357a 100644 --- a/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.test.tsx +++ b/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.test.tsx @@ -10,7 +10,8 @@ import React from 'react'; import { shallow } from 'enzyme'; import { FieldFormat } from 'src/plugins/data/public'; -import { DefaultFormatEditor, convertSampleInput, ConverterParams } from './default'; +import { SampleInput } from '../../types'; +import { DefaultFormatEditor, convertSampleInput } from './default'; const fieldType = 'number'; const format = { @@ -22,7 +23,7 @@ const onError = jest.fn(); describe('DefaultFormatEditor', () => { describe('convertSampleInput', () => { - const converter = (input: ConverterParams) => { + const converter = (input: SampleInput) => { if (typeof input !== 'number') { throw new Error('Input is not a number'); } else { diff --git a/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx b/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx index 06f3b318b6e93..a282faaa4d2b5 100644 --- a/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx +++ b/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/default.tsx @@ -10,14 +10,12 @@ import React, { PureComponent, ReactText } from 'react'; import { i18n } from '@kbn/i18n'; import { FieldFormat, FieldFormatsContentType } from 'src/plugins/data/public'; -import { Sample } from '../../types'; +import { Sample, SampleInput } from '../../types'; import { FormatSelectEditorProps } from '../../field_format_editor'; -export type ConverterParams = string | number | Array; - export const convertSampleInput = ( - converter: (input: ConverterParams) => string, - inputs: ConverterParams[] + converter: (input: SampleInput) => string, + inputs: SampleInput[] ) => { let error; let samples: Sample[] = []; @@ -55,7 +53,7 @@ export interface FormatEditorProps

{ } export interface FormatEditorState { - sampleInputs: ReactText[]; + sampleInputs: SampleInput[]; sampleConverterType: FieldFormatsContentType; error?: string; samples: Sample[]; @@ -63,7 +61,7 @@ export interface FormatEditorState { } export const defaultState = { - sampleInputs: [] as ReactText[], + sampleInputs: [] as SampleInput[], sampleConverterType: 'text' as FieldFormatsContentType, error: undefined, samples: [] as Sample[], diff --git a/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/histogram/__snapshots__/histogram.test.tsx.snap b/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/histogram/__snapshots__/histogram.test.tsx.snap new file mode 100644 index 0000000000000..ddaeb7214d62e --- /dev/null +++ b/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/histogram/__snapshots__/histogram.test.tsx.snap @@ -0,0 +1,74 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`HistogramFormatEditor should render normally 1`] = ` + + + + + + + +   + + + + } + isInvalid={false} + label="Numeral format pattern (optional)" + labelType="label" + > + + + + +`; diff --git a/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/histogram/histogram.test.tsx b/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/histogram/histogram.test.tsx new file mode 100644 index 0000000000000..053dff1213908 --- /dev/null +++ b/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/histogram/histogram.test.tsx @@ -0,0 +1,51 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; +import { shallow } from 'enzyme'; +import { FieldFormat } from 'src/plugins/data/public'; + +import { HistogramFormatEditor } from './histogram'; + +const fieldType = 'histogram'; +const format = { + getConverterFor: jest + .fn() + .mockImplementation(() => (input: number | Record) => + typeof input === 'number' ? input.toFixed(2) : JSON.stringify(input) + ), + getParamDefaults: jest.fn().mockImplementation(() => { + return { id: 'number', params: {} }; + }), +}; +const formatParams = { + type: 'histogram', + id: 'number' as const, + params: {}, +}; +const onChange = jest.fn(); +const onError = jest.fn(); + +describe('HistogramFormatEditor', () => { + it('should have a formatId', () => { + expect(HistogramFormatEditor.formatId).toEqual('histogram'); + }); + + it('should render normally', async () => { + const component = shallow( + + ); + expect(component).toMatchSnapshot(); + }); +}); diff --git a/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/histogram/histogram.tsx b/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/histogram/histogram.tsx new file mode 100644 index 0000000000000..0f13439e1269b --- /dev/null +++ b/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/histogram/histogram.tsx @@ -0,0 +1,109 @@ +/* + * Copyright 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, { Fragment } from 'react'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n/react'; +import { EuiSelect, EuiFieldText, EuiFormRow, EuiIcon, EuiLink } from '@elastic/eui'; +import { DefaultFormatEditor, defaultState } from '../default'; +import { FormatEditorSamples } from '../../samples'; + +export interface HistogramFormatEditorParams { + id: 'bytes' | 'percent' | 'number'; + params: { pattern?: string } & Record; +} + +export class HistogramFormatEditor extends DefaultFormatEditor { + static formatId = 'histogram'; + state = { + ...defaultState, + sampleInputs: [ + 50.1234, + 100.0001, + 99.9999, + { values: [0.00001, 99.9999, 200, 300], counts: [573, 102, 482] }, + ], + }; + + render() { + const { formatParams } = this.props; + const { error, samples } = this.state; + + const numberOptions = [ + { + value: 'number', + text: i18n.translate('indexPatternFieldEditor.histogram.subFormat.number', { + defaultMessage: 'Number', + }), + }, + { + value: 'bytes', + text: i18n.translate('indexPatternFieldEditor.histogram.subFormat.bytes', { + defaultMessage: 'Bytes', + }), + }, + { + value: 'percent', + text: i18n.translate('indexPatternFieldEditor.histogram.subFormat.percent', { + defaultMessage: 'Percentage', + }), + }, + ]; + + return ( + + + { + this.onChange({ id: e.target.value }); + }} + /> + + + + +   + + + + } + isInvalid={!!error} + error={error} + > + { + this.onChange({ + params: { + pattern: e.target.value, + }, + }); + }} + isInvalid={!!error} + /> + + + + + ); + } +} diff --git a/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/histogram/index.ts b/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/histogram/index.ts new file mode 100644 index 0000000000000..221895f4cba23 --- /dev/null +++ b/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/histogram/index.ts @@ -0,0 +1,9 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export { HistogramFormatEditor } from './histogram'; diff --git a/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/index.ts b/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/index.ts index 9dd4098768e96..41d60c6e2144f 100644 --- a/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/index.ts +++ b/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/index.ts @@ -19,3 +19,4 @@ export { StaticLookupFormatEditor } from './static_lookup'; export { StringFormatEditor } from './string'; export { TruncateFormatEditor } from './truncate'; export { UrlFormatEditor } from './url'; +export { HistogramFormatEditor } from './histogram'; diff --git a/src/plugins/index_pattern_field_editor/public/components/field_format_editor/types.ts b/src/plugins/index_pattern_field_editor/public/components/field_format_editor/types.ts index 11c0b8a625907..8588423b87489 100644 --- a/src/plugins/index_pattern_field_editor/public/components/field_format_editor/types.ts +++ b/src/plugins/index_pattern_field_editor/public/components/field_format_editor/types.ts @@ -8,7 +8,9 @@ import { ReactText } from 'react'; +export type SampleInput = ReactText | ReactText[] | Record; + export interface Sample { - input: ReactText | ReactText[]; + input: SampleInput; output: string; } diff --git a/src/plugins/index_pattern_field_editor/public/service/format_editor_service.ts b/src/plugins/index_pattern_field_editor/public/service/format_editor_service.ts index 67064e8a9cdbf..faabc7f5b9450 100644 --- a/src/plugins/index_pattern_field_editor/public/service/format_editor_service.ts +++ b/src/plugins/index_pattern_field_editor/public/service/format_editor_service.ts @@ -20,6 +20,7 @@ import { StringFormatEditor, TruncateFormatEditor, UrlFormatEditor, + HistogramFormatEditor, } from '../components'; /** @@ -47,6 +48,7 @@ export class FormatEditorService { StringFormatEditor, TruncateFormatEditor, UrlFormatEditor, + HistogramFormatEditor, ]; const fieldFormatEditorsSetup = this.fieldFormatEditors.setup(defaultFieldFormatEditors); diff --git a/src/plugins/index_pattern_management/public/components/field_editor/types.ts b/src/plugins/index_pattern_management/public/components/field_editor/types.ts index 4bf6217c875ca..de03c88f505f8 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/types.ts +++ b/src/plugins/index_pattern_management/public/components/field_editor/types.ts @@ -10,8 +10,9 @@ import { ReactText } from 'react'; import { Query } from 'src/plugins/data/public'; import { HttpStart } from 'src/core/public'; +export type SampleInput = ReactText | ReactText[] | Record; export interface Sample { - input: ReactText | ReactText[]; + input: SampleInput; output: string; } diff --git a/src/plugins/maps_legacy/public/map/_legend.scss b/src/plugins/maps_legacy/public/map/_legend.scss index 2c50e214c248b..27016840cfabf 100644 --- a/src/plugins/maps_legacy/public/map/_legend.scss +++ b/src/plugins/maps_legacy/public/map/_legend.scss @@ -1,6 +1,6 @@ .visMapLegend { @include fontSize(11px); - @include euiBottomShadowMedium($color: $euiShadowColorLarge, $opacity: .1); + @include euiBottomShadowMedium($color: $euiShadowColorLarge); font-family: $euiFontFamily; font-weight: $euiFontWeightMedium; line-height: $euiLineHeight; diff --git a/src/plugins/security_oss/.eslintrc.json b/src/plugins/security_oss/.eslintrc.json deleted file mode 100644 index 2b63a9259d220..0000000000000 --- a/src/plugins/security_oss/.eslintrc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "rules": { - "@typescript-eslint/consistent-type-imports": 1 - } -} diff --git a/src/plugins/security_oss/public/insecure_cluster_service/insecure_cluster_service.test.tsx b/src/plugins/security_oss/public/insecure_cluster_service/insecure_cluster_service.test.tsx index 45240527d91ef..25eae0b11c519 100644 --- a/src/plugins/security_oss/public/insecure_cluster_service/insecure_cluster_service.test.tsx +++ b/src/plugins/security_oss/public/insecure_cluster_service/insecure_cluster_service.test.tsx @@ -7,7 +7,6 @@ */ import { nextTick } from '@kbn/test/jest'; - import { coreMock } from 'src/core/public/mocks'; import { mockAppStateService } from '../app_state/app_state_service.mock'; diff --git a/src/plugins/security_oss/public/insecure_cluster_service/insecure_cluster_service.tsx b/src/plugins/security_oss/public/insecure_cluster_service/insecure_cluster_service.tsx index 6ad84b80eaf70..6cb2079cbe954 100644 --- a/src/plugins/security_oss/public/insecure_cluster_service/insecure_cluster_service.tsx +++ b/src/plugins/security_oss/public/insecure_cluster_service/insecure_cluster_service.tsx @@ -11,8 +11,8 @@ import { distinctUntilChanged, map } from 'rxjs/operators'; import type { CoreSetup, CoreStart, MountPoint, Toast } from 'src/core/public'; -import type { ConfigType } from '../config'; import type { AppStateServiceStart } from '../app_state'; +import type { ConfigType } from '../config'; import { defaultAlertText, defaultAlertTitle } from './components'; interface SetupDeps { diff --git a/src/plugins/spaces_oss/.eslintrc.json b/src/plugins/spaces_oss/.eslintrc.json deleted file mode 100644 index 2b63a9259d220..0000000000000 --- a/src/plugins/spaces_oss/.eslintrc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "rules": { - "@typescript-eslint/consistent-type-imports": 1 - } -} diff --git a/src/plugins/spaces_oss/public/api.ts b/src/plugins/spaces_oss/public/api.ts index 1d33408d645ea..3f562bcbed8e2 100644 --- a/src/plugins/spaces_oss/public/api.ts +++ b/src/plugins/spaces_oss/public/api.ts @@ -6,8 +6,8 @@ * Side Public License, v 1. */ -import type { Observable } from 'rxjs'; import type { ReactElement } from 'react'; +import type { Observable } from 'rxjs'; import type { Space } from '../common'; diff --git a/src/plugins/spaces_oss/public/mocks/index.ts b/src/plugins/spaces_oss/public/mocks/index.ts index 8061faa00b089..dc7b9e34fe822 100644 --- a/src/plugins/spaces_oss/public/mocks/index.ts +++ b/src/plugins/spaces_oss/public/mocks/index.ts @@ -6,9 +6,8 @@ * Side Public License, v 1. */ -import { spacesApiMock } from '../api.mock'; - import type { SpacesOssPluginSetup, SpacesOssPluginStart } from '../'; +import { spacesApiMock } from '../api.mock'; const createSetupContract = (): jest.Mocked => ({ registerSpacesApi: jest.fn(), diff --git a/src/plugins/spaces_oss/public/plugin.ts b/src/plugins/spaces_oss/public/plugin.ts index 52a8fd0d570d2..2531453257e3e 100644 --- a/src/plugins/spaces_oss/public/plugin.ts +++ b/src/plugins/spaces_oss/public/plugin.ts @@ -8,8 +8,8 @@ import type { Plugin } from 'src/core/public'; -import type { SpacesOssPluginSetup, SpacesOssPluginStart } from './types'; import type { SpacesApi } from './api'; +import type { SpacesOssPluginSetup, SpacesOssPluginStart } from './types'; export class SpacesOssPlugin implements Plugin { private api?: SpacesApi; diff --git a/src/plugins/telemetry/server/telemetry_collection/get_local_stats.test.ts b/src/plugins/telemetry/server/telemetry_collection/get_local_stats.test.ts index 45db15bbdedb0..47c6736ff9aea 100644 --- a/src/plugins/telemetry/server/telemetry_collection/get_local_stats.test.ts +++ b/src/plugins/telemetry/server/telemetry_collection/get_local_stats.test.ts @@ -14,6 +14,7 @@ import { createCollectorFetchContextMock, } from '../../../usage_collection/server/mocks'; import { elasticsearchServiceMock, httpServerMock } from '../../../../../src/core/server/mocks'; +import { StatsCollectionConfig } from '../../../telemetry_collection_manager/server'; function mockUsageCollection(kibanaUsage = {}) { const usageCollection = usageCollectionPluginMock.createSetupContract(); @@ -69,13 +70,16 @@ function mockGetLocalStats(clusterInfo: any, clusterStats: any) { return esClient; } -function mockStatsCollectionConfig(clusterInfo: any, clusterStats: any, kibana: {}) { +function mockStatsCollectionConfig( + clusterInfo: any, + clusterStats: any, + kibana: {} +): StatsCollectionConfig { return { ...createCollectorFetchContextMock(), esClient: mockGetLocalStats(clusterInfo, clusterStats), usageCollection: mockUsageCollection(kibana), kibanaRequest: httpServerMock.createKibanaRequest(), - timestamp: Date.now(), }; } @@ -227,7 +231,7 @@ describe('get_local_stats', () => { const statsCollectionConfig = mockStatsCollectionConfig(clusterInfo, clusterStats, kibana); const response = await getLocalStats( [{ clusterUuid: 'abc123' }], - { ...statsCollectionConfig }, + statsCollectionConfig, context ); const result = response[0]; @@ -243,7 +247,7 @@ describe('get_local_stats', () => { it('returns an empty array when no cluster uuid is provided', async () => { const statsCollectionConfig = mockStatsCollectionConfig(clusterInfo, clusterStats, kibana); - const response = await getLocalStats([], { ...statsCollectionConfig }, context); + const response = await getLocalStats([], statsCollectionConfig, context); expect(response).toBeDefined(); expect(response.length).toEqual(0); }); diff --git a/src/plugins/telemetry_collection_manager/server/plugin.test.ts b/src/plugins/telemetry_collection_manager/server/plugin.test.ts new file mode 100644 index 0000000000000..ac3904ca58b0f --- /dev/null +++ b/src/plugins/telemetry_collection_manager/server/plugin.test.ts @@ -0,0 +1,138 @@ +/* + * Copyright 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 { coreMock, httpServerMock } from '../../../core/server/mocks'; +import { usageCollectionPluginMock } from '../../usage_collection/server/mocks'; +import { TelemetryCollectionManagerPlugin } from './plugin'; +import { CollectionStrategyConfig, StatsGetterConfig } from './types'; +import { TelemetrySavedObjectsClient } from './telemetry_saved_objects_client'; + +function createCollectionStrategy(priority: number): jest.Mocked { + return { + title: 'test_collection', + priority, + statsGetter: jest.fn(), + clusterDetailsGetter: jest.fn(), + }; +} + +describe('Telemetry Collection Manager', () => { + const initializerContext = coreMock.createPluginInitializerContext(); + const usageCollection = usageCollectionPluginMock.createSetupContract(); + + describe('everything works when no collection mechanisms are registered', () => { + const telemetryCollectionManager = new TelemetryCollectionManagerPlugin(initializerContext); + const setupApi = telemetryCollectionManager.setup(coreMock.createSetup(), { usageCollection }); + test('All collectors are ready (there are none)', async () => { + await expect(setupApi.areAllCollectorsReady()).resolves.toBe(true); + }); + test('getStats returns empty', async () => { + const config: StatsGetterConfig = { unencrypted: false }; + await expect(setupApi.getStats(config)).resolves.toStrictEqual([]); + }); + test('getOptInStats returns empty', async () => { + const config: StatsGetterConfig = { unencrypted: false }; + await expect(setupApi.getOptInStats(true, config)).resolves.toStrictEqual([]); + }); + }); + + describe('With a registered collection strategy', () => { + const telemetryCollectionManager = new TelemetryCollectionManagerPlugin(initializerContext); + const setupApi = telemetryCollectionManager.setup(coreMock.createSetup(), { usageCollection }); + const collectionStrategy = createCollectionStrategy(1); + + describe('before start', () => { + test('registers a collection strategy', () => { + const zeroCollectionStrategy = createCollectionStrategy(0); + expect(setupApi.setCollectionStrategy(zeroCollectionStrategy)).toBeUndefined(); + // eslint-disable-next-line dot-notation + expect(telemetryCollectionManager['collectionStrategy']).toStrictEqual( + zeroCollectionStrategy + ); + // eslint-disable-next-line dot-notation + expect(telemetryCollectionManager['usageGetterMethodPriority']).toBe(0); + }); + test('register a higher-priority collection strategy', () => { + expect(setupApi.setCollectionStrategy(collectionStrategy)).toBeUndefined(); + // eslint-disable-next-line dot-notation + expect(telemetryCollectionManager['collectionStrategy']).toStrictEqual(collectionStrategy); + // eslint-disable-next-line dot-notation + expect(telemetryCollectionManager['usageGetterMethodPriority']).toBe(1); + }); + test('fails to register the collection strategy with the same priority', () => { + expect(() => setupApi.setCollectionStrategy(createCollectionStrategy(1))).toThrowError( + `A Usage Getter with the same priority is already set.` + ); + }); + test('do not register a collection strategy with lower priority', () => { + expect(setupApi.setCollectionStrategy(createCollectionStrategy(0))).toBeUndefined(); + // eslint-disable-next-line dot-notation + expect(telemetryCollectionManager['collectionStrategy']).toStrictEqual(collectionStrategy); + // eslint-disable-next-line dot-notation + expect(telemetryCollectionManager['usageGetterMethodPriority']).toBe(1); + }); + test('getStats returns empty because ES and SO clients are not initialized yet', async () => { + const config: StatsGetterConfig = { unencrypted: false }; + await expect(setupApi.getStats(config)).resolves.toStrictEqual([]); + }); + test('getOptInStats returns empty because ES and SO clients are not initialized yet', async () => { + const config: StatsGetterConfig = { unencrypted: false }; + await expect(setupApi.getOptInStats(true, config)).resolves.toStrictEqual([]); + }); + }); + + describe(`after start`, () => { + beforeAll(() => { + telemetryCollectionManager.start(coreMock.createStart()); + }); + afterEach(() => { + collectionStrategy.clusterDetailsGetter.mockClear(); + collectionStrategy.statsGetter.mockClear(); + }); + describe('unencrypted: false', () => { + const config: StatsGetterConfig = { unencrypted: false }; + + test('getStats returns empty because clusterDetails returns empty, and the soClient is an instance of the TelemetrySavedObjectsClient', async () => { + collectionStrategy.clusterDetailsGetter.mockResolvedValue([]); + await expect(setupApi.getStats(config)).resolves.toStrictEqual([]); + expect(collectionStrategy.clusterDetailsGetter.mock.calls[0][0].soClient).toBeInstanceOf( + TelemetrySavedObjectsClient + ); + }); + test('getOptInStats returns empty', async () => { + collectionStrategy.clusterDetailsGetter.mockResolvedValue([]); + await expect(setupApi.getOptInStats(true, config)).resolves.toStrictEqual([]); + expect(collectionStrategy.clusterDetailsGetter.mock.calls[0][0].soClient).toBeInstanceOf( + TelemetrySavedObjectsClient + ); + }); + }); + describe('unencrypted: true', () => { + const config: StatsGetterConfig = { + unencrypted: true, + request: httpServerMock.createKibanaRequest(), + }; + + test('getStats returns empty because clusterDetails returns empty, and the soClient is not an instance of the TelemetrySavedObjectsClient', async () => { + collectionStrategy.clusterDetailsGetter.mockResolvedValue([]); + await expect(setupApi.getStats(config)).resolves.toStrictEqual([]); + expect( + collectionStrategy.clusterDetailsGetter.mock.calls[0][0].soClient + ).not.toBeInstanceOf(TelemetrySavedObjectsClient); + }); + test('getOptInStats returns empty', async () => { + collectionStrategy.clusterDetailsGetter.mockResolvedValue([]); + await expect(setupApi.getOptInStats(true, config)).resolves.toStrictEqual([]); + expect( + collectionStrategy.clusterDetailsGetter.mock.calls[0][0].soClient + ).not.toBeInstanceOf(TelemetrySavedObjectsClient); + }); + }); + }); + }); +}); diff --git a/src/plugins/telemetry_collection_manager/server/plugin.ts b/src/plugins/telemetry_collection_manager/server/plugin.ts index f86d3e4773d62..0fec225d5c424 100644 --- a/src/plugins/telemetry_collection_manager/server/plugin.ts +++ b/src/plugins/telemetry_collection_manager/server/plugin.ts @@ -15,6 +15,8 @@ import { Logger, IClusterClient, SavedObjectsServiceStart, + ElasticsearchClient, + SavedObjectsClientContract, } from 'src/core/server'; import { @@ -30,6 +32,7 @@ import { } from './types'; import { isClusterOptedIn } from './util'; import { encryptTelemetry } from './encryption'; +import { TelemetrySavedObjectsClient } from './telemetry_saved_objects_client'; interface TelemetryCollectionPluginsDepsSetup { usageCollection: UsageCollectionSetup; @@ -115,14 +118,8 @@ export class TelemetryCollectionManagerPlugin config: StatsGetterConfig, usageCollection: UsageCollectionSetup ): StatsCollectionConfig | undefined { - // Scope the new elasticsearch Client appropriately and pass to the stats collection config - const esClient = config.unencrypted - ? this.elasticsearchClient?.asScoped(config.request).asCurrentUser - : this.elasticsearchClient?.asInternalUser; - // Scope the saved objects client appropriately and pass to the stats collection config - const soClient = config.unencrypted - ? this.savedObjectsService?.getScopedClient(config.request) - : this.savedObjectsService?.createInternalRepository(); + const esClient = this.getElasticsearchClient(config); + const soClient = this.getSavedObjectsClient(config); // Provide the kibanaRequest so opted-in plugins can scope their custom clients only if the request is not encrypted const kibanaRequest = config.unencrypted ? config.request : void 0; @@ -131,6 +128,39 @@ export class TelemetryCollectionManagerPlugin } } + /** + * Returns the ES client scoped to the requester or Kibana's internal user + * depending on whether the request is encrypted or not: + * If the request is unencrypted, we intentionally scope the results to "what the user can see". + * @param config {@link StatsGetterConfig} + * @private + */ + private getElasticsearchClient(config: StatsGetterConfig): ElasticsearchClient | undefined { + return config.unencrypted + ? this.elasticsearchClient?.asScoped(config.request).asCurrentUser + : this.elasticsearchClient?.asInternalUser; + } + + /** + * Returns the SavedObjects client scoped to the requester or Kibana's internal user + * depending on whether the request is encrypted or not: + * If the request is unencrypted, we intentionally scope the results to "what the user can see" + * @param config {@link StatsGetterConfig} + * @private + */ + private getSavedObjectsClient(config: StatsGetterConfig): SavedObjectsClientContract | undefined { + if (config.unencrypted) { + // Intentionally using the scoped client here to make use of all the security wrappers. + // It also returns spaces-scoped telemetry. + return this.savedObjectsService?.getScopedClient(config.request); + } else if (this.savedObjectsService) { + // Wrapping the internalRepository with the `TelemetrySavedObjectsClient` + // to ensure some best practices when collecting "all the telemetry" + // (i.e.: `.find` requests should query all spaces) + return new TelemetrySavedObjectsClient(this.savedObjectsService.createInternalRepository()); + } + } + private async getOptInStats(optInStatus: boolean, config: StatsGetterConfig) { if (!this.usageCollection) { return []; diff --git a/src/plugins/telemetry_collection_manager/server/telemetry_saved_objects_client.test.ts b/src/plugins/telemetry_collection_manager/server/telemetry_saved_objects_client.test.ts new file mode 100644 index 0000000000000..a1aa9a3070d01 --- /dev/null +++ b/src/plugins/telemetry_collection_manager/server/telemetry_saved_objects_client.test.ts @@ -0,0 +1,28 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { TelemetrySavedObjectsClient } from './telemetry_saved_objects_client'; +import { savedObjectsRepositoryMock } from '../../../core/server/mocks'; + +describe('TelemetrySavedObjectsClient', () => { + test("find requests are extended with `namespaces:['*']`", async () => { + const savedObjectsRepository = savedObjectsRepositoryMock.create(); + const telemetrySavedObjectsClient = new TelemetrySavedObjectsClient(savedObjectsRepository); + await telemetrySavedObjectsClient.find({ type: 'my-test-type' }); + expect(savedObjectsRepository.find).toBeCalledWith({ type: 'my-test-type', namespaces: ['*'] }); + }); + test("allow callers to overwrite the `namespaces:['*']`", async () => { + const savedObjectsRepository = savedObjectsRepositoryMock.create(); + const telemetrySavedObjectsClient = new TelemetrySavedObjectsClient(savedObjectsRepository); + await telemetrySavedObjectsClient.find({ type: 'my-test-type', namespaces: ['some_space'] }); + expect(savedObjectsRepository.find).toBeCalledWith({ + type: 'my-test-type', + namespaces: ['some_space'], + }); + }); +}); diff --git a/src/plugins/telemetry_collection_manager/server/telemetry_saved_objects_client.ts b/src/plugins/telemetry_collection_manager/server/telemetry_saved_objects_client.ts new file mode 100644 index 0000000000000..d639b053565d1 --- /dev/null +++ b/src/plugins/telemetry_collection_manager/server/telemetry_saved_objects_client.ts @@ -0,0 +1,23 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { SavedObjectsFindOptions, SavedObjectsFindResponse } from 'src/core/server'; +import { SavedObjectsClient } from '../../../core/server'; + +/** + * Extends the SavedObjectsClient to fit the telemetry fetching requirements (i.e.: find objects from all namespaces by default) + */ +export class TelemetrySavedObjectsClient extends SavedObjectsClient { + /** + * Find the SavedObjects matching the search query in all the Spaces by default + * @param options + */ + async find(options: SavedObjectsFindOptions): Promise> { + return super.find({ namespaces: ['*'], ...options }); + } +} diff --git a/src/plugins/telemetry_collection_manager/server/types.ts b/src/plugins/telemetry_collection_manager/server/types.ts index c98aff03f5d07..985eff409c1de 100644 --- a/src/plugins/telemetry_collection_manager/server/types.ts +++ b/src/plugins/telemetry_collection_manager/server/types.ts @@ -11,7 +11,6 @@ import { Logger, KibanaRequest, SavedObjectsClientContract, - ISavedObjectsRepository, } from 'src/core/server'; import { UsageCollectionSetup } from 'src/plugins/usage_collection/server'; import { TelemetryCollectionManagerPlugin } from './plugin'; @@ -57,7 +56,7 @@ export interface ClusterDetails { export interface StatsCollectionConfig { usageCollection: UsageCollectionSetup; esClient: ElasticsearchClient; - soClient: SavedObjectsClientContract | ISavedObjectsRepository; + soClient: SavedObjectsClientContract; kibanaRequest: KibanaRequest | undefined; // intentionally `| undefined` to enforce providing the parameter } diff --git a/src/plugins/usage_collection/server/collector/collector.ts b/src/plugins/usage_collection/server/collector/collector.ts index 8e114df440cbe..90e873388d22e 100644 --- a/src/plugins/usage_collection/server/collector/collector.ts +++ b/src/plugins/usage_collection/server/collector/collector.ts @@ -6,10 +6,9 @@ * Side Public License, v 1. */ -import { +import type { Logger, ElasticsearchClient, - ISavedObjectsRepository, SavedObjectsClientContract, KibanaRequest, } from 'src/core/server'; @@ -72,7 +71,7 @@ export type CollectorFetchContext { export function createCollectorFetchContextMock(): jest.Mocked> { const collectorFetchClientsMock: jest.Mocked> = { esClient: elasticsearchServiceMock.createClusterClient().asInternalUser, - soClient: savedObjectsRepositoryMock.create(), + soClient: savedObjectsClientMock.create(), }; return collectorFetchClientsMock; } @@ -50,7 +50,7 @@ export function createCollectorFetchContextWithKibanaMock(): jest.Mocked< > { const collectorFetchClientsMock: jest.Mocked> = { esClient: elasticsearchServiceMock.createClusterClient().asInternalUser, - soClient: savedObjectsRepositoryMock.create(), + soClient: savedObjectsClientMock.create(), kibanaRequest: httpServerMock.createKibanaRequest(), }; return collectorFetchClientsMock; diff --git a/src/plugins/vis_type_xy/public/plugin.ts b/src/plugins/vis_type_xy/public/plugin.ts index 75a2f4fb6895c..d414da8f6dc97 100644 --- a/src/plugins/vis_type_xy/public/plugin.ts +++ b/src/plugins/vis_type_xy/public/plugin.ts @@ -18,7 +18,6 @@ import { setDataActions, setFormatService, setThemeService, - setTimefilter, setUISettings, setDocLinks, setPalettesService, @@ -80,7 +79,6 @@ export class VisTypeXyPlugin public start(core: CoreStart, { data }: VisTypeXyPluginStartDependencies) { setFormatService(data.fieldFormats); setDataActions(data.actions); - setTimefilter(data.query.timefilter.timefilter); setDocLinks(core.docLinks); return {}; diff --git a/src/plugins/vis_type_xy/public/services.ts b/src/plugins/vis_type_xy/public/services.ts index 3f6a344091d76..b5dd6152605dc 100644 --- a/src/plugins/vis_type_xy/public/services.ts +++ b/src/plugins/vis_type_xy/public/services.ts @@ -24,10 +24,6 @@ export const [getFormatService, setFormatService] = createGetterSetter< DataPublicPluginStart['fieldFormats'] >('xy data.fieldFormats'); -export const [getTimefilter, setTimefilter] = createGetterSetter< - DataPublicPluginStart['query']['timefilter']['timefilter'] ->('xy data.query.timefilter.timefilter'); - export const [getThemeService, setThemeService] = createGetterSetter( 'xy charts.theme' ); diff --git a/src/plugins/vis_type_xy/public/to_ast.ts b/src/plugins/vis_type_xy/public/to_ast.ts index 7f990b01c2d07..84331af3a5329 100644 --- a/src/plugins/vis_type_xy/public/to_ast.ts +++ b/src/plugins/vis_type_xy/public/to_ast.ts @@ -16,6 +16,7 @@ import { DateHistogramParams, Dimensions, HistogramParams, VisParams } from './t import { visName, VisTypeXyExpressionFunctionDefinition } from './xy_vis_fn'; import { XyVisType } from '../common'; import { getEsaggsFn } from './to_ast_esaggs'; +import { TimeRangeBounds } from '../../data/common'; export const toExpressionAst: VisToExpressionAst = async (vis, params) => { const schemas = getVisSchemas(vis, params); @@ -42,6 +43,14 @@ export const toExpressionAst: VisToExpressionAst = async (vis, params .duration(esValue, esUnit) .asMilliseconds(); (dimensions.x.params as DateHistogramParams).format = xAgg.buckets.getScaledDateFormat(); + const bounds = xAgg.buckets.getBounds() as TimeRangeBounds | undefined; + + if (bounds && bounds?.min && bounds?.max) { + (dimensions.x.params as DateHistogramParams).bounds = { + min: bounds.min.valueOf(), + max: bounds.max.valueOf(), + }; + } } else if (xAgg.type.name === BUCKET_TYPES.HISTOGRAM) { const intervalParam = xAgg.type.paramByName('interval'); const output = { params: {} as any }; diff --git a/src/plugins/vis_type_xy/public/utils/domain.ts b/src/plugins/vis_type_xy/public/utils/domain.ts index a59b2fd20cb5a..322ffc087766c 100644 --- a/src/plugins/vis_type_xy/public/utils/domain.ts +++ b/src/plugins/vis_type_xy/public/utils/domain.ts @@ -14,22 +14,20 @@ import { DomainRange } from '@elastic/charts'; import { getAdjustedInterval } from '../../../charts/public'; import { Datatable } from '../../../expressions/public'; -import { getTimefilter } from '../services'; import { Aspect, DateHistogramParams, HistogramParams } from '../types'; export const getXDomain = (params: Aspect['params']): DomainRange => { const minInterval = (params as DateHistogramParams | HistogramParams)?.interval ?? undefined; + const bounds = (params as DateHistogramParams).date + ? (params as DateHistogramParams).bounds + : null; - if ((params as DateHistogramParams).date) { - const bounds = getTimefilter().getActiveBounds(); - - if (bounds) { - return { - min: bounds.min ? bounds.min.valueOf() : undefined, - max: bounds.max ? bounds.max.valueOf() : undefined, - minInterval, - }; - } + if (bounds) { + return { + min: bounds.min as number, + max: bounds.max as number, + minInterval, + }; } return { diff --git a/test/api_integration/apis/telemetry/telemetry_local.ts b/test/api_integration/apis/telemetry/telemetry_local.ts index 9d3ced5224502..85d94cbf46dda 100644 --- a/test/api_integration/apis/telemetry/telemetry_local.ts +++ b/test/api_integration/apis/telemetry/telemetry_local.ts @@ -256,6 +256,7 @@ export default function ({ getService }: FtrProviderContext) { await es.deleteByQuery({ index: '.kibana', body: { query: { term: { type: 'application_usage_transactional' } } }, + conflicts: 'proceed', }); }); diff --git a/test/functional/apps/context/_discover_navigation.js b/test/functional/apps/context/_discover_navigation.js index 6152659e47f27..7756a915139e2 100644 --- a/test/functional/apps/context/_discover_navigation.js +++ b/test/functional/apps/context/_discover_navigation.js @@ -18,8 +18,18 @@ export default function ({ getService, getPageObjects }) { const retry = getService('retry'); const docTable = getService('docTable'); const filterBar = getService('filterBar'); - const PageObjects = getPageObjects(['common', 'discover', 'timePicker', 'context']); + const PageObjects = getPageObjects([ + 'common', + 'discover', + 'timePicker', + 'settings', + 'dashboard', + 'context', + 'header', + ]); const testSubjects = getService('testSubjects'); + const dashboardAddPanel = getService('dashboardAddPanel'); + const browser = getService('browser'); describe('context link in discover', () => { before(async () => { @@ -94,5 +104,28 @@ export default function ({ getService, getPageObjects }) { await PageObjects.discover.waitForDiscoverAppOnScreen(); await PageObjects.discover.waitForDocTableLoadingComplete(); }); + + it('navigates to doc view from embeddable', async () => { + await PageObjects.common.navigateToApp('discover'); + await PageObjects.discover.saveSearch('my search'); + await PageObjects.header.waitUntilLoadingHasFinished(); + + await PageObjects.common.navigateToApp('dashboard'); + await PageObjects.dashboard.gotoDashboardLandingPage(); + await PageObjects.dashboard.clickNewDashboard(); + + await dashboardAddPanel.addSavedSearch('my search'); + await PageObjects.header.waitUntilLoadingHasFinished(); + + await docTable.clickRowToggle({ rowIndex: 0 }); + const rowActions = await docTable.getRowActions({ rowIndex: 0 }); + await rowActions[1].click(); + await PageObjects.common.sleep(250); + // accept alert if it pops up + const alert = await browser.getAlert(); + await alert?.accept(); + expect(await browser.getCurrentUrl()).to.contain('#/doc'); + expect(await PageObjects.discover.isShowingDocViewer()).to.be(true); + }); }); } diff --git a/test/functional/apps/discover/_data_grid_context.ts b/test/functional/apps/discover/_data_grid_context.ts index 8f817dbea35c3..896cd4ad595c9 100644 --- a/test/functional/apps/discover/_data_grid_context.ts +++ b/test/functional/apps/discover/_data_grid_context.ts @@ -20,10 +20,19 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const filterBar = getService('filterBar'); const dataGrid = getService('dataGrid'); const docTable = getService('docTable'); - const PageObjects = getPageObjects(['common', 'discover', 'timePicker', 'settings']); + const PageObjects = getPageObjects([ + 'common', + 'discover', + 'timePicker', + 'settings', + 'dashboard', + 'header', + ]); const defaultSettings = { defaultIndex: 'logstash-*', 'doc_table:legacy': false }; const kibanaServer = getService('kibanaServer'); const esArchiver = getService('esArchiver'); + const dashboardAddPanel = getService('dashboardAddPanel'); + const browser = getService('browser'); describe('discover data grid context tests', () => { before(async () => { @@ -78,5 +87,29 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { } expect(disabledFilterCounter).to.be(TEST_FILTER_COLUMN_NAMES.length); }); + + it('navigates to context view from embeddable', async () => { + await PageObjects.common.navigateToApp('discover'); + await PageObjects.discover.saveSearch('my search'); + await PageObjects.header.waitUntilLoadingHasFinished(); + + await PageObjects.common.navigateToApp('dashboard'); + await PageObjects.dashboard.gotoDashboardLandingPage(); + await PageObjects.dashboard.clickNewDashboard(); + + await dashboardAddPanel.addSavedSearch('my search'); + await PageObjects.header.waitUntilLoadingHasFinished(); + + await dataGrid.clickRowToggle({ rowIndex: 0 }); + const rowActions = await dataGrid.getRowActions({ rowIndex: 0 }); + await rowActions[1].click(); + await PageObjects.common.sleep(250); + // accept alert if it pops up + const alert = await browser.getAlert(); + await alert?.accept(); + expect(await browser.getCurrentUrl()).to.contain('#/context'); + await PageObjects.header.waitUntilLoadingHasFinished(); + expect(await docTable.getRowsText()).to.have.length(6); + }); }); } diff --git a/test/functional/apps/discover/_large_string.ts b/test/functional/apps/discover/_large_string.ts index c53fee2afae61..3f9a5ab264c7a 100644 --- a/test/functional/apps/discover/_large_string.ts +++ b/test/functional/apps/discover/_large_string.ts @@ -29,8 +29,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('verify the large string book present', async function () { const ExpectedDoc = - '_id:1 _type: - _index:testlargestring _score:0' + - ' mybook:Project Gutenberg EBook of Hamlet, by William Shakespeare' + + 'mybook:Project Gutenberg EBook of Hamlet, by William Shakespeare' + ' This eBook is for the use of anyone anywhere in the United States' + ' and most other parts of the world at no cost and with almost no restrictions whatsoever.' + ' You may copy it, give it away or re-use it under the terms of the' + @@ -39,7 +38,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ' you’ll have to check the laws of the country where you are' + ' located before using this ebook.' + ' Title: Hamlet Author: William Shakespeare Release Date: November 1998 [EBook #1524]' + - ' Last Updated: December 30, 2017 Language: English Character set encoding:'; + ' Last Updated: December 30, 2017 Language: English Character set encoding:' + + ' _id:1 _type: - _index:testlargestring _score:0'; let rowData; await PageObjects.common.navigateToApp('discover'); diff --git a/test/functional/apps/management/_test_huge_fields.js b/test/functional/apps/management/_test_huge_fields.js index 3102becbe181f..b9c9e964ac3f5 100644 --- a/test/functional/apps/management/_test_huge_fields.js +++ b/test/functional/apps/management/_test_huge_fields.js @@ -13,15 +13,15 @@ export default function ({ getService, getPageObjects }) { const security = getService('security'); const PageObjects = getPageObjects(['common', 'home', 'settings']); - // Failing: See https://github.com/elastic/kibana/issues/89031 - describe.skip('test large number of fields', function () { + describe('test large number of fields', function () { this.tags(['skipCloud']); const EXPECTED_FIELD_COUNT = '10006'; before(async function () { - await security.testUser.setRoles(['kibana_admin', 'test_testhuge_reader']); + await security.testUser.setRoles(['kibana_admin', 'test_testhuge_reader'], false); await esArchiver.emptyKibanaIndex(); await esArchiver.loadIfNeeded('large_fields'); + await PageObjects.settings.navigateTo(); await PageObjects.settings.createIndexPattern('testhuge', 'date'); }); diff --git a/test/functional/apps/visualize/_area_chart.ts b/test/functional/apps/visualize/_area_chart.ts index 9b8abc7ae60a8..05fbdc2e0c283 100644 --- a/test/functional/apps/visualize/_area_chart.ts +++ b/test/functional/apps/visualize/_area_chart.ts @@ -96,14 +96,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show correct chart', async function () { const xAxisLabels = await PageObjects.visChart.getExpectedValue( ['2015-09-20 00:00', '2015-09-21 00:00', '2015-09-22 00:00', '2015-09-23 00:00'], - [ - '2015-09-20 00:00', - '2015-09-20 12:00', - '2015-09-21 00:00', - '2015-09-21 12:00', - '2015-09-22 00:00', - '2015-09-22 12:00', - ] + ['2015-09-19 12:00', '2015-09-20 12:00', '2015-09-21 12:00', '2015-09-22 12:00'] ); const yAxisLabels = await PageObjects.visChart.getExpectedValue( ['0', '200', '400', '600', '800', '1,000', '1,200', '1,400', '1,600'], diff --git a/test/functional/apps/visualize/_point_series_options.ts b/test/functional/apps/visualize/_point_series_options.ts index 09f9694ea9474..ac641fb554b0b 100644 --- a/test/functional/apps/visualize/_point_series_options.ts +++ b/test/functional/apps/visualize/_point_series_options.ts @@ -269,7 +269,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show round labels in default timezone', async function () { const expectedLabels = await PageObjects.visChart.getExpectedValue( ['2015-09-20 00:00', '2015-09-21 00:00', '2015-09-22 00:00'], - ['2015-09-20 00:00', '2015-09-20 18:00', '2015-09-21 12:00', '2015-09-22 06:00'] + ['2015-09-19 12:00', '2015-09-20 12:00', '2015-09-21 12:00', '2015-09-22 12:00'] ); await initChart(); const labels = await PageObjects.visChart.getXAxisLabels(); @@ -279,7 +279,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show round labels in different timezone', async function () { const expectedLabels = await PageObjects.visChart.getExpectedValue( ['2015-09-20 00:00', '2015-09-21 00:00', '2015-09-22 00:00'], - ['2015-09-19 18:00', '2015-09-20 12:00', '2015-09-21 06:00', '2015-09-22 00:00'] + [ + '2015-09-19 12:00', + '2015-09-20 06:00', + '2015-09-21 00:00', + '2015-09-21 18:00', + '2015-09-22 12:00', + ] ); await kibanaServer.uiSettings.update({ 'dateFormat:tz': 'America/Phoenix' }); diff --git a/test/functional/fixtures/es_archiver/large_fields/data.json.gz b/test/functional/fixtures/es_archiver/large_fields/data.json.gz index e3879e288b6f2..ff82acd5842ee 100644 Binary files a/test/functional/fixtures/es_archiver/large_fields/data.json.gz and b/test/functional/fixtures/es_archiver/large_fields/data.json.gz differ diff --git a/test/functional/page_objects/discover_page.ts b/test/functional/page_objects/discover_page.ts index b7b4535641c90..733f5cb59fbbb 100644 --- a/test/functional/page_objects/discover_page.ts +++ b/test/functional/page_objects/discover_page.ts @@ -222,6 +222,10 @@ export function DiscoverPageProvider({ getService, getPageObjects }: FtrProvider await find.clickByCssSelector('.fa-sort-up'); } + public async isShowingDocViewer() { + return await testSubjects.exists('kbnDocViewer'); + } + public async getMarks() { const table = await docTable.getTable(); const $ = await table.parseDomContent(); diff --git a/test/scripts/checks/kbn_pm_dist.sh b/test/scripts/checks/kbn_pm_dist.sh new file mode 100644 index 0000000000000..3116404280cca --- /dev/null +++ b/test/scripts/checks/kbn_pm_dist.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +source src/dev/ci_setup/setup_env.sh + +### +### rebuild kbn-pm distributable to ensure it's not out of date +### +echo " -- building kbn-pm distributable" +yarn kbn run build -i @kbn/pm + +### +### verify no git modifications +### +GIT_CHANGES="$(git ls-files --modified)" +if [ "$GIT_CHANGES" ]; then + echo -e "\n${RED}ERROR: 'yarn kbn run build -i @kbn/pm' caused changes to the following files:${C_RESET}\n" + echo -e "$GIT_CHANGES\n" + exit 1 +fi diff --git a/test/scripts/checks/plugin_list_docs.sh b/test/scripts/checks/plugin_list_docs.sh new file mode 100644 index 0000000000000..b0f49d7845841 --- /dev/null +++ b/test/scripts/checks/plugin_list_docs.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +source src/dev/ci_setup/setup_env.sh + +### +### rebuild plugin list to ensure it's not out of date +### +echo " -- building plugin list docs" +node scripts/build_plugin_list_docs + +### +### verify no git modifications +### +GIT_CHANGES="$(git ls-files --modified)" +if [ "$GIT_CHANGES" ]; then + echo -e "\n${RED}ERROR: 'node scripts/build_plugin_list_docs' caused changes to the following files:${C_RESET}\n" + echo -e "$GIT_CHANGES\n" + exit 1 +fi diff --git a/test/scripts/checks/plugin_public_api_docs.sh b/test/scripts/checks/plugin_public_api_docs.sh new file mode 100644 index 0000000000000..ffa6afbc9d177 --- /dev/null +++ b/test/scripts/checks/plugin_public_api_docs.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +source src/dev/ci_setup/setup_env.sh + +### +### rebuild plugin api docs to ensure it's not out of date +### +echo " -- building api docs" +node scripts/build_api_docs + +### +### verify no api changes +### +GIT_CHANGES="$(git ls-files --modified)" +if [ "$GIT_CHANGES" ]; then + echo -e "\n${RED}ERROR: 'node scripts/build_api_docs' caused changes to the following files:${C_RESET}\n" + echo -e "$GIT_CHANGES\n" + exit 1 +fi diff --git a/vars/tasks.groovy b/vars/tasks.groovy index a61035403dabd..7ed6de8094067 100644 --- a/vars/tasks.groovy +++ b/vars/tasks.groovy @@ -9,6 +9,9 @@ def check() { kibanaPipeline.scriptTask('Check TypeScript Projects', 'test/scripts/checks/ts_projects.sh'), kibanaPipeline.scriptTask('Check Jest Configs', 'test/scripts/checks/jest_configs.sh'), kibanaPipeline.scriptTask('Check Doc API Changes', 'test/scripts/checks/doc_api_changes.sh'), + kibanaPipeline.scriptTask('Check @kbn/pm Distributable', 'test/scripts/checks/kbn_pm_dist.sh'), + kibanaPipeline.scriptTask('Check Plugin List Docs', 'test/scripts/checks/plugin_list_docs.sh'), + kibanaPipeline.scriptTask('Check Public API Docs', 'test/scripts/checks/plugin_public_api_docs.sh'), kibanaPipeline.scriptTask('Check Types', 'test/scripts/checks/type_check.sh'), kibanaPipeline.scriptTask('Check Bundle Limits', 'test/scripts/checks/bundle_limits.sh'), kibanaPipeline.scriptTask('Check i18n', 'test/scripts/checks/i18n.sh'), diff --git a/x-pack/plugins/actions/server/actions_client.ts b/x-pack/plugins/actions/server/actions_client.ts index c941bc1fab772..2703cbad32460 100644 --- a/x-pack/plugins/actions/server/actions_client.ts +++ b/x-pack/plugins/actions/server/actions_client.ts @@ -56,7 +56,7 @@ interface Action extends ActionUpdate { actionTypeId: string; } -interface CreateOptions { +export interface CreateOptions { action: Action; } @@ -73,7 +73,7 @@ interface ConstructorOptions { auditLogger?: AuditLogger; } -interface UpdateOptions { +export interface UpdateOptions { id: string; action: ActionUpdate; } diff --git a/x-pack/plugins/actions/server/plugin.ts b/x-pack/plugins/actions/server/plugin.ts index c4159c80e806f..d9d34e99bffea 100644 --- a/x-pack/plugins/actions/server/plugin.ts +++ b/x-pack/plugins/actions/server/plugin.ts @@ -50,15 +50,7 @@ import { import { getActionsConfigurationUtilities } from './actions_config'; -import { - createActionRoute, - deleteActionRoute, - getAllActionRoute, - getActionRoute, - updateActionRoute, - listActionTypesRoute, - executeActionRoute, -} from './routes'; +import { defineRoutes } from './routes'; import { IEventLogger, IEventLogService } from '../../event_log/server'; import { initializeActionsTelemetry, scheduleActionsTelemetry } from './usage/task'; import { @@ -237,14 +229,7 @@ export class ActionsPlugin implements Plugin(); - createActionRoute(router, this.licenseState); - deleteActionRoute(router, this.licenseState); - getActionRoute(router, this.licenseState); - getAllActionRoute(router, this.licenseState); - updateActionRoute(router, this.licenseState); - listActionTypesRoute(router, this.licenseState); - executeActionRoute(router, this.licenseState); + defineRoutes(core.http.createRouter(), this.licenseState); return { registerType: < diff --git a/x-pack/plugins/actions/server/routes/connector_types.test.ts b/x-pack/plugins/actions/server/routes/connector_types.test.ts new file mode 100644 index 0000000000000..ebbdc703556d5 --- /dev/null +++ b/x-pack/plugins/actions/server/routes/connector_types.test.ts @@ -0,0 +1,157 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { connectorTypesRoute } from './connector_types'; +import { httpServiceMock } from 'src/core/server/mocks'; +import { licenseStateMock } from '../lib/license_state.mock'; +import { mockHandlerArguments } from './legacy/_mock_handler_arguments'; +import { LicenseType } from '../../../../plugins/licensing/server'; +import { actionsClientMock } from '../mocks'; +import { verifyAccessAndContext } from './verify_access_and_context'; + +jest.mock('./verify_access_and_context.ts', () => ({ + verifyAccessAndContext: jest.fn(), +})); + +beforeEach(() => { + jest.resetAllMocks(); + (verifyAccessAndContext as jest.Mock).mockImplementation((license, handler) => handler); +}); + +describe('connectorTypesRoute', () => { + it('lists action types with proper parameters', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + connectorTypesRoute(router, licenseState); + + const [config, handler] = router.get.mock.calls[0]; + + expect(config.path).toMatchInlineSnapshot(`"/api/actions/connector_types"`); + + const listTypes = [ + { + id: '1', + name: 'name', + enabled: true, + enabledInConfig: true, + enabledInLicense: true, + minimumLicenseRequired: 'gold' as LicenseType, + }, + ]; + + const actionsClient = actionsClientMock.create(); + actionsClient.listTypes.mockResolvedValueOnce(listTypes); + const [context, req, res] = mockHandlerArguments({ actionsClient }, {}, ['ok']); + + expect(await handler(context, req, res)).toMatchInlineSnapshot(` + Object { + "body": Array [ + Object { + "enabled": true, + "enabled_in_config": true, + "enabled_in_license": true, + "id": "1", + "minimum_license_required": "gold", + "name": "name", + }, + ], + } + `); + + expect(res.ok).toHaveBeenCalledWith({ + body: [ + { + id: '1', + name: 'name', + enabled: true, + enabled_in_config: true, + enabled_in_license: true, + minimum_license_required: 'gold', + }, + ], + }); + }); + + it('ensures the license allows listing action types', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + connectorTypesRoute(router, licenseState); + + const [config, handler] = router.get.mock.calls[0]; + + expect(config.path).toMatchInlineSnapshot(`"/api/actions/connector_types"`); + + const listTypes = [ + { + id: '1', + name: 'name', + enabled: true, + enabledInConfig: true, + enabledInLicense: true, + minimumLicenseRequired: 'gold' as LicenseType, + }, + ]; + + const actionsClient = actionsClientMock.create(); + actionsClient.listTypes.mockResolvedValueOnce(listTypes); + + const [context, req, res] = mockHandlerArguments( + { actionsClient }, + { + params: { id: '1' }, + }, + ['ok'] + ); + + await handler(context, req, res); + + expect(verifyAccessAndContext).toHaveBeenCalledWith(licenseState, expect.any(Function)); + }); + + it('ensures the license check prevents listing action types', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + (verifyAccessAndContext as jest.Mock).mockImplementation(() => async () => { + throw new Error('OMG'); + }); + + connectorTypesRoute(router, licenseState); + + const [config, handler] = router.get.mock.calls[0]; + + expect(config.path).toMatchInlineSnapshot(`"/api/actions/connector_types"`); + + const listTypes = [ + { + id: '1', + name: 'name', + enabled: true, + enabledInConfig: true, + enabledInLicense: true, + minimumLicenseRequired: 'gold' as LicenseType, + }, + ]; + + const actionsClient = actionsClientMock.create(); + actionsClient.listTypes.mockResolvedValueOnce(listTypes); + + const [context, req, res] = mockHandlerArguments( + { actionsClient }, + { + params: { id: '1' }, + }, + ['ok'] + ); + + expect(handler(context, req, res)).rejects.toMatchInlineSnapshot(`[Error: OMG]`); + + expect(verifyAccessAndContext).toHaveBeenCalledWith(licenseState, expect.any(Function)); + }); +}); diff --git a/x-pack/plugins/actions/server/routes/connector_types.ts b/x-pack/plugins/actions/server/routes/connector_types.ts new file mode 100644 index 0000000000000..d686ddbdaee70 --- /dev/null +++ b/x-pack/plugins/actions/server/routes/connector_types.ts @@ -0,0 +1,42 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { IRouter } from 'kibana/server'; +import { ILicenseState } from '../lib'; +import { ActionType, BASE_ACTION_API_PATH } from '../../common'; +import { ActionsRequestHandlerContext } from '../types'; +import { verifyAccessAndContext } from './verify_access_and_context'; +import { RewriteResponseCase } from './rewrite_request_case'; + +const rewriteBodyRes: RewriteResponseCase = (results) => { + return results.map(({ enabledInConfig, enabledInLicense, minimumLicenseRequired, ...res }) => ({ + ...res, + enabled_in_config: enabledInConfig, + enabled_in_license: enabledInLicense, + minimum_license_required: minimumLicenseRequired, + })); +}; + +export const connectorTypesRoute = ( + router: IRouter, + licenseState: ILicenseState +) => { + router.get( + { + path: `${BASE_ACTION_API_PATH}/connector_types`, + validate: {}, + }, + router.handleLegacyErrors( + verifyAccessAndContext(licenseState, async function (context, req, res) { + const actionsClient = context.actions.getActionsClient(); + return res.ok({ + body: rewriteBodyRes(await actionsClient.listTypes()), + }); + }) + ) + ); +}; diff --git a/x-pack/plugins/actions/server/routes/create.test.ts b/x-pack/plugins/actions/server/routes/create.test.ts index b917dbcc23ff2..e5d8e6f5861f3 100644 --- a/x-pack/plugins/actions/server/routes/create.test.ts +++ b/x-pack/plugins/actions/server/routes/create.test.ts @@ -8,16 +8,18 @@ import { createActionRoute } from './create'; import { httpServiceMock } from 'src/core/server/mocks'; import { licenseStateMock } from '../lib/license_state.mock'; -import { verifyApiAccess, ActionTypeDisabledError } from '../lib'; -import { mockHandlerArguments } from './_mock_handler_arguments'; +import { mockHandlerArguments } from './legacy/_mock_handler_arguments'; import { actionsClientMock } from '../actions_client.mock'; +import { verifyAccessAndContext } from './verify_access_and_context'; +import { omit } from 'lodash'; -jest.mock('../lib/verify_api_access.ts', () => ({ - verifyApiAccess: jest.fn(), +jest.mock('./verify_access_and_context.ts', () => ({ + verifyAccessAndContext: jest.fn(), })); beforeEach(() => { jest.resetAllMocks(); + (verifyAccessAndContext as jest.Mock).mockImplementation((license, handler) => handler); }); describe('createActionRoute', () => { @@ -29,7 +31,7 @@ describe('createActionRoute', () => { const [config, handler] = router.post.mock.calls[0]; - expect(config.path).toMatchInlineSnapshot(`"/api/actions/action"`); + expect(config.path).toMatchInlineSnapshot(`"/api/actions/connector"`); const createResult = { id: '1', @@ -39,6 +41,12 @@ describe('createActionRoute', () => { isPreconfigured: false, }; + const createApiResult = { + ...omit(createResult, ['actionTypeId', 'isPreconfigured']), + connector_type_id: createResult.actionTypeId, + is_preconfigured: createResult.isPreconfigured, + }; + const actionsClient = actionsClientMock.create(); actionsClient.create.mockResolvedValueOnce(createResult); @@ -47,7 +55,7 @@ describe('createActionRoute', () => { { body: { name: 'My name', - actionTypeId: 'abc', + connector_type_id: 'abc', config: { foo: true }, secrets: {}, }, @@ -55,7 +63,7 @@ describe('createActionRoute', () => { ['ok'] ); - expect(await handler(context, req, res)).toEqual({ body: createResult }); + expect(await handler(context, req, res)).toEqual({ body: createApiResult }); expect(actionsClient.create).toHaveBeenCalledTimes(1); expect(actionsClient.create.mock.calls[0]).toMatchInlineSnapshot(` @@ -74,7 +82,7 @@ describe('createActionRoute', () => { `); expect(res.ok).toHaveBeenCalledWith({ - body: createResult, + body: createApiResult, }); }); @@ -95,18 +103,28 @@ describe('createActionRoute', () => { isPreconfigured: false, }); - const [context, req, res] = mockHandlerArguments({ actionsClient }, {}); + const [context, req, res] = mockHandlerArguments( + { actionsClient }, + { + body: { + name: 'My name', + connector_type_id: 'abc', + config: { foo: true }, + secrets: {}, + }, + } + ); await handler(context, req, res); - expect(verifyApiAccess).toHaveBeenCalledWith(licenseState); + expect(verifyAccessAndContext).toHaveBeenCalledWith(licenseState, expect.any(Function)); }); it('ensures the license check prevents creating actions', async () => { const licenseState = licenseStateMock.create(); const router = httpServiceMock.createRouter(); - (verifyApiAccess as jest.Mock).mockImplementation(() => { + (verifyAccessAndContext as jest.Mock).mockImplementation(() => async () => { throw new Error('OMG'); }); @@ -123,28 +141,18 @@ describe('createActionRoute', () => { isPreconfigured: false, }); - const [context, req, res] = mockHandlerArguments({ actionsClient }, {}); + const [context, req, res] = mockHandlerArguments( + { actionsClient }, + { + body: { + name: 'My name', + connector_type_id: 'abc', + config: { foo: true }, + secrets: {}, + }, + } + ); expect(handler(context, req, res)).rejects.toMatchInlineSnapshot(`[Error: OMG]`); - - expect(verifyApiAccess).toHaveBeenCalledWith(licenseState); - }); - - it('ensures the action type gets validated for the license', async () => { - const licenseState = licenseStateMock.create(); - const router = httpServiceMock.createRouter(); - - createActionRoute(router, licenseState); - - const [, handler] = router.post.mock.calls[0]; - - const actionsClient = actionsClientMock.create(); - actionsClient.create.mockRejectedValue(new ActionTypeDisabledError('Fail', 'license_invalid')); - - const [context, req, res] = mockHandlerArguments({ actionsClient }, {}, ['ok', 'forbidden']); - - await handler(context, req, res); - - expect(res.forbidden).toHaveBeenCalledWith({ body: { message: 'Fail' } }); }); }); diff --git a/x-pack/plugins/actions/server/routes/create.ts b/x-pack/plugins/actions/server/routes/create.ts index a64264412fc47..e1717891231db 100644 --- a/x-pack/plugins/actions/server/routes/create.ts +++ b/x-pack/plugins/actions/server/routes/create.ts @@ -8,46 +8,54 @@ import { schema } from '@kbn/config-schema'; import { IRouter } from 'kibana/server'; import { ActionResult, ActionsRequestHandlerContext } from '../types'; -import { ILicenseState, verifyApiAccess, isErrorThatHandlesItsOwnResponse } from '../lib'; +import { ILicenseState } from '../lib'; import { BASE_ACTION_API_PATH } from '../../common'; +import { verifyAccessAndContext } from './verify_access_and_context'; +import { RewriteRequestCase, RewriteResponseCase } from './rewrite_request_case'; +import { CreateOptions } from '../actions_client'; export const bodySchema = schema.object({ name: schema.string(), - actionTypeId: schema.string(), + connector_type_id: schema.string(), config: schema.recordOf(schema.string(), schema.any(), { defaultValue: {} }), secrets: schema.recordOf(schema.string(), schema.any(), { defaultValue: {} }), }); +const rewriteBodyReq: RewriteRequestCase = ({ + connector_type_id: actionTypeId, + name, + config, + secrets, +}) => ({ actionTypeId, name, config, secrets }); +const rewriteBodyRes: RewriteResponseCase = ({ + actionTypeId, + isPreconfigured, + ...res +}) => ({ + ...res, + connector_type_id: actionTypeId, + is_preconfigured: isPreconfigured, +}); + export const createActionRoute = ( router: IRouter, licenseState: ILicenseState ) => { router.post( { - path: `${BASE_ACTION_API_PATH}/action`, + path: `${BASE_ACTION_API_PATH}/connector`, validate: { body: bodySchema, }, }, - router.handleLegacyErrors(async function (context, req, res) { - verifyApiAccess(licenseState); - - if (!context.actions) { - return res.badRequest({ body: 'RouteHandlerContext is not registered for actions' }); - } - const actionsClient = context.actions.getActionsClient(); - const action = req.body; - try { - const actionRes: ActionResult = await actionsClient.create({ action }); + router.handleLegacyErrors( + verifyAccessAndContext(licenseState, async function (context, req, res) { + const actionsClient = context.actions.getActionsClient(); + const action = rewriteBodyReq(req.body); return res.ok({ - body: actionRes, + body: rewriteBodyRes(await actionsClient.create({ action })), }); - } catch (e) { - if (isErrorThatHandlesItsOwnResponse(e)) { - return e.sendResponse(res); - } - throw e; - } - }) + }) + ) ); }; diff --git a/x-pack/plugins/actions/server/routes/delete.test.ts b/x-pack/plugins/actions/server/routes/delete.test.ts index fa7777fb508ce..438f366e5cb73 100644 --- a/x-pack/plugins/actions/server/routes/delete.test.ts +++ b/x-pack/plugins/actions/server/routes/delete.test.ts @@ -8,16 +8,17 @@ import { deleteActionRoute } from './delete'; import { httpServiceMock } from 'src/core/server/mocks'; import { licenseStateMock } from '../lib/license_state.mock'; -import { verifyApiAccess } from '../lib'; -import { mockHandlerArguments } from './_mock_handler_arguments'; +import { mockHandlerArguments } from './legacy/_mock_handler_arguments'; import { actionsClientMock } from '../mocks'; +import { verifyAccessAndContext } from './verify_access_and_context'; -jest.mock('../lib/verify_api_access.ts', () => ({ - verifyApiAccess: jest.fn(), +jest.mock('./verify_access_and_context.ts', () => ({ + verifyAccessAndContext: jest.fn(), })); beforeEach(() => { jest.resetAllMocks(); + (verifyAccessAndContext as jest.Mock).mockImplementation((license, handler) => handler); }); describe('deleteActionRoute', () => { @@ -29,7 +30,7 @@ describe('deleteActionRoute', () => { const [config, handler] = router.delete.mock.calls[0]; - expect(config.path).toMatchInlineSnapshot(`"/api/actions/action/{id}"`); + expect(config.path).toMatchInlineSnapshot(`"/api/actions/connector/{id}"`); const actionsClient = actionsClientMock.create(); actionsClient.delete.mockResolvedValueOnce({}); @@ -78,14 +79,14 @@ describe('deleteActionRoute', () => { await handler(context, req, res); - expect(verifyApiAccess).toHaveBeenCalledWith(licenseState); + expect(verifyAccessAndContext).toHaveBeenCalledWith(licenseState, expect.any(Function)); }); it('ensures the license check prevents deleting actions', async () => { const licenseState = licenseStateMock.create(); const router = httpServiceMock.createRouter(); - (verifyApiAccess as jest.Mock).mockImplementation(() => { + (verifyAccessAndContext as jest.Mock).mockImplementation(() => async () => { throw new Error('OMG'); }); @@ -105,6 +106,6 @@ describe('deleteActionRoute', () => { expect(handler(context, req, res)).rejects.toMatchInlineSnapshot(`[Error: OMG]`); - expect(verifyApiAccess).toHaveBeenCalledWith(licenseState); + expect(verifyAccessAndContext).toHaveBeenCalledWith(licenseState, expect.any(Function)); }); }); diff --git a/x-pack/plugins/actions/server/routes/delete.ts b/x-pack/plugins/actions/server/routes/delete.ts index 84da01dd2bb20..653ce32e69eb0 100644 --- a/x-pack/plugins/actions/server/routes/delete.ts +++ b/x-pack/plugins/actions/server/routes/delete.ts @@ -7,9 +7,10 @@ import { schema } from '@kbn/config-schema'; import { IRouter } from 'kibana/server'; -import { ILicenseState, verifyApiAccess, isErrorThatHandlesItsOwnResponse } from '../lib'; +import { ILicenseState } from '../lib'; import { BASE_ACTION_API_PATH } from '../../common'; import { ActionsRequestHandlerContext } from '../types'; +import { verifyAccessAndContext } from './verify_access_and_context'; const paramSchema = schema.object({ id: schema.string(), @@ -21,27 +22,18 @@ export const deleteActionRoute = ( ) => { router.delete( { - path: `${BASE_ACTION_API_PATH}/action/{id}`, + path: `${BASE_ACTION_API_PATH}/connector/{id}`, validate: { params: paramSchema, }, }, - router.handleLegacyErrors(async function (context, req, res) { - verifyApiAccess(licenseState); - if (!context.actions) { - return res.badRequest({ body: 'RouteHandlerContext is not registered for actions' }); - } - const actionsClient = context.actions.getActionsClient(); - const { id } = req.params; - try { + router.handleLegacyErrors( + verifyAccessAndContext(licenseState, async function (context, req, res) { + const actionsClient = context.actions.getActionsClient(); + const { id } = req.params; await actionsClient.delete({ id }); return res.noContent(); - } catch (e) { - if (isErrorThatHandlesItsOwnResponse(e)) { - return e.sendResponse(res); - } - throw e; - } - }) + }) + ) ); }; diff --git a/x-pack/plugins/actions/server/routes/execute.test.ts b/x-pack/plugins/actions/server/routes/execute.test.ts index e07591f404e2f..4b12bf3111c1f 100644 --- a/x-pack/plugins/actions/server/routes/execute.test.ts +++ b/x-pack/plugins/actions/server/routes/execute.test.ts @@ -8,17 +8,19 @@ import { executeActionRoute } from './execute'; import { httpServiceMock } from 'src/core/server/mocks'; import { licenseStateMock } from '../lib/license_state.mock'; -import { mockHandlerArguments } from './_mock_handler_arguments'; -import { verifyApiAccess, ActionTypeDisabledError, asHttpRequestExecutionSource } from '../lib'; +import { mockHandlerArguments } from './legacy/_mock_handler_arguments'; +import { asHttpRequestExecutionSource } from '../lib'; import { actionsClientMock } from '../actions_client.mock'; import { ActionTypeExecutorResult } from '../types'; +import { verifyAccessAndContext } from './verify_access_and_context'; -jest.mock('../lib/verify_api_access.ts', () => ({ - verifyApiAccess: jest.fn(), +jest.mock('./verify_access_and_context.ts', () => ({ + verifyAccessAndContext: jest.fn(), })); beforeEach(() => { jest.resetAllMocks(); + (verifyAccessAndContext as jest.Mock).mockImplementation((license, handler) => handler); }); describe('executeActionRoute', () => { @@ -45,7 +47,7 @@ describe('executeActionRoute', () => { ); const executeResult = { - actionId: '1', + connector_id: '1', status: 'ok', }; @@ -53,7 +55,7 @@ describe('executeActionRoute', () => { const [config, handler] = router.post.mock.calls[0]; - expect(config.path).toMatchInlineSnapshot(`"/api/actions/action/{id}/_execute"`); + expect(config.path).toMatchInlineSnapshot(`"/api/actions/connector/{id}/_execute"`); expect(await handler(context, req, res)).toEqual({ body: executeResult }); @@ -131,7 +133,7 @@ describe('executeActionRoute', () => { await handler(context, req, res); - expect(verifyApiAccess).toHaveBeenCalledWith(licenseState); + expect(verifyAccessAndContext).toHaveBeenCalledWith(licenseState, expect.any(Function)); }); it('ensures the license check prevents action execution', async () => { @@ -144,7 +146,7 @@ describe('executeActionRoute', () => { status: 'ok', }); - (verifyApiAccess as jest.Mock).mockImplementation(() => { + (verifyAccessAndContext as jest.Mock).mockImplementation(() => async () => { throw new Error('OMG'); }); @@ -163,31 +165,6 @@ describe('executeActionRoute', () => { expect(handler(context, req, res)).rejects.toMatchInlineSnapshot(`[Error: OMG]`); - expect(verifyApiAccess).toHaveBeenCalledWith(licenseState); - }); - - it('ensures the action type gets validated for the license', async () => { - const licenseState = licenseStateMock.create(); - const router = httpServiceMock.createRouter(); - - const actionsClient = actionsClientMock.create(); - actionsClient.execute.mockRejectedValue(new ActionTypeDisabledError('Fail', 'license_invalid')); - - const [context, req, res] = mockHandlerArguments( - { actionsClient }, - { - body: {}, - params: {}, - }, - ['ok', 'forbidden'] - ); - - executeActionRoute(router, licenseState); - - const [, handler] = router.post.mock.calls[0]; - - await handler(context, req, res); - - expect(res.forbidden).toHaveBeenCalledWith({ body: { message: 'Fail' } }); + expect(verifyAccessAndContext).toHaveBeenCalledWith(licenseState, expect.any(Function)); }); }); diff --git a/x-pack/plugins/actions/server/routes/execute.ts b/x-pack/plugins/actions/server/routes/execute.ts index f87f1ee0d0890..0d1bee83ed047 100644 --- a/x-pack/plugins/actions/server/routes/execute.ts +++ b/x-pack/plugins/actions/server/routes/execute.ts @@ -7,11 +7,13 @@ import { schema } from '@kbn/config-schema'; import { IRouter } from 'kibana/server'; -import { ILicenseState, verifyApiAccess, isErrorThatHandlesItsOwnResponse } from '../lib'; +import { ILicenseState } from '../lib'; import { ActionTypeExecutorResult, ActionsRequestHandlerContext } from '../types'; import { BASE_ACTION_API_PATH } from '../../common'; import { asHttpRequestExecutionSource } from '../lib/action_execution_source'; +import { verifyAccessAndContext } from './verify_access_and_context'; +import { RewriteResponseCase } from './rewrite_request_case'; const paramSchema = schema.object({ id: schema.string(), @@ -21,29 +23,33 @@ const bodySchema = schema.object({ params: schema.recordOf(schema.string(), schema.any()), }); +const rewriteBodyRes: RewriteResponseCase> = ({ + actionId, + serviceMessage, + ...res +}) => ({ + ...res, + connector_id: actionId, + ...(serviceMessage ? { service_message: serviceMessage } : {}), +}); + export const executeActionRoute = ( router: IRouter, licenseState: ILicenseState ) => { router.post( { - path: `${BASE_ACTION_API_PATH}/action/{id}/_execute`, + path: `${BASE_ACTION_API_PATH}/connector/{id}/_execute`, validate: { body: bodySchema, params: paramSchema, }, }, - router.handleLegacyErrors(async function (context, req, res) { - verifyApiAccess(licenseState); - - if (!context.actions) { - return res.badRequest({ body: 'RouteHandlerContext is not registered for actions' }); - } - - const actionsClient = context.actions.getActionsClient(); - const { params } = req.body; - const { id } = req.params; - try { + router.handleLegacyErrors( + verifyAccessAndContext(licenseState, async function (context, req, res) { + const actionsClient = context.actions.getActionsClient(); + const { params } = req.body; + const { id } = req.params; const body: ActionTypeExecutorResult = await actionsClient.execute({ params, actionId: id, @@ -51,15 +57,10 @@ export const executeActionRoute = ( }); return body ? res.ok({ - body, + body: rewriteBodyRes(body), }) : res.noContent(); - } catch (e) { - if (isErrorThatHandlesItsOwnResponse(e)) { - return e.sendResponse(res); - } - throw e; - } - }) + }) + ) ); }; diff --git a/x-pack/plugins/actions/server/routes/get.test.ts b/x-pack/plugins/actions/server/routes/get.test.ts index d2625f8f434a5..6a42f3b27370e 100644 --- a/x-pack/plugins/actions/server/routes/get.test.ts +++ b/x-pack/plugins/actions/server/routes/get.test.ts @@ -8,16 +8,17 @@ import { getActionRoute } from './get'; import { httpServiceMock } from 'src/core/server/mocks'; import { licenseStateMock } from '../lib/license_state.mock'; -import { verifyApiAccess } from '../lib'; -import { mockHandlerArguments } from './_mock_handler_arguments'; +import { mockHandlerArguments } from './legacy/_mock_handler_arguments'; import { actionsClientMock } from '../actions_client.mock'; +import { verifyAccessAndContext } from './verify_access_and_context'; -jest.mock('../lib/verify_api_access.ts', () => ({ - verifyApiAccess: jest.fn(), +jest.mock('./verify_access_and_context.ts', () => ({ + verifyAccessAndContext: jest.fn(), })); beforeEach(() => { jest.resetAllMocks(); + (verifyAccessAndContext as jest.Mock).mockImplementation((license, handler) => handler); }); describe('getActionRoute', () => { @@ -29,7 +30,7 @@ describe('getActionRoute', () => { const [config, handler] = router.get.mock.calls[0]; - expect(config.path).toMatchInlineSnapshot(`"/api/actions/action/{id}"`); + expect(config.path).toMatchInlineSnapshot(`"/api/actions/connector/{id}"`); const getResult = { id: '1', @@ -53,10 +54,10 @@ describe('getActionRoute', () => { expect(await handler(context, req, res)).toMatchInlineSnapshot(` Object { "body": Object { - "actionTypeId": "2", "config": Object {}, + "connector_type_id": "2", "id": "1", - "isPreconfigured": false, + "is_preconfigured": false, "name": "action name", }, } @@ -66,7 +67,13 @@ describe('getActionRoute', () => { expect(actionsClient.get.mock.calls[0][0].id).toEqual('1'); expect(res.ok).toHaveBeenCalledWith({ - body: getResult, + body: { + id: '1', + connector_type_id: '2', + name: 'action name', + config: {}, + is_preconfigured: false, + }, }); }); @@ -97,14 +104,14 @@ describe('getActionRoute', () => { await handler(context, req, res); - expect(verifyApiAccess).toHaveBeenCalledWith(licenseState); + expect(verifyAccessAndContext).toHaveBeenCalledWith(licenseState, expect.any(Function)); }); it('ensures the license check prevents getting actions', async () => { const licenseState = licenseStateMock.create(); const router = httpServiceMock.createRouter(); - (verifyApiAccess as jest.Mock).mockImplementation(() => { + (verifyAccessAndContext as jest.Mock).mockImplementation(() => async () => { throw new Error('OMG'); }); @@ -131,6 +138,6 @@ describe('getActionRoute', () => { expect(handler(context, req, res)).rejects.toMatchInlineSnapshot(`[Error: OMG]`); - expect(verifyApiAccess).toHaveBeenCalledWith(licenseState); + expect(verifyAccessAndContext).toHaveBeenCalledWith(licenseState, expect.any(Function)); }); }); diff --git a/x-pack/plugins/actions/server/routes/get.ts b/x-pack/plugins/actions/server/routes/get.ts index 436b6bed9970f..63f89d6b3ca49 100644 --- a/x-pack/plugins/actions/server/routes/get.ts +++ b/x-pack/plugins/actions/server/routes/get.ts @@ -7,35 +7,45 @@ import { schema } from '@kbn/config-schema'; import { IRouter } from 'kibana/server'; -import { ILicenseState, verifyApiAccess } from '../lib'; +import { ILicenseState } from '../lib'; import { BASE_ACTION_API_PATH } from '../../common'; -import { ActionsRequestHandlerContext } from '../types'; +import { ActionResult, ActionsRequestHandlerContext } from '../types'; +import { verifyAccessAndContext } from './verify_access_and_context'; +import { RewriteResponseCase } from './rewrite_request_case'; const paramSchema = schema.object({ id: schema.string(), }); +const rewriteBodyRes: RewriteResponseCase = ({ + actionTypeId, + isPreconfigured, + ...res +}) => ({ + ...res, + connector_type_id: actionTypeId, + is_preconfigured: isPreconfigured, +}); + export const getActionRoute = ( router: IRouter, licenseState: ILicenseState ) => { router.get( { - path: `${BASE_ACTION_API_PATH}/action/{id}`, + path: `${BASE_ACTION_API_PATH}/connector/{id}`, validate: { params: paramSchema, }, }, - router.handleLegacyErrors(async function (context, req, res) { - verifyApiAccess(licenseState); - if (!context.actions) { - return res.badRequest({ body: 'RouteHandlerContext is not registered for actions' }); - } - const actionsClient = context.actions.getActionsClient(); - const { id } = req.params; - return res.ok({ - body: await actionsClient.get({ id }), - }); - }) + router.handleLegacyErrors( + verifyAccessAndContext(licenseState, async function (context, req, res) { + const actionsClient = context.actions.getActionsClient(); + const { id } = req.params; + return res.ok({ + body: rewriteBodyRes(await actionsClient.get({ id })), + }); + }) + ) ); }; diff --git a/x-pack/plugins/actions/server/routes/get_all.test.ts b/x-pack/plugins/actions/server/routes/get_all.test.ts index c57a2ef6d7526..69684457f3dd8 100644 --- a/x-pack/plugins/actions/server/routes/get_all.test.ts +++ b/x-pack/plugins/actions/server/routes/get_all.test.ts @@ -8,16 +8,17 @@ import { getAllActionRoute } from './get_all'; import { httpServiceMock } from 'src/core/server/mocks'; import { licenseStateMock } from '../lib/license_state.mock'; -import { verifyApiAccess } from '../lib'; -import { mockHandlerArguments } from './_mock_handler_arguments'; +import { mockHandlerArguments } from './legacy/_mock_handler_arguments'; import { actionsClientMock } from '../actions_client.mock'; +import { verifyAccessAndContext } from './verify_access_and_context'; -jest.mock('../lib/verify_api_access.ts', () => ({ - verifyApiAccess: jest.fn(), +jest.mock('./verify_access_and_context.ts', () => ({ + verifyAccessAndContext: jest.fn(), })); beforeEach(() => { jest.resetAllMocks(); + (verifyAccessAndContext as jest.Mock).mockImplementation((license, handler) => handler); }); describe('getAllActionRoute', () => { @@ -29,7 +30,7 @@ describe('getAllActionRoute', () => { const [config, handler] = router.get.mock.calls[0]; - expect(config.path).toMatchInlineSnapshot(`"/api/actions"`); + expect(config.path).toMatchInlineSnapshot(`"/api/actions/connectors"`); const actionsClient = actionsClientMock.create(); actionsClient.getAll.mockResolvedValueOnce([]); @@ -57,7 +58,7 @@ describe('getAllActionRoute', () => { const [config, handler] = router.get.mock.calls[0]; - expect(config.path).toMatchInlineSnapshot(`"/api/actions"`); + expect(config.path).toMatchInlineSnapshot(`"/api/actions/connectors"`); const actionsClient = actionsClientMock.create(); actionsClient.getAll.mockResolvedValueOnce([]); @@ -66,14 +67,14 @@ describe('getAllActionRoute', () => { await handler(context, req, res); - expect(verifyApiAccess).toHaveBeenCalledWith(licenseState); + expect(verifyAccessAndContext).toHaveBeenCalledWith(licenseState, expect.any(Function)); }); it('ensures the license check prevents getting all actions', async () => { const licenseState = licenseStateMock.create(); const router = httpServiceMock.createRouter(); - (verifyApiAccess as jest.Mock).mockImplementation(() => { + (verifyAccessAndContext as jest.Mock).mockImplementation(() => async () => { throw new Error('OMG'); }); @@ -81,7 +82,7 @@ describe('getAllActionRoute', () => { const [config, handler] = router.get.mock.calls[0]; - expect(config.path).toMatchInlineSnapshot(`"/api/actions"`); + expect(config.path).toMatchInlineSnapshot(`"/api/actions/connectors"`); const actionsClient = actionsClientMock.create(); actionsClient.getAll.mockResolvedValueOnce([]); @@ -90,6 +91,6 @@ describe('getAllActionRoute', () => { expect(handler(context, req, res)).rejects.toMatchInlineSnapshot(`[Error: OMG]`); - expect(verifyApiAccess).toHaveBeenCalledWith(licenseState); + expect(verifyAccessAndContext).toHaveBeenCalledWith(licenseState, expect.any(Function)); }); }); diff --git a/x-pack/plugins/actions/server/routes/get_all.ts b/x-pack/plugins/actions/server/routes/get_all.ts index 825950fa3412c..32f48e32ab278 100644 --- a/x-pack/plugins/actions/server/routes/get_all.ts +++ b/x-pack/plugins/actions/server/routes/get_all.ts @@ -6,9 +6,20 @@ */ import { IRouter } from 'kibana/server'; -import { ILicenseState, verifyApiAccess } from '../lib'; +import { ILicenseState } from '../lib'; import { BASE_ACTION_API_PATH } from '../../common'; -import { ActionsRequestHandlerContext } from '../types'; +import { ActionsRequestHandlerContext, FindActionResult } from '../types'; +import { verifyAccessAndContext } from './verify_access_and_context'; +import { RewriteResponseCase } from './rewrite_request_case'; + +const rewriteBodyRes: RewriteResponseCase = (results) => { + return results.map(({ actionTypeId, isPreconfigured, referencedByCount, ...res }) => ({ + ...res, + connector_type_id: actionTypeId, + is_preconfigured: isPreconfigured, + referenced_by_count: referencedByCount, + })); +}; export const getAllActionRoute = ( router: IRouter, @@ -16,19 +27,17 @@ export const getAllActionRoute = ( ) => { router.get( { - path: `${BASE_ACTION_API_PATH}`, + path: `${BASE_ACTION_API_PATH}/connectors`, validate: {}, }, - router.handleLegacyErrors(async function (context, req, res) { - verifyApiAccess(licenseState); - if (!context.actions) { - return res.badRequest({ body: 'RouteHandlerContext is not registered for actions' }); - } - const actionsClient = context.actions.getActionsClient(); - const result = await actionsClient.getAll(); - return res.ok({ - body: result, - }); - }) + router.handleLegacyErrors( + verifyAccessAndContext(licenseState, async function (context, req, res) { + const actionsClient = context.actions.getActionsClient(); + const result = await actionsClient.getAll(); + return res.ok({ + body: rewriteBodyRes(result), + }); + }) + ) ); }; diff --git a/x-pack/plugins/actions/server/routes/index.ts b/x-pack/plugins/actions/server/routes/index.ts index 14f71269db5ff..a236e514ef78d 100644 --- a/x-pack/plugins/actions/server/routes/index.ts +++ b/x-pack/plugins/actions/server/routes/index.ts @@ -5,10 +5,29 @@ * 2.0. */ -export { createActionRoute } from './create'; -export { deleteActionRoute } from './delete'; -export { getAllActionRoute } from './get_all'; -export { getActionRoute } from './get'; -export { updateActionRoute } from './update'; -export { listActionTypesRoute } from './list_action_types'; -export { executeActionRoute } from './execute'; +import { IRouter } from 'kibana/server'; +import { ILicenseState } from '../lib'; +import { ActionsRequestHandlerContext } from '../types'; +import { createActionRoute } from './create'; +import { deleteActionRoute } from './delete'; +import { executeActionRoute } from './execute'; +import { getActionRoute } from './get'; +import { getAllActionRoute } from './get_all'; +import { connectorTypesRoute } from './connector_types'; +import { updateActionRoute } from './update'; +import { defineLegacyRoutes } from './legacy'; + +export function defineRoutes( + router: IRouter, + licenseState: ILicenseState +) { + defineLegacyRoutes(router, licenseState); + + createActionRoute(router, licenseState); + deleteActionRoute(router, licenseState); + getActionRoute(router, licenseState); + getAllActionRoute(router, licenseState); + updateActionRoute(router, licenseState); + connectorTypesRoute(router, licenseState); + executeActionRoute(router, licenseState); +} diff --git a/x-pack/plugins/actions/server/routes/_mock_handler_arguments.ts b/x-pack/plugins/actions/server/routes/legacy/_mock_handler_arguments.ts similarity index 75% rename from x-pack/plugins/actions/server/routes/_mock_handler_arguments.ts rename to x-pack/plugins/actions/server/routes/legacy/_mock_handler_arguments.ts index c27699ba665dc..2a2452b02cc7d 100644 --- a/x-pack/plugins/actions/server/routes/_mock_handler_arguments.ts +++ b/x-pack/plugins/actions/server/routes/legacy/_mock_handler_arguments.ts @@ -5,12 +5,13 @@ * 2.0. */ -import { RequestHandlerContext, KibanaRequest, KibanaResponseFactory } from 'kibana/server'; +import { KibanaRequest, KibanaResponseFactory } from 'kibana/server'; import { identity } from 'lodash'; import type { MethodKeysOf } from '@kbn/utility-types'; -import { httpServerMock } from '../../../../../src/core/server/mocks'; -import { ActionType } from '../../common'; -import { ActionsClientMock, actionsClientMock } from '../actions_client.mock'; +import { httpServerMock } from '../../../../../../src/core/server/mocks'; +import { ActionType } from '../../../common'; +import { ActionsClientMock, actionsClientMock } from '../../actions_client.mock'; +import { ActionsRequestHandlerContext } from '../../types'; export function mockHandlerArguments( { @@ -19,7 +20,7 @@ export function mockHandlerArguments( }: { actionsClient?: ActionsClientMock; listTypes?: ActionType[] }, req: unknown, res?: Array> -): [RequestHandlerContext, KibanaRequest, KibanaResponseFactory] { +): [ActionsRequestHandlerContext, KibanaRequest, KibanaResponseFactory] { const listTypes = jest.fn(() => listTypesRes); return [ ({ @@ -37,7 +38,7 @@ export function mockHandlerArguments( ); }, }, - } as unknown) as RequestHandlerContext, + } as unknown) as ActionsRequestHandlerContext, req as KibanaRequest, mockResponseFactory(res), ]; diff --git a/x-pack/plugins/actions/server/routes/legacy/create.test.ts b/x-pack/plugins/actions/server/routes/legacy/create.test.ts new file mode 100644 index 0000000000000..3993319d1471f --- /dev/null +++ b/x-pack/plugins/actions/server/routes/legacy/create.test.ts @@ -0,0 +1,131 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { createActionRoute } from './create'; +import { httpServiceMock } from 'src/core/server/mocks'; +import { licenseStateMock } from '../../lib/license_state.mock'; +import { mockHandlerArguments } from './_mock_handler_arguments'; +import { actionsClientMock } from '../../actions_client.mock'; +import { verifyAccessAndContext } from '../verify_access_and_context'; + +jest.mock('../verify_access_and_context.ts', () => ({ + verifyAccessAndContext: jest.fn(), +})); + +beforeEach(() => { + jest.resetAllMocks(); + (verifyAccessAndContext as jest.Mock).mockImplementation((license, handler) => handler); +}); + +describe('createActionRoute', () => { + it('creates an action with proper parameters', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + createActionRoute(router, licenseState); + + const [config, handler] = router.post.mock.calls[0]; + + expect(config.path).toMatchInlineSnapshot(`"/api/actions/action"`); + + const createResult = { + id: '1', + name: 'My name', + actionTypeId: 'abc', + config: { foo: true }, + isPreconfigured: false, + }; + + const actionsClient = actionsClientMock.create(); + actionsClient.create.mockResolvedValueOnce(createResult); + + const [context, req, res] = mockHandlerArguments( + { actionsClient }, + { + body: { + name: 'My name', + actionTypeId: 'abc', + config: { foo: true }, + secrets: {}, + }, + }, + ['ok'] + ); + + expect(await handler(context, req, res)).toEqual({ body: createResult }); + + expect(actionsClient.create).toHaveBeenCalledTimes(1); + expect(actionsClient.create.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + Object { + "action": Object { + "actionTypeId": "abc", + "config": Object { + "foo": true, + }, + "name": "My name", + "secrets": Object {}, + }, + }, + ] + `); + + expect(res.ok).toHaveBeenCalledWith({ + body: createResult, + }); + }); + + it('ensures the license allows creating actions', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + createActionRoute(router, licenseState); + + const [, handler] = router.post.mock.calls[0]; + + const actionsClient = actionsClientMock.create(); + actionsClient.create.mockResolvedValueOnce({ + id: '1', + name: 'My name', + actionTypeId: 'abc', + config: { foo: true }, + isPreconfigured: false, + }); + + const [context, req, res] = mockHandlerArguments({ actionsClient }, {}); + + await handler(context, req, res); + + expect(verifyAccessAndContext).toHaveBeenCalledWith(licenseState, expect.any(Function)); + }); + + it('ensures the license check prevents creating actions', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + (verifyAccessAndContext as jest.Mock).mockImplementation(() => async () => { + throw new Error('OMG'); + }); + + createActionRoute(router, licenseState); + + const [, handler] = router.post.mock.calls[0]; + + const actionsClient = actionsClientMock.create(); + actionsClient.create.mockResolvedValueOnce({ + id: '1', + name: 'My name', + actionTypeId: 'abc', + config: { foo: true }, + isPreconfigured: false, + }); + + const [context, req, res] = mockHandlerArguments({ actionsClient }, {}); + + expect(handler(context, req, res)).rejects.toMatchInlineSnapshot(`[Error: OMG]`); + }); +}); diff --git a/x-pack/plugins/actions/server/routes/legacy/create.ts b/x-pack/plugins/actions/server/routes/legacy/create.ts new file mode 100644 index 0000000000000..caed699641673 --- /dev/null +++ b/x-pack/plugins/actions/server/routes/legacy/create.ts @@ -0,0 +1,43 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { schema } from '@kbn/config-schema'; +import { IRouter } from 'kibana/server'; +import { ActionsRequestHandlerContext } from '../../types'; +import { ILicenseState } from '../../lib'; +import { BASE_ACTION_API_PATH } from '../../../common'; +import { verifyAccessAndContext } from '../verify_access_and_context'; + +export const bodySchema = schema.object({ + name: schema.string(), + actionTypeId: schema.string(), + config: schema.recordOf(schema.string(), schema.any(), { defaultValue: {} }), + secrets: schema.recordOf(schema.string(), schema.any(), { defaultValue: {} }), +}); + +export const createActionRoute = ( + router: IRouter, + licenseState: ILicenseState +) => { + router.post( + { + path: `${BASE_ACTION_API_PATH}/action`, + validate: { + body: bodySchema, + }, + }, + router.handleLegacyErrors( + verifyAccessAndContext(licenseState, async function (context, req, res) { + const actionsClient = context.actions.getActionsClient(); + const action = req.body; + return res.ok({ + body: await actionsClient.create({ action }), + }); + }) + ) + ); +}; diff --git a/x-pack/plugins/actions/server/routes/legacy/delete.test.ts b/x-pack/plugins/actions/server/routes/legacy/delete.test.ts new file mode 100644 index 0000000000000..cee78d998d62a --- /dev/null +++ b/x-pack/plugins/actions/server/routes/legacy/delete.test.ts @@ -0,0 +1,110 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { deleteActionRoute } from './delete'; +import { httpServiceMock } from 'src/core/server/mocks'; +import { licenseStateMock } from '../../lib/license_state.mock'; +import { verifyApiAccess } from '../../lib'; +import { mockHandlerArguments } from './_mock_handler_arguments'; +import { actionsClientMock } from '../../mocks'; + +jest.mock('../../lib/verify_api_access.ts', () => ({ + verifyApiAccess: jest.fn(), +})); + +beforeEach(() => { + jest.resetAllMocks(); +}); + +describe('deleteActionRoute', () => { + it('deletes an action with proper parameters', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + deleteActionRoute(router, licenseState); + + const [config, handler] = router.delete.mock.calls[0]; + + expect(config.path).toMatchInlineSnapshot(`"/api/actions/action/{id}"`); + + const actionsClient = actionsClientMock.create(); + actionsClient.delete.mockResolvedValueOnce({}); + + const [context, req, res] = mockHandlerArguments( + { actionsClient }, + { + params: { + id: '1', + }, + }, + ['noContent'] + ); + + expect(await handler(context, req, res)).toEqual(undefined); + + expect(actionsClient.delete).toHaveBeenCalledTimes(1); + expect(actionsClient.delete.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + Object { + "id": "1", + }, + ] + `); + + expect(res.noContent).toHaveBeenCalled(); + }); + + it('ensures the license allows deleting actions', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + deleteActionRoute(router, licenseState); + + const [, handler] = router.delete.mock.calls[0]; + + const actionsClient = actionsClientMock.create(); + actionsClient.delete.mockResolvedValueOnce({}); + + const [context, req, res] = mockHandlerArguments( + { actionsClient }, + { + params: { id: '1' }, + } + ); + + await handler(context, req, res); + + expect(verifyApiAccess).toHaveBeenCalledWith(licenseState); + }); + + it('ensures the license check prevents deleting actions', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + (verifyApiAccess as jest.Mock).mockImplementation(() => { + throw new Error('OMG'); + }); + + deleteActionRoute(router, licenseState); + + const [, handler] = router.delete.mock.calls[0]; + + const actionsClient = actionsClientMock.create(); + actionsClient.delete.mockResolvedValueOnce({}); + + const [context, req, res] = mockHandlerArguments( + { actionsClient }, + { + id: '1', + } + ); + + expect(handler(context, req, res)).rejects.toMatchInlineSnapshot(`[Error: OMG]`); + + expect(verifyApiAccess).toHaveBeenCalledWith(licenseState); + }); +}); diff --git a/x-pack/plugins/actions/server/routes/legacy/delete.ts b/x-pack/plugins/actions/server/routes/legacy/delete.ts new file mode 100644 index 0000000000000..9b3c449607b4a --- /dev/null +++ b/x-pack/plugins/actions/server/routes/legacy/delete.ts @@ -0,0 +1,47 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { schema } from '@kbn/config-schema'; +import { IRouter } from 'kibana/server'; +import { ILicenseState, verifyApiAccess, isErrorThatHandlesItsOwnResponse } from '../../lib'; +import { BASE_ACTION_API_PATH } from '../../../common'; +import { ActionsRequestHandlerContext } from '../../types'; + +const paramSchema = schema.object({ + id: schema.string(), +}); + +export const deleteActionRoute = ( + router: IRouter, + licenseState: ILicenseState +) => { + router.delete( + { + path: `${BASE_ACTION_API_PATH}/action/{id}`, + validate: { + params: paramSchema, + }, + }, + router.handleLegacyErrors(async function (context, req, res) { + verifyApiAccess(licenseState); + if (!context.actions) { + return res.badRequest({ body: 'RouteHandlerContext is not registered for actions' }); + } + const actionsClient = context.actions.getActionsClient(); + const { id } = req.params; + try { + await actionsClient.delete({ id }); + return res.noContent(); + } catch (e) { + if (isErrorThatHandlesItsOwnResponse(e)) { + return e.sendResponse(res); + } + throw e; + } + }) + ); +}; diff --git a/x-pack/plugins/actions/server/routes/legacy/execute.test.ts b/x-pack/plugins/actions/server/routes/legacy/execute.test.ts new file mode 100644 index 0000000000000..2ac53ddaaedf6 --- /dev/null +++ b/x-pack/plugins/actions/server/routes/legacy/execute.test.ts @@ -0,0 +1,193 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { executeActionRoute } from './execute'; +import { httpServiceMock } from 'src/core/server/mocks'; +import { licenseStateMock } from '../../lib/license_state.mock'; +import { mockHandlerArguments } from './_mock_handler_arguments'; +import { verifyApiAccess, ActionTypeDisabledError, asHttpRequestExecutionSource } from '../../lib'; +import { actionsClientMock } from '../../actions_client.mock'; +import { ActionTypeExecutorResult } from '../../types'; + +jest.mock('../../lib/verify_api_access.ts', () => ({ + verifyApiAccess: jest.fn(), +})); + +beforeEach(() => { + jest.resetAllMocks(); +}); + +describe('executeActionRoute', () => { + it('executes an action with proper parameters', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + const actionsClient = actionsClientMock.create(); + actionsClient.execute.mockResolvedValueOnce({ status: 'ok', actionId: '1' }); + + const [context, req, res] = mockHandlerArguments( + { actionsClient }, + { + body: { + params: { + someData: 'data', + }, + }, + params: { + id: '1', + }, + }, + ['ok'] + ); + + const executeResult = { + actionId: '1', + status: 'ok', + }; + + executeActionRoute(router, licenseState); + + const [config, handler] = router.post.mock.calls[0]; + + expect(config.path).toMatchInlineSnapshot(`"/api/actions/action/{id}/_execute"`); + + expect(await handler(context, req, res)).toEqual({ body: executeResult }); + + expect(actionsClient.execute).toHaveBeenCalledWith({ + actionId: '1', + params: { + someData: 'data', + }, + source: asHttpRequestExecutionSource(req), + }); + + expect(res.ok).toHaveBeenCalled(); + }); + + it('returns a "204 NO CONTENT" when the executor returns a nullish value', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + const actionsClient = actionsClientMock.create(); + actionsClient.execute.mockResolvedValueOnce( + (null as unknown) as ActionTypeExecutorResult + ); + + const [context, req, res] = mockHandlerArguments( + { actionsClient }, + { + body: { + params: {}, + }, + params: { + id: '1', + }, + }, + ['noContent'] + ); + + executeActionRoute(router, licenseState); + + const [, handler] = router.post.mock.calls[0]; + + expect(await handler(context, req, res)).toEqual(undefined); + + expect(actionsClient.execute).toHaveBeenCalledWith({ + actionId: '1', + params: {}, + source: asHttpRequestExecutionSource(req), + }); + + expect(res.ok).not.toHaveBeenCalled(); + expect(res.noContent).toHaveBeenCalled(); + }); + + it('ensures the license allows action execution', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + const actionsClient = actionsClientMock.create(); + actionsClient.execute.mockResolvedValue({ + actionId: '1', + status: 'ok', + }); + + const [context, req, res] = mockHandlerArguments( + { actionsClient }, + { + body: {}, + params: {}, + }, + ['ok'] + ); + + executeActionRoute(router, licenseState); + + const [, handler] = router.post.mock.calls[0]; + + await handler(context, req, res); + + expect(verifyApiAccess).toHaveBeenCalledWith(licenseState); + }); + + it('ensures the license check prevents action execution', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + const actionsClient = actionsClientMock.create(); + actionsClient.execute.mockResolvedValue({ + actionId: '1', + status: 'ok', + }); + + (verifyApiAccess as jest.Mock).mockImplementation(() => { + throw new Error('OMG'); + }); + + const [context, req, res] = mockHandlerArguments( + { actionsClient }, + { + body: {}, + params: {}, + }, + ['ok'] + ); + + executeActionRoute(router, licenseState); + + const [, handler] = router.post.mock.calls[0]; + + expect(handler(context, req, res)).rejects.toMatchInlineSnapshot(`[Error: OMG]`); + + expect(verifyApiAccess).toHaveBeenCalledWith(licenseState); + }); + + it('ensures the action type gets validated for the license', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + const actionsClient = actionsClientMock.create(); + actionsClient.execute.mockRejectedValue(new ActionTypeDisabledError('Fail', 'license_invalid')); + + const [context, req, res] = mockHandlerArguments( + { actionsClient }, + { + body: {}, + params: {}, + }, + ['ok', 'forbidden'] + ); + + executeActionRoute(router, licenseState); + + const [, handler] = router.post.mock.calls[0]; + + await handler(context, req, res); + + expect(res.forbidden).toHaveBeenCalledWith({ body: { message: 'Fail' } }); + }); +}); diff --git a/x-pack/plugins/actions/server/routes/legacy/execute.ts b/x-pack/plugins/actions/server/routes/legacy/execute.ts new file mode 100644 index 0000000000000..f6ddec1d01c20 --- /dev/null +++ b/x-pack/plugins/actions/server/routes/legacy/execute.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 { schema } from '@kbn/config-schema'; +import { IRouter } from 'kibana/server'; +import { ILicenseState, verifyApiAccess, isErrorThatHandlesItsOwnResponse } from '../../lib'; + +import { ActionTypeExecutorResult, ActionsRequestHandlerContext } from '../../types'; +import { BASE_ACTION_API_PATH } from '../../../common'; +import { asHttpRequestExecutionSource } from '../../lib/action_execution_source'; + +const paramSchema = schema.object({ + id: schema.string(), +}); + +const bodySchema = schema.object({ + params: schema.recordOf(schema.string(), schema.any()), +}); + +export const executeActionRoute = ( + router: IRouter, + licenseState: ILicenseState +) => { + router.post( + { + path: `${BASE_ACTION_API_PATH}/action/{id}/_execute`, + validate: { + body: bodySchema, + params: paramSchema, + }, + }, + router.handleLegacyErrors(async function (context, req, res) { + verifyApiAccess(licenseState); + + if (!context.actions) { + return res.badRequest({ body: 'RouteHandlerContext is not registered for actions' }); + } + + const actionsClient = context.actions.getActionsClient(); + const { params } = req.body; + const { id } = req.params; + try { + const body: ActionTypeExecutorResult = await actionsClient.execute({ + params, + actionId: id, + source: asHttpRequestExecutionSource(req), + }); + return body + ? res.ok({ + body, + }) + : res.noContent(); + } catch (e) { + if (isErrorThatHandlesItsOwnResponse(e)) { + return e.sendResponse(res); + } + throw e; + } + }) + ); +}; diff --git a/x-pack/plugins/actions/server/routes/legacy/get.test.ts b/x-pack/plugins/actions/server/routes/legacy/get.test.ts new file mode 100644 index 0000000000000..4d1265030141f --- /dev/null +++ b/x-pack/plugins/actions/server/routes/legacy/get.test.ts @@ -0,0 +1,136 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { getActionRoute } from './get'; +import { httpServiceMock } from 'src/core/server/mocks'; +import { licenseStateMock } from '../../lib/license_state.mock'; +import { verifyApiAccess } from '../../lib'; +import { mockHandlerArguments } from './_mock_handler_arguments'; +import { actionsClientMock } from '../../actions_client.mock'; + +jest.mock('../../lib/verify_api_access.ts', () => ({ + verifyApiAccess: jest.fn(), +})); + +beforeEach(() => { + jest.resetAllMocks(); +}); + +describe('getActionRoute', () => { + it('gets an action with proper parameters', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + getActionRoute(router, licenseState); + + const [config, handler] = router.get.mock.calls[0]; + + expect(config.path).toMatchInlineSnapshot(`"/api/actions/action/{id}"`); + + const getResult = { + id: '1', + actionTypeId: '2', + name: 'action name', + config: {}, + isPreconfigured: false, + }; + + const actionsClient = actionsClientMock.create(); + actionsClient.get.mockResolvedValueOnce(getResult); + + const [context, req, res] = mockHandlerArguments( + { actionsClient }, + { + params: { id: '1' }, + }, + ['ok'] + ); + + expect(await handler(context, req, res)).toMatchInlineSnapshot(` + Object { + "body": Object { + "actionTypeId": "2", + "config": Object {}, + "id": "1", + "isPreconfigured": false, + "name": "action name", + }, + } + `); + + expect(actionsClient.get).toHaveBeenCalledTimes(1); + expect(actionsClient.get.mock.calls[0][0].id).toEqual('1'); + + expect(res.ok).toHaveBeenCalledWith({ + body: getResult, + }); + }); + + it('ensures the license allows getting actions', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + getActionRoute(router, licenseState); + + const [, handler] = router.get.mock.calls[0]; + + const actionsClient = actionsClientMock.create(); + actionsClient.get.mockResolvedValueOnce({ + id: '1', + actionTypeId: '2', + name: 'action name', + config: {}, + isPreconfigured: false, + }); + + const [context, req, res] = mockHandlerArguments( + { actionsClient }, + { + params: { id: '1' }, + }, + ['ok'] + ); + + await handler(context, req, res); + + expect(verifyApiAccess).toHaveBeenCalledWith(licenseState); + }); + + it('ensures the license check prevents getting actions', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + (verifyApiAccess as jest.Mock).mockImplementation(() => { + throw new Error('OMG'); + }); + + getActionRoute(router, licenseState); + + const [, handler] = router.get.mock.calls[0]; + + const actionsClient = actionsClientMock.create(); + actionsClient.get.mockResolvedValueOnce({ + id: '1', + actionTypeId: '2', + name: 'action name', + config: {}, + isPreconfigured: false, + }); + + const [context, req, res] = mockHandlerArguments( + { actionsClient }, + { + params: { id: '1' }, + }, + ['ok'] + ); + + expect(handler(context, req, res)).rejects.toMatchInlineSnapshot(`[Error: OMG]`); + + expect(verifyApiAccess).toHaveBeenCalledWith(licenseState); + }); +}); diff --git a/x-pack/plugins/actions/server/routes/legacy/get.ts b/x-pack/plugins/actions/server/routes/legacy/get.ts new file mode 100644 index 0000000000000..44780d4f8a14b --- /dev/null +++ b/x-pack/plugins/actions/server/routes/legacy/get.ts @@ -0,0 +1,41 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { schema } from '@kbn/config-schema'; +import { IRouter } from 'kibana/server'; +import { ILicenseState, verifyApiAccess } from '../../lib'; +import { BASE_ACTION_API_PATH } from '../../../common'; +import { ActionsRequestHandlerContext } from '../../types'; + +const paramSchema = schema.object({ + id: schema.string(), +}); + +export const getActionRoute = ( + router: IRouter, + licenseState: ILicenseState +) => { + router.get( + { + path: `${BASE_ACTION_API_PATH}/action/{id}`, + validate: { + params: paramSchema, + }, + }, + router.handleLegacyErrors(async function (context, req, res) { + verifyApiAccess(licenseState); + if (!context.actions) { + return res.badRequest({ body: 'RouteHandlerContext is not registered for actions' }); + } + const actionsClient = context.actions.getActionsClient(); + const { id } = req.params; + return res.ok({ + body: await actionsClient.get({ id }), + }); + }) + ); +}; diff --git a/x-pack/plugins/actions/server/routes/legacy/get_all.test.ts b/x-pack/plugins/actions/server/routes/legacy/get_all.test.ts new file mode 100644 index 0000000000000..7f1003e564614 --- /dev/null +++ b/x-pack/plugins/actions/server/routes/legacy/get_all.test.ts @@ -0,0 +1,95 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { getAllActionRoute } from './get_all'; +import { httpServiceMock } from 'src/core/server/mocks'; +import { licenseStateMock } from '../../lib/license_state.mock'; +import { verifyApiAccess } from '../../lib'; +import { mockHandlerArguments } from './_mock_handler_arguments'; +import { actionsClientMock } from '../../actions_client.mock'; + +jest.mock('../../lib/verify_api_access.ts', () => ({ + verifyApiAccess: jest.fn(), +})); + +beforeEach(() => { + jest.resetAllMocks(); +}); + +describe('getAllActionRoute', () => { + it('get all actions with proper parameters', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + getAllActionRoute(router, licenseState); + + const [config, handler] = router.get.mock.calls[0]; + + expect(config.path).toMatchInlineSnapshot(`"/api/actions"`); + + const actionsClient = actionsClientMock.create(); + actionsClient.getAll.mockResolvedValueOnce([]); + + const [context, req, res] = mockHandlerArguments({ actionsClient }, {}, ['ok']); + + expect(await handler(context, req, res)).toMatchInlineSnapshot(` + Object { + "body": Array [], + } + `); + + expect(actionsClient.getAll).toHaveBeenCalledTimes(1); + + expect(res.ok).toHaveBeenCalledWith({ + body: [], + }); + }); + + it('ensures the license allows getting all actions', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + getAllActionRoute(router, licenseState); + + const [config, handler] = router.get.mock.calls[0]; + + expect(config.path).toMatchInlineSnapshot(`"/api/actions"`); + + const actionsClient = actionsClientMock.create(); + actionsClient.getAll.mockResolvedValueOnce([]); + + const [context, req, res] = mockHandlerArguments({ actionsClient }, {}, ['ok']); + + await handler(context, req, res); + + expect(verifyApiAccess).toHaveBeenCalledWith(licenseState); + }); + + it('ensures the license check prevents getting all actions', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + (verifyApiAccess as jest.Mock).mockImplementation(() => { + throw new Error('OMG'); + }); + + getAllActionRoute(router, licenseState); + + const [config, handler] = router.get.mock.calls[0]; + + expect(config.path).toMatchInlineSnapshot(`"/api/actions"`); + + const actionsClient = actionsClientMock.create(); + actionsClient.getAll.mockResolvedValueOnce([]); + + const [context, req, res] = mockHandlerArguments({ actionsClient }, {}, ['ok']); + + expect(handler(context, req, res)).rejects.toMatchInlineSnapshot(`[Error: OMG]`); + + expect(verifyApiAccess).toHaveBeenCalledWith(licenseState); + }); +}); diff --git a/x-pack/plugins/actions/server/routes/legacy/get_all.ts b/x-pack/plugins/actions/server/routes/legacy/get_all.ts new file mode 100644 index 0000000000000..9ea5024d8672b --- /dev/null +++ b/x-pack/plugins/actions/server/routes/legacy/get_all.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 { IRouter } from 'kibana/server'; +import { ILicenseState, verifyApiAccess } from '../../lib'; +import { BASE_ACTION_API_PATH } from '../../../common'; +import { ActionsRequestHandlerContext } from '../../types'; + +export const getAllActionRoute = ( + router: IRouter, + licenseState: ILicenseState +) => { + router.get( + { + path: `${BASE_ACTION_API_PATH}`, + validate: {}, + }, + router.handleLegacyErrors(async function (context, req, res) { + verifyApiAccess(licenseState); + if (!context.actions) { + return res.badRequest({ body: 'RouteHandlerContext is not registered for actions' }); + } + const actionsClient = context.actions.getActionsClient(); + const result = await actionsClient.getAll(); + return res.ok({ + body: result, + }); + }) + ); +}; diff --git a/x-pack/plugins/actions/server/routes/legacy/index.ts b/x-pack/plugins/actions/server/routes/legacy/index.ts new file mode 100644 index 0000000000000..1a22cd9be5681 --- /dev/null +++ b/x-pack/plugins/actions/server/routes/legacy/index.ts @@ -0,0 +1,30 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { IRouter } from 'kibana/server'; +import { ILicenseState } from '../../lib'; +import { ActionsRequestHandlerContext } from '../../types'; +import { createActionRoute } from './create'; +import { deleteActionRoute } from './delete'; +import { getAllActionRoute } from './get_all'; +import { getActionRoute } from './get'; +import { updateActionRoute } from './update'; +import { listActionTypesRoute } from './list_action_types'; +import { executeActionRoute } from './execute'; + +export function defineLegacyRoutes( + router: IRouter, + licenseState: ILicenseState +) { + createActionRoute(router, licenseState); + deleteActionRoute(router, licenseState); + getActionRoute(router, licenseState); + getAllActionRoute(router, licenseState); + updateActionRoute(router, licenseState); + listActionTypesRoute(router, licenseState); + executeActionRoute(router, licenseState); +} diff --git a/x-pack/plugins/actions/server/routes/list_action_types.test.ts b/x-pack/plugins/actions/server/routes/legacy/list_action_types.test.ts similarity index 93% rename from x-pack/plugins/actions/server/routes/list_action_types.test.ts rename to x-pack/plugins/actions/server/routes/legacy/list_action_types.test.ts index 102805e019420..e49dd251136ad 100644 --- a/x-pack/plugins/actions/server/routes/list_action_types.test.ts +++ b/x-pack/plugins/actions/server/routes/legacy/list_action_types.test.ts @@ -7,13 +7,13 @@ import { listActionTypesRoute } from './list_action_types'; import { httpServiceMock } from 'src/core/server/mocks'; -import { licenseStateMock } from '../lib/license_state.mock'; -import { verifyApiAccess } from '../lib'; +import { licenseStateMock } from '../../lib/license_state.mock'; +import { verifyApiAccess } from '../../lib'; import { mockHandlerArguments } from './_mock_handler_arguments'; -import { LicenseType } from '../../../../plugins/licensing/server'; -import { actionsClientMock } from '../mocks'; +import { LicenseType } from '../../../../../plugins/licensing/server'; +import { actionsClientMock } from '../../mocks'; -jest.mock('../lib/verify_api_access.ts', () => ({ +jest.mock('../../lib/verify_api_access.ts', () => ({ verifyApiAccess: jest.fn(), })); diff --git a/x-pack/plugins/actions/server/routes/list_action_types.ts b/x-pack/plugins/actions/server/routes/legacy/list_action_types.ts similarity index 83% rename from x-pack/plugins/actions/server/routes/list_action_types.ts rename to x-pack/plugins/actions/server/routes/legacy/list_action_types.ts index 72aba7b6dbbd2..814f5fffd35ff 100644 --- a/x-pack/plugins/actions/server/routes/list_action_types.ts +++ b/x-pack/plugins/actions/server/routes/legacy/list_action_types.ts @@ -6,9 +6,9 @@ */ import { IRouter } from 'kibana/server'; -import { ILicenseState, verifyApiAccess } from '../lib'; -import { BASE_ACTION_API_PATH } from '../../common'; -import { ActionsRequestHandlerContext } from '../types'; +import { ILicenseState, verifyApiAccess } from '../../lib'; +import { BASE_ACTION_API_PATH } from '../../../common'; +import { ActionsRequestHandlerContext } from '../../types'; export const listActionTypesRoute = ( router: IRouter, diff --git a/x-pack/plugins/actions/server/routes/legacy/update.test.ts b/x-pack/plugins/actions/server/routes/legacy/update.test.ts new file mode 100644 index 0000000000000..0ce49751753b2 --- /dev/null +++ b/x-pack/plugins/actions/server/routes/legacy/update.test.ts @@ -0,0 +1,185 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { updateActionRoute } from './update'; +import { httpServiceMock } from 'src/core/server/mocks'; +import { licenseStateMock } from '../../lib/license_state.mock'; +import { verifyApiAccess, ActionTypeDisabledError } from '../../lib'; +import { mockHandlerArguments } from './_mock_handler_arguments'; +import { actionsClientMock } from '../../actions_client.mock'; + +jest.mock('../../lib/verify_api_access.ts', () => ({ + verifyApiAccess: jest.fn(), +})); + +beforeEach(() => { + jest.resetAllMocks(); +}); + +describe('updateActionRoute', () => { + it('updates an action with proper parameters', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + updateActionRoute(router, licenseState); + + const [config, handler] = router.put.mock.calls[0]; + + expect(config.path).toMatchInlineSnapshot(`"/api/actions/action/{id}"`); + + const updateResult = { + id: '1', + actionTypeId: 'my-action-type-id', + name: 'My name', + config: { foo: true }, + isPreconfigured: false, + }; + + const actionsClient = actionsClientMock.create(); + actionsClient.update.mockResolvedValueOnce(updateResult); + + const [context, req, res] = mockHandlerArguments( + { actionsClient }, + { + params: { + id: '1', + }, + body: { + name: 'My name', + config: { foo: true }, + secrets: { key: 'i8oh34yf9783y39' }, + }, + }, + ['ok'] + ); + + expect(await handler(context, req, res)).toEqual({ body: updateResult }); + + expect(actionsClient.update).toHaveBeenCalledTimes(1); + expect(actionsClient.update.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + Object { + "action": Object { + "config": Object { + "foo": true, + }, + "name": "My name", + "secrets": Object { + "key": "i8oh34yf9783y39", + }, + }, + "id": "1", + }, + ] + `); + + expect(res.ok).toHaveBeenCalled(); + }); + + it('ensures the license allows deleting actions', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + updateActionRoute(router, licenseState); + + const [, handler] = router.put.mock.calls[0]; + + const updateResult = { + id: '1', + actionTypeId: 'my-action-type-id', + name: 'My name', + config: { foo: true }, + isPreconfigured: false, + }; + + const actionsClient = actionsClientMock.create(); + actionsClient.update.mockResolvedValueOnce(updateResult); + + const [context, req, res] = mockHandlerArguments( + { actionsClient }, + { + params: { + id: '1', + }, + body: { + name: 'My name', + config: { foo: true }, + secrets: { key: 'i8oh34yf9783y39' }, + }, + }, + ['ok'] + ); + + await handler(context, req, res); + + expect(verifyApiAccess).toHaveBeenCalledWith(licenseState); + }); + + it('ensures the license check prevents deleting actions', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + (verifyApiAccess as jest.Mock).mockImplementation(() => { + throw new Error('OMG'); + }); + + updateActionRoute(router, licenseState); + + const [, handler] = router.put.mock.calls[0]; + + const updateResult = { + id: '1', + actionTypeId: 'my-action-type-id', + name: 'My name', + config: { foo: true }, + isPreconfigured: false, + }; + + const actionsClient = actionsClientMock.create(); + actionsClient.update.mockResolvedValueOnce(updateResult); + + const [context, req, res] = mockHandlerArguments( + { actionsClient }, + { + params: { + id: '1', + }, + body: { + name: 'My name', + config: { foo: true }, + secrets: { key: 'i8oh34yf9783y39' }, + }, + }, + ['ok'] + ); + + expect(handler(context, req, res)).rejects.toMatchInlineSnapshot(`[Error: OMG]`); + + expect(verifyApiAccess).toHaveBeenCalledWith(licenseState); + }); + + it('ensures the action type gets validated for the license', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + updateActionRoute(router, licenseState); + + const [, handler] = router.put.mock.calls[0]; + + const actionsClient = actionsClientMock.create(); + actionsClient.update.mockRejectedValue(new ActionTypeDisabledError('Fail', 'license_invalid')); + + const [context, req, res] = mockHandlerArguments({ actionsClient }, { params: {}, body: {} }, [ + 'ok', + 'forbidden', + ]); + + await handler(context, req, res); + + expect(res.forbidden).toHaveBeenCalledWith({ body: { message: 'Fail' } }); + }); +}); diff --git a/x-pack/plugins/actions/server/routes/legacy/update.ts b/x-pack/plugins/actions/server/routes/legacy/update.ts new file mode 100644 index 0000000000000..6cbcd56af5048 --- /dev/null +++ b/x-pack/plugins/actions/server/routes/legacy/update.ts @@ -0,0 +1,60 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { schema } from '@kbn/config-schema'; +import { IRouter } from 'kibana/server'; +import { ILicenseState, verifyApiAccess, isErrorThatHandlesItsOwnResponse } from '../../lib'; +import { BASE_ACTION_API_PATH } from '../../../common'; +import { ActionsRequestHandlerContext } from '../../types'; + +const paramSchema = schema.object({ + id: schema.string(), +}); + +const bodySchema = schema.object({ + name: schema.string(), + config: schema.recordOf(schema.string(), schema.any(), { defaultValue: {} }), + secrets: schema.recordOf(schema.string(), schema.any(), { defaultValue: {} }), +}); + +export const updateActionRoute = ( + router: IRouter, + licenseState: ILicenseState +) => { + router.put( + { + path: `${BASE_ACTION_API_PATH}/action/{id}`, + validate: { + body: bodySchema, + params: paramSchema, + }, + }, + router.handleLegacyErrors(async function (context, req, res) { + verifyApiAccess(licenseState); + if (!context.actions) { + return res.badRequest({ body: 'RouteHandlerContext is not registered for actions' }); + } + const actionsClient = context.actions.getActionsClient(); + const { id } = req.params; + const { name, config, secrets } = req.body; + + try { + return res.ok({ + body: await actionsClient.update({ + id, + action: { name, config, secrets }, + }), + }); + } catch (e) { + if (isErrorThatHandlesItsOwnResponse(e)) { + return e.sendResponse(res); + } + throw e; + } + }) + ); +}; diff --git a/x-pack/plugins/actions/server/routes/rewrite_request_case.ts b/x-pack/plugins/actions/server/routes/rewrite_request_case.ts new file mode 100644 index 0000000000000..c11a82f4af5ac --- /dev/null +++ b/x-pack/plugins/actions/server/routes/rewrite_request_case.ts @@ -0,0 +1,48 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +type RenameActionToConnector = K extends `actionTypeId` + ? `connectorTypeId` + : K extends `actionId` + ? `connectorId` + : K; + +export type AsApiContract = { + [K in keyof T as CamelToSnake>>]: T[K]; +}; + +export type RewriteRequestCase = (requested: AsApiContract) => T; +export type RewriteResponseCase = ( + responded: T +) => T extends Array ? Array> : AsApiContract; + +/** + * This type maps Camel Case strings into their Snake Case version. + * This is achieved by checking each character and, if it is an uppercase character, it is mapped to an + * underscore followed by a lowercase one. + * + * The reason there are two ternaries is that, for perfformance reasons, TS limits its + * character parsing to ~15 characters. + * To get around this we use the second turnery to parse 2 characters at a time, which allows us to support + * strings that are 30 characters long. + * + * If you get the TS #2589 error ("Type instantiation is excessively deep and possibly infinite") then most + * likely you have a string that's longer than 30 characters. + * Address this by reducing the length if possible, otherwise, you'll need to add a 3rd ternary which + * parses 3 chars at a time :grimace: + * + * For more details see this PR comment: https://github.com/microsoft/TypeScript/pull/40336#issuecomment-686723087 + */ +type CamelToSnake = string extends T + ? string + : T extends `${infer C0}${infer C1}${infer R}` + ? `${C0 extends Uppercase ? '_' : ''}${Lowercase}${C1 extends Uppercase + ? '_' + : ''}${Lowercase}${CamelToSnake}` + : T extends `${infer C0}${infer R}` + ? `${C0 extends Uppercase ? '_' : ''}${Lowercase}${CamelToSnake}` + : ''; diff --git a/x-pack/plugins/actions/server/routes/update.test.ts b/x-pack/plugins/actions/server/routes/update.test.ts index ed539522c00d5..653fcba75da95 100644 --- a/x-pack/plugins/actions/server/routes/update.test.ts +++ b/x-pack/plugins/actions/server/routes/update.test.ts @@ -8,16 +8,17 @@ import { updateActionRoute } from './update'; import { httpServiceMock } from 'src/core/server/mocks'; import { licenseStateMock } from '../lib/license_state.mock'; -import { verifyApiAccess, ActionTypeDisabledError } from '../lib'; -import { mockHandlerArguments } from './_mock_handler_arguments'; +import { mockHandlerArguments } from './legacy/_mock_handler_arguments'; import { actionsClientMock } from '../actions_client.mock'; +import { verifyAccessAndContext } from './verify_access_and_context'; -jest.mock('../lib/verify_api_access.ts', () => ({ - verifyApiAccess: jest.fn(), +jest.mock('./verify_access_and_context.ts', () => ({ + verifyAccessAndContext: jest.fn(), })); beforeEach(() => { jest.resetAllMocks(); + (verifyAccessAndContext as jest.Mock).mockImplementation((license, handler) => handler); }); describe('updateActionRoute', () => { @@ -29,7 +30,7 @@ describe('updateActionRoute', () => { const [config, handler] = router.put.mock.calls[0]; - expect(config.path).toMatchInlineSnapshot(`"/api/actions/action/{id}"`); + expect(config.path).toMatchInlineSnapshot(`"/api/actions/connector/{id}"`); const updateResult = { id: '1', @@ -57,7 +58,15 @@ describe('updateActionRoute', () => { ['ok'] ); - expect(await handler(context, req, res)).toEqual({ body: updateResult }); + expect(await handler(context, req, res)).toEqual({ + body: { + id: '1', + connector_type_id: 'my-action-type-id', + name: 'My name', + config: { foo: true }, + is_preconfigured: false, + }, + }); expect(actionsClient.update).toHaveBeenCalledTimes(1); expect(actionsClient.update.mock.calls[0]).toMatchInlineSnapshot(` @@ -116,14 +125,14 @@ describe('updateActionRoute', () => { await handler(context, req, res); - expect(verifyApiAccess).toHaveBeenCalledWith(licenseState); + expect(verifyAccessAndContext).toHaveBeenCalledWith(licenseState, expect.any(Function)); }); it('ensures the license check prevents deleting actions', async () => { const licenseState = licenseStateMock.create(); const router = httpServiceMock.createRouter(); - (verifyApiAccess as jest.Mock).mockImplementation(() => { + (verifyAccessAndContext as jest.Mock).mockImplementation(() => async () => { throw new Error('OMG'); }); @@ -159,27 +168,6 @@ describe('updateActionRoute', () => { expect(handler(context, req, res)).rejects.toMatchInlineSnapshot(`[Error: OMG]`); - expect(verifyApiAccess).toHaveBeenCalledWith(licenseState); - }); - - it('ensures the action type gets validated for the license', async () => { - const licenseState = licenseStateMock.create(); - const router = httpServiceMock.createRouter(); - - updateActionRoute(router, licenseState); - - const [, handler] = router.put.mock.calls[0]; - - const actionsClient = actionsClientMock.create(); - actionsClient.update.mockRejectedValue(new ActionTypeDisabledError('Fail', 'license_invalid')); - - const [context, req, res] = mockHandlerArguments({ actionsClient }, { params: {}, body: {} }, [ - 'ok', - 'forbidden', - ]); - - await handler(context, req, res); - - expect(res.forbidden).toHaveBeenCalledWith({ body: { message: 'Fail' } }); + expect(verifyAccessAndContext).toHaveBeenCalledWith(licenseState, expect.any(Function)); }); }); diff --git a/x-pack/plugins/actions/server/routes/update.ts b/x-pack/plugins/actions/server/routes/update.ts index 97cc11a5d0ad4..af55fa32b76ca 100644 --- a/x-pack/plugins/actions/server/routes/update.ts +++ b/x-pack/plugins/actions/server/routes/update.ts @@ -7,9 +7,11 @@ import { schema } from '@kbn/config-schema'; import { IRouter } from 'kibana/server'; -import { ILicenseState, verifyApiAccess, isErrorThatHandlesItsOwnResponse } from '../lib'; +import { ILicenseState } from '../lib'; import { BASE_ACTION_API_PATH } from '../../common'; -import { ActionsRequestHandlerContext } from '../types'; +import { ActionResult, ActionsRequestHandlerContext } from '../types'; +import { verifyAccessAndContext } from './verify_access_and_context'; +import { RewriteResponseCase } from './rewrite_request_case'; const paramSchema = schema.object({ id: schema.string(), @@ -21,40 +23,43 @@ const bodySchema = schema.object({ secrets: schema.recordOf(schema.string(), schema.any(), { defaultValue: {} }), }); +const rewriteBodyRes: RewriteResponseCase = ({ + actionTypeId, + isPreconfigured, + ...res +}) => ({ + ...res, + connector_type_id: actionTypeId, + is_preconfigured: isPreconfigured, +}); + export const updateActionRoute = ( router: IRouter, licenseState: ILicenseState ) => { router.put( { - path: `${BASE_ACTION_API_PATH}/action/{id}`, + path: `${BASE_ACTION_API_PATH}/connector/{id}`, validate: { body: bodySchema, params: paramSchema, }, }, - router.handleLegacyErrors(async function (context, req, res) { - verifyApiAccess(licenseState); - if (!context.actions) { - return res.badRequest({ body: 'RouteHandlerContext is not registered for actions' }); - } - const actionsClient = context.actions.getActionsClient(); - const { id } = req.params; - const { name, config, secrets } = req.body; + router.handleLegacyErrors( + verifyAccessAndContext(licenseState, async function (context, req, res) { + const actionsClient = context.actions.getActionsClient(); + const { id } = req.params; + const { name, config, secrets } = req.body; - try { return res.ok({ - body: await actionsClient.update({ - id, - action: { name, config, secrets }, - }), + body: rewriteBodyRes( + await actionsClient.update({ + id, + action: { name, config, secrets }, + }) + ), }); - } catch (e) { - if (isErrorThatHandlesItsOwnResponse(e)) { - return e.sendResponse(res); - } - throw e; - } - }) + }) + ) ); }; diff --git a/x-pack/plugins/actions/server/routes/verify_access_and_context.test.ts b/x-pack/plugins/actions/server/routes/verify_access_and_context.test.ts new file mode 100644 index 0000000000000..f13bc7279e346 --- /dev/null +++ b/x-pack/plugins/actions/server/routes/verify_access_and_context.test.ts @@ -0,0 +1,69 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { licenseStateMock } from '../lib/license_state.mock'; +import { verifyApiAccess, ActionTypeDisabledError } from '../lib'; +import { mockHandlerArguments } from './legacy/_mock_handler_arguments'; +import { actionsClientMock } from '../actions_client.mock'; +import { verifyAccessAndContext } from './verify_access_and_context'; + +jest.mock('../lib/verify_api_access.ts', () => ({ + verifyApiAccess: jest.fn(), +})); + +beforeEach(() => { + jest.resetAllMocks(); +}); + +describe('verifyAccessAndContext', () => { + it('ensures the license allows creating actions', async () => { + const licenseState = licenseStateMock.create(); + + const handler = jest.fn(); + const verify = verifyAccessAndContext(licenseState, handler); + + const actionsClient = actionsClientMock.create(); + const [context, req, res] = mockHandlerArguments({ actionsClient }, {}); + + await verify(context, req, res); + + expect(verifyApiAccess).toHaveBeenCalledWith(licenseState); + }); + + it('ensures the license check prevents creating actions', async () => { + const licenseState = licenseStateMock.create(); + + (verifyApiAccess as jest.Mock).mockImplementation(() => { + throw new Error('OMG'); + }); + + const handler = jest.fn(); + const verify = verifyAccessAndContext(licenseState, handler); + + const actionsClient = actionsClientMock.create(); + const [context, req, res] = mockHandlerArguments({ actionsClient }, {}); + + await expect(verify(context, req, res)).rejects.toMatchInlineSnapshot(`[Error: OMG]`); + + expect(verifyApiAccess).toHaveBeenCalledWith(licenseState); + }); + + it('supports error that handle their own response', async () => { + const licenseState = licenseStateMock.create(); + + const handler = jest.fn(); + const verify = verifyAccessAndContext(licenseState, handler); + + const actionsClient = actionsClientMock.create(); + const [context, req, res] = mockHandlerArguments({ actionsClient }, {}, ['ok', 'forbidden']); + + handler.mockRejectedValue(new ActionTypeDisabledError('Fail', 'license_invalid')); + + await expect(verify(context, req, res)).resolves.toMatchObject({ body: { message: 'Fail' } }); + expect(res.forbidden).toHaveBeenCalledWith({ body: { message: 'Fail' } }); + }); +}); diff --git a/x-pack/plugins/actions/server/routes/verify_access_and_context.ts b/x-pack/plugins/actions/server/routes/verify_access_and_context.ts new file mode 100644 index 0000000000000..3f1fe4b1c229f --- /dev/null +++ b/x-pack/plugins/actions/server/routes/verify_access_and_context.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 { RequestHandler } from 'kibana/server'; +import { ILicenseState, isErrorThatHandlesItsOwnResponse, verifyApiAccess } from '../lib'; +import { ActionsRequestHandlerContext } from '../types'; + +type ActionsRequestHandlerWrapper = ( + licenseState: ILicenseState, + handler: RequestHandler +) => RequestHandler; + +export const verifyAccessAndContext: ActionsRequestHandlerWrapper = (licenseState, handler) => { + return async (context, request, response) => { + verifyApiAccess(licenseState); + + if (!context.actions) { + return response.badRequest({ body: 'RouteHandlerContext is not registered for actions' }); + } + + try { + return await handler(context, request, response); + } catch (e) { + if (isErrorThatHandlesItsOwnResponse(e)) { + return e.sendResponse(response); + } + throw e; + } + }; +}; diff --git a/x-pack/plugins/alerts/server/health/get_state.test.ts b/x-pack/plugins/alerts/server/health/get_state.test.ts index 5dd58aba23911..7b36bf34377f7 100644 --- a/x-pack/plugins/alerts/server/health/get_state.test.ts +++ b/x-pack/plugins/alerts/server/health/get_state.test.ts @@ -5,73 +5,182 @@ * 2.0. */ +import { ServiceStatusLevels } from '../../../../../src/core/server'; import { taskManagerMock } from '../../../task_manager/server/mocks'; -import { getHealthStatusStream } from '.'; -import { TaskStatus } from '../../../task_manager/server'; +import { + getHealthStatusStream, + getHealthServiceStatusWithRetryAndErrorHandling, + MAX_RETRY_ATTEMPTS, +} from './get_state'; +import { ConcreteTaskInstance, TaskStatus } from '../../../task_manager/server'; import { HealthStatus } from '../types'; -describe('getHealthStatusStream()', () => { - const mockTaskManager = taskManagerMock.createStart(); - - it('should return an object with the "unavailable" level and proper summary of "Alerting framework is unhealthy"', async () => { - mockTaskManager.get.mockReturnValue( - new Promise((_resolve, _reject) => { - return { - id: 'test', - attempts: 0, - status: TaskStatus.Running, - version: '123', - runAt: new Date(), - scheduledAt: new Date(), - startedAt: new Date(), - retryAt: new Date(Date.now() + 5 * 60 * 1000), - state: { - runs: 1, - health_status: HealthStatus.Warning, - }, - taskType: 'alerting:alerting_health_check', - params: { - alertId: '1', - }, - ownerId: null, - }; +const tick = () => new Promise((resolve) => setImmediate(resolve)); + +const getHealthCheckTask = (overrides = {}): ConcreteTaskInstance => ({ + id: 'test', + attempts: 0, + status: TaskStatus.Running, + version: '123', + runAt: new Date(), + scheduledAt: new Date(), + startedAt: new Date(), + retryAt: new Date(Date.now() + 5 * 60 * 1000), + state: { + runs: 1, + health_status: HealthStatus.OK, + }, + taskType: 'alerting:alerting_health_check', + params: { + alertId: '1', + }, + ownerId: null, + ...overrides, +}); + +describe('getHealthServiceStatusWithRetryAndErrorHandling', () => { + beforeEach(() => jest.useFakeTimers()); + + it('should get status at each interval', async () => { + const mockTaskManager = taskManagerMock.createStart(); + mockTaskManager.get.mockResolvedValue(getHealthCheckTask()); + const pollInterval = 100; + const halfInterval = Math.floor(pollInterval / 2); + + getHealthStatusStream(mockTaskManager, pollInterval).subscribe(); + + // shouldn't fire before poll interval passes + // should fire once each poll interval + jest.advanceTimersByTime(halfInterval); + expect(mockTaskManager.get).toHaveBeenCalledTimes(0); + jest.advanceTimersByTime(halfInterval); + expect(mockTaskManager.get).toHaveBeenCalledTimes(1); + jest.advanceTimersByTime(pollInterval); + expect(mockTaskManager.get).toHaveBeenCalledTimes(2); + jest.advanceTimersByTime(pollInterval); + expect(mockTaskManager.get).toHaveBeenCalledTimes(3); + }); + + it('should retry on error', async () => { + const mockTaskManager = taskManagerMock.createStart(); + mockTaskManager.get.mockRejectedValue(new Error('Failure')); + const retryDelay = 10; + const pollInterval = 100; + const halfInterval = Math.floor(pollInterval / 2); + + getHealthStatusStream(mockTaskManager, pollInterval, retryDelay).subscribe(); + + jest.advanceTimersByTime(halfInterval); + expect(mockTaskManager.get).toHaveBeenCalledTimes(0); + jest.advanceTimersByTime(halfInterval); + expect(mockTaskManager.get).toHaveBeenCalledTimes(1); + + // Retry on failure + let numTimesCalled = 1; + for (let i = 0; i < MAX_RETRY_ATTEMPTS; i++) { + await tick(); + jest.advanceTimersByTime(retryDelay); + expect(mockTaskManager.get).toHaveBeenCalledTimes(numTimesCalled++ + 1); + } + + // Once we've exceeded max retries, should not try again + await tick(); + jest.advanceTimersByTime(retryDelay); + expect(mockTaskManager.get).toHaveBeenCalledTimes(numTimesCalled); + + // Once another poll interval passes, should call fn again + await tick(); + jest.advanceTimersByTime(pollInterval - MAX_RETRY_ATTEMPTS * retryDelay); + expect(mockTaskManager.get).toHaveBeenCalledTimes(numTimesCalled + 1); + }); + + it('should return healthy status when health status is "ok"', async () => { + const mockTaskManager = taskManagerMock.createStart(); + mockTaskManager.get.mockResolvedValue(getHealthCheckTask()); + + const status = await getHealthServiceStatusWithRetryAndErrorHandling( + mockTaskManager + ).toPromise(); + + expect(status.level).toEqual(ServiceStatusLevels.available); + expect(status.summary).toEqual('Alerting framework is available'); + }); + + it('should return degraded status when health status is "warn"', async () => { + const mockTaskManager = taskManagerMock.createStart(); + mockTaskManager.get.mockResolvedValue( + getHealthCheckTask({ + state: { + runs: 1, + health_status: HealthStatus.Warning, + }, }) ); - getHealthStatusStream(mockTaskManager).subscribe( - (val: { level: Readonly; summary: string }) => { - expect(val.level).toBe(false); - } - ); + + const status = await getHealthServiceStatusWithRetryAndErrorHandling( + mockTaskManager + ).toPromise(); + + expect(status.level).toEqual(ServiceStatusLevels.degraded); + expect(status.summary).toEqual('Alerting framework is degraded'); }); - it('should return an object with the "available" level and proper summary of "Alerting framework is healthy"', async () => { - mockTaskManager.get.mockReturnValue( - new Promise((_resolve, _reject) => { - return { - id: 'test', - attempts: 0, - status: TaskStatus.Running, - version: '123', - runAt: new Date(), - scheduledAt: new Date(), - startedAt: new Date(), - retryAt: new Date(Date.now() + 5 * 60 * 1000), - state: { - runs: 1, - health_status: HealthStatus.OK, - }, - taskType: 'alerting:alerting_health_check', - params: { - alertId: '1', - }, - ownerId: null, - }; + it('should return unavailable status when health status is "error"', async () => { + const mockTaskManager = taskManagerMock.createStart(); + mockTaskManager.get.mockResolvedValue( + getHealthCheckTask({ + state: { + runs: 1, + health_status: HealthStatus.Error, + }, }) ); - getHealthStatusStream(mockTaskManager).subscribe( - (val: { level: Readonly; summary: string }) => { - expect(val.level).toBe(true); + + const status = await getHealthServiceStatusWithRetryAndErrorHandling( + mockTaskManager + ).toPromise(); + + expect(status.level).toEqual(ServiceStatusLevels.unavailable); + expect(status.summary).toEqual('Alerting framework is unavailable'); + expect(status.meta).toBeUndefined(); + }); + + it('should retry on error and return healthy status if retry succeeds', async () => { + const retryDelay = 10; + const mockTaskManager = taskManagerMock.createStart(); + mockTaskManager.get + .mockRejectedValueOnce(new Error('Failure')) + .mockResolvedValue(getHealthCheckTask()); + + getHealthServiceStatusWithRetryAndErrorHandling(mockTaskManager, retryDelay).subscribe( + (status) => { + expect(status.level).toEqual(ServiceStatusLevels.available); + expect(status.summary).toEqual('Alerting framework is available'); + } + ); + + await tick(); + jest.advanceTimersByTime(retryDelay * 2); + }); + + it('should retry on error and return unavailable status if retry fails', async () => { + const retryDelay = 10; + const err = new Error('Failure'); + const mockTaskManager = taskManagerMock.createStart(); + mockTaskManager.get.mockRejectedValue(err); + + getHealthServiceStatusWithRetryAndErrorHandling(mockTaskManager, retryDelay).subscribe( + (status) => { + expect(status.level).toEqual(ServiceStatusLevels.unavailable); + expect(status.summary).toEqual('Alerting framework is unavailable'); + expect(status.meta).toEqual({ error: err }); } ); + + for (let i = 0; i < MAX_RETRY_ATTEMPTS + 1; i++) { + await tick(); + jest.advanceTimersByTime(retryDelay); + } + expect(mockTaskManager.get).toHaveBeenCalledTimes(MAX_RETRY_ATTEMPTS + 1); }); }); diff --git a/x-pack/plugins/alerts/server/health/get_state.ts b/x-pack/plugins/alerts/server/health/get_state.ts index 4f9f2f73b63bd..49604462662d5 100644 --- a/x-pack/plugins/alerts/server/health/get_state.ts +++ b/x-pack/plugins/alerts/server/health/get_state.ts @@ -6,13 +6,17 @@ */ import { i18n } from '@kbn/i18n'; -import { interval, Observable } from 'rxjs'; -import { catchError, switchMap } from 'rxjs/operators'; +import { defer, of, interval, Observable, throwError, timer } from 'rxjs'; +import { catchError, mergeMap, retryWhen, switchMap } from 'rxjs/operators'; import { ServiceStatus, ServiceStatusLevels } from '../../../../../src/core/server'; import { TaskManagerStartContract } from '../../../task_manager/server'; import { HEALTH_TASK_ID } from './task'; import { HealthStatus } from '../types'; +export const MAX_RETRY_ATTEMPTS = 3; +const HEALTH_STATUS_INTERVAL = 60000 * 5; // Five minutes +const RETRY_DELAY = 5000; // Wait 5 seconds before retrying on errors + async function getLatestTaskState(taskManager: TaskManagerStartContract) { try { const result = await taskManager.get(HEALTH_TASK_ID); @@ -48,27 +52,53 @@ const LEVEL_SUMMARY = { ), }; -export const getHealthStatusStream = ( +const getHealthServiceStatus = async ( taskManager: TaskManagerStartContract +): Promise> => { + const doc = await getLatestTaskState(taskManager); + const level = + doc?.state?.health_status === HealthStatus.OK + ? ServiceStatusLevels.available + : doc?.state?.health_status === HealthStatus.Warning + ? ServiceStatusLevels.degraded + : ServiceStatusLevels.unavailable; + return { + level, + summary: LEVEL_SUMMARY[level.toString()], + }; +}; + +export const getHealthServiceStatusWithRetryAndErrorHandling = ( + taskManager: TaskManagerStartContract, + retryDelay?: number ): Observable> => { - return interval(60000 * 5).pipe( - switchMap(async () => { - const doc = await getLatestTaskState(taskManager); - const level = - doc?.state?.health_status === HealthStatus.OK - ? ServiceStatusLevels.available - : doc?.state?.health_status === HealthStatus.Warning - ? ServiceStatusLevels.degraded - : ServiceStatusLevels.unavailable; - return { - level, - summary: LEVEL_SUMMARY[level.toString()], - }; + return defer(() => getHealthServiceStatus(taskManager)).pipe( + retryWhen((errors) => { + return errors.pipe( + mergeMap((error, i) => { + const retryAttempt = i + 1; + if (retryAttempt > MAX_RETRY_ATTEMPTS) { + return throwError(error); + } + return timer(retryDelay ?? RETRY_DELAY); + }) + ); }), - catchError(async (error) => ({ - level: ServiceStatusLevels.unavailable, - summary: LEVEL_SUMMARY[ServiceStatusLevels.unavailable.toString()], - meta: { error }, - })) + catchError((error) => { + return of({ + level: ServiceStatusLevels.unavailable, + summary: LEVEL_SUMMARY[ServiceStatusLevels.unavailable.toString()], + meta: { error }, + }); + }) ); }; + +export const getHealthStatusStream = ( + taskManager: TaskManagerStartContract, + healthStatusInterval?: number, + retryDelay?: number +): Observable> => + interval(healthStatusInterval ?? HEALTH_STATUS_INTERVAL).pipe( + switchMap(() => getHealthServiceStatusWithRetryAndErrorHandling(taskManager, retryDelay)) + ); diff --git a/x-pack/plugins/alerts/server/plugin.ts b/x-pack/plugins/alerts/server/plugin.ts index 5a0745d3f00b7..d85622f301171 100644 --- a/x-pack/plugins/alerts/server/plugin.ts +++ b/x-pack/plugins/alerts/server/plugin.ts @@ -6,7 +6,7 @@ */ import type { PublicMethodsOf } from '@kbn/utility-types'; -import { first, map } from 'rxjs/operators'; +import { first, map, share } from 'rxjs/operators'; import { Observable } from 'rxjs'; import { UsageCollectionSetup } from 'src/plugins/usage_collection/server'; import { combineLatest } from 'rxjs'; @@ -251,7 +251,8 @@ export class AlertingPlugin { } else { return derivedStatus; } - }) + }), + share() ) ); }); diff --git a/x-pack/plugins/apm/e2e/run-e2e.sh b/x-pack/plugins/apm/e2e/run-e2e.sh index 85ab67bbf9a10..1b3afb4823426 100755 --- a/x-pack/plugins/apm/e2e/run-e2e.sh +++ b/x-pack/plugins/apm/e2e/run-e2e.sh @@ -147,7 +147,7 @@ $WAIT_ON_BIN -i 500 -w 500 http-get://admin:changeme@localhost:$KIBANA_PORT/api/ ## Workaround to wait for the http server running ## See: https://github.com/elastic/kibana/issues/66326 if [ -e kibana.log ] ; then - grep -m 1 "http server running" <(tail -f -n +1 kibana.log) + grep -m 1 "Kibana is now available" <(tail -f -n +1 kibana.log) echo "✅ Kibana server running..." grep -m 1 "bundles compiled successfully" <(tail -f -n +1 kibana.log) echo "✅ Kibana bundles have been compiled..." diff --git a/x-pack/plugins/apm/server/lib/service_map/get_service_map_from_trace_ids.ts b/x-pack/plugins/apm/server/lib/service_map/get_service_map_from_trace_ids.ts index 6e9225041b199..7e43c8f684377 100644 --- a/x-pack/plugins/apm/server/lib/service_map/get_service_map_from_trace_ids.ts +++ b/x-pack/plugins/apm/server/lib/service_map/get_service_map_from_trace_ids.ts @@ -30,10 +30,8 @@ export function getConnections({ if (!paths) { return []; } - const isEnvironmentSelected = - environment && environment !== ENVIRONMENT_ALL.value; - if (serviceName || isEnvironmentSelected) { + if (serviceName || environment) { paths = paths.filter((path) => { return ( path @@ -46,7 +44,7 @@ export function getConnections({ return false; } - if (!environment) { + if (!environment || environment === ENVIRONMENT_ALL.value) { return true; } diff --git a/x-pack/plugins/apm/server/routes/settings/agent_configuration.ts b/x-pack/plugins/apm/server/routes/settings/agent_configuration.ts index ae0d9aeeaade1..e3ed398171d01 100644 --- a/x-pack/plugins/apm/server/routes/settings/agent_configuration.ts +++ b/x-pack/plugins/apm/server/routes/settings/agent_configuration.ts @@ -166,8 +166,8 @@ export const agentConfigurationSearchRoute = createRoute({ }); if (!config) { - context.logger.info( - `Config was not found for ${service.name}/${service.environment}` + context.logger.debug( + `[Central configuration] Config was not found for ${service.name}/${service.environment}` ); throw Boom.notFound(); } diff --git a/x-pack/plugins/canvas/canvas_plugin_src/renderers/embeddable/embeddable.tsx b/x-pack/plugins/canvas/canvas_plugin_src/renderers/embeddable/embeddable.tsx index e9050d313fbaf..73e839433c25e 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/renderers/embeddable/embeddable.tsx +++ b/x-pack/plugins/canvas/canvas_plugin_src/renderers/embeddable/embeddable.tsx @@ -24,7 +24,7 @@ import { CANVAS_EMBEDDABLE_CLASSNAME } from '../../../common/lib'; const { embeddable: strings } = RendererStrings; const embeddablesRegistry: { - [key: string]: IEmbeddable; + [key: string]: IEmbeddable | Promise; } = {}; const renderEmbeddableFactory = (core: CoreStart, plugins: StartDeps) => { @@ -67,7 +67,15 @@ export const embeddableRendererFactory = ( throw new EmbeddableFactoryNotFoundError(embeddableType); } - const embeddableObject = await factory.createFromSavedObject(input.id, input); + const embeddablePromise = factory + .createFromSavedObject(input.id, input) + .then((embeddable) => { + embeddablesRegistry[uniqueId] = embeddable; + return embeddable; + }); + embeddablesRegistry[uniqueId] = embeddablePromise; + + const embeddableObject = await (async () => embeddablePromise)(); const palettes = await plugins.charts.palettes.getPalettes(); @@ -105,8 +113,12 @@ export const embeddableRendererFactory = ( return ReactDOM.unmountComponentAtNode(domNode); }); } else { - embeddablesRegistry[uniqueId].updateInput(input); - embeddablesRegistry[uniqueId].reload(); + const embeddable = embeddablesRegistry[uniqueId]; + + if ('updateInput' in embeddable) { + embeddable.updateInput(input); + embeddable.reload(); + } } }, }); diff --git a/x-pack/plugins/case/server/client/alerts/get.ts b/x-pack/plugins/case/server/client/alerts/get.ts index 0b2663b737204..6a6e961e952c0 100644 --- a/x-pack/plugins/case/server/client/alerts/get.ts +++ b/x-pack/plugins/case/server/client/alerts/get.ts @@ -6,34 +6,33 @@ */ import { ElasticsearchClient, Logger } from 'kibana/server'; +import { AlertInfo } from '../../common'; import { AlertServiceContract } from '../../services'; import { CaseClientGetAlertsResponse } from './types'; interface GetParams { alertsService: AlertServiceContract; - ids: string[]; - indices: Set; + alertsInfo: AlertInfo[]; scopedClusterClient: ElasticsearchClient; logger: Logger; } export const get = async ({ alertsService, - ids, - indices, + alertsInfo, scopedClusterClient, logger, }: GetParams): Promise => { - if (ids.length === 0 || indices.size <= 0) { + if (alertsInfo.length === 0) { return []; } - const alerts = await alertsService.getAlerts({ ids, indices, scopedClusterClient, logger }); + const alerts = await alertsService.getAlerts({ alertsInfo, scopedClusterClient, logger }); if (!alerts) { return []; } - return alerts.hits.hits.map((alert) => ({ + return alerts.docs.map((alert) => ({ id: alert._id, index: alert._index, ...alert._source, diff --git a/x-pack/plugins/case/server/client/alerts/update_status.test.ts b/x-pack/plugins/case/server/client/alerts/update_status.test.ts index b3ed3c2b84a99..4662ce1976620 100644 --- a/x-pack/plugins/case/server/client/alerts/update_status.test.ts +++ b/x-pack/plugins/case/server/client/alerts/update_status.test.ts @@ -15,17 +15,13 @@ describe('updateAlertsStatus', () => { const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); await caseClient.client.updateAlertsStatus({ - ids: ['alert-id-1'], - status: CaseStatuses.closed, - indices: new Set(['.siem-signals']), + alerts: [{ id: 'alert-id-1', index: '.siem-signals', status: CaseStatuses.closed }], }); expect(caseClient.services.alertsService.updateAlertsStatus).toHaveBeenCalledWith({ - scopedClusterClient: expect.anything(), logger: expect.anything(), - ids: ['alert-id-1'], - indices: new Set(['.siem-signals']), - status: CaseStatuses.closed, + scopedClusterClient: expect.anything(), + alerts: [{ id: 'alert-id-1', index: '.siem-signals', status: CaseStatuses.closed }], }); }); }); diff --git a/x-pack/plugins/case/server/client/alerts/update_status.ts b/x-pack/plugins/case/server/client/alerts/update_status.ts index 2194c3a18afdd..cd6f97273d6d7 100644 --- a/x-pack/plugins/case/server/client/alerts/update_status.ts +++ b/x-pack/plugins/case/server/client/alerts/update_status.ts @@ -6,25 +6,21 @@ */ import { ElasticsearchClient, Logger } from 'src/core/server'; -import { CaseStatuses } from '../../../common/api'; import { AlertServiceContract } from '../../services'; +import { UpdateAlertRequest } from '../types'; interface UpdateAlertsStatusArgs { alertsService: AlertServiceContract; - ids: string[]; - status: CaseStatuses; - indices: Set; + alerts: UpdateAlertRequest[]; scopedClusterClient: ElasticsearchClient; logger: Logger; } export const updateAlertsStatus = async ({ alertsService, - ids, - status, - indices, + alerts, scopedClusterClient, logger, }: UpdateAlertsStatusArgs): Promise => { - await alertsService.updateAlertsStatus({ ids, status, indices, scopedClusterClient, logger }); + await alertsService.updateAlertsStatus({ alerts, scopedClusterClient, logger }); }; diff --git a/x-pack/plugins/case/server/client/cases/push.ts b/x-pack/plugins/case/server/client/cases/push.ts index 80dcc7a0e018c..8aab11be21b01 100644 --- a/x-pack/plugins/case/server/client/cases/push.ts +++ b/x-pack/plugins/case/server/client/cases/push.ts @@ -15,7 +15,7 @@ import { SavedObject, } from 'kibana/server'; import { ActionResult, ActionsClient } from '../../../../actions/server'; -import { flattenCaseSavedObject, getAlertIndicesAndIDs } from '../../routes/api/utils'; +import { flattenCaseSavedObject, getAlertInfoFromComments } from '../../routes/api/utils'; import { ActionConnector, @@ -108,12 +108,11 @@ export const push = async ({ ); } - const { ids, indices } = getAlertIndicesAndIDs(theCase?.comments); + const alertsInfo = getAlertInfoFromComments(theCase?.comments); try { alerts = await caseClient.getAlerts({ - ids, - indices, + alertsInfo, }); } catch (e) { throw createCaseError({ diff --git a/x-pack/plugins/case/server/client/cases/update.test.ts b/x-pack/plugins/case/server/client/cases/update.test.ts index 752b0ab369de0..be68aa1266023 100644 --- a/x-pack/plugins/case/server/client/cases/update.test.ts +++ b/x-pack/plugins/case/server/client/cases/update.test.ts @@ -430,9 +430,13 @@ describe('update', () => { await caseClient.client.update(patchCases); expect(caseClient.client.updateAlertsStatus).toHaveBeenCalledWith({ - ids: ['test-id'], - status: 'closed', - indices: new Set(['test-index']), + alerts: [ + { + id: 'test-id', + index: 'test-index', + status: 'closed', + }, + ], }); }); @@ -458,11 +462,10 @@ describe('update', () => { }); const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); - caseClient.client.updateAlertsStatus = jest.fn(); await caseClient.client.update(patchCases); - expect(caseClient.client.updateAlertsStatus).not.toHaveBeenCalled(); + expect(caseClient.esClient.bulk).not.toHaveBeenCalled(); }); test('it updates alert status when syncAlerts is turned on', async () => { @@ -492,9 +495,7 @@ describe('update', () => { await caseClient.client.update(patchCases); expect(caseClient.client.updateAlertsStatus).toHaveBeenCalledWith({ - ids: ['test-id'], - status: 'open', - indices: new Set(['test-index']), + alerts: [{ id: 'test-id', index: 'test-index', status: 'open' }], }); }); @@ -515,11 +516,10 @@ describe('update', () => { }); const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); - caseClient.client.updateAlertsStatus = jest.fn(); await caseClient.client.update(patchCases); - expect(caseClient.client.updateAlertsStatus).not.toHaveBeenCalled(); + expect(caseClient.esClient.bulk).not.toHaveBeenCalled(); }); test('it updates alert status for multiple cases', async () => { @@ -576,22 +576,12 @@ describe('update', () => { caseClient.client.updateAlertsStatus = jest.fn(); await caseClient.client.update(patchCases); - /** - * the update code will put each comment into a status bucket and then make at most 1 call - * to ES for each status bucket - * Now instead of doing a call per case to get the comments, it will do a single call with all the cases - * and sub cases and get all the comments in one go - */ - expect(caseClient.client.updateAlertsStatus).toHaveBeenNthCalledWith(1, { - ids: ['test-id'], - status: 'open', - indices: new Set(['test-index']), - }); - expect(caseClient.client.updateAlertsStatus).toHaveBeenNthCalledWith(2, { - ids: ['test-id-2'], - status: 'closed', - indices: new Set(['test-index-2']), + expect(caseClient.client.updateAlertsStatus).toHaveBeenCalledWith({ + alerts: [ + { id: 'test-id', index: 'test-index', status: 'open' }, + { id: 'test-id-2', index: 'test-index-2', status: 'closed' }, + ], }); }); @@ -611,11 +601,10 @@ describe('update', () => { }); const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); - caseClient.client.updateAlertsStatus = jest.fn(); await caseClient.client.update(patchCases); - expect(caseClient.client.updateAlertsStatus).not.toHaveBeenCalled(); + expect(caseClient.esClient.bulk).not.toHaveBeenCalled(); }); }); diff --git a/x-pack/plugins/case/server/client/cases/update.ts b/x-pack/plugins/case/server/client/cases/update.ts index 36318f03bd33f..8c788d6f3bcd9 100644 --- a/x-pack/plugins/case/server/client/cases/update.ts +++ b/x-pack/plugins/case/server/client/cases/update.ts @@ -18,7 +18,6 @@ import { Logger, } from 'kibana/server'; import { - AlertInfo, flattenCaseSavedObject, isCommentRequestTypeAlertOrGenAlert, } from '../../routes/api/utils'; @@ -53,7 +52,8 @@ import { SUB_CASE_SAVED_OBJECT, } from '../../saved_object_types'; import { CaseClientHandler } from '..'; -import { addAlertInfoToStatusMap } from '../../common'; +import { createAlertUpdateRequest } from '../../common'; +import { UpdateAlertRequest } from '../types'; import { createCaseError } from '../../common/error'; /** @@ -291,33 +291,25 @@ async function updateAlerts({ // get a map of sub case id to the sub case status const subCasesToStatus = await getSubCasesToStatus({ totalAlerts, client, caseService }); - // create a map of the case statuses to the alert information that we need to update for that status - // This allows us to make at most 3 calls to ES, one for each status type that we need to update - // One potential improvement here is to do a tick (set timeout) to reduce the memory footprint if that becomes an issue - const alertsToUpdate = totalAlerts.saved_objects.reduce((acc, alertComment) => { - if (isCommentRequestTypeAlertOrGenAlert(alertComment.attributes)) { - const status = getSyncStatusForComment({ - alertComment, - casesToSyncToStatus, - subCasesToStatus, - }); + // create an array of requests that indicate the id, index, and status to update an alert + const alertsToUpdate = totalAlerts.saved_objects.reduce( + (acc: UpdateAlertRequest[], alertComment) => { + if (isCommentRequestTypeAlertOrGenAlert(alertComment.attributes)) { + const status = getSyncStatusForComment({ + alertComment, + casesToSyncToStatus, + subCasesToStatus, + }); - addAlertInfoToStatusMap({ comment: alertComment.attributes, statusMap: acc, status }); - } + acc.push(...createAlertUpdateRequest({ comment: alertComment.attributes, status })); + } - return acc; - }, new Map()); - - // This does at most 3 calls to Elasticsearch to update the status of the alerts to either open, closed, or in-progress - for (const [status, alertInfo] of alertsToUpdate.entries()) { - if (alertInfo.ids.length > 0 && alertInfo.indices.size > 0) { - caseClient.updateAlertsStatus({ - ids: alertInfo.ids, - status, - indices: alertInfo.indices, - }); - } - } + return acc; + }, + [] + ); + + await caseClient.updateAlertsStatus({ alerts: alertsToUpdate }); } interface UpdateArgs { diff --git a/x-pack/plugins/case/server/client/client.ts b/x-pack/plugins/case/server/client/client.ts index c34c3942b18d0..9f4bf60677649 100644 --- a/x-pack/plugins/case/server/client/client.ts +++ b/x-pack/plugins/case/server/client/client.ts @@ -169,9 +169,9 @@ export class CaseClientHandler implements CaseClient { }); } catch (error) { throw createCaseError({ - message: `Failed to update alerts status using client ids: ${JSON.stringify( - args.ids - )} \nindices: ${JSON.stringify([...args.indices])} \nstatus: ${args.status}: ${error}`, + message: `Failed to update alerts status using client alerts: ${JSON.stringify( + args.alerts + )}: ${error}`, error, logger: this.logger, }); @@ -218,9 +218,9 @@ export class CaseClientHandler implements CaseClient { }); } catch (error) { throw createCaseError({ - message: `Failed to get alerts using client ids: ${JSON.stringify( - args.ids - )} \nindices: ${JSON.stringify([...args.indices])}: ${error}`, + message: `Failed to get alerts using client requested alerts: ${JSON.stringify( + args.alertsInfo + )}: ${error}`, error, logger: this.logger, }); diff --git a/x-pack/plugins/case/server/client/comments/add.test.ts b/x-pack/plugins/case/server/client/comments/add.test.ts index 123ecec6abea3..460a03643b63d 100644 --- a/x-pack/plugins/case/server/client/comments/add.test.ts +++ b/x-pack/plugins/case/server/client/comments/add.test.ts @@ -15,6 +15,8 @@ import { } from '../../routes/api/__fixtures__'; import { createCaseClientWithMockSavedObjectsClient } from '../mocks'; +type AlertComment = CommentType.alert | CommentType.generatedAlert; + describe('addComment', () => { beforeEach(async () => { jest.restoreAllMocks(); @@ -248,9 +250,7 @@ describe('addComment', () => { }); expect(caseClient.client.updateAlertsStatus).toHaveBeenCalledWith({ - ids: ['test-alert'], - status: 'open', - indices: new Set(['test-index']), + alerts: [{ id: 'test-alert', index: 'test-index', status: 'open' }], }); }); @@ -517,5 +517,77 @@ describe('addComment', () => { expect(boomErr.output.statusCode).toBe(400); }); }); + + describe('alert format', () => { + it.each([ + ['1', ['index1', 'index2'], CommentType.alert], + [['1', '2'], 'index', CommentType.alert], + ['1', ['index1', 'index2'], CommentType.generatedAlert], + [['1', '2'], 'index', CommentType.generatedAlert], + ])( + 'throws an error with an alert comment with contents id: %p indices: %p type: %s', + async (alertId, index, type) => { + expect.assertions(1); + + const savedObjectsClient = createMockSavedObjectsRepository({ + caseSavedObject: mockCases, + caseCommentSavedObject: mockCaseComments, + }); + + const caseClient = await createCaseClientWithMockSavedObjectsClient({ + savedObjectsClient, + }); + await expect( + caseClient.client.addComment({ + caseId: 'mock-id-4', + comment: { + // casting because type must be either alert or generatedAlert but type is CommentType + type: type as AlertComment, + alertId, + index, + rule: { + id: 'test-rule1', + name: 'test-rule', + }, + }, + }) + ).rejects.toThrow(); + } + ); + + it.each([ + ['1', ['index1'], CommentType.alert], + [['1', '2'], ['index', 'other-index'], CommentType.alert], + ])( + 'does not throw an error with an alert comment with contents id: %p indices: %p type: %s', + async (alertId, index, type) => { + expect.assertions(1); + + const savedObjectsClient = createMockSavedObjectsRepository({ + caseSavedObject: mockCases, + caseCommentSavedObject: mockCaseComments, + }); + + const caseClient = await createCaseClientWithMockSavedObjectsClient({ + savedObjectsClient, + }); + await expect( + caseClient.client.addComment({ + caseId: 'mock-id-1', + comment: { + // casting because type must be either alert or generatedAlert but type is CommentType + type: type as AlertComment, + alertId, + index, + rule: { + id: 'test-rule1', + name: 'test-rule', + }, + }, + }) + ).resolves.not.toBeUndefined(); + } + ); + }); }); }); diff --git a/x-pack/plugins/case/server/client/comments/add.ts b/x-pack/plugins/case/server/client/comments/add.ts index d3d7047e71bd3..22a59e4d0539b 100644 --- a/x-pack/plugins/case/server/client/comments/add.ts +++ b/x-pack/plugins/case/server/client/comments/add.ts @@ -11,11 +11,7 @@ import { fold } from 'fp-ts/lib/Either'; import { identity } from 'fp-ts/lib/function'; import { SavedObject, SavedObjectsClientContract, Logger } from 'src/core/server'; -import { - decodeCommentRequest, - getAlertIds, - isCommentRequestTypeGenAlert, -} from '../../routes/api/utils'; +import { decodeCommentRequest, isCommentRequestTypeGenAlert } from '../../routes/api/utils'; import { throwErrors, @@ -36,7 +32,7 @@ import { } from '../../services/user_actions/helpers'; import { CaseServiceSetup, CaseUserActionServiceSetup } from '../../services'; -import { CommentableCase } from '../../common'; +import { CommentableCase, createAlertUpdateRequest } from '../../common'; import { CaseClientHandler } from '..'; import { createCaseError } from '../../common/error'; import { CASE_COMMENT_SAVED_OBJECT } from '../../saved_object_types'; @@ -177,15 +173,12 @@ const addGeneratedAlerts = async ({ newComment.attributes.type === CommentType.generatedAlert) && caseInfo.attributes.settings.syncAlerts ) { - const ids = getAlertIds(query); - await caseClient.updateAlertsStatus({ - ids, + const alertsToUpdate = createAlertUpdateRequest({ + comment: query, status: subCase.attributes.status, - indices: new Set([ - ...(Array.isArray(newComment.attributes.index) - ? newComment.attributes.index - : [newComment.attributes.index]), - ]), + }); + await caseClient.updateAlertsStatus({ + alerts: alertsToUpdate, }); } @@ -331,15 +324,13 @@ export const addComment = async ({ }); if (newComment.attributes.type === CommentType.alert && updatedCase.settings.syncAlerts) { - const ids = getAlertIds(query); - await caseClient.updateAlertsStatus({ - ids, + const alertsToUpdate = createAlertUpdateRequest({ + comment: query, status: updatedCase.status, - indices: new Set([ - ...(Array.isArray(newComment.attributes.index) - ? newComment.attributes.index - : [newComment.attributes.index]), - ]), + }); + + await caseClient.updateAlertsStatus({ + alerts: alertsToUpdate, }); } diff --git a/x-pack/plugins/case/server/client/mocks.ts b/x-pack/plugins/case/server/client/mocks.ts index 98ffed0eaf8c5..5cbd31c79885e 100644 --- a/x-pack/plugins/case/server/client/mocks.ts +++ b/x-pack/plugins/case/server/client/mocks.ts @@ -5,6 +5,8 @@ * 2.0. */ +import { ElasticsearchClient } from 'kibana/server'; +import { DeeplyMockedKeys } from 'packages/kbn-utility-types/target/jest'; import { loggingSystemMock, elasticsearchServiceMock } from '../../../../../src/core/server/mocks'; import { AlertServiceContract, @@ -45,6 +47,7 @@ export const createCaseClientWithMockSavedObjectsClient = async ({ userActionService: jest.Mocked; alertsService: jest.Mocked; }; + esClient: DeeplyMockedKeys; }> => { const esClient = elasticsearchServiceMock.createElasticsearchClient(); const log = loggingSystemMock.create().get('case'); @@ -82,5 +85,6 @@ export const createCaseClientWithMockSavedObjectsClient = async ({ return { client: caseClient, services: { userActionService, alertsService }, + esClient, }; }; diff --git a/x-pack/plugins/case/server/client/types.ts b/x-pack/plugins/case/server/client/types.ts index adc66d8b1ea77..3f4ef77d7f348 100644 --- a/x-pack/plugins/case/server/client/types.ts +++ b/x-pack/plugins/case/server/client/types.ts @@ -19,6 +19,7 @@ import { CaseUserActionsResponse, User, } from '../../common/api'; +import { AlertInfo } from '../common'; import { CaseConfigureServiceSetup, CaseServiceSetup, @@ -46,14 +47,11 @@ export interface CaseClientAddComment { } export interface CaseClientUpdateAlertsStatus { - ids: string[]; - status: CaseStatuses; - indices: Set; + alerts: UpdateAlertRequest[]; } export interface CaseClientGetAlerts { - ids: string[]; - indices: Set; + alertsInfo: AlertInfo[]; } export interface CaseClientGetUserActions { @@ -85,6 +83,15 @@ export interface ConfigureFields { connectorType: string; } +/** + * Defines the fields necessary to update an alert's status. + */ +export interface UpdateAlertRequest { + id: string; + index: string; + status: CaseStatuses; +} + /** * This represents the interface that other plugins can access. */ diff --git a/x-pack/plugins/case/server/common/index.ts b/x-pack/plugins/case/server/common/index.ts index 0960b28b3d25a..b07ed5d4ae2d6 100644 --- a/x-pack/plugins/case/server/common/index.ts +++ b/x-pack/plugins/case/server/common/index.ts @@ -7,3 +7,4 @@ export * from './models'; export * from './utils'; +export * from './types'; diff --git a/x-pack/plugins/case/server/common/types.ts b/x-pack/plugins/case/server/common/types.ts new file mode 100644 index 0000000000000..b58d8ec0e849e --- /dev/null +++ b/x-pack/plugins/case/server/common/types.ts @@ -0,0 +1,14 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +/** + * This structure holds the alert ID and index from an alert comment + */ +export interface AlertInfo { + id: string; + index: string; +} diff --git a/x-pack/plugins/case/server/common/utils.ts b/x-pack/plugins/case/server/common/utils.ts index a3ac0361569d5..dce26f3d5998a 100644 --- a/x-pack/plugins/case/server/common/utils.ts +++ b/x-pack/plugins/case/server/common/utils.ts @@ -6,8 +6,15 @@ */ import { SavedObjectsFindResult, SavedObjectsFindResponse } from 'kibana/server'; -import { CaseStatuses, CommentAttributes, CommentType, User } from '../../common/api'; -import { AlertInfo, getAlertIndicesAndIDs } from '../routes/api/utils'; +import { + CaseStatuses, + CommentAttributes, + CommentRequest, + CommentType, + User, +} from '../../common/api'; +import { UpdateAlertRequest } from '../client/types'; +import { getAlertInfoFromComments } from '../routes/api/utils'; /** * Default sort field for querying saved objects. @@ -22,27 +29,14 @@ export const nullUser: User = { username: null, full_name: null, email: null }; /** * Adds the ids and indices to a map of statuses */ -export function addAlertInfoToStatusMap({ +export function createAlertUpdateRequest({ comment, - statusMap, status, }: { - comment: CommentAttributes; - statusMap: Map; + comment: CommentRequest; status: CaseStatuses; -}) { - const newAlertInfo = getAlertIndicesAndIDs([comment]); - - // combine the already accumulated ids and indices with the new ones from this alert comment - if (newAlertInfo.ids.length > 0 && newAlertInfo.indices.size > 0) { - const accAlertInfo = statusMap.get(status) ?? { ids: [], indices: new Set() }; - accAlertInfo.ids.push(...newAlertInfo.ids); - accAlertInfo.indices = new Set([ - ...accAlertInfo.indices.values(), - ...newAlertInfo.indices.values(), - ]); - statusMap.set(status, accAlertInfo); - } +}): UpdateAlertRequest[] { + return getAlertInfoFromComments([comment]).map((alert) => ({ ...alert, status })); } /** diff --git a/x-pack/plugins/case/server/routes/api/__fixtures__/mock_saved_objects.ts b/x-pack/plugins/case/server/routes/api/__fixtures__/mock_saved_objects.ts index e67a6f6dd3344..f2318c45e6ed3 100644 --- a/x-pack/plugins/case/server/routes/api/__fixtures__/mock_saved_objects.ts +++ b/x-pack/plugins/case/server/routes/api/__fixtures__/mock_saved_objects.ts @@ -404,6 +404,43 @@ export const mockCaseComments: Array> = [ updated_at: '2019-11-25T22:32:30.608Z', version: 'WzYsMV0=', }, + { + type: 'cases-comment', + id: 'mock-comment-6', + attributes: { + associationType: AssociationType.case, + type: CommentType.generatedAlert, + index: 'test-index', + alertId: 'test-id', + created_at: '2019-11-25T22:32:30.608Z', + created_by: { + full_name: 'elastic', + email: 'testemail@elastic.co', + username: 'elastic', + }, + pushed_at: null, + pushed_by: null, + rule: { + id: 'rule-id-1', + name: 'rule-name-1', + }, + updated_at: '2019-11-25T22:32:30.608Z', + updated_by: { + full_name: 'elastic', + email: 'testemail@elastic.co', + username: 'elastic', + }, + }, + references: [ + { + type: 'cases', + name: 'associated-cases', + id: 'mock-id-4', + }, + ], + updated_at: '2019-11-25T22:32:30.608Z', + version: 'WzYsMV0=', + }, ]; export const mockCaseConfigure: Array> = [ diff --git a/x-pack/plugins/case/server/routes/api/cases/comments/patch_comment.test.ts b/x-pack/plugins/case/server/routes/api/cases/comments/patch_comment.test.ts index 1ebd336c83af7..9cc0575f9bb94 100644 --- a/x-pack/plugins/case/server/routes/api/cases/comments/patch_comment.test.ts +++ b/x-pack/plugins/case/server/routes/api/cases/comments/patch_comment.test.ts @@ -296,4 +296,83 @@ describe('PATCH comment', () => { expect(response.status).toEqual(404); expect(response.payload.isBoom).toEqual(true); }); + + describe('alert format', () => { + it.each([ + ['1', ['index1', 'index2'], CommentType.alert, 'mock-comment-4'], + [['1', '2'], 'index', CommentType.alert, 'mock-comment-4'], + ['1', ['index1', 'index2'], CommentType.generatedAlert, 'mock-comment-6'], + [['1', '2'], 'index', CommentType.generatedAlert, 'mock-comment-6'], + ])( + 'returns an error with an alert comment with contents id: %p indices: %p type: %s comment id: %s', + async (alertId, index, type, commentID) => { + const request = httpServerMock.createKibanaRequest({ + path: CASE_COMMENTS_URL, + method: 'patch', + params: { + case_id: 'mock-id-4', + }, + body: { + type, + alertId, + index, + rule: { + id: 'rule-id', + name: 'rule', + }, + id: commentID, + version: 'WzYsMV0=', + }, + }); + + const { context } = await createRouteContext( + createMockSavedObjectsRepository({ + caseSavedObject: mockCases, + caseCommentSavedObject: mockCaseComments, + }) + ); + + const response = await routeHandler(context, request, kibanaResponseFactory); + expect(response.status).toEqual(400); + } + ); + + it.each([ + ['1', ['index1'], CommentType.alert], + [['1', '2'], ['index', 'other-index'], CommentType.alert], + ])( + 'does not return an error with an alert comment with contents id: %p indices: %p type: %s', + async (alertId, index, type) => { + const request = httpServerMock.createKibanaRequest({ + path: CASE_COMMENTS_URL, + method: 'patch', + params: { + case_id: 'mock-id-4', + }, + body: { + type, + alertId, + index, + rule: { + id: 'rule-id', + name: 'rule', + }, + id: 'mock-comment-4', + // this version is different than the one in mockCaseComments because it gets updated in place + version: 'WzE3LDFd', + }, + }); + + const { context } = await createRouteContext( + createMockSavedObjectsRepository({ + caseSavedObject: mockCases, + caseCommentSavedObject: mockCaseComments, + }) + ); + + const response = await routeHandler(context, request, kibanaResponseFactory); + expect(response.status).toEqual(200); + } + ); + }); }); diff --git a/x-pack/plugins/case/server/routes/api/cases/get_case.test.ts b/x-pack/plugins/case/server/routes/api/cases/get_case.test.ts index 968dd0424fe3f..b9312331b4df2 100644 --- a/x-pack/plugins/case/server/routes/api/cases/get_case.test.ts +++ b/x-pack/plugins/case/server/routes/api/cases/get_case.test.ts @@ -105,7 +105,7 @@ describe('GET case', () => { const response = await routeHandler(context, request, kibanaResponseFactory); expect(response.status).toEqual(200); - expect(response.payload.comments).toHaveLength(5); + expect(response.payload.comments).toHaveLength(6); }); it(`returns an error when thrown from getAllCaseComments`, async () => { diff --git a/x-pack/plugins/case/server/routes/api/cases/push_case.test.ts b/x-pack/plugins/case/server/routes/api/cases/push_case.test.ts index c8501130493ba..0c3ebe67d227a 100644 --- a/x-pack/plugins/case/server/routes/api/cases/push_case.test.ts +++ b/x-pack/plugins/case/server/routes/api/cases/push_case.test.ts @@ -132,8 +132,7 @@ describe('Push case', () => { const response = await routeHandler(context, request, kibanaResponseFactory); expect(response.status).toEqual(200); expect(caseClient.getAlerts).toHaveBeenCalledWith({ - ids: ['test-id'], - indices: new Set(['test-index']), + alertsInfo: [{ id: 'test-id', index: 'test-index' }], }); }); diff --git a/x-pack/plugins/case/server/routes/api/cases/sub_case/patch_sub_cases.ts b/x-pack/plugins/case/server/routes/api/cases/sub_case/patch_sub_cases.ts index 73aacc2c2b0ba..da7ec956cad1d 100644 --- a/x-pack/plugins/case/server/routes/api/cases/sub_case/patch_sub_cases.ts +++ b/x-pack/plugins/case/server/routes/api/cases/sub_case/patch_sub_cases.ts @@ -39,7 +39,6 @@ import { import { SUB_CASES_PATCH_DEL_URL } from '../../../../../common/constants'; import { RouteDeps } from '../../types'; import { - AlertInfo, escapeHatch, flattenSubCaseSavedObject, isCommentRequestTypeAlertOrGenAlert, @@ -47,7 +46,8 @@ import { } from '../../utils'; import { getCaseToUpdate } from '../helpers'; import { buildSubCaseUserActions } from '../../../../services/user_actions/helpers'; -import { addAlertInfoToStatusMap } from '../../../../common'; +import { createAlertUpdateRequest } from '../../../../common'; +import { UpdateAlertRequest } from '../../../../client/types'; import { createCaseError } from '../../../../common/error'; interface UpdateArgs { @@ -235,29 +235,23 @@ async function updateAlerts({ // get all the alerts for all sub cases that need to be synced const totalAlerts = await getAlertComments({ caseService, client, subCasesToSync }); // create a map of the status (open, closed, etc) to alert info that needs to be updated - const alertsToUpdate = totalAlerts.saved_objects.reduce((acc, alertComment) => { - if (isCommentRequestTypeAlertOrGenAlert(alertComment.attributes)) { - const id = getID(alertComment); - const status = - id !== undefined - ? subCasesToSyncMap.get(id)?.status ?? CaseStatuses.open - : CaseStatuses.open; - - addAlertInfoToStatusMap({ comment: alertComment.attributes, statusMap: acc, status }); - } - return acc; - }, new Map()); - - // This does at most 3 calls to Elasticsearch to update the status of the alerts to either open, closed, or in-progress - for (const [status, alertInfo] of alertsToUpdate.entries()) { - if (alertInfo.ids.length > 0 && alertInfo.indices.size > 0) { - caseClient.updateAlertsStatus({ - ids: alertInfo.ids, - status, - indices: alertInfo.indices, - }); - } - } + const alertsToUpdate = totalAlerts.saved_objects.reduce( + (acc: UpdateAlertRequest[], alertComment) => { + if (isCommentRequestTypeAlertOrGenAlert(alertComment.attributes)) { + const id = getID(alertComment); + const status = + id !== undefined + ? subCasesToSyncMap.get(id)?.status ?? CaseStatuses.open + : CaseStatuses.open; + + acc.push(...createAlertUpdateRequest({ comment: alertComment.attributes, status })); + } + return acc; + }, + [] + ); + + await caseClient.updateAlertsStatus({ alerts: alertsToUpdate }); } catch (error) { throw createCaseError({ message: `Failed to update alert status while updating sub cases: ${JSON.stringify( diff --git a/x-pack/plugins/case/server/routes/api/utils.ts b/x-pack/plugins/case/server/routes/api/utils.ts index 298f8bb877cda..37bffafa4377d 100644 --- a/x-pack/plugins/case/server/routes/api/utils.ts +++ b/x-pack/plugins/case/server/routes/api/utils.ts @@ -45,6 +45,7 @@ import { import { transformESConnectorToCaseConnector } from './cases/helpers'; import { SortFieldCase } from './types'; +import { AlertInfo } from '../../common'; import { isCaseError } from '../../common/error'; export const transformNewSubCase = ({ @@ -111,55 +112,50 @@ export const getAlertIds = (comment: CommentRequest): string[] => { return []; }; -/** - * This structure holds the alert IDs and indices found from multiple alert comments - */ -export interface AlertInfo { - ids: string[]; - indices: Set; -} - -const accumulateIndicesAndIDs = (comment: CommentAttributes, acc: AlertInfo): AlertInfo => { - if (isCommentRequestTypeAlertOrGenAlert(comment)) { - acc.ids.push(...getAlertIds(comment)); - const indices = Array.isArray(comment.index) ? comment.index : [comment.index]; - indices.forEach((index) => acc.indices.add(index)); - } - return acc; +const getIDsAndIndicesAsArrays = ( + comment: CommentRequestAlertType +): { ids: string[]; indices: string[] } => { + return { + ids: Array.isArray(comment.alertId) ? comment.alertId : [comment.alertId], + indices: Array.isArray(comment.index) ? comment.index : [comment.index], + }; }; /** - * Builds an AlertInfo object accumulating the alert IDs and indices for the passed in alerts. + * This functions extracts the ids and indices from an alert comment. It enforces that the alertId and index are either + * both strings or string arrays that are the same length. If they are arrays they represent a 1-to-1 mapping of + * id existing in an index at each position in the array. This is not ideal. Ideally an alert comment request would + * accept an array of objects like this: Array<{id: string; index: string; ruleName: string ruleID: string}> instead. + * + * To reformat the alert comment request requires a migration and a breaking API change. */ -export const getAlertIndicesAndIDs = (comments: CommentAttributes[] | undefined): AlertInfo => { - if (comments === undefined) { - return { ids: [], indices: new Set() }; +const getAndValidateAlertInfoFromComment = (comment: CommentRequest): AlertInfo[] => { + if (!isCommentRequestTypeAlertOrGenAlert(comment)) { + return []; + } + + const { ids, indices } = getIDsAndIndicesAsArrays(comment); + + if (ids.length !== indices.length) { + return []; } - return comments.reduce( - (acc: AlertInfo, comment) => { - return accumulateIndicesAndIDs(comment, acc); - }, - { ids: [], indices: new Set() } - ); + return ids.map((id, index) => ({ id, index: indices[index] })); }; /** - * Builds an AlertInfo object accumulating the alert IDs and indices for the passed in alert saved objects. + * Builds an AlertInfo object accumulating the alert IDs and indices for the passed in alerts. */ -export const getAlertIndicesAndIDsFromSO = ( - comments: SavedObjectsFindResponse | undefined -): AlertInfo => { +export const getAlertInfoFromComments = (comments: CommentRequest[] | undefined): AlertInfo[] => { if (comments === undefined) { - return { ids: [], indices: new Set() }; + return []; } - return comments.saved_objects.reduce( - (acc: AlertInfo, comment) => { - return accumulateIndicesAndIDs(comment.attributes, acc); - }, - { ids: [], indices: new Set() } - ); + return comments.reduce((acc: AlertInfo[], comment) => { + const alertInfo = getAndValidateAlertInfoFromComment(comment); + acc.push(...alertInfo); + return acc; + }, []); }; export const transformNewComment = ({ @@ -378,5 +374,47 @@ export const decodeCommentRequest = (comment: CommentRequest) => { pipe(excess(ContextTypeUserRt).decode(comment), fold(throwErrors(badRequest), identity)); } else if (isCommentRequestTypeAlertOrGenAlert(comment)) { pipe(excess(AlertCommentRequestRt).decode(comment), fold(throwErrors(badRequest), identity)); + const { ids, indices } = getIDsAndIndicesAsArrays(comment); + + /** + * The alertId and index field must either be both of type string or they must both be string[] and be the same length. + * Having a one-to-one relationship between the id and index of an alert avoids accidentally updating or + * retrieving the wrong alert. Elasticsearch only guarantees that the _id (the field we use for alertId) to be + * unique within a single index. So if we attempt to update or get a specific alert across multiple indices we could + * update or receive the wrong one. + * + * Consider the situation where we have a alert1 with _id = '100' in index 'my-index-awesome' and also in index + * 'my-index-hi'. + * If we attempt to update the status of alert1 using an index pattern like `my-index-*` or even providing multiple + * indices, there's a chance we'll accidentally update too many alerts. + * + * This check doesn't enforce that the API request has the correct alert ID to index relationship it just guards + * against accidentally making a request like: + * { + * alertId: [1,2,3], + * index: awesome, + * } + * + * Instead this requires the requestor to provide: + * { + * alertId: [1,2,3], + * index: [awesome, awesome, awesome] + * } + * + * Ideally we'd change the format of the comment request to be an array of objects like: + * { + * alerts: [{id: 1, index: awesome}, {id: 2, index: awesome}] + * } + * + * But we'd need to also implement a migration because the saved object document currently stores the id and index + * in separate fields. + */ + if (ids.length !== indices.length) { + throw badRequest( + `Received an alert comment with ids and indices arrays of different lengths ids: ${JSON.stringify( + ids + )} indices: ${JSON.stringify(indices)}` + ); + } } }; diff --git a/x-pack/plugins/case/server/services/alerts/index.test.ts b/x-pack/plugins/case/server/services/alerts/index.test.ts index 3b1020d3ef556..042e415b77e43 100644 --- a/x-pack/plugins/case/server/services/alerts/index.test.ts +++ b/x-pack/plugins/case/server/services/alerts/index.test.ts @@ -17,10 +17,8 @@ describe('updateAlertsStatus', () => { describe('happy path', () => { let alertService: AlertServiceContract; const args = { - ids: ['alert-id-1'], - indices: new Set(['.siem-signals']), + alerts: [{ id: 'alert-id-1', index: '.siem-signals', status: CaseStatuses.closed }], request: {} as KibanaRequest, - status: CaseStatuses.closed, scopedClusterClient: esClient, logger, }; @@ -33,14 +31,17 @@ describe('updateAlertsStatus', () => { test('it update the status of the alert correctly', async () => { await alertService.updateAlertsStatus(args); - expect(esClient.updateByQuery).toHaveBeenCalledWith({ - body: { - query: { ids: { values: args.ids } }, - script: { lang: 'painless', source: `ctx._source.signal.status = '${args.status}'` }, - }, - conflicts: 'abort', - ignore_unavailable: true, - index: [...args.indices], + expect(esClient.bulk).toHaveBeenCalledWith({ + body: [ + { update: { _id: 'alert-id-1', _index: '.siem-signals' } }, + { + doc: { + signal: { + status: CaseStatuses.closed, + }, + }, + }, + ], }); }); @@ -48,9 +49,7 @@ describe('updateAlertsStatus', () => { it('ignores empty indices', async () => { expect( await alertService.updateAlertsStatus({ - ids: ['alert-id-1'], - status: CaseStatuses.closed, - indices: new Set(['']), + alerts: [{ id: 'alert-id-1', index: '', status: CaseStatuses.closed }], scopedClusterClient: esClient, logger, }) diff --git a/x-pack/plugins/case/server/services/alerts/index.ts b/x-pack/plugins/case/server/services/alerts/index.ts index 45245b86ba2d5..6ce4db61ab956 100644 --- a/x-pack/plugins/case/server/services/alerts/index.ts +++ b/x-pack/plugins/case/server/services/alerts/index.ts @@ -5,28 +5,26 @@ * 2.0. */ -import _ from 'lodash'; +import { isEmpty } from 'lodash'; import type { PublicMethodsOf } from '@kbn/utility-types'; import { ElasticsearchClient, Logger } from 'kibana/server'; -import { CaseStatuses } from '../../../common/api'; import { MAX_ALERTS_PER_SUB_CASE } from '../../../common/constants'; +import { UpdateAlertRequest } from '../../client/types'; +import { AlertInfo } from '../../common'; import { createCaseError } from '../../common/error'; export type AlertServiceContract = PublicMethodsOf; interface UpdateAlertsStatusArgs { - ids: string[]; - status: CaseStatuses; - indices: Set; + alerts: UpdateAlertRequest[]; scopedClusterClient: ElasticsearchClient; logger: Logger; } interface GetAlertsArgs { - ids: string[]; - indices: Set; + alertsInfo: AlertInfo[]; scopedClusterClient: ElasticsearchClient; logger: Logger; } @@ -38,54 +36,33 @@ interface Alert { } interface AlertsResponse { - hits: { - hits: Alert[]; - }; + docs: Alert[]; } -/** - * remove empty strings from the indices, I'm not sure how likely this is but in the case that - * the document doesn't have _index set the security_solution code sets the value to an empty string - * instead - */ -function getValidIndices(indices: Set): string[] { - return [...indices].filter((index) => !_.isEmpty(index)); +function isEmptyAlert(alert: AlertInfo): boolean { + return isEmpty(alert.id) || isEmpty(alert.index); } export class AlertService { constructor() {} - public async updateAlertsStatus({ - ids, - status, - indices, - scopedClusterClient, - logger, - }: UpdateAlertsStatusArgs) { - const sanitizedIndices = getValidIndices(indices); - if (sanitizedIndices.length <= 0) { - logger.warn(`Empty alert indices when updateAlertsStatus ids: ${JSON.stringify(ids)}`); - return; - } - + public async updateAlertsStatus({ alerts, scopedClusterClient, logger }: UpdateAlertsStatusArgs) { try { - const result = await scopedClusterClient.updateByQuery({ - index: sanitizedIndices, - conflicts: 'abort', - body: { - script: { - source: `ctx._source.signal.status = '${status}'`, - lang: 'painless', - }, - query: { ids: { values: ids } }, - }, - ignore_unavailable: true, - }); - - return result; + const body = alerts + .filter((alert) => !isEmptyAlert(alert)) + .flatMap((alert) => [ + { update: { _id: alert.id, _index: alert.index } }, + { doc: { signal: { status: alert.status } } }, + ]); + + if (body.length <= 0) { + return; + } + + return scopedClusterClient.bulk({ body }); } catch (error) { throw createCaseError({ - message: `Failed to update alert status ids: ${JSON.stringify(ids)}: ${error}`, + message: `Failed to update alert status ids: ${JSON.stringify(alerts)}: ${error}`, error, logger, }); @@ -94,38 +71,25 @@ export class AlertService { public async getAlerts({ scopedClusterClient, - ids, - indices, + alertsInfo, logger, }: GetAlertsArgs): Promise { - const index = getValidIndices(indices); - if (index.length <= 0) { - logger.warn(`Empty alert indices when retrieving alerts ids: ${JSON.stringify(ids)}`); - return; - } - try { - const result = await scopedClusterClient.search({ - index, - body: { - query: { - bool: { - filter: { - ids: { - values: ids, - }, - }, - }, - }, - }, - size: MAX_ALERTS_PER_SUB_CASE, - ignore_unavailable: true, - }); + const docs = alertsInfo + .filter((alert) => !isEmptyAlert(alert)) + .slice(0, MAX_ALERTS_PER_SUB_CASE) + .map((alert) => ({ _id: alert.id, _index: alert.index })); + + if (docs.length <= 0) { + return; + } + + const results = await scopedClusterClient.mget({ body: { docs } }); - return result.body; + return results.body; } catch (error) { throw createCaseError({ - message: `Failed to retrieve alerts ids: ${JSON.stringify(ids)}: ${error}`, + message: `Failed to retrieve alerts ids: ${JSON.stringify(alertsInfo)}: ${error}`, error, logger, }); diff --git a/x-pack/plugins/encrypted_saved_objects/.eslintrc.json b/x-pack/plugins/encrypted_saved_objects/.eslintrc.json deleted file mode 100644 index 2b63a9259d220..0000000000000 --- a/x-pack/plugins/encrypted_saved_objects/.eslintrc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "rules": { - "@typescript-eslint/consistent-type-imports": 1 - } -} diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_cards.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_cards.tsx index b08e391f845e6..ba71549455409 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_cards.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_cards.tsx @@ -17,10 +17,10 @@ interface Props { }>; } export const AnalyticsCards: React.FC = ({ stats }) => ( - + {stats.map(({ text, stat, dataTestSubj }) => ( - + { @@ -23,4 +25,12 @@ describe('AnalyticsSection', () => { expect(wrapper.find('p').text()).toEqual('Dolor sit amet.'); expect(wrapper.find('[data-test-subj="HelloWorld"]')).toHaveLength(1); }); + + it('renders an optional icon', () => { + const wrapper = shallow( + + ); + + expect(wrapper.find(EuiIcon).prop('type')).toEqual('eye'); + }); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_section.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_section.tsx index a068696fda0d3..065eecf76ad43 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_section.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_section.tsx @@ -7,18 +7,43 @@ import React from 'react'; -import { EuiPageContentBody, EuiTitle, EuiText, EuiSpacer } from '@elastic/eui'; +import { + EuiFlexGroup, + EuiFlexItem, + EuiIcon, + EuiPageContentBody, + EuiSpacer, + EuiText, + EuiTitle, + IconType, +} from '@elastic/eui'; interface Props { title: string; subtitle: string; + iconType?: IconType; } -export const AnalyticsSection: React.FC = ({ title, subtitle, children }) => ( +export const AnalyticsSection: React.FC = ({ title, subtitle, iconType, children }) => (

- -

{title}

-
+ + {iconType && ( + + + + )} + + +

{title}

+
+
+
+

{subtitle}

diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_tables/analytics_table.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_tables/analytics_table.test.tsx index 593f70cda404c..a0b0e4402c1e4 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_tables/analytics_table.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_tables/analytics_table.test.tsx @@ -69,6 +69,16 @@ describe('AnalyticsTable', () => { expect(tableContent).toContain('0'); }); + it('renders tag counts instead of tag names if isSmall is passed', () => { + const wrapper = mountWithIntl(); + const tableContent = wrapper.find(EuiBasicTable).text(); + + expect(tableContent).toContain('Analytics tags'); + expect(tableContent).toContain('1 tag'); + expect(tableContent).toContain('2 tags'); + expect(wrapper.find(EuiBadge)).toHaveLength(3); + }); + describe('renders an action column', () => { const wrapper = mountWithIntl(); runActionColumnTests(wrapper); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_tables/analytics_table.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_tables/analytics_table.tsx index a580047f1f635..737b87816ba46 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_tables/analytics_table.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_tables/analytics_table.tsx @@ -14,7 +14,8 @@ import { Query } from '../../types'; import { TERM_COLUMN_PROPS, - TAGS_COLUMN, + TAGS_LIST_COLUMN, + TAGS_COUNT_COLUMN, COUNT_COLUMN_PROPS, ACTIONS_COLUMN, } from './shared_columns'; @@ -22,15 +23,18 @@ import { interface Props { items: Query[]; hasClicks?: boolean; + isSmall?: boolean; } type Columns = Array>; -export const AnalyticsTable: React.FC = ({ items, hasClicks }) => { +export const AnalyticsTable: React.FC = ({ items, hasClicks, isSmall }) => { const TERM_COLUMN = { field: 'key', ...TERM_COLUMN_PROPS, }; + const TAGS_COLUMN = isSmall ? TAGS_COUNT_COLUMN : TAGS_LIST_COLUMN; + const COUNT_COLUMNS = [ { field: 'searches.doc_count', diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_tables/inline_tags_list.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_tables/inline_tags_list.test.tsx deleted file mode 100644 index 9204fa6e75fa7..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_tables/inline_tags_list.test.tsx +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; - -import { shallow } from 'enzyme'; - -import { EuiBadge, EuiToolTip } from '@elastic/eui'; - -import { InlineTagsList } from './inline_tags_list'; - -describe('InlineTagsList', () => { - it('renders', () => { - const wrapper = shallow(); - - expect(wrapper.find(EuiBadge)).toHaveLength(1); - expect(wrapper.find(EuiBadge).prop('children')).toEqual('test'); - }); - - it('renders >2 badges in a tooltip list', () => { - const wrapper = shallow(); - - expect(wrapper.find(EuiBadge)).toHaveLength(3); - expect(wrapper.find(EuiToolTip)).toHaveLength(1); - - expect(wrapper.find(EuiBadge).at(0).prop('children')).toEqual('1'); - expect(wrapper.find(EuiBadge).at(1).prop('children')).toEqual('2'); - expect(wrapper.find(EuiBadge).at(2).prop('children')).toEqual('and 3 more'); - expect(wrapper.find(EuiToolTip).prop('content')).toEqual('3, 4, 5'); - }); - - it('does not render with no tags', () => { - const wrapper = shallow(); - - expect(wrapper.isEmptyRender()).toBe(true); - }); -}); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_tables/query_clicks_table.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_tables/query_clicks_table.tsx index 4a93724ff5245..ba8fd1f17f816 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_tables/query_clicks_table.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_tables/query_clicks_table.tsx @@ -17,7 +17,7 @@ import { generateEnginePath } from '../../../engine'; import { QueryClick } from '../../types'; -import { FIRST_COLUMN_PROPS, TAGS_COLUMN, COUNT_COLUMN_PROPS } from './shared_columns'; +import { FIRST_COLUMN_PROPS, TAGS_LIST_COLUMN, COUNT_COLUMN_PROPS } from './shared_columns'; interface Props { items: QueryClick[]; @@ -55,7 +55,7 @@ export const QueryClicksTable: React.FC = ({ items }) => { return ( = ({ items }) => { return ( { const { http } = HttpLogic.values; const { navigateToUrl } = KibanaLogic.values; @@ -101,13 +101,20 @@ export const ACTIONS_COLUMN = { ], }; -export const TAGS_COLUMN = { +export const TAGS_COLUMN_PROPS = { field: 'tags', name: i18n.translate('xpack.enterpriseSearch.appSearch.engine.analytics.table.tagsColumn', { defaultMessage: 'Analytics tags', }), truncateText: true, - render: (tags: Query['tags']) => , +}; +export const TAGS_LIST_COLUMN = { + ...TAGS_COLUMN_PROPS, + render: (tags: Query['tags']) => , +}; +export const TAGS_COUNT_COLUMN = { + ...TAGS_COLUMN_PROPS, + render: (tags: Query['tags']) => , }; export const COUNT_COLUMN_PROPS = { diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_tables/tags.scss b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_tables/tags.scss new file mode 100644 index 0000000000000..4de1c5e6226fa --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_tables/tags.scss @@ -0,0 +1,3 @@ +.tagsList .euiBadge { + max-width: $euiSize * 9; +} diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_tables/tags.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_tables/tags.test.tsx new file mode 100644 index 0000000000000..9a42da7461e0c --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_tables/tags.test.tsx @@ -0,0 +1,67 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license 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 { EuiBadge, EuiToolTip } from '@elastic/eui'; + +import { TagsList, TagsCount } from './tags'; + +describe('TagsList', () => { + it('renders', () => { + const wrapper = shallow(); + + expect(wrapper.find(EuiBadge)).toHaveLength(1); + expect(wrapper.find(EuiBadge).prop('children')).toEqual('test'); + }); + + it('renders >2 badges in a tooltip list', () => { + const wrapper = shallow(); + + expect(wrapper.find(EuiBadge)).toHaveLength(3); + expect(wrapper.find(EuiToolTip)).toHaveLength(1); + + expect(wrapper.find(EuiBadge).at(0).prop('children')).toEqual('1'); + expect(wrapper.find(EuiBadge).at(1).prop('children')).toEqual('2'); + expect(wrapper.find(EuiBadge).at(2).prop('children')).toEqual('and 3 more'); + expect(wrapper.find(EuiToolTip).prop('content')).toEqual('3, 4, 5'); + }); + + it('does not render if missing tags', () => { + const wrapper = shallow(); + + expect(wrapper.isEmptyRender()).toBe(true); + }); +}); + +describe('TagsCount', () => { + it('renders a count and all tags in a tooltip', () => { + const wrapper = shallow(); + + expect(wrapper.find(EuiToolTip)).toHaveLength(1); + expect(wrapper.find(EuiBadge)).toHaveLength(1); + expect(wrapper.find(EuiBadge).prop('children')).toEqual('3 tags'); + expect(wrapper.find(EuiToolTip).prop('content')).toEqual('1, 2, 3'); + }); + + it('handles pluralization correctly', () => { + const wrapper = shallow(); + + expect(wrapper.find(EuiToolTip)).toHaveLength(1); + expect(wrapper.find(EuiBadge)).toHaveLength(1); + expect(wrapper.find(EuiBadge).prop('children')).toEqual('1 tag'); + expect(wrapper.find(EuiToolTip).prop('content')).toEqual('1'); + }); + + it('does not render if missing tags', () => { + const wrapper = shallow(); + + expect(wrapper.isEmptyRender()).toBe(true); + }); +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_tables/inline_tags_list.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_tables/tags.tsx similarity index 67% rename from x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_tables/inline_tags_list.tsx rename to x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_tables/tags.tsx index 908b096c80a9e..241abfabfab4c 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_tables/inline_tags_list.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/components/analytics_tables/tags.tsx @@ -12,17 +12,35 @@ import { i18n } from '@kbn/i18n'; import { Query } from '../../types'; +import './tags.scss'; + interface Props { tags?: Query['tags']; } -export const InlineTagsList: React.FC = ({ tags }) => { + +export const TagsCount: React.FC = ({ tags }) => { + if (!tags?.length) return null; + + return ( + + + {i18n.translate('xpack.enterpriseSearch.appSearch.engine.analytics.table.tagsCountBadge', { + defaultMessage: '{tagsCount, plural, one {# tag} other {# tags}}', + values: { tagsCount: tags.length }, + })} + + + ); +}; + +export const TagsList: React.FC = ({ tags }) => { if (!tags?.length) return null; const displayedTags = tags.slice(0, 2); const tooltipTags = tags.slice(2); return ( - + {displayedTags.map((tag: string) => ( {tag} diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/views/analytics.scss b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/views/analytics.scss new file mode 100644 index 0000000000000..9b24a64390d4f --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/views/analytics.scss @@ -0,0 +1,5 @@ +.analyticsOverviewTables { + @include euiBreakpoint('xs', 's', 'm', 'l') { + flex-direction: column; // Force full width on table panels earlier to ensure content stays legible + } +} diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/views/analytics.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/views/analytics.test.tsx index d8921ff0d3723..688d5dec1a958 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/views/analytics.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/views/analytics.test.tsx @@ -42,7 +42,7 @@ describe('Analytics overview', () => { expect(wrapper.find(AnalyticsCards)).toHaveLength(1); expect(wrapper.find(AnalyticsChart)).toHaveLength(1); - expect(wrapper.find(AnalyticsSection)).toHaveLength(3); + expect(wrapper.find(AnalyticsSection)).toHaveLength(2); expect(wrapper.find(AnalyticsTable)).toHaveLength(4); expect(wrapper.find(RecentQueriesTable)).toHaveLength(1); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/views/analytics.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/views/analytics.tsx index a4f0bc356ac78..82b0d9a318f1d 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/views/analytics.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/views/analytics.tsx @@ -9,10 +9,12 @@ import React from 'react'; import { useValues } from 'kea'; -import { EuiSpacer, EuiTitle } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiPanel, EuiSpacer } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { EuiButtonTo } from '../../../../shared/react_router_helpers'; +import { EuiButtonEmptyTo } from '../../../../shared/react_router_helpers'; +import { CursorIcon } from '../../../icons'; + import { ENGINE_ANALYTICS_TOP_QUERIES_PATH, ENGINE_ANALYTICS_TOP_QUERIES_NO_RESULTS_PATH, @@ -20,6 +22,7 @@ import { ENGINE_ANALYTICS_TOP_QUERIES_WITH_CLICKS_PATH, ENGINE_ANALYTICS_RECENT_QUERIES_PATH, } from '../../../routes'; +import { DataPanel } from '../../data_panel'; import { generateEnginePath } from '../../engine'; import { AnalyticsLayout } from '../analytics_layout'; @@ -37,6 +40,8 @@ import { } from '../constants'; import { AnalyticsLogic, AnalyticsCards, AnalyticsChart, convertToChartData } from '../index'; +import './analytics.scss'; + export const Analytics: React.FC = () => { const { totalQueries, @@ -55,45 +60,54 @@ export const Analytics: React.FC = () => { return ( - + + + + + + {/* TODO: Update this panel to use the bordered version once available */} + + + + + - { 'Gain insight into the most frequent queries, and which queries returned no results.', } )} + iconType="search" > - -

{TOP_QUERIES}

-
- - - - -

{TOP_QUERIES_NO_RESULTS}

-
- - + + + {TOP_QUERIES}} + filled + action={} + > + + + + + {TOP_QUERIES_NO_RESULTS}} + filled + action={ + + } + > + + + +
@@ -134,39 +162,57 @@ export const Analytics: React.FC = () => { defaultMessage: 'Discover which queries generated the most and least amount of clicks.', } )} + iconType={CursorIcon} > - -

{TOP_QUERIES_WITH_CLICKS}

-
- - - - -

{TOP_QUERIES_NO_CLICKS}

-
- - + + + {TOP_QUERIES_WITH_CLICKS}} + filled + action={ + + } + > + + + + + {TOP_QUERIES_NO_CLICKS}} + filled + action={ + + } + > + + + + - {RECENT_QUERIES}} subtitle={i18n.translate( 'xpack.enterpriseSearch.appSearch.engine.analytics.recentQueriesDescription', { defaultMessage: 'A view into queries happening right now.' } )} + action={} > - - +
); }; export const ViewAllButton: React.FC<{ to: string }> = ({ to }) => ( - + {i18n.translate('xpack.enterpriseSearch.appSearch.engine.analytics.table.viewAllButtonLabel', { defaultMessage: 'View all', })} - + ); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/data_panel/data_panel.scss b/x-pack/plugins/enterprise_search/public/applications/app_search/components/data_panel/data_panel.scss new file mode 100644 index 0000000000000..f05e029ec8f8b --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/data_panel/data_panel.scss @@ -0,0 +1,8 @@ +.dataPanel { + // TODO: This CSS can be removed once EUI supports tables in `subdued` panels + &--filled { + .euiTable { + background-color: transparent; + } + } +} diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/data_panel/data_panel.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/data_panel/data_panel.test.tsx new file mode 100644 index 0000000000000..e8f480bce9ee7 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/data_panel/data_panel.test.tsx @@ -0,0 +1,95 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { shallow } from 'enzyme'; + +import { EuiIcon, EuiButton } from '@elastic/eui'; + +import { DataPanel } from './data_panel'; + +describe('DataPanel', () => { + it('renders with a title and children', () => { + const wrapper = shallow( + Tabula Rasa}> +
Look at this graph
+
+ ); + + expect(wrapper.find('[data-test-subj="title"]').text()).toEqual('Tabula Rasa'); + expect(wrapper.find('[data-test-subj="children"]').text()).toEqual('Look at this graph'); + }); + + describe('components', () => { + it('renders with an icon', () => { + const wrapper = shallow(The Smoke Monster} iconType="eye" />); + + expect(wrapper.find(EuiIcon).prop('type')).toEqual('eye'); + }); + + it('renders with a subtitle', () => { + const wrapper = shallow( + Hugo Reyes} subtitle="Hurley was typically happy-go-lucky" /> + ); + + expect(wrapper.find('p').text()).toEqual('Hurley was typically happy-go-lucky'); + }); + + it('renders with an icon and a subtitle', () => { + const wrapper = shallow( + Flight 815} + iconType="package" + subtitle="Oceanic Airlines Flight 815 was a scheduled flight from Sydney, Australia to Los Angeles, California" + /> + ); + + expect(wrapper.find(EuiIcon).prop('type')).toEqual('package'); + expect(wrapper.find('p').text()).toEqual( + 'Oceanic Airlines Flight 815 was a scheduled flight from Sydney, Australia to Los Angeles, California' + ); + }); + + it('renders with a button', () => { + const wrapper = shallow( + Board Flight 815} + action={Book flight} + /> + ); + + expect(wrapper.find('[data-test-subj="action"]')).toHaveLength(1); + }); + }); + + describe('props', () => { + it('renders panel color based on filled flag', () => { + const wrapper = shallow(Test} />); + + expect(wrapper.prop('color')).toEqual('plain'); + expect(wrapper.prop('className')).toEqual('dataPanel'); + + wrapper.setProps({ filled: true }); + + expect(wrapper.prop('color')).toEqual('subdued'); + expect(wrapper.prop('className')).toEqual('dataPanel dataPanel--filled'); + }); + + it('passes class names', () => { + const wrapper = shallow(Test} className="testing" />); + + expect(wrapper.prop('className')).toEqual('dataPanel testing'); + }); + + it('passes arbitrary props', () => { + const wrapper = shallow(Test} data-test-subj="testing" />); + + expect(wrapper.find('[data-test-subj="testing"]')).toHaveLength(1); + }); + }); +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/data_panel/data_panel.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/data_panel/data_panel.tsx new file mode 100644 index 0000000000000..f6a474689b3af --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/data_panel/data_panel.tsx @@ -0,0 +1,73 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import classNames from 'classnames'; + +import { + EuiFlexGroup, + EuiFlexItem, + EuiIcon, + EuiPanel, + EuiSpacer, + EuiText, + EuiTitle, +} from '@elastic/eui'; + +import './data_panel.scss'; + +interface Props { + title: React.ReactElement; // e.g., h2 tag + subtitle?: string; + iconType?: string; + action?: React.ReactNode; + filled?: boolean; + className?: string; +} + +export const DataPanel: React.FC = ({ + title, + subtitle, + iconType, + action, + filled, + className, + children, + ...props // e.g., data-test-subj +}) => { + const classes = classNames('dataPanel', className, { + 'dataPanel--filled': filled, + }); + + return ( + + + + + {iconType && ( + + + + )} + + {title} + {subtitle && ( + +

{subtitle}

+
+ )} +
+
+
+ {action && {action}} +
+ + {children} +
+ ); +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/data_panel/index.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/data_panel/index.ts new file mode 100644 index 0000000000000..092a86180e95d --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/data_panel/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 { DataPanel } from './data_panel'; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/components/recent_api_logs.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/components/recent_api_logs.test.tsx index 42fa9777563db..ceda3ab92f589 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/components/recent_api_logs.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/components/recent_api_logs.test.tsx @@ -11,8 +11,6 @@ import React from 'react'; import { shallow, ShallowWrapper } from 'enzyme'; -import { EuiButtonTo } from '../../../../shared/react_router_helpers'; - import { RecentApiLogs } from './recent_api_logs'; describe('RecentApiLogs', () => { @@ -24,8 +22,7 @@ describe('RecentApiLogs', () => { }); it('renders the recent API logs table', () => { - expect(wrapper.find('h2').text()).toEqual('Recent API events'); - expect(wrapper.find(EuiButtonTo).prop('to')).toEqual('/engines/some-engine/api-logs'); + expect(wrapper.prop('title')).toEqual(

Recent API events

); // TODO: expect(wrapper.find(ApiLogsTable)).toHaveLength(1) }); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/components/recent_api_logs.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/components/recent_api_logs.tsx index 625ba2e905840..1c7f43a592536 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/components/recent_api_logs.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/components/recent_api_logs.tsx @@ -7,40 +7,26 @@ import React from 'react'; -import { - EuiPageContent, - EuiPageContentHeader, - EuiPageContentHeaderSection, - EuiPageContentBody, - EuiTitle, -} from '@elastic/eui'; - -import { EuiButtonTo } from '../../../../shared/react_router_helpers'; +import { EuiButtonEmptyTo } from '../../../../shared/react_router_helpers'; import { ENGINE_API_LOGS_PATH } from '../../../routes'; import { RECENT_API_EVENTS } from '../../api_logs/constants'; +import { DataPanel } from '../../data_panel'; import { generateEnginePath } from '../../engine'; import { VIEW_API_LOGS } from '../constants'; export const RecentApiLogs: React.FC = () => { return ( - - - - -

{RECENT_API_EVENTS}

-
-
- - - {VIEW_API_LOGS} - - -
- - TODO: API Logs Table - {/* */} - -
+ {RECENT_API_EVENTS}} + action={ + + {VIEW_API_LOGS} + + } + > + TODO: API Logs Table + {/* */} + ); }; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/components/total_charts.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/components/total_charts.test.tsx index a2f35b4709939..74ce770205ffe 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/components/total_charts.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/components/total_charts.test.tsx @@ -12,7 +12,6 @@ import React from 'react'; import { shallow, ShallowWrapper } from 'enzyme'; -import { EuiButtonTo } from '../../../../shared/react_router_helpers'; import { AnalyticsChart } from '../../analytics'; import { TotalCharts } from './total_charts'; @@ -31,18 +30,16 @@ describe('TotalCharts', () => { }); it('renders the total queries chart', () => { - const chart = wrapper.find('[data-test-subj="TotalQueriesChart"]'); + const panel = wrapper.find('[data-test-subj="TotalQueriesChart"]'); - expect(chart.find('h2').text()).toEqual('Total queries'); - expect(chart.find(EuiButtonTo).prop('to')).toEqual('/engines/some-engine/analytics'); - expect(chart.find(AnalyticsChart)).toHaveLength(1); + expect(panel.prop('title')).toEqual(

Total queries

); + expect(panel.find(AnalyticsChart)).toHaveLength(1); }); it('renders the total API operations chart', () => { - const chart = wrapper.find('[data-test-subj="TotalApiOperationsChart"]'); + const panel = wrapper.find('[data-test-subj="TotalApiOperationsChart"]'); - expect(chart.find('h2').text()).toEqual('Total API operations'); - expect(chart.find(EuiButtonTo).prop('to')).toEqual('/engines/some-engine/api-logs'); - expect(chart.find(AnalyticsChart)).toHaveLength(1); + expect(panel.prop('title')).toEqual(

Total API operations

); + expect(panel.find(AnalyticsChart)).toHaveLength(1); }); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/components/total_charts.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/components/total_charts.tsx index 6bd973ae142a8..77ba9ad0f9514 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/components/total_charts.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/components/total_charts.tsx @@ -9,21 +9,13 @@ import React from 'react'; import { useValues } from 'kea'; -import { - EuiFlexGroup, - EuiFlexItem, - EuiPageContent, - EuiPageContentHeader, - EuiPageContentHeaderSection, - EuiPageContentBody, - EuiTitle, - EuiText, -} from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import { EuiButtonTo } from '../../../../shared/react_router_helpers'; +import { EuiButtonEmptyTo } from '../../../../shared/react_router_helpers'; import { ENGINE_ANALYTICS_PATH, ENGINE_API_LOGS_PATH } from '../../../routes'; import { AnalyticsChart, convertToChartData } from '../../analytics'; import { TOTAL_QUERIES, TOTAL_API_OPERATIONS } from '../../analytics/constants'; +import { DataPanel } from '../../data_panel'; import { generateEnginePath } from '../../engine'; import { VIEW_ANALYTICS, VIEW_API_LOGS, LAST_7_DAYS } from '../constants'; @@ -35,62 +27,52 @@ export const TotalCharts: React.FC = () => { return ( - - - - -

{TOTAL_QUERIES}

-
- - {LAST_7_DAYS} - -
- - - {VIEW_ANALYTICS} - - -
- - - -
+ {TOTAL_QUERIES}} + subtitle={LAST_7_DAYS} + action={ + + {VIEW_ANALYTICS} + + } + > + +
- - - - -

{TOTAL_API_OPERATIONS}

-
- - {LAST_7_DAYS} - -
- - - {VIEW_API_LOGS} - - -
- - - -
+ {TOTAL_API_OPERATIONS}} + subtitle={LAST_7_DAYS} + action={ + + {VIEW_API_LOGS} + + } + > + +
); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/engine_overview_metrics.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/engine_overview_metrics.tsx index c33431354eafc..c60cf70f435c5 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/engine_overview_metrics.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/engine_overview_metrics.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { useValues } from 'kea'; -import { EuiPageHeader, EuiTitle, EuiSpacer } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiPageHeader, EuiTitle, EuiSpacer } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FlashMessages } from '../../../shared/flash_messages'; @@ -37,9 +37,14 @@ export const EngineOverviewMetrics: React.FC = () => { ) : ( <> - - - + + + + + + + + diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_overview.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_overview.tsx index 4cfa5d9078162..ca70e323bd3e7 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_overview.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_overview.tsx @@ -25,10 +25,9 @@ import { LicensingLogic } from '../../../shared/licensing'; import { EuiButtonTo } from '../../../shared/react_router_helpers'; import { convertMetaToPagination, handlePageChange } from '../../../shared/table_pagination'; import { SendAppSearchTelemetry as SendTelemetry } from '../../../shared/telemetry'; +import { EngineIcon, MetaEngineIcon } from '../../icons'; import { ENGINE_CREATION_PATH, META_ENGINE_CREATION_PATH } from '../../routes'; -import { EngineIcon } from './assets/engine_icon'; -import { MetaEngineIcon } from './assets/meta_engine_icon'; import { EnginesOverviewHeader, LoadingState, EmptyState } from './components'; import { CREATE_AN_ENGINE_BUTTON_LABEL, diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/boosts/boosts.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/boosts/boosts.test.tsx index 75c22d2ae9473..8a355b97e7b9f 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/boosts/boosts.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/boosts/boosts.test.tsx @@ -64,6 +64,20 @@ describe('Boosts', () => { expect(select.prop('options').map((o: any) => o.value)).toEqual(['add-boost', 'value']); }); + it('will not render functional or value options if "type" prop is "geolocation"', () => { + const wrapper = shallow( + + ); + + const select = wrapper.find(EuiSuperSelect); + expect(select.prop('options').map((o: any) => o.value)).toEqual(['add-boost', 'proximity']); + }); + it('will add a boost of the selected type when a selection is made', () => { const wrapper = shallow(); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/boosts/boosts.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/boosts/boosts.tsx index d6d43ea7beab0..4268e21110277 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/boosts/boosts.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/boosts/boosts.tsx @@ -13,7 +13,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiPanel, EuiTitle, EuiSuperSelect } from '@ import { i18n } from '@kbn/i18n'; -import { TEXT } from '../../../../shared/constants/field_types'; +import { GEOLOCATION, TEXT } from '../../../../shared/constants/field_types'; import { SchemaTypes } from '../../../../shared/types'; import { BoostIcon } from '../boost_icon'; @@ -68,6 +68,8 @@ const BASE_OPTIONS = [ const filterInvalidOptions = (value: BoostType, type: SchemaTypes) => { // Proximity and Functional boost types are not valid for text fields if (type === TEXT && [BoostType.Proximity, BoostType.Functional].includes(value)) return false; + // Value and Functional boost types are not valid for geolocation fields + if (type === GEOLOCATION && [BoostType.Functional, BoostType.Value].includes(value)) return false; return true; }; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/relevance_tuning.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/relevance_tuning.tsx index 0ae3c8fd3b5dc..70adc91dd2b30 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/relevance_tuning.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/relevance_tuning.tsx @@ -19,6 +19,8 @@ import { DOCS_PREFIX } from '../../routes'; import { RelevanceTuningForm } from './relevance_tuning_form'; import { RelevanceTuningLayout } from './relevance_tuning_layout'; +import { RelevanceTuningPreview } from './relevance_tuning_preview'; + import { RelevanceTuningLogic } from '.'; interface Props { @@ -81,11 +83,13 @@ export const RelevanceTuning: React.FC = ({ engineBreadcrumb }) => { } return ( - - + + - + + + ); }; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/relevance_tuning_form/relevance_tuning_form.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/relevance_tuning_form/relevance_tuning_form.tsx index 87b9e1615774f..ab72f29a678c9 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/relevance_tuning_form/relevance_tuning_form.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/relevance_tuning_form/relevance_tuning_form.tsx @@ -10,8 +10,6 @@ import React from 'react'; import { useActions, useValues } from 'kea'; import { - EuiPageHeader, - EuiPageHeaderSection, EuiTitle, EuiFieldSearch, EuiSpacer, @@ -44,37 +42,36 @@ export const RelevanceTuningForm: React.FC = () => { return (
- - - -

- {i18n.translate( - 'xpack.enterpriseSearch.appSearch.engine.relevanceTuning.manageFields.title', - { - defaultMessage: 'Manage fields', - } - )} -

-
-
-
- {schemaFields.length > FIELD_FILTER_CUTOFF && ( - setFilterValue(e.target.value)} - placeholder={i18n.translate( - 'xpack.enterpriseSearch.appSearch.engine.relevanceTuning.manageFields.filterPlaceholder', + +

+ {i18n.translate( + 'xpack.enterpriseSearch.appSearch.engine.relevanceTuning.manageFields.title', { - defaultMessage: 'Filter {schemaFieldsLength} fields...', - values: { - schemaFieldsLength: schemaFields.length, - }, + defaultMessage: 'Manage fields', } )} - fullWidth - /> - )} +

+
+ {schemaFields.length > FIELD_FILTER_CUTOFF && ( + <> + setFilterValue(e.target.value)} + placeholder={i18n.translate( + 'xpack.enterpriseSearch.appSearch.engine.relevanceTuning.manageFields.filterPlaceholder', + { + defaultMessage: 'Filter {schemaFieldsLength} fields...', + values: { + schemaFieldsLength: schemaFields.length, + }, + } + )} + fullWidth + /> + + + )} {filteredSchemaFields.map((fieldName) => ( { expect(mockEngineActions.initializeEngine).toHaveBeenCalled(); }); - it('will re-fetch the current engine after settings are updated if there were unconfirmed search fieldds', async () => { + it('will re-fetch the current engine after settings are updated if there were unconfirmed search fields', async () => { mockEngineValues.engine.unsearchedUnconfirmedFields = true; mount({}); http.put.mockReturnValueOnce(Promise.resolve(searchSettings)); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/relevance_tuning_preview.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/relevance_tuning_preview.test.tsx new file mode 100644 index 0000000000000..ec6458a14b346 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/relevance_tuning_preview.test.tsx @@ -0,0 +1,110 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { setMockActions, setMockValues } from '../../../__mocks__/kea.mock'; + +import React from 'react'; + +import { shallow } from 'enzyme'; + +import { EuiFieldSearch } from '@elastic/eui'; + +import { Result } from '../result/result'; + +import { RelevanceTuningPreview } from './relevance_tuning_preview'; + +describe('RelevanceTuningPreview', () => { + const result1 = { id: { raw: 1 } }; + const result2 = { id: { raw: 2 } }; + const result3 = { id: { raw: 3 } }; + + const actions = { + updateSearchValue: jest.fn(), + }; + + const values = { + searchResults: [result1, result2, result3], + engineName: 'foo', + isMetaEngine: false, + schema: {}, + }; + + beforeAll(() => { + setMockActions(actions); + setMockValues(values); + }); + + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('renders', () => { + const wrapper = shallow(); + + expect(wrapper.find(EuiFieldSearch).prop('placeholder')).toBe('Search foo'); + + const results = wrapper.find(Result); + expect(results.length).toBe(3); + expect(results.at(0).prop('result')).toBe(result1); + expect(results.at(0).prop('isMetaEngine')).toBe(false); + expect(results.at(0).prop('showScore')).toBe(true); + expect(results.at(0).prop('schemaForTypeHighlights')).toBe(values.schema); + + expect(results.at(1).prop('result')).toBe(result2); + expect(results.at(2).prop('result')).toBe(result3); + + expect(wrapper.find('[data-test-subj="EmptyQueryPrompt"]').exists()).toBe(false); + expect(wrapper.find('[data-test-subj="NoResultsPrompt"]').exists()).toBe(false); + }); + + it('correctly indicates whether or not this is a meta engine in results', () => { + setMockValues({ + ...values, + isMetaEngine: true, + }); + + const wrapper = shallow(); + + const results = wrapper.find(Result); + expect(results.at(0).prop('isMetaEngine')).toBe(true); + expect(results.at(1).prop('isMetaEngine')).toBe(true); + expect(results.at(2).prop('isMetaEngine')).toBe(true); + }); + + it('renders a search box that will update search results whenever it is changed', () => { + const wrapper = shallow(); + + wrapper.find(EuiFieldSearch).simulate('change', { target: { value: 'some search text' } }); + + expect(actions.updateSearchValue).toHaveBeenCalledWith('some search text'); + }); + + it('will show user a prompt to enter a query if they have not entered one', () => { + setMockValues({ + ...values, + // Since `searchResults` is initialized as undefined, an undefined value indicates + // that no query has been performed, which means they have no yet entered a query + searchResults: undefined, + }); + + const wrapper = shallow(); + + expect(wrapper.find('[data-test-subj="EmptyQueryPrompt"]').exists()).toBe(true); + expect(wrapper.find('[data-test-subj="NoResultsPrompt"]').exists()).toBe(false); + }); + + it('will show user a no results message if their query returns no results', () => { + setMockValues({ + ...values, + searchResults: [], + }); + + const wrapper = shallow(); + + expect(wrapper.find('[data-test-subj="EmptyQueryPrompt"]').exists()).toBe(false); + expect(wrapper.find('[data-test-subj="NoResultsPrompt"]').exists()).toBe(true); + }); +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/relevance_tuning_preview.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/relevance_tuning_preview.tsx new file mode 100644 index 0000000000000..298b692ac7b80 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/relevance_tuning/relevance_tuning_preview.tsx @@ -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 React from 'react'; + +import { useActions, useValues } from 'kea'; + +import { EuiEmptyPrompt, EuiFieldSearch, EuiPanel, EuiSpacer, EuiTitle } from '@elastic/eui'; + +import { i18n } from '@kbn/i18n'; + +import { EngineLogic } from '../engine'; +import { Result } from '../result/result'; + +import { RelevanceTuningLogic } from '.'; + +const emptyCallout = ( + +); + +const noResultsCallout = ( + +); + +export const RelevanceTuningPreview: React.FC = () => { + const { updateSearchValue } = useActions(RelevanceTuningLogic); + const { searchResults, schema } = useValues(RelevanceTuningLogic); + const { engineName, isMetaEngine } = useValues(EngineLogic); + + return ( + + +

+ {i18n.translate('xpack.enterpriseSearch.appSearch.engine.relevanceTuning.preview.title', { + defaultMessage: 'Preview', + })} +

+
+ + updateSearchValue(e.target.value)} + placeholder={i18n.translate( + 'xpack.enterpriseSearch.appSearch.engine.relevanceTuning.preview.searchPlaceholder', + { + defaultMessage: 'Search {engineName}', + values: { + engineName, + }, + } + )} + fullWidth + /> + {!searchResults && emptyCallout} + {searchResults && searchResults.length === 0 && noResultsCallout} + {searchResults && + searchResults.map((result) => { + return ( + + + + + ); + })} +
+ ); +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/icons/cursor_icon.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/icons/cursor_icon.tsx new file mode 100644 index 0000000000000..c874f135563ec --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/icons/cursor_icon.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'; + +// TODO: This icon will be added to EUI soon - we should remove this custom SVG when once it's available in EUI +export const CursorIcon: React.FC = ({ ...props }) => ( + +); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/assets/engine_icon.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/icons/engine_icon.tsx similarity index 100% rename from x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/assets/engine_icon.tsx rename to x-pack/plugins/enterprise_search/public/applications/app_search/icons/engine_icon.tsx diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/assets/icons.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/icons/icons.test.tsx similarity index 75% rename from x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/assets/icons.test.tsx rename to x-pack/plugins/enterprise_search/public/applications/app_search/icons/icons.test.tsx index 33ca5bd8248c9..7c4eaddda6c6f 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/assets/icons.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/icons/icons.test.tsx @@ -9,10 +9,16 @@ import React from 'react'; import { shallow } from 'enzyme'; +import { CursorIcon } from './cursor_icon'; import { EngineIcon } from './engine_icon'; import { MetaEngineIcon } from './meta_engine_icon'; -describe('Engines icons', () => { +describe('shared App Search icons', () => { + it('renders a cursor icon', () => { + const wrapper = shallow(); + expect(wrapper.hasClass('euiIcon')).toBe(true); + }); + it('renders an engine icon', () => { const wrapper = shallow(); expect(wrapper.hasClass('engineIcon')).toBe(true); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/icons/index.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/icons/index.ts new file mode 100644 index 0000000000000..1669fdab5ec4e --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/icons/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 { CursorIcon } from './cursor_icon'; +export { EngineIcon } from './engine_icon'; +export { MetaEngineIcon } from './meta_engine_icon'; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/assets/meta_engine_icon.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/icons/meta_engine_icon.tsx similarity index 100% rename from x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/assets/meta_engine_icon.tsx rename to x-pack/plugins/enterprise_search/public/applications/app_search/icons/meta_engine_icon.tsx diff --git a/x-pack/plugins/enterprise_search/server/routes/app_search/search_settings.ts b/x-pack/plugins/enterprise_search/server/routes/app_search/search_settings.ts index 82b0497cd0946..d329c9b834b08 100644 --- a/x-pack/plugins/enterprise_search/server/routes/app_search/search_settings.ts +++ b/x-pack/plugins/enterprise_search/server/routes/app_search/search_settings.ts @@ -79,7 +79,7 @@ export function registerSearchSettingsRoutes({ engineName: schema.string(), }), body: schema.object({ - boosts, + boosts: schema.maybe(boosts), search_fields: searchFields, }), query: schema.object({ diff --git a/x-pack/plugins/event_log/README.md b/x-pack/plugins/event_log/README.md index 9c806680f68a2..2656718cc15ea 100644 --- a/x-pack/plugins/event_log/README.md +++ b/x-pack/plugins/event_log/README.md @@ -1,188 +1,279 @@ # Event Log +The event log plugin provides a persistent history of alerting and action +actitivies. + ## Overview -The purpose of this plugin is to provide a way to persist a history of events -occuring in Kibana, initially just for the Make It Action project - alerts -and actions. +This plugin provides a persistent log of "events" that can be used by other +plugins to record their processing, for later acccess. Currently it's only +used by the alerts and actions plugins. +The "events" are ECS documents, with some custom properties for Kibana, and +alerting-specific properties within those Kibana properties. The number of +ECS fields is limited today, but can be extended fairly easily. We are being +conservative in adding new fields though, to help prevent indexing explosions. -## Basic Usage - Logging Events +A client API is available for other plugins to: -Follow these steps to use `eventLog` in your plugin: +- register the events they want to write +- write the events, with helpers for `duration` calculation, etc +- query the events -1. Declare `eventLog` as a dependency in `kibana.json`: +HTTP APIs are also available to query the events. -```json +Currently, events are written with references to Saved Objects, and queries +against the event log must include the Saved Object references that the query +should return events for. This is the basic security mechanism to prevent +users from accessing events for Saved Objects that they do not have access to. +The queries ensure that the user can read the referenced Saved Objects before +returning the events relating to them. + +The default index name is `.kibana-event-log-${kibanaVersion}-${ILM-sequence}`. + +The index written to is controlled by ILM. The ILM policy is initially created +by the plugin, but is otherwise never updated by the plugin. This allows +customers to customize it to their environment, without having to worry about +their updates getting overwritten by newer versions of Kibana. +The policy provides some default phases to roll over and delete older +indices. The name of the policy is `kibana-event-log-policy`. + + +## Event Documents + +The structure of the event documents can be seen in the +[mappings](generated/mappings.json) and +[config-schema definitions](generated/schemas.ts). Note these files are +generated via a script when the structure changes. See the +[README.md](generated/README.md) for how to change the document structure. + +Below is an document in the expected structure, with descriptions of the fields: + +```js { - ... - "requiredPlugins": ["eventLog"], - ... + "@timestamp": "ISO date", + tags: ["tags", "here"], + message: "message for humans here", + ecs: { + version: "version of ECS used by the event log", + }, + event: { + provider: "see below", + action: "see below", + start: "ISO date of start time for events that capture a duration", + duration: "duration in nanoseconds for events that capture a duration", + end: "ISO date of end time for events that capture a duration", + outcome: "success | failure, for events that indicate an outcome", + reason: "additional detail on failure outcome", + }, + error: { + message: "an error message, usually associated with outcome: failure", + }, + user: { + name: "name of Kibana user", + }, + kibana: { // custom ECS field + server_uuid: "UUID of kibana server, for diagnosing multi-Kibana scenarios", + alerting: { + instance_id: "alert instance id, for relevant documents", + action_group_id: "alert action group, for relevant documents", + action_subgroup_id: "alert action subgroup, for relevant documents", + status: "overall alert status, after alert execution", + }, + saved_objects: [ + { + rel: "'primary' | undefined; see below", + namespace: "${spaceId} | undefined", + id: "saved object id", + type: " saved object type", + }, + ], + }, } ``` -2. Register provider / actions, and create your plugin's logger, using service -API provided in the `setup` stage: +The `event.provider` and `event.action` fields provide a scoped mechanism for +describing who is generating the event, and what kind of event it is. Plugins +that write events need to register the `provider` and `action` values they +will be using. Generally, each plugin should provide it's own `provider`, +but a plugin could provide multiple providers, or a single provider might be +used by multiple plugins. -```typescript -... -import { IEventLogger, IEventLogService } from '../../event_log/server'; -interface PluginSetupDependencies { - eventLog: IEventLogService; -} -... -public setup(core: CoreSetup, { eventLog }: PluginSetupDependencies) { - ... - eventLog.registerProviderActions('my-plugin', ['action-1, action-2']); - const eventLogger: IEventLogger = eventLog.getLogger({ event: { provider: 'my-plugin' } }); - ... -} -... -``` +The following `provider` / `action` pairs are used by the alerting and actions +plugins: -4. To log an event, call `logEvent()` on the `eventLogger` object you created: +- `provider: actions` + - `action: execute` - generated when an action is executed by the actions client + - `action: execute-via-http` - generated when an action is executed via HTTP request -```typescript -... - eventLogger.logEvent({ event: { action: 'action-1' }, tags: ['fe', 'fi', 'fo'] }); -... -``` +- `provider: alerting` + - `action: execute` - generated when an alert executor runs + - `action: execute-action` - generated when an alert schedules an action to run + - `action: new-instance` - generated when an alert has a new instance id that is active + - `action: recovered-instance` - generated when an alert has a previously active instance id that is no longer active + - `action: active-instance` - generated when an alert determines an instance id is active +For the `saved_objects` array elements, these are references to saved objects +associated with the event. For the `alerting` provider, those are alert saved +ojects and for the `actions` provider those are action saved objects. The +`alerts:execute-action` event includes both the alert and action saved object +references. For that event, only the alert reference has the optional `rel` +property with a `primary` value. This property is used when searching the +event log to indicate which saved objects should be directly searchable via +saved object references. For the `alerts:execute-action` event, searching +only via the alert saved object reference will return the event. -## Testing -### Unit tests +## Event Log index - associated resources -Documentation: https://www.elastic.co/guide/en/kibana/current/development-tests.html#_unit_testing +The index template and ILM policy are defined in the file +[`x-pack/plugins/event_log/server/es/documents.ts`](server/es/documents.ts). -``` -yarn test:jest x-pack/plugins/event_log --watch -``` +See [ILM rollover action docs][] for more information on the `is_write_index` +and `index.lifecycle.*` properties. -### API Integration tests +[ILM rollover action docs]: https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-rollover.html -None yet! +## Using the Event Log for diagnosing alerting and actions issues -## Background +For ad-hoc diagnostic purposes, your go to tools are Discover and Lens. Your +user will need to have access to the index, which is considered a Kibana +system index due to it's prefix. -For the Make It Action alerting / action plugins, we will need a way to -persist data regarding alerts and actions, for UI and investigative purposes. -We're referring to this persisted data as "events", and will be persisted to -a new elasticsearch index referred to as the "event log". +Add the event log index as an index pattern. The only customization needed is +to set the `event.duration` field to a duration in nanoseconds. You'll +probably want it displayed as milliseconds. -Example events are actions firing, alerts running their scheduled functions, -alerts scheduling actions to run, etc. -This functionality will be provided in a new NP plugin `eventLog`, and will -provide server-side plugin APIs to write to the event log, and run limited -queries against it. For now, access via HTTP will not be available, due to -security concerns and lack of use cases. +## Experimental RESTful API for querying -The current clients for the event log are the actions and alerting plugins, -however the event log currently has nothing specific to them, and is general -purpose, so can be used by any plugin to "log events". +As this plugin is space-aware, prefix any URL below with the usual `/s/{space}` +to target a space other than the default space. -We currently assume that there may be many events logged, and that (some) customers -may not be interested in "old" events, and so to keep the event log from -consuming too much disk space, we'll set it up with ILM and some kind of -reasonable default policy that can be customized by the user. This implies -also the use of rollver, setting a write index alias upon rollover, and -that searches for events will be done via an ES index pattern / alias to search -across event log indices with a wildcard. +Usage of the event log allows you to retrieve the events for a given saved object type by the specified set of IDs. +The following API is experimental and can change or be removed in a future release. -The shape of the documents indexed into the event log index is a subset of ECS -properties with a few Kibana extensions. Over time the subset is of ECS and -Kibana extensions will likely grow. +### `GET /api/event_log/{type}/{id}/_find`: Get events for a given saved object type by the ID -# Basic example +Collects event information from the event log for the selected saved object by type and ID. -When an action is executed, an event should be written to the event log. +Params: -Here's a [`kbn-action` command](https://github.com/pmuellr/kbn-action) to -execute a "server log" action (writes a message to the Kibana log): +|Property|Description|Type| +|---|---|---| +|type|The type of the saved object whose events you're trying to get.|string| +|id|The id of the saved object.|string| -```console -$ kbn-action execute 79b4c37e-ef42-4421-a0b0-b536840f930d '{level:info message:hallo}' -{ - "status": "ok" -} -``` +Query: -Here's the event written to the event log index: +|Property|Description|Type| +|---|---|---| +|page|The page number.|number| +|per_page|The number of events to return per page.|number| +|sort_field|Sorts the response. Could be an event fields returned in the response.|string| +|sort_order|Sort direction, either `asc` or `desc`.|string| +|filter|A KQL string that you filter with an attribute from the event. It should look like `event.action:(execute)`.|string| +|start|The date to start looking for saved object events in the event log. Either an ISO date string, or a duration string that indicates the time since now.|string| +|end|The date to stop looking for saved object events in the event log. Either an ISO date string, or a duration string that indicates the time since now.|string| -```json -{ - "_index": ".kibana-event-log-000001", - "_type": "_doc", - "_id": "d2CXT20BPOpswQ8vgXp5", - "_score": 1, - "_source": { - "event": { - "provider": "actions", - "action": "execute", - "start": "2019-12-09T21:16:43.424Z", - "end": "2019-12-09T21:16:43.425Z", - "duration": 1000000 - }, - "kibana": { - "saved_objects": [ - { - "type": "action", - "id": "79b4c37e-ef42-4421-a0b0-b536840f930d" - } - ] - }, - "message": "action executed successfully: 79b4c37e-ef42-4421-a0b0-b536840f930d - .server-log - server-log", - "@timestamp": "2019-12-09T21:16:43.425Z", - "ecs": { - "version": "1.3.1" - } - } -} -``` +Response body: -The shape of the document written to the index is a subset of [ECS][] with an -extended field of `kibana` with some Kibana-related properties contained within -it. +See `QueryEventsBySavedObjectResult` in the Plugin Client APIs below. -The ES mappings for the ECS data, and the config-schema for the ECS data, are -generated by a script, and available here: +### `POST /api/event_log/{type}/_find`: Retrive events for a given saved object type by the IDs -- [`generated/mappings.json`](generated/mappings.json) -- [`generated/schemas.ts`](generated/schemas.ts) +Collects event information from the event log for the selected saved object by type and by IDs. -It's anticipated that these interfaces will grow over time, hopefully adding -more ECS fields but adding Kibana extensions as required. +Params: -Since there are some security concerns with the data, we are currently -restricting access via known saved object ids. That is, you can only query -history records associated with specific saved object ids. +|Property|Description|Type| +|---|---|---| +|type|The type of the saved object whose events you're trying to get.|string| -[ECS]: https://www.elastic.co/guide/en/ecs/current/index.html +Query: +|Property|Description|Type| +|---|---|---| +|page|The page number.|number| +|per_page|The number of events to return per page.|number| +|sort_field|Sorts the response. Could be an event field returned in the response.|string| +|sort_order|Sort direction, either `asc` or `desc`.|string| +|filter|A KQL string that you filter with an attribute from the event. It should look like `event.action:(execute)`.|string| +|start|The date to start looking for saved object events in the event log. Either an ISO date string, or a duration string that indicates the time since now.|string| +|end|The date to stop looking for saved object events in the event log. Either an ISO date string, or a duration string that indicates the time since now.|string| -## API +Request Body: -Event Log plugin returns a service instance from setup() and client service from start() methods. +|Property|Description|Type| +|---|---|---| +|ids|The array ids of the saved object.|string array| -### Setup -```typescript -// IEvent is a TS type generated from the subset of ECS supported +Response body: + +See `QueryEventsBySavedObjectResult` in the Plugin Client APIs below. + + +## Plugin Client APIs for querying + +```ts +interface EventLogClient { + findEventsBySavedObjectIds( + type: string, + ids: string[], + options?: Partial + ): Promise; +} + +interface FindOptionsType { /* typed version of HTTP query parameters ^^^ */ } + +interface QueryEventsBySavedObjectResult { + page: number; + per_page: number; + total: number; + data: Event[]; +} +``` -export interface IEventLogService { - registerProviderActions(provider: string, actions: string[]): void; - isProviderActionRegistered(provider: string, action: string): boolean; - getProviderActions(): Map>; +## Generating Events + +Follow these steps to use `eventLog` in your plugin: - getLogger(properties: IEvent): IEventLogger; +1. Declare `eventLog` as a dependency in `kibana.json`: + +```json +{ + ... + "requiredPlugins": ["eventLog"], + ... } +``` + +2. Register provider / actions, and create your plugin's logger, using the +service API provided in the `setup` stage: -export interface IEventLogger { - logEvent(properties: IEvent): void; - startTiming(event: IEvent): void; - stopTiming(event: IEvent): void; +```typescript +... +import { IEventLogger, IEventLogService } from '../../event_log/server'; +interface PluginSetupDependencies { + eventLog: IEventLogService; } +... +public setup(core: CoreSetup, { eventLog }: PluginSetupDependencies) { + ... + eventLog.registerProviderActions('my-plugin', ['action-1, action-2']); + const eventLogger: IEventLogger = eventLog.getLogger({ event: { provider: 'my-plugin' } }); + ... +} +... +``` + +3. To log an event, call `logEvent()` on the `eventLogger` object you created: + +```typescript +... + eventLogger.logEvent({ event: { action: 'action-1' }, tags: ['fe', 'fi', 'fo'] }); +... ``` The plugin exposes an `IEventLogService` object to plugins that pre-req it. @@ -211,15 +302,15 @@ that result is validated to ensure it's complete and valid. Errors will be logged to the server log. The `logEvent()` method returns no values, and is itself not asynchronous. -It's a "call and forget" kind of thing. The method itself will arrange -to have the ultimate document written to the index asynchronously. It's designed +The messages are queued written asynchonously in bulk. It's designed this way because it's not clear what a client would do with a result from this method, nor what it would do if the method threw an error. All the error processing involved with getting the data into the index is handled internally, and logged to the server log as appropriate. -The `startTiming()` and `stopTiming()` methods can be used to set the timing -properties `start`, `end`, and `duration` in the event. For example: +There are additional utility methods `startTiming()` and `stopTiming()` which +can be used to set the timing properties `start`, `end`, and `duration` in the +event. For example: ```typescript const loggedEvent: IEvent = { event: { action: 'foo' } }; @@ -258,124 +349,17 @@ export interface IEventLogClient { The plugin exposes an `IEventLogClientService` object to plugins that request it. These plugins must call `getClient(request)` to get the event log client. -## Experimental RESTful API - -Usage of the event log allows you to retrieve the events for a given saved object type by the specified set of IDs. -The following API is experimental and can change or be removed in a future release. - -### `GET /api/event_log/{type}/{id}/_find`: Get events for a given saved object type by the ID - -Collects event information from the event log for the selected saved object by type and ID. - -Params: - -|Property|Description|Type| -|---|---|---| -|type|The type of the saved object whose events you're trying to get.|string| -|id|The id of the saved object.|string| - -Query: - -|Property|Description|Type| -|---|---|---| -|page|The page number.|number| -|per_page|The number of events to return per page.|number| -|sort_field|Sorts the response. Could be an event fields returned in the response.|string| -|sort_order|Sort direction, either `asc` or `desc`.|string| -|filter|A KQL string that you filter with an attribute from the event. It should look like `event.action:(execute)`.|string| -|start|The date to start looking for saved object events in the event log. Either an ISO date string, or a duration string that indicates the time since now.|string| -|end|The date to stop looking for saved object events in the event log. Either an ISO date string, or a duration string that indicates the time since now.|string| - -### `POST /api/event_log/{type}/_find`: Retrive events for a given saved object type by the IDs - -Collects event information from the event log for the selected saved object by type and by IDs. - -Params: - -|Property|Description|Type| -|---|---|---| -|type|The type of the saved object whose events you're trying to get.|string| - -Query: - -|Property|Description|Type| -|---|---|---| -|page|The page number.|number| -|per_page|The number of events to return per page.|number| -|sort_field|Sorts the response. Could be an event field returned in the response.|string| -|sort_order|Sort direction, either `asc` or `desc`.|string| -|filter|A KQL string that you filter with an attribute from the event. It should look like `event.action:(execute)`.|string| -|start|The date to start looking for saved object events in the event log. Either an ISO date string, or a duration string that indicates the time since now.|string| -|end|The date to stop looking for saved object events in the event log. Either an ISO date string, or a duration string that indicates the time since now.|string| - -Body: - -|Property|Description|Type| -|---|---|---| -|ids|The array ids of the saved object.|string array| - -## Stored data - -The elasticsearch index for the event log will have ILM and rollover support, -as customers may decide to only keep recent event documents, wanting indices -with older event documents deleted, turned cold, frozen, etc. We'll supply -some default values, but customers will be able to tweak these. - -The index template, mappings, config-schema types, etc for the index can -be found in the [generated directory](generated). These files are generated -from a script which takes as input the ECS properties to use, and the Kibana -extensions. - -See [ilm rollover action docs][] for more info on the `is_write_index`, and `index.lifecycle.*` properties. - -[ilm rollover action docs]: https://www.elastic.co/guide/en/elasticsearch/reference/current/_actions.html#ilm-rollover-action - -Of particular note in the `mappings`: - -- all "objects" are `dynamic: 'strict'` implies users can't add new fields -- all the `properties` are indexed - -We may change some of that before releasing. - +## Testing -## ILM setup +### Unit tests -We'll want to provide default ILM policy, this seems like a reasonable first -attempt: +Documentation: https://www.elastic.co/guide/en/kibana/current/development-tests.html#_unit_testing ``` -PUT _ilm/policy/event_log_policy -{ - "policy": { - "phases": { - "hot": { - "actions": { - "rollover": { - "max_size": "50GB", - "max_age": "30d" - } - } - }, - "delete": { - "min_age": "90d", - "actions": { - "delete": {} - } - } - } - } -} +yarn test:jest x-pack/plugins/event_log --watch ``` -This means that ILM would "rollover" the current index, say -`.kibana-event-log-8.0.0-000001` by creating a new index `.kibana-event-log-8.0.0-000002`, -which would "inherit" everything from the index template, and then ILM will -set the write index of the the alias to the new index. This would happen -when the original index grew past 50 GB, or was created more than 30 days ago. -After rollover, the indices will be removed after 90 days to avoid disks to fill up. +### API Integration tests -For more relevant information on ILM, see: -[getting started with ILM doc][] and [write index alias behavior][]: +See: [`x-pack/test/plugin_api_integration/test_suites/event_log`](https://github.com/elastic/kibana/tree/master/x-pack/test/plugin_api_integration/test_suites/event_log). -[getting started with ILM doc]: https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started-index-lifecycle-management.html -[write index alias behavior]: https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html#indices-rollover-is-write-index diff --git a/x-pack/plugins/file_upload/public/importer/geojson_importer/geojson_importer.test.js b/x-pack/plugins/file_upload/public/importer/geojson_importer/geojson_importer.test.js index 98f14f3e58166..3542b38aac793 100644 --- a/x-pack/plugins/file_upload/public/importer/geojson_importer/geojson_importer.test.js +++ b/x-pack/plugins/file_upload/public/importer/geojson_importer/geojson_importer.test.js @@ -25,6 +25,29 @@ const FEATURE_COLLECTION = { ], }; +const GEOMETRY_COLLECTION_FEATURE = { + type: 'Feature', + properties: { + population: 200, + }, + geometry: { + type: 'GeometryCollection', + geometries: [ + { + type: 'Point', + coordinates: [100.0, 0.0], + }, + { + type: 'LineString', + coordinates: [ + [101.0, 0.0], + [102.0, 1.0], + ], + }, + ], + }, +}; + describe('previewFile', () => { const FILE_WITH_FEATURE_COLLECTION = new File( [JSON.stringify(FEATURE_COLLECTION)], @@ -60,6 +83,27 @@ describe('previewFile', () => { }); }); + test('should read GeometryCollection feature', async () => { + const fileWithGeometryCollectionFeature = new File( + [ + JSON.stringify({ + type: 'FeatureCollection', + features: [GEOMETRY_COLLECTION_FEATURE], + }), + ], + 'testfile.json', + { type: 'text/json' } + ); + const importer = new GeoJsonImporter(fileWithGeometryCollectionFeature); + const results = await importer.previewFile(); + expect(results).toEqual({ + previewCoverage: 100, + hasPoints: false, + hasShapes: true, + features: [GEOMETRY_COLLECTION_FEATURE], + }); + }); + test('should remove features without geometry', async () => { const fileWithFeaturesWithoutGeometry = new File( [ @@ -193,11 +237,36 @@ describe('toEsDocs', () => { expect(esDocs).toEqual([ { coordinates: { - type: 'point', + type: 'Point', coordinates: [-112.0372, 46.608058], }, population: 200, }, ]); }); + + test('should convert GeometryCollection feature to geo_shape ES documents', () => { + const esDocs = toEsDocs([GEOMETRY_COLLECTION_FEATURE], ES_FIELD_TYPES.GEO_SHAPE); + expect(esDocs).toEqual([ + { + coordinates: { + type: 'GeometryCollection', + geometries: [ + { + type: 'Point', + coordinates: [100.0, 0.0], + }, + { + type: 'LineString', + coordinates: [ + [101.0, 0.0], + [102.0, 1.0], + ], + }, + ], + }, + population: 200, + }, + ]); + }); }); diff --git a/x-pack/plugins/file_upload/public/importer/geojson_importer/geojson_importer.ts b/x-pack/plugins/file_upload/public/importer/geojson_importer/geojson_importer.ts index 3294655916b5b..80ff9325b4fe0 100644 --- a/x-pack/plugins/file_upload/public/importer/geojson_importer/geojson_importer.ts +++ b/x-pack/plugins/file_upload/public/importer/geojson_importer/geojson_importer.ts @@ -5,15 +5,7 @@ * 2.0. */ -import { - Feature, - Point, - MultiPoint, - LineString, - MultiLineString, - Polygon, - MultiPolygon, -} from 'geojson'; +import { Feature, Point } from 'geojson'; import { i18n } from '@kbn/i18n'; // @ts-expect-error import { JSONLoader, loadInBatches } from './loaders'; @@ -71,7 +63,8 @@ export class GeoJsonImporter extends Importer { this._geometryTypesMap.has('LineString') || this._geometryTypesMap.has('MultiLineString') || this._geometryTypesMap.has('Polygon') || - this._geometryTypesMap.has('MultiPolygon'), + this._geometryTypesMap.has('MultiPolygon') || + this._geometryTypesMap.has('GeometryCollection'), }; } @@ -266,23 +259,12 @@ export function toEsDocs( const esDocs = []; for (let i = 0; i < features.length; i++) { const feature = features[i]; - const geometry = feature.geometry as - | Point - | MultiPoint - | LineString - | MultiLineString - | Polygon - | MultiPolygon; - const coordinates = - geoFieldType === ES_FIELD_TYPES.GEO_SHAPE - ? { - type: geometry.type.toLowerCase(), - coordinates: geometry.coordinates, - } - : geometry.coordinates; const properties = feature.properties ? feature.properties : {}; esDocs.push({ - coordinates, + coordinates: + geoFieldType === ES_FIELD_TYPES.GEO_SHAPE + ? feature.geometry + : (feature.geometry as Point).coordinates, ...properties, }); } diff --git a/x-pack/plugins/fleet/common/constants/agent_policy.ts b/x-pack/plugins/fleet/common/constants/agent_policy.ts index 51cf0382e2dbc..859a96801595a 100644 --- a/x-pack/plugins/fleet/common/constants/agent_policy.ts +++ b/x-pack/plugins/fleet/common/constants/agent_policy.ts @@ -5,9 +5,10 @@ * 2.0. */ -import { defaultPackages } from './epm'; import type { AgentPolicy } from '../types'; +import { defaultPackages } from './epm'; + export const AGENT_POLICY_SAVED_OBJECT_TYPE = 'ingest-agent-policies'; export const AGENT_POLICY_INDEX = '.fleet-policies'; export const agentPolicyStatuses = { diff --git a/x-pack/plugins/fleet/common/services/full_agent_policy_to_yaml.ts b/x-pack/plugins/fleet/common/services/full_agent_policy_to_yaml.ts index 64d297922f570..e532a90f8839f 100644 --- a/x-pack/plugins/fleet/common/services/full_agent_policy_to_yaml.ts +++ b/x-pack/plugins/fleet/common/services/full_agent_policy_to_yaml.ts @@ -6,6 +6,7 @@ */ import { safeDump } from 'js-yaml'; + import type { FullAgentPolicy } from '../types'; const POLICY_KEYS_ORDER = [ diff --git a/x-pack/plugins/fleet/common/services/is_agent_upgradeable.test.ts b/x-pack/plugins/fleet/common/services/is_agent_upgradeable.test.ts index 38ae63933a076..f6656b881c598 100644 --- a/x-pack/plugins/fleet/common/services/is_agent_upgradeable.test.ts +++ b/x-pack/plugins/fleet/common/services/is_agent_upgradeable.test.ts @@ -5,9 +5,10 @@ * 2.0. */ -import { isAgentUpgradeable } from './is_agent_upgradeable'; import type { Agent } from '../types/models/agent'; +import { isAgentUpgradeable } from './is_agent_upgradeable'; + const getAgent = ({ version, upgradeable = false, diff --git a/x-pack/plugins/fleet/common/services/is_agent_upgradeable.ts b/x-pack/plugins/fleet/common/services/is_agent_upgradeable.ts index 7de4e7c11d09e..0350c47816f6d 100644 --- a/x-pack/plugins/fleet/common/services/is_agent_upgradeable.ts +++ b/x-pack/plugins/fleet/common/services/is_agent_upgradeable.ts @@ -7,6 +7,7 @@ import semverCoerce from 'semver/functions/coerce'; import semverLt from 'semver/functions/lt'; + import type { Agent } from '../types'; export function isAgentUpgradeable(agent: Agent, kibanaVersion: string) { diff --git a/x-pack/plugins/fleet/common/services/license.ts b/x-pack/plugins/fleet/common/services/license.ts index 68cbee5786d3b..767c94436effb 100644 --- a/x-pack/plugins/fleet/common/services/license.ts +++ b/x-pack/plugins/fleet/common/services/license.ts @@ -6,6 +6,7 @@ */ import { Observable, Subscription } from 'rxjs'; + import type { ILicense } from '../../../licensing/common/types'; // Generic license service class that works with the license observable diff --git a/x-pack/plugins/fleet/common/services/package_policies_to_agent_inputs.test.ts b/x-pack/plugins/fleet/common/services/package_policies_to_agent_inputs.test.ts index 930a111f66d6b..31c47bf9dc69d 100644 --- a/x-pack/plugins/fleet/common/services/package_policies_to_agent_inputs.test.ts +++ b/x-pack/plugins/fleet/common/services/package_policies_to_agent_inputs.test.ts @@ -6,6 +6,7 @@ */ import type { PackagePolicy, PackagePolicyInput } from '../types'; + import { storedPackagePoliciesToAgentInputs } from './package_policies_to_agent_inputs'; describe('Fleet - storedPackagePoliciesToAgentInputs', () => { diff --git a/x-pack/plugins/fleet/common/services/package_to_package_policy.test.ts b/x-pack/plugins/fleet/common/services/package_to_package_policy.test.ts index e8ede61098dc2..ab15212431401 100644 --- a/x-pack/plugins/fleet/common/services/package_to_package_policy.test.ts +++ b/x-pack/plugins/fleet/common/services/package_to_package_policy.test.ts @@ -6,6 +6,7 @@ */ import type { PackageInfo } from '../types'; + import { packageToPackagePolicy, packageToPackagePolicyInputs } from './package_to_package_policy'; describe('Fleet - packageToPackagePolicy', () => { diff --git a/x-pack/plugins/fleet/common/types/models/agent.ts b/x-pack/plugins/fleet/common/types/models/agent.ts index 60eb47a6ecc43..0e558f8ebdcdb 100644 --- a/x-pack/plugins/fleet/common/types/models/agent.ts +++ b/x-pack/plugins/fleet/common/types/models/agent.ts @@ -5,9 +5,10 @@ * 2.0. */ -import type { FullAgentPolicy } from './agent_policy'; import { AGENT_TYPE_EPHEMERAL, AGENT_TYPE_PERMANENT, AGENT_TYPE_TEMPORARY } from '../../constants'; +import type { FullAgentPolicy } from './agent_policy'; + export type AgentType = | typeof AGENT_TYPE_EPHEMERAL | typeof AGENT_TYPE_PERMANENT diff --git a/x-pack/plugins/fleet/common/types/models/agent_policy.ts b/x-pack/plugins/fleet/common/types/models/agent_policy.ts index 1aaca4fc5d932..3325a8db713aa 100644 --- a/x-pack/plugins/fleet/common/types/models/agent_policy.ts +++ b/x-pack/plugins/fleet/common/types/models/agent_policy.ts @@ -7,6 +7,7 @@ import { agentPolicyStatuses } from '../../constants'; import type { DataType, ValueOf } from '../../types'; + import type { PackagePolicy, PackagePolicyPackage } from './package_policy'; import type { Output } from './output'; diff --git a/x-pack/plugins/fleet/common/types/models/epm.ts b/x-pack/plugins/fleet/common/types/models/epm.ts index e42ef7515b4c1..a710e51878db4 100644 --- a/x-pack/plugins/fleet/common/types/models/epm.ts +++ b/x-pack/plugins/fleet/common/types/models/epm.ts @@ -8,6 +8,7 @@ // Follow pattern from https://github.com/elastic/kibana/pull/52447 // TODO: Update when https://github.com/elastic/kibana/issues/53021 is closed import type { SavedObject, SavedObjectAttributes, SavedObjectReference } from 'src/core/public'; + import { ASSETS_SAVED_OBJECT_TYPE, agentAssetTypes, @@ -17,6 +18,7 @@ import { requiredPackages, } from '../../constants'; import type { ValueOf } from '../../types'; + import type { PackageSpecManifest, PackageSpecScreenshot } from './package_spec'; export type InstallationStatus = typeof installationStatuses; @@ -229,7 +231,7 @@ export interface RegistryElasticsearch { 'index_template.mappings'?: object; } -export type RegistryVarType = 'integer' | 'bool' | 'password' | 'text' | 'yaml'; +export type RegistryVarType = 'integer' | 'bool' | 'password' | 'text' | 'yaml' | 'string'; // EPR types this as `[]map[string]interface{}` // which means the official/possible type is Record // but we effectively only see this shape diff --git a/x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts b/x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts index 4b64044e1f2de..927368694693a 100644 --- a/x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts +++ b/x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts @@ -6,6 +6,7 @@ */ import type { AgentPolicy, NewAgentPolicy, FullAgentPolicy } from '../models'; + import type { ListWithKuery } from './common'; export interface GetAgentPoliciesRequest { diff --git a/x-pack/plugins/fleet/public/applications/fleet/app.tsx b/x-pack/plugins/fleet/public/applications/fleet/app.tsx index b441a2181af35..57758d616d908 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/app.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/app.tsx @@ -14,6 +14,11 @@ import { FormattedMessage } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; import styled from 'styled-components'; import useObservable from 'react-use/lib/useObservable'; + +import { FleetConfigType, FleetStartServices } from '../../plugin'; +import { KibanaContextProvider } from '../../../../../../src/plugins/kibana_react/public'; +import { EuiThemeProvider } from '../../../../../../src/plugins/kibana_react/common'; + import { ConfigContext, FleetStatusProvider, @@ -34,10 +39,7 @@ import { DataStreamApp } from './sections/data_stream'; import { FleetApp } from './sections/agents'; import { IngestManagerOverview } from './sections/overview'; import { ProtectedRoute } from './index'; -import { FleetConfigType, FleetStartServices } from '../../plugin'; import { UIExtensionsStorage } from './types'; -import { KibanaContextProvider } from '../../../../../../src/plugins/kibana_react/public'; -import { EuiThemeProvider } from '../../../../../../src/plugins/kibana_react/common'; import { UIExtensionsContext } from './hooks/use_ui_extension'; const ErrorLayout = ({ children }: { children: JSX.Element }) => ( diff --git a/x-pack/plugins/fleet/public/applications/fleet/components/alpha_messaging.tsx b/x-pack/plugins/fleet/public/applications/fleet/components/alpha_messaging.tsx index a3b6401741fb2..af550868c126b 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/components/alpha_messaging.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/components/alpha_messaging.tsx @@ -9,6 +9,7 @@ import React, { useState } from 'react'; import styled from 'styled-components'; import { FormattedMessage } from '@kbn/i18n/react'; import { EuiText, EuiLink } from '@elastic/eui'; + import { AlphaFlyout } from './alpha_flyout'; const Message = styled(EuiText).attrs((props) => ({ diff --git a/x-pack/plugins/fleet/public/applications/fleet/components/enrollment_instructions/manual/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/components/enrollment_instructions/manual/index.tsx index b77bf21945e30..6243597cf003c 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/components/enrollment_instructions/manual/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/components/enrollment_instructions/manual/index.tsx @@ -9,6 +9,7 @@ import React from 'react'; import styled from 'styled-components'; import { EuiText, EuiSpacer, EuiLink, EuiTitle, EuiCodeBlock } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; + import { EnrollmentAPIKey } from '../../../types'; interface Props { diff --git a/x-pack/plugins/fleet/public/applications/fleet/components/extension_wrapper.tsx b/x-pack/plugins/fleet/public/applications/fleet/components/extension_wrapper.tsx index d8188740c1cab..bb22586122295 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/components/extension_wrapper.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/components/extension_wrapper.tsx @@ -7,6 +7,7 @@ import React, { memo, ReactNode, Suspense } from 'react'; import { EuiErrorBoundary } from '@elastic/eui'; + import { Loading } from './loading'; export const ExtensionWrapper = memo<{ children: ReactNode }>(({ children }) => { diff --git a/x-pack/plugins/fleet/public/applications/fleet/components/home_integration/tutorial_directory_header_link.tsx b/x-pack/plugins/fleet/public/applications/fleet/components/home_integration/tutorial_directory_header_link.tsx index cd378ec842679..106df8a9afb1d 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/components/home_integration/tutorial_directory_header_link.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/components/home_integration/tutorial_directory_header_link.tsx @@ -9,8 +9,10 @@ import React, { memo, useState, useEffect } from 'react'; import { FormattedMessage } from '@kbn/i18n/react'; import { EuiButtonEmpty } from '@elastic/eui'; import type { TutorialDirectoryHeaderLinkComponent } from 'src/plugins/home/public'; + import { RedirectAppLinks } from '../../../../../../../../src/plugins/kibana_react/public'; import { useLink, useCapabilities, useStartServices } from '../../hooks'; + import { tutorialDirectoryNoticeState$ } from './tutorial_directory_notice'; const TutorialDirectoryHeaderLink: TutorialDirectoryHeaderLinkComponent = memo(() => { diff --git a/x-pack/plugins/fleet/public/applications/fleet/components/home_integration/tutorial_directory_notice.tsx b/x-pack/plugins/fleet/public/applications/fleet/components/home_integration/tutorial_directory_notice.tsx index 8ea0c8730fdb5..4e8123a4fadec 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/components/home_integration/tutorial_directory_notice.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/components/home_integration/tutorial_directory_notice.tsx @@ -19,6 +19,7 @@ import { EuiSpacer, } from '@elastic/eui'; import type { TutorialDirectoryNoticeComponent } from 'src/plugins/home/public'; + import { RedirectAppLinks } from '../../../../../../../../src/plugins/kibana_react/public'; import { sendPutSettings, diff --git a/x-pack/plugins/fleet/public/applications/fleet/components/home_integration/tutorial_module_notice.tsx b/x-pack/plugins/fleet/public/applications/fleet/components/home_integration/tutorial_module_notice.tsx index 88b6933fe4774..526b6513173ef 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/components/home_integration/tutorial_module_notice.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/components/home_integration/tutorial_module_notice.tsx @@ -9,6 +9,7 @@ import React, { memo } from 'react'; import { FormattedMessage } from '@kbn/i18n/react'; import { EuiText, EuiLink, EuiSpacer } from '@elastic/eui'; import { TutorialModuleNoticeComponent } from 'src/plugins/home/public'; + import { useGetPackages, useLink, useCapabilities } from '../../hooks'; import { pkgKeyFromPackageInfo } from '../../services/pkg_key_from_package_info'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/components/linked_agent_count.tsx b/x-pack/plugins/fleet/public/applications/fleet/components/linked_agent_count.tsx index 325229a298ec5..3b788126a570f 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/components/linked_agent_count.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/components/linked_agent_count.tsx @@ -7,6 +7,7 @@ import React, { memo } from 'react'; import { EuiLink, EuiLinkAnchorProps } from '@elastic/eui'; + import { useLink } from '../hooks'; import { AGENT_SAVED_OBJECT_TYPE } from '../constants'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/components/package_icon.tsx b/x-pack/plugins/fleet/public/applications/fleet/components/package_icon.tsx index 0b35d6cf9fa2d..5b8fddd2d5e05 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/components/package_icon.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/components/package_icon.tsx @@ -7,6 +7,7 @@ import React from 'react'; import { EuiIcon, EuiIconProps } from '@elastic/eui'; + import { usePackageIconType, UsePackageIconType } from '../hooks'; export const PackageIcon: React.FunctionComponent< diff --git a/x-pack/plugins/fleet/public/applications/fleet/components/search_bar.tsx b/x-pack/plugins/fleet/public/applications/fleet/components/search_bar.tsx index 9897d89881450..cac475fc7a98a 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/components/search_bar.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/components/search_bar.tsx @@ -6,6 +6,7 @@ */ import React, { useState, useEffect, useMemo } from 'react'; + import { QueryStringInput, IFieldType, diff --git a/x-pack/plugins/fleet/public/applications/fleet/components/settings_flyout.tsx b/x-pack/plugins/fleet/public/applications/fleet/components/settings_flyout.tsx index ea48e483a7fed..c668097cdb47e 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/components/settings_flyout.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/components/settings_flyout.tsx @@ -27,6 +27,7 @@ import { import { FormattedMessage } from '@kbn/i18n/react'; import { EuiText } from '@elastic/eui'; import { safeLoad } from 'js-yaml'; + import { useComboInput, useStartServices, diff --git a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_breadcrumbs.tsx b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_breadcrumbs.tsx index 22dfe2e8be517..000c664548cb8 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_breadcrumbs.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_breadcrumbs.tsx @@ -7,7 +7,9 @@ import { i18n } from '@kbn/i18n'; import { ChromeBreadcrumb } from 'src/core/public'; + import { BASE_PATH, Page, DynamicPagePathValues, pagePathGetters } from '../constants'; + import { useStartServices } from './use_core'; const BASE_BREADCRUMB: ChromeBreadcrumb = { diff --git a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_config.ts b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_config.ts index cee563280e7bf..b72860efcc9ec 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_config.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_config.ts @@ -6,6 +6,7 @@ */ import React, { useContext } from 'react'; + import type { FleetConfigType } from '../../../plugin'; export const ConfigContext = React.createContext(null); diff --git a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_fleet_status.tsx b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_fleet_status.tsx index 71161c17a7b49..c506ccda37de8 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_fleet_status.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_fleet_status.tsx @@ -6,9 +6,11 @@ */ import React, { useState, useContext, useEffect } from 'react'; + +import { GetFleetStatusResponse } from '../types'; + import { useConfig } from './use_config'; import { sendGetFleetStatus } from './use_request'; -import { GetFleetStatusResponse } from '../types'; interface FleetStatusState { enabled: boolean; diff --git a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_intra_app_state.tsx b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_intra_app_state.tsx index e5acdff405994..e6f91093aafad 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_intra_app_state.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_intra_app_state.tsx @@ -8,6 +8,7 @@ import React, { memo, useContext, useMemo } from 'react'; import { AppMountParameters } from 'kibana/public'; import { useLocation } from 'react-router-dom'; + import { AnyIntraAppRouteState } from '../types'; interface IntraAppState { diff --git a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_link.ts b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_link.ts index bcb8c4c749211..440cd693d7af2 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_link.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_link.ts @@ -7,6 +7,7 @@ import { BASE_PATH, pagePathGetters } from '../constants'; import type { StaticPage, DynamicPage, DynamicPagePathValues } from '../constants'; + import { useStartServices } from './'; const getPath = (page: StaticPage | DynamicPage, values: DynamicPagePathValues = {}): string => { diff --git a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_package_icon_type.ts b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_package_icon_type.ts index 679c44f2c0ea9..654cfc70ab418 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_package_icon_type.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_package_icon_type.ts @@ -7,8 +7,10 @@ import { useEffect, useState } from 'react'; import { ICON_TYPES } from '@elastic/eui'; + import type { PackageInfo, PackageListItem } from '../types'; import { useLinks } from '../sections/epm/hooks'; + import { sendGetPackageInfoByKey } from './index'; type Package = PackageInfo | PackageListItem; diff --git a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/agent_policy.ts b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/agent_policy.ts index d60383c15d2f4..7b3007a61d248 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/agent_policy.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/agent_policy.ts @@ -5,9 +5,8 @@ * 2.0. */ -import { useRequest, sendRequest, useConditionalRequest } from './use_request'; -import type { SendConditionalRequestConfig } from './use_request'; import { agentPolicyRouteService } from '../../services'; + import type { GetAgentPoliciesRequest, GetAgentPoliciesResponse, @@ -23,6 +22,9 @@ import type { DeleteAgentPolicyResponse, } from '../../types'; +import { useRequest, sendRequest, useConditionalRequest } from './use_request'; +import type { SendConditionalRequestConfig } from './use_request'; + export const useGetAgentPolicies = (query?: GetAgentPoliciesRequest['query']) => { return useRequest({ path: agentPolicyRouteService.getListPath(), diff --git a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/agents.ts b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/agents.ts index a40ebbf78e0f2..90ca762173a80 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/agents.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/agents.ts @@ -5,9 +5,8 @@ * 2.0. */ -import { useRequest, sendRequest } from './use_request'; -import type { UseRequestConfig } from './use_request'; import { agentRouteService } from '../../services'; + import type { GetOneAgentResponse, GetOneAgentEventsResponse, @@ -32,6 +31,9 @@ import type { PostNewAgentActionResponse, } from '../../types'; +import { useRequest, sendRequest } from './use_request'; +import type { UseRequestConfig } from './use_request'; + type RequestOptions = Pick, 'pollIntervalMs'>; export function useGetOneAgent(agentId: string, options?: RequestOptions) { diff --git a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/app.ts b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/app.ts index 2e93a1700d08c..bd690a4b53e07 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/app.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/app.ts @@ -5,10 +5,11 @@ * 2.0. */ -import { sendRequest } from './use_request'; import { appRoutesService } from '../../services'; import type { CheckPermissionsResponse } from '../../types'; +import { sendRequest } from './use_request'; + export const sendGetPermissionsCheck = () => { return sendRequest({ path: appRoutesService.getCheckPermissionsPath(), diff --git a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/data_stream.ts b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/data_stream.ts index 16e27596e7090..e2bd8eca1c89d 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/data_stream.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/data_stream.ts @@ -5,10 +5,11 @@ * 2.0. */ -import { useRequest } from './use_request'; import { dataStreamRouteService } from '../../services'; import type { GetDataStreamsResponse } from '../../types'; +import { useRequest } from './use_request'; + export const useGetDataStreams = () => { return useRequest({ path: dataStreamRouteService.getListPath(), diff --git a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/enrollment_api_keys.ts b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/enrollment_api_keys.ts index 4aad8b7314482..601d54ec56c46 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/enrollment_api_keys.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/enrollment_api_keys.ts @@ -5,15 +5,17 @@ * 2.0. */ -import { useRequest, sendRequest, useConditionalRequest } from './use_request'; -import type { UseRequestConfig, SendConditionalRequestConfig } from './use_request'; import { enrollmentAPIKeyRouteService } from '../../services'; + import type { GetOneEnrollmentAPIKeyResponse, GetEnrollmentAPIKeysResponse, GetEnrollmentAPIKeysRequest, } from '../../types'; +import { useRequest, sendRequest, useConditionalRequest } from './use_request'; +import type { UseRequestConfig, SendConditionalRequestConfig } from './use_request'; + type RequestOptions = Pick, 'pollIntervalMs'>; export function useGetOneEnrollmentAPIKey(keyId: string | undefined) { diff --git a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/epm.ts b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/epm.ts index 45e754849b5bc..3f3d2299fdebf 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/epm.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/epm.ts @@ -5,7 +5,6 @@ * 2.0. */ -import { useRequest, sendRequest } from './use_request'; import { epmRouteService } from '../../services'; import type { GetCategoriesRequest, @@ -19,6 +18,8 @@ import type { } from '../../types'; import type { GetStatsResponse } from '../../../../../common'; +import { useRequest, sendRequest } from './use_request'; + export const useGetCategories = (query: GetCategoriesRequest['query'] = {}) => { return useRequest({ path: epmRouteService.getCategoriesPath(), diff --git a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/outputs.ts b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/outputs.ts index 64c82d2a04790..0fcaa262cf321 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/outputs.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/outputs.ts @@ -5,10 +5,11 @@ * 2.0. */ -import { sendRequest, useRequest } from './use_request'; import { outputRoutesService } from '../../services'; import type { PutOutputRequest, GetOutputsResponse } from '../../types'; +import { sendRequest, useRequest } from './use_request'; + export function useGetOutputs() { return useRequest({ method: 'get', diff --git a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/package_policy.ts b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/package_policy.ts index 1266f47a80e21..89eab44a14461 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/package_policy.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/package_policy.ts @@ -5,7 +5,6 @@ * 2.0. */ -import { sendRequest, useRequest } from './use_request'; import { packagePolicyRouteService } from '../../services'; import type { CreatePackagePolicyRequest, @@ -21,6 +20,8 @@ import type { GetOnePackagePolicyResponse, } from '../../../../../common/types/rest_spec'; +import { sendRequest, useRequest } from './use_request'; + export const sendCreatePackagePolicy = (body: CreatePackagePolicyRequest['body']) => { return sendRequest({ path: packagePolicyRouteService.getCreatePath(), diff --git a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/settings.ts b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/settings.ts index bf4ea6eacb3c1..83b2612822f60 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/settings.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/settings.ts @@ -5,10 +5,11 @@ * 2.0. */ -import { sendRequest, useRequest } from './use_request'; import { settingsRoutesService } from '../../services'; import type { PutSettingsResponse, PutSettingsRequest, GetSettingsResponse } from '../../types'; +import { sendRequest, useRequest } from './use_request'; + export function useGetSettings() { return useRequest({ method: 'get', diff --git a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/setup.ts b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/setup.ts index 001b8af99aec5..67d631d5d55bc 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/setup.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/setup.ts @@ -5,10 +5,11 @@ * 2.0. */ -import { sendRequest } from './use_request'; import { setupRouteService, fleetSetupRouteService } from '../../services'; import type { GetFleetStatusResponse } from '../../types'; +import { sendRequest } from './use_request'; + export const sendSetup = () => { return sendRequest({ path: setupRouteService.getSetupPath(), diff --git a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/use_request.ts b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/use_request.ts index 985f4d71d6a75..91c45e3019cf5 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/use_request.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_request/use_request.ts @@ -7,6 +7,7 @@ import { useState, useEffect } from 'react'; import type { HttpSetup } from 'src/core/public'; + import { UseRequestConfig as _UseRequestConfig, sendRequest as _sendRequest, diff --git a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_ui_extension.ts b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_ui_extension.ts index f6b3cfd2b3642..3880a08a7ec03 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_ui_extension.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_ui_extension.ts @@ -6,6 +6,7 @@ */ import React, { useContext } from 'react'; + import type { UIExtensionPoint, UIExtensionsStorage } from '../types'; export const UIExtensionsContext = React.createContext({}); diff --git a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_url_pagination.ts b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_url_pagination.ts index 090ce34ae244a..b73a298a704ff 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_url_pagination.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_url_pagination.ts @@ -7,6 +7,7 @@ import { useCallback, useEffect, useMemo } from 'react'; import { useHistory, useLocation } from 'react-router-dom'; + import { useUrlParams } from './use_url_params'; import { PAGE_SIZE_OPTIONS, usePagination } from './use_pagination'; import type { Pagination } from './use_pagination'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/index.tsx index 440a613e3653e..a66b28e5f05c9 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/index.tsx @@ -9,7 +9,9 @@ import React from 'react'; import ReactDOM from 'react-dom'; import { Redirect, Route, RouteProps } from 'react-router-dom'; import { CoreStart, AppMountParameters } from 'src/core/public'; + import { FleetConfigType, FleetStartServices } from '../../plugin'; + import { licenseService } from './hooks'; import { UIExtensionsStorage } from './types'; import { AppRoutes, FleetAppContext, WithPermissionsAndSetup } from './app'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/layouts/default.tsx b/x-pack/plugins/fleet/public/applications/fleet/layouts/default.tsx index bc71f8bd10414..001ad069f1b6f 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/layouts/default.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/layouts/default.tsx @@ -9,6 +9,7 @@ import React from 'react'; import styled from 'styled-components'; import { EuiTabs, EuiTab, EuiFlexGroup, EuiFlexItem, EuiButtonEmpty } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; + import { Section } from '../sections'; import { AlphaMessaging, SettingFlyout } from '../components'; import { useLink, useConfig } from '../hooks'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/layouts/with_header.tsx b/x-pack/plugins/fleet/public/applications/fleet/layouts/with_header.tsx index 461a0bb84d181..c8a8d47e6d802 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/layouts/with_header.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/layouts/with_header.tsx @@ -7,7 +7,9 @@ import React, { Fragment } from 'react'; import { EuiPageBody, EuiSpacer } from '@elastic/eui'; + import { Header, HeaderProps } from '../components'; + import { Page, ContentWrapper } from './without_header'; export interface WithHeaderLayoutProps extends HeaderProps { diff --git a/x-pack/plugins/fleet/public/applications/fleet/mock/create_test_renderer.tsx b/x-pack/plugins/fleet/public/applications/fleet/mock/create_test_renderer.tsx index 04c4923d6f8a8..0a1346c888acc 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/mock/create_test_renderer.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/mock/create_test_renderer.tsx @@ -8,11 +8,13 @@ import { createMemoryHistory, History, createHashHistory } from 'history'; import React, { memo } from 'react'; import { render as reactRender, RenderOptions, RenderResult, act } from '@testing-library/react'; + import { ScopedHistory } from '../../../../../../../src/core/public'; import { FleetAppContext } from '../app'; import { FleetConfigType } from '../../../plugin'; -import { createConfigurationMock } from './plugin_configuration'; import { UIExtensionsStorage } from '../types'; + +import { createConfigurationMock } from './plugin_configuration'; import { createStartMock } from './plugin_interfaces'; import { createStartServices } from './fleet_start_services'; import { MockedFleetStart, MockedFleetStartServices } from './types'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/mock/fleet_start_services.tsx b/x-pack/plugins/fleet/public/applications/fleet/mock/fleet_start_services.tsx index d219384f66cef..4dfa0805bdbc5 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/mock/fleet_start_services.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/mock/fleet_start_services.tsx @@ -8,10 +8,12 @@ import React from 'react'; import { I18nProvider } from '@kbn/i18n/react'; import { MockedKeys } from '@kbn/utility-types/jest'; + import { coreMock } from '../../../../../../../src/core/public/mocks'; -import { createStartDepsMock } from './plugin_dependencies'; import { IStorage, Storage } from '../../../../../../../src/plugins/kibana_utils/public'; import { setHttpClient } from '../hooks/use_request'; + +import { createStartDepsMock } from './plugin_dependencies'; import { MockedFleetStartServices } from './types'; // Taken from core. See: src/plugins/kibana_utils/public/storage/storage.test.ts diff --git a/x-pack/plugins/fleet/public/applications/fleet/mock/plugin_dependencies.ts b/x-pack/plugins/fleet/public/applications/fleet/mock/plugin_dependencies.ts index 8207e3d89fc56..d7725830afb41 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/mock/plugin_dependencies.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/mock/plugin_dependencies.ts @@ -8,6 +8,7 @@ import { dataPluginMock } from '../../../../../../../src/plugins/data/public/mocks'; import { licensingMock } from '../../../../../licensing/public/mocks'; import { homePluginMock } from '../../../../../../../src/plugins/home/public/mocks'; + import type { MockedFleetSetupDeps, MockedFleetStartDeps } from './types'; export const createSetupDepsMock = (): MockedFleetSetupDeps => { diff --git a/x-pack/plugins/fleet/public/applications/fleet/mock/plugin_interfaces.ts b/x-pack/plugins/fleet/public/applications/fleet/mock/plugin_interfaces.ts index 3c76452f17ce7..134bd408d8c3c 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/mock/plugin_interfaces.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/mock/plugin_interfaces.ts @@ -7,6 +7,7 @@ import type { UIExtensionsStorage } from '../types'; import { createExtensionRegistrationCallback } from '../services/ui_extensions'; + import type { MockedFleetStart } from './types'; export const createStartMock = (extensionsStorage: UIExtensionsStorage = {}): MockedFleetStart => { diff --git a/x-pack/plugins/fleet/public/applications/fleet/mock/types.ts b/x-pack/plugins/fleet/public/applications/fleet/mock/types.ts index 660fe6af29fb1..b1a1ddc4a582f 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/mock/types.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/mock/types.ts @@ -6,6 +6,7 @@ */ import type { MockedKeys } from '@kbn/utility-types/jest'; + import type { FleetSetupDeps, FleetStart, diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/actions_menu.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/actions_menu.tsx index 78e43f4c04b99..0db0f1f8cab72 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/actions_menu.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/actions_menu.tsx @@ -8,10 +8,12 @@ import React, { memo, useState, useMemo } from 'react'; import { FormattedMessage } from '@kbn/i18n/react'; import { EuiContextMenuItem, EuiPortal } from '@elastic/eui'; + import { AgentPolicy } from '../../../types'; import { useCapabilities } from '../../../hooks'; import { ContextMenuActions } from '../../../components'; import { AgentEnrollmentFlyout } from '../../agents/components'; + import { AgentPolicyYamlFlyout } from './agent_policy_yaml_flyout'; import { AgentPolicyCopyProvider } from './agent_policy_copy_provider'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_copy_provider.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_copy_provider.tsx index 2b7ecc75195b0..d16a0351f1bbd 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_copy_provider.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_copy_provider.tsx @@ -9,6 +9,7 @@ import React, { Fragment, useRef, useState } from 'react'; import { EuiConfirmModal, EuiFormRow, EuiFieldText } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; + import { AgentPolicy } from '../../../types'; import { sendCopyAgentPolicy, useStartServices } from '../../../hooks'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_delete_provider.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_delete_provider.tsx index 014af7f54d020..c5d0e5279220e 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_delete_provider.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_delete_provider.tsx @@ -9,6 +9,7 @@ import React, { Fragment, useRef, useState } from 'react'; import { EuiConfirmModal, EuiCallOut } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; + import { AGENT_SAVED_OBJECT_TYPE } from '../../../constants'; import { sendDeleteAgentPolicy, useStartServices, useConfig, sendRequest } from '../../../hooks'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_form.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_form.tsx index 37f3e5bc398b8..c0da3a72dce62 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_form.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_form.tsx @@ -24,9 +24,11 @@ import { import { FormattedMessage } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; import styled from 'styled-components'; + import { dataTypes } from '../../../../../../common'; import { NewAgentPolicy, AgentPolicy } from '../../../types'; import { isValidNamespace } from '../../../services'; + import { AgentPolicyDeleteProvider } from './agent_policy_delete_provider'; interface ValidationResults { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_yaml_flyout.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_yaml_flyout.tsx index 9ed4bb6ff6ff4..e434347c2c367 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_yaml_flyout.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_yaml_flyout.tsx @@ -21,6 +21,7 @@ import { EuiButton, EuiCallOut, } from '@elastic/eui'; + import { useGetOneAgentPolicyFull, useGetOneAgentPolicy, useStartServices } from '../../../hooks'; import { Loading } from '../../../components'; import { fullAgentPolicyToYaml, agentPolicyRouteService } from '../../../services'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/confirm_deploy_modal.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/confirm_deploy_modal.tsx index f3d01e6b528ca..f75aea703fd19 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/confirm_deploy_modal.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/confirm_deploy_modal.tsx @@ -9,6 +9,7 @@ import React from 'react'; import { EuiCallOut, EuiConfirmModal, EuiSpacer } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; + import { AgentPolicy } from '../../../types'; export const ConfirmDeployAgentPolicyModal: React.FunctionComponent<{ diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/package_policy_delete_provider.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/package_policy_delete_provider.tsx index 80952fee05bb4..05b2bbf46b9e9 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/package_policy_delete_provider.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/package_policy_delete_provider.tsx @@ -9,6 +9,7 @@ import React, { Fragment, useMemo, useRef, useState } from 'react'; import { EuiCallOut, EuiConfirmModal, EuiSpacer } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; + import { useStartServices, sendRequest, sendDeletePackagePolicy, useConfig } from '../../../hooks'; import { AGENT_API_ROUTES, AGENT_SAVED_OBJECT_TYPE } from '../../../constants'; import { AgentPolicy } from '../../../types'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/layout.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/layout.tsx index 8b63f280a3aa7..0f51b603a49aa 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/layout.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/layout.tsx @@ -17,6 +17,7 @@ import { EuiButtonEmpty, EuiSpacer, } from '@elastic/eui'; + import { WithHeaderLayout } from '../../../../layouts'; import { AgentPolicy, PackageInfo } from '../../../../types'; import { PackageIcon } from '../../../../components/package_icon'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/package_policy_input_config.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/package_policy_input_config.tsx index cd76e5b1a2a25..c5c1033f1b800 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/package_policy_input_config.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/package_policy_input_config.tsx @@ -16,12 +16,14 @@ import { EuiSpacer, EuiButtonEmpty, } from '@elastic/eui'; + import { NewPackagePolicyInput, RegistryVarsEntry } from '../../../../types'; import { isAdvancedVar, PackagePolicyConfigValidationResults, validationHasErrors, } from '../services'; + import { PackagePolicyInputVarField } from './package_policy_input_var_field'; const FlexItemWithMaxWidth = styled(EuiFlexItem)` diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/package_policy_input_panel.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/package_policy_input_panel.tsx index 197ba78c3e0fe..92098d6971d35 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/package_policy_input_panel.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/package_policy_input_panel.tsx @@ -18,6 +18,7 @@ import { EuiHorizontalRule, EuiSpacer, } from '@elastic/eui'; + import { NewPackagePolicyInput, PackagePolicyInputStream, @@ -29,6 +30,7 @@ import { hasInvalidButRequiredVar, countValidationErrors, } from '../services'; + import { PackagePolicyInputConfig } from './package_policy_input_config'; import { PackagePolicyInputStreamConfig } from './package_policy_input_stream'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/package_policy_input_stream.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/package_policy_input_stream.tsx index 519f7acbbc64e..b21e8ca2e2243 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/package_policy_input_stream.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/package_policy_input_stream.tsx @@ -18,12 +18,14 @@ import { EuiSpacer, EuiButtonEmpty, } from '@elastic/eui'; + import { NewPackagePolicyInputStream, RegistryStream, RegistryVarsEntry } from '../../../../types'; import { isAdvancedVar, PackagePolicyConfigValidationResults, validationHasErrors, } from '../services'; + import { PackagePolicyInputVarField } from './package_policy_input_var_field'; const FlexItemWithMaxWidth = styled(EuiFlexItem)` diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/package_policy_input_var_field.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/package_policy_input_var_field.tsx index 6f5c9e79fa5f1..8de60739fe6ae 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/package_policy_input_var_field.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/package_policy_input_var_field.tsx @@ -16,6 +16,7 @@ import { EuiText, EuiCodeEditor, } from '@elastic/eui'; + import { RegistryVarsEntry } from '../../../../types'; import 'brace/mode/yaml'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/index.test.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/index.test.tsx index c3b76a51ff2f1..d9d43dc6ef975 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/index.test.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/index.test.tsx @@ -5,14 +5,16 @@ * 2.0. */ -import { createTestRendererMock, MockedFleetStartServices, TestRenderer } from '../../../mock'; -import { PAGE_ROUTING_PATHS, pagePathGetters, PLUGIN_ID } from '../../../constants'; import { Route } from 'react-router-dom'; -import { CreatePackagePolicyPage } from './index'; import React from 'react'; -import { CreatePackagePolicyRouteState } from '../../../types'; import { act } from 'react-test-renderer'; +import { createTestRendererMock, MockedFleetStartServices, TestRenderer } from '../../../mock'; +import { PAGE_ROUTING_PATHS, pagePathGetters, PLUGIN_ID } from '../../../constants'; +import { CreatePackagePolicyRouteState } from '../../../types'; + +import { CreatePackagePolicyPage } from './index'; + describe('when on the package policy create page', () => { const createPageUrlPath = pagePathGetters.add_integration_to_policy({ pkgkey: 'nginx-0.3.7' }); let testRenderer: TestRenderer; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/index.tsx index a076012100421..bf6540db7dee7 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/index.tsx @@ -21,6 +21,7 @@ import { } from '@elastic/eui'; import { EuiStepProps } from '@elastic/eui/src/components/steps/step'; import { ApplicationStart } from 'kibana/public'; + import { AgentPolicy, PackageInfo, @@ -37,6 +38,13 @@ import { } from '../../../hooks'; import { Loading } from '../../../components'; import { ConfirmDeployAgentPolicyModal } from '../components'; +import { useIntraAppState } from '../../../hooks/use_intra_app_state'; +import { useUIExtension } from '../../../hooks/use_ui_extension'; +import { ExtensionWrapper } from '../../../components/extension_wrapper'; +import { PackagePolicyEditExtensionComponentProps } from '../../../types'; +import { PLUGIN_ID } from '../../../../../../common/constants'; +import { pkgKeyFromPackageInfo } from '../../../services/pkg_key_from_package_info'; + import { CreatePackagePolicyPageLayout } from './components'; import { CreatePackagePolicyFrom, PackagePolicyFormState } from './types'; import { @@ -48,12 +56,6 @@ import { StepSelectPackage } from './step_select_package'; import { StepSelectAgentPolicy } from './step_select_agent_policy'; import { StepConfigurePackagePolicy } from './step_configure_package'; import { StepDefinePackagePolicy } from './step_define_package_policy'; -import { useIntraAppState } from '../../../hooks/use_intra_app_state'; -import { useUIExtension } from '../../../hooks/use_ui_extension'; -import { ExtensionWrapper } from '../../../components/extension_wrapper'; -import { PackagePolicyEditExtensionComponentProps } from '../../../types'; -import { PLUGIN_ID } from '../../../../../../common/constants'; -import { pkgKeyFromPackageInfo } from '../../../services/pkg_key_from_package_info'; const StepsWithLessPadding = styled(EuiSteps)` .euiStep__content { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/has_invalid_but_required_var.ts b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/has_invalid_but_required_var.ts index a9a0480098323..e204d86b51511 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/has_invalid_but_required_var.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/has_invalid_but_required_var.ts @@ -6,6 +6,7 @@ */ import type { PackagePolicyConfigRecord, RegistryVarsEntry } from '../../../../types'; + import { validatePackagePolicyConfig } from './'; export const hasInvalidButRequiredVar = ( diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/validate_package_policy.test.ts b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/validate_package_policy.test.ts index e1e0d026966c3..180a585a4305a 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/validate_package_policy.test.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/validate_package_policy.test.ts @@ -7,6 +7,7 @@ import { installationStatuses } from '../../../../../../../common/constants'; import type { PackageInfo, NewPackagePolicy, RegistryPolicyTemplate } from '../../../../types'; + import { validatePackagePolicy, validationHasErrors } from './validate_package_policy'; describe('Fleet - validatePackagePolicy()', () => { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/validate_package_policy.ts b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/validate_package_policy.ts index c727be683c130..1874a458d8541 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/validate_package_policy.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/validate_package_policy.ts @@ -7,6 +7,7 @@ import { i18n } from '@kbn/i18n'; import { safeLoad } from 'js-yaml'; + import { getFlattenedObject, isValidNamespace } from '../../../../services'; import type { NewPackagePolicy, @@ -228,6 +229,37 @@ export const validatePackagePolicyConfig = ( }) ); } + if ( + (varDef.type === 'text' || varDef.type === 'string') && + parsedValue && + Array.isArray(parsedValue) + ) { + const invalidStrings = parsedValue.filter((cand) => /^[*&]/.test(cand)); + // only show one error if multiple strings in array are invalid + if (invalidStrings.length > 0) { + errors.push( + i18n.translate('xpack.fleet.packagePolicyValidation.quoteStringErrorMessage', { + defaultMessage: + 'Strings starting with special YAML characters like * or & need to be enclosed in double quotes.', + }) + ); + } + } + } + + if ( + (varDef.type === 'text' || varDef.type === 'string') && + parsedValue && + !Array.isArray(parsedValue) + ) { + if (/^[*&]/.test(parsedValue)) { + errors.push( + i18n.translate('xpack.fleet.packagePolicyValidation.quoteStringErrorMessage', { + defaultMessage: + 'Strings starting with special YAML characters like * or & need to be enclosed in double quotes.', + }) + ); + } } return errors.length ? errors : null; 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 54875bbfeb0b2..35619f528f907 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 @@ -14,6 +14,7 @@ import { EuiText, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; + import { PackageInfo, RegistryStream, @@ -21,6 +22,7 @@ import { NewPackagePolicyInput, } from '../../../types'; import { Loading } from '../../../components'; + import { PackagePolicyValidationResults } from './services'; import { PackagePolicyInputPanel } from './components'; import { CreatePackagePolicyFrom } from './types'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/step_define_package_policy.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/step_define_package_policy.tsx index 64837b208ae45..fdcb4e15112a6 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/step_define_package_policy.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/step_define_package_policy.tsx @@ -18,12 +18,14 @@ import { EuiFlexGroup, EuiFlexItem, } from '@elastic/eui'; + import { AgentPolicy, PackageInfo, PackagePolicy, NewPackagePolicy } from '../../../types'; import { packageToPackagePolicyInputs } from '../../../services'; import { Loading } from '../../../components'; -import { PackagePolicyValidationResults } from './services'; import { pkgKeyFromPackageInfo } from '../../../services/pkg_key_from_package_info'; +import { PackagePolicyValidationResults } from './services'; + export const StepDefinePackagePolicy: React.FunctionComponent<{ agentPolicy: AgentPolicy; packageInfo: PackageInfo; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/step_select_agent_policy.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/step_select_agent_policy.tsx index 4e386ba9789ce..5359075ed19c3 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/step_select_agent_policy.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/step_select_agent_policy.tsx @@ -19,6 +19,7 @@ import { EuiFormRow, EuiLink, } from '@elastic/eui'; + import { Error } from '../../../components'; import { AgentPolicy, PackageInfo, GetAgentPoliciesResponseItem } from '../../../types'; import { isPackageLimited, doesAgentPolicyAlreadyIncludePackage } from '../../../services'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/step_select_package.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/step_select_package.tsx index e1062c84e4314..346dba971a2b4 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/step_select_package.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/step_select_package.tsx @@ -9,6 +9,7 @@ import React, { useEffect, useState, Fragment } from 'react'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; import { EuiFlexGroup, EuiFlexItem, EuiSelectable, EuiSpacer } from '@elastic/eui'; + import { Error } from '../../../components'; import { AgentPolicy, PackageInfo, PackagePolicy, GetPackagesResponse } from '../../../types'; import { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/package_policies/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/package_policies/index.tsx index 804ce89005f42..c131183f20bdc 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/package_policies/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/package_policies/index.tsx @@ -6,7 +6,9 @@ */ import React, { memo } from 'react'; + import { AgentPolicy, PackagePolicy } from '../../../../../types'; + import { NoPackagePolicies } from './no_package_policies'; import { PackagePoliciesTable } from './package_policies_table'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/package_policies/no_package_policies.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/package_policies/no_package_policies.tsx index 6c8e9c9536da5..54adbd78ab75a 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/package_policies/no_package_policies.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/package_policies/no_package_policies.tsx @@ -8,6 +8,7 @@ import React, { memo } from 'react'; import { FormattedMessage } from '@kbn/i18n/react'; import { EuiButton, EuiEmptyPrompt } from '@elastic/eui'; + import { useCapabilities, useLink } from '../../../../../hooks'; export const NoPackagePolicies = memo<{ policyId: string }>(({ policyId }) => { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/package_policies/package_policies_table.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/package_policies/package_policies_table.tsx index 550a0275f1895..423ea052be41b 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/package_policies/package_policies_table.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/package_policies/package_policies_table.tsx @@ -17,6 +17,7 @@ import { EuiFlexGroup, EuiFlexItem, } from '@elastic/eui'; + import { AgentPolicy, PackagePolicy } from '../../../../../types'; import { PackageIcon, ContextMenuActions } from '../../../../../components'; import { PackagePolicyDeleteProvider, DangerEuiContextMenuItem } from '../../../components'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/settings/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/settings/index.tsx index bad504333b9d7..c10c197691390 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/settings/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/settings/index.tsx @@ -11,6 +11,7 @@ import styled from 'styled-components'; import { EuiBottomBar, EuiFlexGroup, EuiFlexItem, EuiButtonEmpty, EuiButton } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; + import { AgentPolicy } from '../../../../../types'; import { useLink, diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/hooks/use_agent_status.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/hooks/use_agent_status.tsx index 05af605fc3509..8171dc12483a8 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/hooks/use_agent_status.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/hooks/use_agent_status.tsx @@ -6,6 +6,7 @@ */ import React from 'react'; + import { useRequest } from '../../../../hooks'; import { GetAgentStatusResponse } from '../../../../types'; import { agentRouteService } from '../../../../services'; 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 ec05aaf0acc28..d365d9407ffc0 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 @@ -22,6 +22,7 @@ import { } from '@elastic/eui'; import { Props as EuiTabProps } from '@elastic/eui/src/components/tabs/tab'; import styled from 'styled-components'; + import { AgentPolicy, AgentPolicyDetailsDeployAgentAction } from '../../../types'; import { PAGE_ROUTING_PATHS } from '../../../constants'; import { @@ -33,11 +34,12 @@ import { } from '../../../hooks'; import { Loading, Error } from '../../../components'; import { WithHeaderLayout } from '../../../layouts'; -import { AgentPolicyRefreshContext, useGetAgentStatus, AgentStatusRefreshContext } from './hooks'; import { LinkedAgentCount, AgentPolicyActionMenu } from '../components'; -import { PackagePoliciesView, SettingsView } from './components'; import { useIntraAppState } from '../../../hooks/use_intra_app_state'; +import { AgentPolicyRefreshContext, useGetAgentStatus, AgentStatusRefreshContext } from './hooks'; +import { PackagePoliciesView, SettingsView } from './components'; + const Divider = styled.div` width: 0; height: 100%; 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 b0f2232cf5067..05ad1848a0bf5 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 @@ -17,6 +17,7 @@ import { EuiFlexItem, EuiSpacer, } from '@elastic/eui'; + import { AgentPolicy, PackageInfo, UpdatePackagePolicy } from '../../../types'; import { useLink, diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/index.tsx index 4b3a873e9b5fd..345a4b4afa935 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/index.tsx @@ -7,8 +7,10 @@ import React from 'react'; import { HashRouter as Router, Switch, Route } from 'react-router-dom'; + import { PAGE_ROUTING_PATHS } from '../../constants'; import { useBreadcrumbs } from '../../hooks'; + import { AgentPolicyListPage } from './list_page'; import { AgentPolicyDetailsPage } from './details_page'; import { CreatePackagePolicyPage } from './create_package_policy_page'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/list_page/components/create_agent_policy.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/list_page/components/create_agent_policy.tsx index 35c75796633cf..3e103775ae494 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/list_page/components/create_agent_policy.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/list_page/components/create_agent_policy.tsx @@ -23,6 +23,7 @@ import { EuiFlyoutProps, EuiSpacer, } from '@elastic/eui'; + import { dataTypes } from '../../../../../../../common'; import { NewAgentPolicy, AgentPolicy } from '../../../../types'; import { useCapabilities, useStartServices, sendCreateAgentPolicy } from '../../../../hooks'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/list_page/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/list_page/index.tsx index dd1375ea3b30f..795c1934c3361 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/list_page/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/list_page/index.tsx @@ -23,6 +23,7 @@ import { CriteriaWithPagination } from '@elastic/eui/src/components/basic_table/ import { i18n } from '@kbn/i18n'; import { FormattedMessage, FormattedDate } from '@kbn/i18n/react'; import { useHistory } from 'react-router-dom'; + import { AgentPolicy } from '../../../types'; import { AGENT_POLICY_SAVED_OBJECT_TYPE } from '../../../constants'; import { WithHeaderLayout } from '../../../layouts'; @@ -38,6 +39,7 @@ import { } from '../../../hooks'; import { LinkAndRevision, SearchBar } from '../../../components'; import { LinkedAgentCount, AgentPolicyActionMenu } from '../components'; + import { CreateAgentPolicyFlyout } from './components'; const AgentPolicyListPageLayout: React.FunctionComponent = ({ children }) => ( diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/actions_menu.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/actions_menu.tsx index 93646e79589aa..887e91e1c375d 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/actions_menu.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/actions_menu.tsx @@ -8,6 +8,7 @@ import React, { memo, useState, useMemo } from 'react'; import { EuiPortal, EuiContextMenuItem } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; + import { Agent } from '../../../../types'; import { useCapabilities, useKibanaVersion } from '../../../../hooks'; import { ContextMenuActions } from '../../../../components'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_details/agent_details_integrations.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_details/agent_details_integrations.tsx index d71fb8be5f9cf..bbd47b9afb8c9 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_details/agent_details_integrations.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_details/agent_details_integrations.tsx @@ -20,9 +20,11 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import styled from 'styled-components'; + import { Agent, AgentPolicy, PackagePolicy, PackagePolicyInput } from '../../../../../types'; import { useLink } from '../../../../../hooks'; import { PackageIcon } from '../../../../../components'; + import { displayInputType, getLogsQueryByInputType } from './input_type_utils'; const StyledEuiAccordion = styled(EuiAccordion)` diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_details/agent_details_overview.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_details/agent_details_overview.tsx index a992c1a274063..28d7b026eb737 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_details/agent_details_overview.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_details/agent_details_overview.tsx @@ -19,6 +19,7 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; + import { Agent, AgentPolicy } from '../../../../../types'; import { useKibanaVersion, useLink } from '../../../../../hooks'; import { isAgentUpgradeable } from '../../../../../services'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_details/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_details/index.tsx index 059e4ef405daa..656bb8509aa30 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_details/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_details/index.tsx @@ -9,7 +9,9 @@ import React, { memo } from 'react'; import styled from 'styled-components'; import { EuiFlexGroup, EuiFlexItem, EuiTitle, EuiSpacer } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; + import { Agent, AgentPolicy } from '../../../../../types'; + import { AgentDetailsOverviewSection } from './agent_details_overview'; import { AgentDetailsIntegrationsSection } from './agent_details_integrations'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_details/input_type_utils.ts b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_details/input_type_utils.ts index 012fc863e4607..dd1197a8ee2d7 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_details/input_type_utils.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_details/input_type_utils.ts @@ -6,6 +6,7 @@ */ import { i18n } from '@kbn/i18n'; + import { STATE_DATASET_FIELD, AGENT_DATASET_FILEBEAT, diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/agent_logs.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/agent_logs.tsx index fafe389d07b82..ed2ae773bbb7e 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/agent_logs.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/agent_logs.tsx @@ -5,9 +5,10 @@ * 2.0. */ +import url from 'url'; + import React, { memo, useMemo, useState, useCallback, useEffect } from 'react'; import styled from 'styled-components'; -import url from 'url'; import { encode } from 'rison-node'; import { stringify } from 'query-string'; import { @@ -24,12 +25,14 @@ import useMeasure from 'react-use/lib/useMeasure'; import { FormattedMessage } from '@kbn/i18n/react'; import semverGte from 'semver/functions/gte'; import semverCoerce from 'semver/functions/coerce'; + import { createStateContainerReactHelpers } from '../../../../../../../../../../../src/plugins/kibana_utils/public'; import { RedirectAppLinks } from '../../../../../../../../../../../src/plugins/kibana_react/public'; import { TimeRange, esKuery } from '../../../../../../../../../../../src/plugins/data/public'; import { LogStream } from '../../../../../../../../../infra/public'; import { Agent } from '../../../../../types'; import { useStartServices } from '../../../../../hooks'; + import { DEFAULT_DATE_RANGE } from './constants'; import { DatasetFilter } from './filter_dataset'; import { LogLevelFilter } from './filter_log_level'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_dataset.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_dataset.tsx index ba1475cfe1cd9..47174561230ba 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_dataset.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_dataset.tsx @@ -8,7 +8,9 @@ import React, { memo, useState, useEffect } from 'react'; import { EuiPopover, EuiFilterButton, EuiFilterSelectItem } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; + import { useStartServices } from '../../../../../hooks'; + import { AGENT_LOG_INDEX_PATTERN, DATASET_FIELD, AGENT_DATASET } from './constants'; export const DatasetFilter: React.FunctionComponent<{ diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_log_level.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_log_level.tsx index a88b7dd2b2a15..120f21fe68207 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_log_level.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_log_level.tsx @@ -8,9 +8,11 @@ import React, { memo, useState, useEffect } from 'react'; import { EuiPopover, EuiFilterButton, EuiFilterSelectItem } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { ORDERED_FILTER_LOG_LEVELS, AGENT_LOG_INDEX_PATTERN, LOG_LEVEL_FIELD } from './constants'; + import { useStartServices } from '../../../../../hooks'; +import { ORDERED_FILTER_LOG_LEVELS, AGENT_LOG_INDEX_PATTERN, LOG_LEVEL_FIELD } from './constants'; + function sortLogLevels(levels: string[]): string[] { return [ ...new Set([ diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/index.tsx index 2c327c8c7c6df..7e37e5fb49cb3 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/index.tsx @@ -6,6 +6,7 @@ */ import React, { memo, useEffect, useState, useMemo } from 'react'; + import { createStateContainer, syncState, @@ -14,6 +15,7 @@ import { PureTransition, getStateFromKbnUrl, } from '../../../../../../../../../../../src/plugins/kibana_utils/public'; + import { DEFAULT_LOGS_STATE, STATE_STORAGE_KEY } from './constants'; import { AgentLogsUI, AgentLogsProps, AgentLogsState, AgentLogsUrlStateHelper } from './agent_logs'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/query_bar.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/query_bar.tsx index 17b77d0935b31..776c866e22f4b 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/query_bar.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/query_bar.tsx @@ -7,11 +7,13 @@ import React, { memo, useState, useEffect } from 'react'; import { i18n } from '@kbn/i18n'; + import { QueryStringInput, IFieldType, } from '../../../../../../../../../../../src/plugins/data/public'; import { useStartServices } from '../../../../../hooks'; + import { AGENT_LOG_INDEX_PATTERN, AGENT_ID_FIELD, diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/select_log_level.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/select_log_level.tsx index 123fe2cf1df29..d4ea76605b777 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/select_log_level.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/select_log_level.tsx @@ -9,8 +9,10 @@ import React, { memo, useState, useCallback } from 'react'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; import { EuiSelect, EuiFormLabel, EuiButtonEmpty, EuiFlexItem, EuiFlexGroup } from '@elastic/eui'; + import { Agent } from '../../../../../types'; import { sendPostAgentAction, useStartServices } from '../../../../../hooks'; + import { AGENT_LOG_LEVELS, DEFAULT_LOG_LEVEL } from './constants'; const LEVEL_VALUES = Object.values(AGENT_LOG_LEVELS); diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/index.tsx index e8f6ca92db272..dc1e25401bf18 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/index.tsx @@ -21,6 +21,7 @@ import { Props as EuiTabProps } from '@elastic/eui/src/components/tabs/tab'; import { FormattedMessage, FormattedRelative } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; import { EuiIconTip } from '@elastic/eui'; + import { Agent, AgentPolicy, AgentDetailsReassignPolicyAction } from '../../../types'; import { PAGE_ROUTING_PATHS } from '../../../constants'; import { Loading, Error } from '../../../components'; @@ -34,11 +35,12 @@ import { } from '../../../hooks'; import { WithHeaderLayout } from '../../../layouts'; import { AgentHealth } from '../components'; -import { AgentRefreshContext } from './hooks'; -import { AgentLogs, AgentDetailsActionMenu, AgentDetailsContent } from './components'; import { useIntraAppState } from '../../../hooks/use_intra_app_state'; import { isAgentUpgradeable } from '../../../services'; +import { AgentRefreshContext } from './hooks'; +import { AgentLogs, AgentDetailsActionMenu, AgentDetailsContent } from './components'; + export const AgentDetailsPage: React.FunctionComponent = () => { const { params: { agentId, tabId = '' }, diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/bulk_actions.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/bulk_actions.tsx index fecbe7d00368a..1fe611dd97fcf 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/bulk_actions.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/bulk_actions.tsx @@ -18,6 +18,7 @@ import { EuiPortal, } from '@elastic/eui'; import { FormattedMessage, FormattedNumber } from '@kbn/i18n/react'; + import { SO_SEARCH_LIMIT } from '../../../../constants'; import { Agent } from '../../../../types'; import { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/search_and_filter_bar.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/search_and_filter_bar.tsx index af990a36a7415..982194f52ddac 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/search_and_filter_bar.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/search_and_filter_bar.tsx @@ -16,6 +16,7 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; + import { AgentPolicy } from '../../../../types'; import { SearchBar } from '../../../../components'; import { AGENTS_INDEX, AGENT_SAVED_OBJECT_TYPE } from '../../../../constants'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/status_badges.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/status_badges.tsx index 66911b61c713c..755d895d3b768 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/status_badges.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/status_badges.tsx @@ -7,6 +7,7 @@ import { EuiFlexGroup, EuiHealth, EuiNotificationBadge, EuiFlexItem } from '@elastic/eui'; import React, { memo, useMemo } from 'react'; + import { AGENT_STATUSES, getColorForAgentStatus, diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/status_bar.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/status_bar.tsx index f28a59093ab00..64bf580f15b5a 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/status_bar.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/status_bar.tsx @@ -8,6 +8,7 @@ import styled from 'styled-components'; import { EuiColorPaletteDisplay } from '@elastic/eui'; import React, { useMemo } from 'react'; + import { AGENT_STATUSES, getColorForAgentStatus } from '../../services/agent_status'; import { SimplifiedAgentStatus } from '../../../../types'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/table_header.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/table_header.tsx index 6d20486e145c3..9d3fb45ff2ff8 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/table_header.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/table_header.tsx @@ -7,6 +7,7 @@ import React from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; + import { Agent, SimplifiedAgentStatus } from '../../../../types'; import { AgentStatusBar } from './status_bar'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.tsx index 80191fbb0a370..a66105a15f17c 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.tsx @@ -21,6 +21,7 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage, FormattedRelative } from '@kbn/i18n/react'; + import { AgentEnrollmentFlyout } from '../components'; import { Agent, AgentPolicy, SimplifiedAgentStatus } from '../../../types'; import { @@ -45,6 +46,7 @@ import { AgentUnenrollAgentModal, AgentUpgradeAgentModal, } from '../components'; + import { AgentTableHeader } from './components/table_header'; import { SelectionMode } from './components/bulk_actions'; import { SearchAndFilterBar } from './components/search_and_filter_bar'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_enrollment_flyout/agent_policy_selection.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_enrollment_flyout/agent_policy_selection.tsx index 3c2c2940a2233..09d66b9b7cfad 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_enrollment_flyout/agent_policy_selection.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_enrollment_flyout/agent_policy_selection.tsx @@ -9,6 +9,7 @@ import React, { useState, useEffect } from 'react'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; import { EuiSelect, EuiSpacer, EuiText, EuiButtonEmpty } from '@elastic/eui'; + import { SO_SEARCH_LIMIT } from '../../../../constants'; import { AgentPolicy, GetEnrollmentAPIKeysResponse } from '../../../../types'; import { sendGetEnrollmentAPIKeys, useStartServices } from '../../../../hooks'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_enrollment_flyout/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_enrollment_flyout/index.tsx index ce8e3b1e514c6..e013e35488161 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_enrollment_flyout/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_enrollment_flyout/index.tsx @@ -22,7 +22,9 @@ import { EuiTabs, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; + import { AgentPolicy } from '../../../../types'; + import { ManagedInstructions } from './managed_instructions'; import { StandaloneInstructions } from './standalone_instructions'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_enrollment_flyout/managed_instructions.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_enrollment_flyout/managed_instructions.tsx index 73e82461c04a6..5a22a47c2593c 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_enrollment_flyout/managed_instructions.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_enrollment_flyout/managed_instructions.tsx @@ -10,6 +10,7 @@ import { EuiSteps, EuiLink, EuiText, EuiSpacer } from '@elastic/eui'; import { EuiContainedStepProps } from '@elastic/eui/src/components/steps/steps'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; + import { AgentPolicy } from '../../../../types'; import { useGetOneEnrollmentAPIKey, @@ -19,6 +20,7 @@ import { useFleetStatus, } from '../../../../hooks'; import { ManualInstructions } from '../../../../components/enrollment_instructions'; + import { DownloadStep, AgentPolicySelectionStep } from './steps'; interface Props { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_enrollment_flyout/standalone_instructions.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_enrollment_flyout/standalone_instructions.tsx index f70dc491f2000..6e4f4168a64c5 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_enrollment_flyout/standalone_instructions.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_enrollment_flyout/standalone_instructions.tsx @@ -21,11 +21,13 @@ import { import { EuiContainedStepProps } from '@elastic/eui/src/components/steps/steps'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; + import { AgentPolicy } from '../../../../types'; import { useStartServices, useLink, sendGetOneAgentPolicyFull } from '../../../../hooks'; -import { DownloadStep, AgentPolicySelectionStep } from './steps'; import { fullAgentPolicyToYaml, agentPolicyRouteService } from '../../../../services'; +import { DownloadStep, AgentPolicySelectionStep } from './steps'; + interface Props { agentPolicies?: AgentPolicy[]; } diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_enrollment_flyout/steps.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_enrollment_flyout/steps.tsx index ad444bf18c496..8ea2259ca80c3 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_enrollment_flyout/steps.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_enrollment_flyout/steps.tsx @@ -9,9 +9,11 @@ import React from 'react'; import { EuiText, EuiButton, EuiSpacer } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; -import { EnrollmentStepAgentPolicy } from './agent_policy_selection'; + import { AgentPolicy } from '../../../../types'; +import { EnrollmentStepAgentPolicy } from './agent_policy_selection'; + export const DownloadStep = () => { return { title: i18n.translate('xpack.fleet.agentEnrollment.stepDownloadAgentTitle', { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_health.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_health.tsx index 6fc801a6419ac..26ad0550ae71f 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_health.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_health.tsx @@ -8,6 +8,7 @@ import React from 'react'; import { FormattedMessage, FormattedRelative } from '@kbn/i18n/react'; import { EuiBadge, EuiToolTip } from '@elastic/eui'; + import { Agent } from '../../../types'; interface Props { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_policy_package_badges.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_policy_package_badges.tsx index ec770305c1f03..e7868e4b6fe10 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_policy_package_badges.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_policy_package_badges.tsx @@ -8,6 +8,7 @@ import React, { useMemo } from 'react'; import { FormattedMessage } from '@kbn/i18n/react'; import { EuiSpacer, EuiText, EuiFlexGroup, EuiFlexItem, EuiBadge } from '@elastic/eui'; + import { PackagePolicy, PackagePolicyPackage } from '../../../types'; import { useGetOneAgentPolicy } from '../../../hooks'; import { PackageIcon } from '../../../components/package_icon'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_reassign_policy_flyout/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_reassign_policy_flyout/index.tsx index e97298f7063b3..265adc29164c5 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_reassign_policy_flyout/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_reassign_policy_flyout/index.tsx @@ -23,6 +23,7 @@ import { EuiText, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; + import { Agent } from '../../../../types'; import { sendPutAgentReassign, diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_unenroll_modal/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_unenroll_modal/index.tsx index a50cc18d46f55..fe550123fec2a 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_unenroll_modal/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_unenroll_modal/index.tsx @@ -9,6 +9,7 @@ import React, { useState } from 'react'; import { i18n } from '@kbn/i18n'; import { EuiConfirmModal, EuiFormFieldset, EuiCheckbox } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; + import { Agent } from '../../../../types'; import { sendPostAgentUnenroll, diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_upgrade_modal/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_upgrade_modal/index.tsx index 57f4007a00274..90c291f249ef5 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_upgrade_modal/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_upgrade_modal/index.tsx @@ -9,6 +9,7 @@ import React, { useState } from 'react'; import { i18n } from '@kbn/i18n'; import { EuiConfirmModal, EuiBetaBadge, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; + import { Agent } from '../../../../types'; import { sendPostAgentUpgrade, diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/list_layout.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/list_layout.tsx index b82dcb9bbf1c4..6c79ab6657fa7 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/list_layout.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/list_layout.tsx @@ -10,6 +10,7 @@ import { FormattedMessage } from '@kbn/i18n/react'; import { EuiText, EuiFlexGroup, EuiFlexItem, EuiButton, EuiPortal } from '@elastic/eui'; import { Props as EuiTabProps } from '@elastic/eui/src/components/tabs/tab'; import { useRouteMatch } from 'react-router-dom'; + import { PAGE_ROUTING_PATHS } from '../../../constants'; import { WithHeaderLayout } from '../../../layouts'; import { useCapabilities, useLink, useGetAgentPolicies } from '../../../hooks'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/enrollment_token_list_page/components/confirm_delete_modal.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/enrollment_token_list_page/components/confirm_delete_modal.tsx index 565657c70e17f..41dab3d6479e0 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/enrollment_token_list_page/components/confirm_delete_modal.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/enrollment_token_list_page/components/confirm_delete_modal.tsx @@ -8,6 +8,7 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import { EuiConfirmModal, EuiCallOut } from '@elastic/eui'; + import { EnrollmentAPIKey } from '../../../../types'; interface Props { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/enrollment_token_list_page/components/new_enrollment_key_flyout.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/enrollment_token_list_page/components/new_enrollment_key_flyout.tsx index c5e31187bac02..9644845ca4ff5 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/enrollment_token_list_page/components/new_enrollment_key_flyout.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/enrollment_token_list_page/components/new_enrollment_key_flyout.tsx @@ -23,6 +23,7 @@ import { EuiSelect, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; + import { AgentPolicy } from '../../../../types'; import { useInput, useStartServices, sendRequest } from '../../../../hooks'; import { enrollmentAPIKeyRouteService } from '../../../../services'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/enrollment_token_list_page/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/enrollment_token_list_page/index.tsx index bab3763ea4f6a..ce4c76141fad0 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/enrollment_token_list_page/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/enrollment_token_list_page/index.tsx @@ -20,6 +20,7 @@ import { HorizontalAlignment, } from '@elastic/eui'; import { FormattedMessage, FormattedDate } from '@kbn/i18n/react'; + import { ENROLLMENT_API_KEYS_INDEX, ENROLLMENT_API_KEYS_SAVED_OBJECT_TYPE, @@ -36,6 +37,7 @@ import { } from '../../../hooks'; import { EnrollmentAPIKey } from '../../../types'; import { SearchBar } from '../../../components/search_bar'; + import { NewEnrollmentTokenFlyout } from './components/new_enrollment_key_flyout'; import { ConfirmEnrollmentTokenDelete } from './components/confirm_delete_modal'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/index.tsx index 95f1136880a1c..7888b29223d50 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/index.tsx @@ -8,16 +8,18 @@ import React from 'react'; import { FormattedMessage } from '@kbn/i18n/react'; import { HashRouter as Router, Route, Switch, Redirect } from 'react-router-dom'; + import { PAGE_ROUTING_PATHS } from '../../constants'; import { Loading, Error } from '../../components'; import { useConfig, useFleetStatus, useBreadcrumbs, useCapabilities } from '../../hooks'; +import { WithoutHeaderLayout } from '../../layouts'; + import { AgentListPage } from './agent_list_page'; import { SetupPage } from './setup_page'; import { AgentDetailsPage } from './agent_details_page'; import { NoAccessPage } from './error_pages/no_access'; import { EnrollmentTokenListPage } from './enrollment_token_list_page'; import { ListLayout } from './components/list_layout'; -import { WithoutHeaderLayout } from '../../layouts'; export const FleetApp: React.FunctionComponent = () => { useBreadcrumbs('fleet'); diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/services/agent_status.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/services/agent_status.tsx index 1cd63f74bdc40..301dd565f94c3 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/services/agent_status.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/services/agent_status.tsx @@ -7,6 +7,7 @@ import { euiPaletteColorBlindBehindText } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; + import { SimplifiedAgentStatus } from '../../../types'; const visColors = euiPaletteColorBlindBehindText(); diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/setup_page/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/setup_page/index.tsx index e5dbaaef66f89..860e081748f56 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/setup_page/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/setup_page/index.tsx @@ -24,6 +24,7 @@ import { EuiCodeBlock, EuiLink, } from '@elastic/eui'; + import { useStartServices, sendPostFleetSetup } from '../../../hooks'; import { WithoutHeaderLayout } from '../../../layouts'; import { GetFleetStatusResponse } from '../../../types'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/data_stream/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/data_stream/index.tsx index 25e92159ae182..fb6078ce73b70 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/data_stream/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/data_stream/index.tsx @@ -7,7 +7,9 @@ import React from 'react'; import { HashRouter as Router, Route, Switch } from 'react-router-dom'; + import { PAGE_ROUTING_PATHS } from '../../constants'; + import { DataStreamListPage } from './list_page'; export const DataStreamApp: React.FunctionComponent = () => { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/data_stream/list_page/components/data_stream_row_actions.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/data_stream/list_page/components/data_stream_row_actions.tsx index 5ce46904bfb02..0516a0a8829af 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/data_stream/list_page/components/data_stream_row_actions.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/data_stream/list_page/components/data_stream_row_actions.tsx @@ -8,6 +8,7 @@ import React, { memo } from 'react'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; + import { DataStream } from '../../../../types'; import { useKibanaLink } from '../../../../hooks'; import { ContextMenuActions } from '../../../../components'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/data_stream/list_page/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/data_stream/list_page/index.tsx index c5278494bc547..dd525dcaf795b 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/data_stream/list_page/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/data_stream/list_page/index.tsx @@ -19,10 +19,12 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage, FormattedDate } from '@kbn/i18n/react'; + import { DataStream } from '../../../types'; import { WithHeaderLayout } from '../../../layouts'; import { useGetDataStreams, useStartServices, usePagination, useBreadcrumbs } from '../../../hooks'; import { PackageIcon } from '../../../components/package_icon'; + import { DataStreamRowActions } from './components/data_stream_row_actions'; const DataStreamListPageLayout: React.FunctionComponent = ({ children }) => ( diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/assets_facet_group.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/assets_facet_group.tsx index e1c86a8990313..a88c6ceaea0c4 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/assets_facet_group.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/assets_facet_group.tsx @@ -18,6 +18,7 @@ import { } from '@elastic/eui'; import styled from 'styled-components'; import { FormattedMessage } from '@kbn/i18n/react'; + import { AssetsGroupedByServiceByType, AssetTypeToParts, diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/icon_panel.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/icon_panel.tsx index 7700c8ed5fdc2..9574ecbcf4e0c 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/icon_panel.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/icon_panel.tsx @@ -8,6 +8,7 @@ import React from 'react'; import styled from 'styled-components'; import { EuiIcon, EuiPanel } from '@elastic/eui'; + import { usePackageIconType, UsePackageIconType } from '../../../hooks'; import { Loading } from '../../../components'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/package_card.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/package_card.tsx index cac8ff7d5e7a2..43985a9d8efa4 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/package_card.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/package_card.tsx @@ -8,9 +8,11 @@ import React from 'react'; import styled from 'styled-components'; import { EuiCard } from '@elastic/eui'; + import { PackageInfo, PackageListItem } from '../../../types'; import { useLink } from '../../../hooks'; import { PackageIcon } from '../../../components/package_icon'; + import { RELEASE_BADGE_LABEL, RELEASE_BADGE_DESCRIPTION } from './release_badge'; type PackageCardProps = PackageListItem | PackageInfo; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/package_list_grid.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/package_list_grid.tsx index 7f089430d547c..da8f2c690a010 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/package_list_grid.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/package_list_grid.tsx @@ -19,12 +19,14 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; + import { Loading } from '../../../components'; import { PackageList } from '../../../types'; import { useLocalSearch, searchIdField } from '../hooks'; -import { PackageCard } from './package_card'; import { pkgKeyFromPackageInfo } from '../../../services/pkg_key_from_package_info'; +import { PackageCard } from './package_card'; + interface ListProps { isLoading?: boolean; controls?: ReactNode; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/release_badge.ts b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/release_badge.ts index 9e4e51e410e7e..547d920045b90 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/release_badge.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/release_badge.ts @@ -6,6 +6,7 @@ */ import { i18n } from '@kbn/i18n'; + import type { RegistryRelease } from '../../../types'; export const RELEASE_BADGE_LABEL: { [key in Exclude]: string } = { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/requirements.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/requirements.tsx index 244d7d3f97153..3cb0f1e061fa3 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/requirements.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/requirements.tsx @@ -8,8 +8,10 @@ import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiText, EuiTextColor, EuiTitle } from '@elastic/eui'; import React, { Fragment } from 'react'; import styled from 'styled-components'; + import { RequirementsByServiceName, ServiceName, entries } from '../../../types'; import { ServiceTitleMap } from '../constants'; + import { Version } from './version'; export interface RequirementsProps { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/version.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/version.tsx index 332d8345c6251..cde8f1ebebfb5 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/version.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/version.tsx @@ -7,6 +7,7 @@ import React from 'react'; import styled from 'styled-components'; + import { RequirementVersion } from '../../../types'; const CodeText = styled.span` diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/constants.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/constants.tsx index 84bca0d2f342a..a50c35765e661 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/constants.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/constants.tsx @@ -6,6 +6,7 @@ */ import { IconType } from '@elastic/eui'; + import { AssetType, ElasticsearchAssetType, KibanaAssetType, ServiceName } from '../../types'; // only allow Kibana assets for the kibana key, ES asssets for elasticsearch, etc diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/hooks/use_local_search.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/hooks/use_local_search.tsx index 5508f94dc730a..9c4839ff859f0 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/hooks/use_local_search.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/hooks/use_local_search.tsx @@ -7,6 +7,7 @@ import { Search as LocalSearch } from 'js-search'; import { useEffect, useRef } from 'react'; + import { PackageList, PackageListItem } from '../../../types'; export type SearchField = keyof PackageListItem; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/hooks/use_package_install.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/hooks/use_package_install.tsx index d3fccb6001733..b5412ce5b57ea 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/hooks/use_package_install.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/hooks/use_package_install.tsx @@ -10,6 +10,7 @@ import React, { useCallback, useState } from 'react'; import { useHistory } from 'react-router-dom'; import { FormattedMessage } from '@kbn/i18n/react'; import { NotificationsStart } from 'src/core/public'; + import { toMountPoint } from '../../../../../../../../../src/plugins/kibana_react/public'; import { PackageInfo } from '../../../types'; import { sendInstallPackage, sendRemovePackage, useLink } from '../../../hooks'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/index.tsx index a02cc852a1d13..cb94ddf3ddf2a 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/index.tsx @@ -7,9 +7,11 @@ import React from 'react'; import { Switch, Route } from 'react-router-dom'; + import { PAGE_ROUTING_PATHS } from '../../constants'; import { useBreadcrumbs } from '../../hooks'; import { CreatePackagePolicyPage } from '../agent_policy/create_package_policy_page'; + import { EPMHomePage } from './screens/home'; import { Detail } from './screens/detail'; import { Policy } from './screens/policy'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/components/icon_panel.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/components/icon_panel.tsx index b2495b607af59..74d2b2fbc680f 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/components/icon_panel.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/components/icon_panel.tsx @@ -8,6 +8,7 @@ import React from 'react'; import styled from 'styled-components'; import { EuiIcon, EuiPanel } from '@elastic/eui'; + import { usePackageIconType, UsePackageIconType } from '../../../../../hooks'; import { Loading } from '../../../../../components'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/components/integration_agent_policy_count.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/components/integration_agent_policy_count.tsx index eeb74526046e2..26e61d536333b 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/components/integration_agent_policy_count.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/components/integration_agent_policy_count.tsx @@ -6,6 +6,7 @@ */ import React, { memo } from 'react'; + import { useGetPackageStats } from '../../../../../hooks'; /** diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/custom/custom.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/custom/custom.tsx index f005c1e24dee7..3ea41436c22d8 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/custom/custom.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/custom/custom.tsx @@ -7,6 +7,7 @@ import React, { memo, useMemo } from 'react'; import { Redirect } from 'react-router-dom'; import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; + import { useUIExtension } from '../../../../../hooks/use_ui_extension'; import { useLink } from '../../../../../hooks'; import { PackageInfo } from '../../../../../types'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/index.test.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/index.test.tsx index 32e39d7c4d6ee..e17e9bdfe2ef2 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/index.test.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/index.test.tsx @@ -5,11 +5,11 @@ * 2.0. */ -import { createTestRendererMock, MockedFleetStartServices, TestRenderer } from '../../../../mock'; -import { Detail } from './index'; import React, { lazy, memo } from 'react'; -import { PAGE_ROUTING_PATHS, pagePathGetters } from '../../../../constants'; import { Route } from 'react-router-dom'; +import { act, cleanup } from '@testing-library/react'; + +import { PAGE_ROUTING_PATHS, pagePathGetters } from '../../../../constants'; import { GetAgentPoliciesResponse, GetFleetStatusResponse, @@ -24,7 +24,9 @@ import { fleetSetupRouteService, packagePolicyRouteService, } from '../../../../../../../common/services'; -import { act, cleanup } from '@testing-library/react'; +import { createTestRendererMock, MockedFleetStartServices, TestRenderer } from '../../../../mock'; + +import { Detail } from './index'; describe('when on integration detail', () => { const pkgkey = 'nginx-0.3.7'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/index.tsx index 3cb57b63e707d..6c67da708a4c1 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/index.tsx @@ -21,6 +21,8 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; +import semverLt from 'semver/functions/lt'; + import { useUIExtension } from '../../../../hooks/use_ui_extension'; import { PAGE_ROUTING_PATHS, PLUGIN_ID } from '../../../../constants'; import { useCapabilities, useGetPackageInfoByKey, useLink } from '../../../../hooks'; @@ -35,7 +37,8 @@ import { Error, Loading } from '../../../../components'; import { useBreadcrumbs } from '../../../../hooks'; import { WithHeaderLayout, WithHeaderLayoutProps } from '../../../../layouts'; import { RELEASE_BADGE_DESCRIPTION, RELEASE_BADGE_LABEL } from '../../components/release_badge'; -import { useSetPackageInstallStatus } from '../../hooks'; +import { useGetPackageInstallStatus, useSetPackageInstallStatus } from '../../hooks'; + import { IntegrationAgentPolicyCount, UpdateIcon, IconPanel, LoadingIconPanel } from './components'; import { OverviewPage } from './overview'; import { PackagePoliciesPage } from './policies'; @@ -74,18 +77,26 @@ export function Detail() { // Package info state const [packageInfo, setPackageInfo] = useState(null); const setPackageInstallStatus = useSetPackageInstallStatus(); + const getPackageInstallStatus = useGetPackageInstallStatus(); + + const packageInstallStatus = useMemo(() => { + if (packageInfo === null || !packageInfo.name) { + return undefined; + } + return getPackageInstallStatus(packageInfo.name).status; + }, [packageInfo, getPackageInstallStatus]); + const updateAvailable = packageInfo && 'savedObject' in packageInfo && packageInfo.savedObject && - packageInfo.savedObject.attributes.version < packageInfo.latestVersion; + semverLt(packageInfo.savedObject.attributes.version, packageInfo.latestVersion); // Fetch package info const { data: packageInfoData, error: packageInfoError, isLoading } = useGetPackageInfoByKey( pkgkey ); - const packageInstallStatus = packageInfoData?.response.status; const showCustomTab = useUIExtension(packageInfoData?.response.name ?? '', 'package-detail-custom') !== undefined; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/overview/details.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/overview/details.tsx index 3b9daaeb0216e..3d6573feab459 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/overview/details.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/overview/details.tsx @@ -15,6 +15,7 @@ import { EuiNotificationBadge, } from '@elastic/eui'; import { EuiDescriptionListProps } from '@elastic/eui/src/components/description_list/description_list'; + import { PackageInfo, PackageSpecCategory, diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/overview/overview.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/overview/overview.tsx index 4e45ecd2f70cb..da8a5133d77e6 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/overview/overview.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/overview/overview.tsx @@ -7,7 +7,9 @@ import React, { memo } from 'react'; import styled from 'styled-components'; import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; + import { PackageInfo } from '../../../../../types'; + import { Screenshots } from './screenshots'; import { Readme } from './readme'; import { Details } from './details'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/overview/readme.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/overview/readme.tsx index 92022f5e97a60..d92b4ce598fd2 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/overview/readme.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/overview/readme.tsx @@ -8,8 +8,10 @@ import { EuiLoadingContent, EuiText } from '@elastic/eui'; import React, { Fragment, useEffect, useState } from 'react'; import ReactMarkdown from 'react-markdown'; + import { useLinks } from '../../../hooks'; import { sendGetFileByPath } from '../../../../../hooks'; + import { markdownRenderers } from './markdown_renderers'; export function Readme({ diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/overview/screenshots.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/overview/screenshots.tsx index 33b2c3efe2fba..4a278967229ad 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/overview/screenshots.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/overview/screenshots.tsx @@ -8,6 +8,7 @@ import React, { useState, useMemo, memo } from 'react'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; import { EuiFlexGroup, EuiFlexItem, EuiImage, EuiText, EuiPagination } from '@elastic/eui'; + import { ScreenshotItem } from '../../../../../types'; import { useLinks } from '../../../hooks'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/policies/package_policies.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/policies/package_policies.tsx index 53cd642a1ef78..1349a48b315ff 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/policies/package_policies.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/policies/package_policies.tsx @@ -17,12 +17,14 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedRelative, FormattedMessage } from '@kbn/i18n/react'; + import { InstallStatus } from '../../../../../types'; import { useLink, useUrlPagination } from '../../../../../hooks'; import { PACKAGE_POLICY_SAVED_OBJECT_TYPE } from '../../../../../constants'; import { LinkAndRevision, LinkAndRevisionProps } from '../../../../../components'; import { LinkedAgentCount } from '../../../../../components/linked_agent_count'; import { useGetPackageInstallStatus } from '../../../hooks'; + import { PackagePolicyAndAgentPolicy, usePackagePoliciesWithAgentPolicy, diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/policies/use_package_policies_with_agent_policy.ts b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/policies/use_package_policies_with_agent_policy.ts index 77811a92093ee..f32047860717c 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/policies/use_package_policies_with_agent_policy.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/policies/use_package_policies_with_agent_policy.ts @@ -6,6 +6,7 @@ */ import { useEffect, useMemo, useState } from 'react'; + import type { PackagePolicy, GetAgentPoliciesResponse, diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/settings/installation_button.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/settings/installation_button.tsx index ca37095f5db19..dd71d4090c86b 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/settings/installation_button.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/settings/installation_button.tsx @@ -8,9 +8,11 @@ import { EuiButton } from '@elastic/eui'; import React, { Fragment, useCallback, useMemo, useState } from 'react'; import { FormattedMessage } from '@kbn/i18n/react'; + import { PackageInfo, InstallStatus } from '../../../../../types'; import { useCapabilities } from '../../../../../hooks'; import { useUninstallPackage, useGetPackageInstallStatus, useInstallPackage } from '../../../hooks'; + import { ConfirmPackageUninstall } from './confirm_package_uninstall'; import { ConfirmPackageInstall } from './confirm_package_install'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/settings/settings.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/settings/settings.tsx index 2c3559a651307..94c03f76cddaf 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/settings/settings.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/settings/settings.tsx @@ -8,12 +8,16 @@ import React, { memo } from 'react'; import styled from 'styled-components'; import { FormattedMessage } from '@kbn/i18n/react'; +import semverLt from 'semver/functions/lt'; + import { EuiTitle, EuiFlexGroup, EuiFlexItem, EuiText, EuiSpacer } from '@elastic/eui'; + import { InstallStatus, PackageInfo } from '../../../../../types'; import { useGetPackagePolicies } from '../../../../../hooks'; import { PACKAGE_POLICY_SAVED_OBJECT_TYPE } from '../../../../../constants'; import { useGetPackageInstallStatus } from '../../../hooks'; import { UpdateIcon } from '../components'; + import { InstallationButton } from './installation_button'; const SettingsTitleCell = styled.td` @@ -55,7 +59,9 @@ export const SettingsPage: React.FC = memo(({ packageInfo }: Props) => { }); const { status: installationStatus, version: installedVersion } = getPackageInstallStatus(name); const packageHasUsages = !!packagePoliciesData?.total; - const updateAvailable = installedVersion && installedVersion < latestVersion ? true : false; + const updateAvailable = + installedVersion && semverLt(installedVersion, latestVersion) ? true : false; + const isViewingOldPackage = version < latestVersion; // hide install/remove options if the user has version of the package is installed // and this package is out of date or if they do have a version installed but it's not this one diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/home/category_facets.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/home/category_facets.tsx index 6c1333ef1fc17..6a754ca86d7aa 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/home/category_facets.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/home/category_facets.tsx @@ -7,6 +7,7 @@ import { EuiFacetButton, EuiFacetGroup } from '@elastic/eui'; import React from 'react'; + import { Loading } from '../../../../components'; import { CategorySummaryItem, CategorySummaryList } from '../../../../types'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/home/header.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/home/header.tsx index d2b9a97b5f443..54ee34e9021a5 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/home/header.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/home/header.tsx @@ -10,6 +10,7 @@ import { i18n } from '@kbn/i18n'; import styled from 'styled-components'; import { EuiFlexGroup, EuiFlexItem, EuiImage, EuiText } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; + import { useLinks } from '../../hooks'; import { useStartServices } from '../../../../hooks'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/home/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/home/index.tsx index 7f43aaf128d9e..8f43adef71b10 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/home/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/home/index.tsx @@ -9,12 +9,14 @@ import React, { useState } from 'react'; import { useRouteMatch, Switch, Route, useLocation, useHistory } from 'react-router-dom'; import { Props as EuiTabProps } from '@elastic/eui/src/components/tabs/tab'; import { i18n } from '@kbn/i18n'; + import { installationStatuses } from '../../../../../../../common/constants'; import { PAGE_ROUTING_PATHS } from '../../../../constants'; import { useLink, useGetCategories, useGetPackages, useBreadcrumbs } from '../../../../hooks'; import { WithHeaderLayout } from '../../../../layouts'; import { CategorySummaryItem } from '../../../../types'; import { PackageListGrid } from '../../components/package_list_grid'; + import { CategoryFacets } from './category_facets'; import { HeroCopy, HeroImage } from './header'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/policy/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/policy/index.tsx index 0f23ccd82d825..b8963b8e39514 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/policy/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/policy/index.tsx @@ -7,6 +7,7 @@ import React, { memo } from 'react'; import { useRouteMatch } from 'react-router-dom'; + import { EditPackagePolicyForm } from '../../../agent_policy/edit_package_policy_page'; export const Policy = memo(() => { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/overview/components/agent_policy_section.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/overview/components/agent_policy_section.tsx index c3b59458abf0a..9c3c76efddc1a 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/overview/components/agent_policy_section.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/overview/components/agent_policy_section.tsx @@ -14,13 +14,15 @@ import { EuiDescriptionListTitle, EuiDescriptionListDescription, } from '@elastic/eui'; -import { OverviewPanel } from './overview_panel'; -import { OverviewStats } from './overview_stats'; + import { SO_SEARCH_LIMIT } from '../../../constants'; import { useLink, useGetPackagePolicies } from '../../../hooks'; import { AgentPolicy } from '../../../types'; import { Loading } from '../../agents/components'; +import { OverviewStats } from './overview_stats'; +import { OverviewPanel } from './overview_panel'; + export const OverviewPolicySection: React.FC<{ agentPolicies: AgentPolicy[] }> = ({ agentPolicies, }) => { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/overview/components/agent_section.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/overview/components/agent_section.tsx index 487e963c70c2c..d69306969c78c 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/overview/components/agent_section.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/overview/components/agent_section.tsx @@ -14,11 +14,13 @@ import { EuiDescriptionListDescription, EuiFlexItem, } from '@elastic/eui'; -import { OverviewPanel } from './overview_panel'; -import { OverviewStats } from './overview_stats'; + import { useLink, useGetAgentStatus } from '../../../hooks'; import { Loading } from '../../agents/components'; +import { OverviewPanel } from './overview_panel'; +import { OverviewStats } from './overview_stats'; + export const OverviewAgentSection = () => { const { getHref } = useLink(); const agentStatusRequest = useGetAgentStatus({}); diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/overview/components/datastream_section.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/overview/components/datastream_section.tsx index ce3a73eb0ccff..b51be3fdd20e5 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/overview/components/datastream_section.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/overview/components/datastream_section.tsx @@ -14,11 +14,13 @@ import { EuiDescriptionListTitle, EuiDescriptionListDescription, } from '@elastic/eui'; -import { OverviewPanel } from './overview_panel'; -import { OverviewStats } from './overview_stats'; + import { useLink, useGetDataStreams, useStartServices } from '../../../hooks'; import { Loading } from '../../agents/components'; +import { OverviewPanel } from './overview_panel'; +import { OverviewStats } from './overview_stats'; + export const OverviewDatastreamSection: React.FC = () => { const { getHref } = useLink(); const datastreamRequest = useGetDataStreams(); diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/overview/components/integration_section.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/overview/components/integration_section.tsx index 795b3b374596a..5ada8e298507c 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/overview/components/integration_section.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/overview/components/integration_section.tsx @@ -14,12 +14,14 @@ import { EuiDescriptionListTitle, EuiDescriptionListDescription, } from '@elastic/eui'; -import { OverviewPanel } from './overview_panel'; -import { OverviewStats } from './overview_stats'; + import { useLink, useGetPackages } from '../../../hooks'; import { Loading } from '../../agents/components'; import { installationStatuses } from '../../../../../../common/constants'; +import { OverviewStats } from './overview_stats'; +import { OverviewPanel } from './overview_panel'; + export const OverviewIntegrationSection: React.FC = () => { const { getHref } = useLink(); const packagesRequest = useGetPackages(); diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/overview/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/overview/index.tsx index 467680e47dda9..9da10c1de2be0 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/overview/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/overview/index.tsx @@ -17,9 +17,11 @@ import { } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; + import { WithHeaderLayout } from '../../layouts'; import { useGetAgentPolicies, useBreadcrumbs } from '../../hooks'; import { AgentEnrollmentFlyout } from '../agents/components'; + import { OverviewAgentSection } from './components/agent_section'; import { OverviewPolicySection } from './components/agent_policy_section'; import { OverviewIntegrationSection } from './components/integration_section'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/services/ui_extensions.test.ts b/x-pack/plugins/fleet/public/applications/fleet/services/ui_extensions.test.ts index bcddcb4afdbb3..1ca135538d2d2 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/services/ui_extensions.test.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/services/ui_extensions.test.ts @@ -6,11 +6,13 @@ */ import { lazy } from 'react'; + import type { PackagePolicyEditExtensionComponent, UIExtensionRegistrationCallback, UIExtensionsStorage, } from '../types'; + import { createExtensionRegistrationCallback } from './ui_extensions'; describe('UI Extension services', () => { diff --git a/x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts b/x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts index b118797d7d38e..74921daa0d2a1 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts @@ -6,6 +6,7 @@ */ import type { ApplicationStart } from 'kibana/public'; + import type { PackagePolicy } from './'; /** diff --git a/x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts b/x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts index a9cea79ee7d8b..c79b676a26b33 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts @@ -6,6 +6,7 @@ */ import type { ComponentType, LazyExoticComponent } from 'react'; + import type { NewPackagePolicy, PackageInfo, PackagePolicy } from './index'; /** Register a Fleet UI extension */ diff --git a/x-pack/plugins/fleet/public/index.ts b/x-pack/plugins/fleet/public/index.ts index 3b1136747f343..0304b7b56181c 100644 --- a/x-pack/plugins/fleet/public/index.ts +++ b/x-pack/plugins/fleet/public/index.ts @@ -6,6 +6,7 @@ */ import type { PluginInitializerContext } from 'src/core/public'; + import { FleetPlugin } from './plugin'; export { FleetSetup, FleetStart } from './plugin'; diff --git a/x-pack/plugins/fleet/public/plugin.ts b/x-pack/plugins/fleet/public/plugin.ts index 7f2fd4ee24d4f..071c9eee46617 100644 --- a/x-pack/plugins/fleet/public/plugin.ts +++ b/x-pack/plugins/fleet/public/plugin.ts @@ -13,6 +13,7 @@ import type { CoreStart, } from 'src/core/public'; import { i18n } from '@kbn/i18n'; + import { DEFAULT_APP_CATEGORIES, AppNavLinkStatus } from '../../../../src/core/public'; import type { DataPublicPluginSetup, @@ -24,8 +25,10 @@ import { Storage } from '../../../../src/plugins/kibana_utils/public'; import type { LicensingPluginSetup } from '../../licensing/public'; import { PLUGIN_ID, setupRouteService, appRoutesService } from '../common'; import type { CheckPermissionsResponse, PostIngestSetupResponse } from '../common'; -import { BASE_PATH } from './applications/fleet/constants'; + import type { FleetConfigType } from '../common/types'; + +import { BASE_PATH } from './applications/fleet/constants'; import { licenseService } from './applications/fleet/hooks/use_license'; import { setHttpClient } from './applications/fleet/hooks/use_request/use_request'; import { diff --git a/x-pack/plugins/fleet/scripts/dev_agent/script.ts b/x-pack/plugins/fleet/scripts/dev_agent/script.ts index 87727ef657e5f..e937706080218 100644 --- a/x-pack/plugins/fleet/scripts/dev_agent/script.ts +++ b/x-pack/plugins/fleet/scripts/dev_agent/script.ts @@ -5,9 +5,11 @@ * 2.0. */ +import os from 'os'; + import { createFlagError, run, ToolingLog } from '@kbn/dev-utils'; import fetch from 'node-fetch'; -import os from 'os'; + import type { Agent as _Agent, PostAgentCheckinRequest, diff --git a/x-pack/plugins/fleet/server/collectors/agent_collectors.ts b/x-pack/plugins/fleet/server/collectors/agent_collectors.ts index 9aeae1dba0ea5..b88249fb71d8d 100644 --- a/x-pack/plugins/fleet/server/collectors/agent_collectors.ts +++ b/x-pack/plugins/fleet/server/collectors/agent_collectors.ts @@ -7,6 +7,7 @@ import { SavedObjectsClient } from 'kibana/server'; import type { ElasticsearchClient } from 'kibana/server'; + import { FleetConfigType } from '../../common/types'; import * as AgentService from '../services/agents'; import { isFleetServerSetup } from '../services/fleet_server'; diff --git a/x-pack/plugins/fleet/server/collectors/helpers.ts b/x-pack/plugins/fleet/server/collectors/helpers.ts index 4de2330e70a2c..83970b0aa0d54 100644 --- a/x-pack/plugins/fleet/server/collectors/helpers.ts +++ b/x-pack/plugins/fleet/server/collectors/helpers.ts @@ -6,6 +6,7 @@ */ import type { CoreSetup } from 'kibana/server'; + import { SavedObjectsClient } from '../../../../../src/core/server'; import type { ElasticsearchClient } from '../../../../../src/core/server'; diff --git a/x-pack/plugins/fleet/server/collectors/package_collectors.ts b/x-pack/plugins/fleet/server/collectors/package_collectors.ts index e0f5667fbe458..20370231c7919 100644 --- a/x-pack/plugins/fleet/server/collectors/package_collectors.ts +++ b/x-pack/plugins/fleet/server/collectors/package_collectors.ts @@ -7,6 +7,7 @@ import { SavedObjectsClient } from 'kibana/server'; import _ from 'lodash'; + import { getPackageSavedObjects } from '../services/epm/packages/get'; import { agentPolicyService } from '../services'; import type { NewPackagePolicy } from '../types'; diff --git a/x-pack/plugins/fleet/server/collectors/register.ts b/x-pack/plugins/fleet/server/collectors/register.ts index 30b3ced260172..7992d54d1dfad 100644 --- a/x-pack/plugins/fleet/server/collectors/register.ts +++ b/x-pack/plugins/fleet/server/collectors/register.ts @@ -7,13 +7,15 @@ import type { UsageCollectionSetup } from 'src/plugins/usage_collection/server'; import type { CoreSetup } from 'kibana/server'; + +import type { FleetConfigType } from '..'; + import { getIsAgentsEnabled } from './config_collectors'; import { getAgentUsage } from './agent_collectors'; import type { AgentUsage } from './agent_collectors'; import { getInternalClients } from './helpers'; import { getPackageUsage } from './package_collectors'; import type { PackageUsage } from './package_collectors'; -import type { FleetConfigType } from '..'; interface Usage { agents_enabled: boolean; diff --git a/x-pack/plugins/fleet/server/errors/handlers.test.ts b/x-pack/plugins/fleet/server/errors/handlers.test.ts index 2b12d031ba533..dc6f90d64180d 100644 --- a/x-pack/plugins/fleet/server/errors/handlers.test.ts +++ b/x-pack/plugins/fleet/server/errors/handlers.test.ts @@ -8,8 +8,10 @@ import Boom from '@hapi/boom'; import { errors } from 'elasticsearch'; import { httpServerMock } from 'src/core/server/mocks'; + import { createAppContextStartContractMock } from '../mocks'; import { appContextService } from '../services'; + import { IngestManagerError, RegistryError, diff --git a/x-pack/plugins/fleet/server/errors/handlers.ts b/x-pack/plugins/fleet/server/errors/handlers.ts index 2d5339b158d9b..cbb1d9c9ca7f7 100644 --- a/x-pack/plugins/fleet/server/errors/handlers.ts +++ b/x-pack/plugins/fleet/server/errors/handlers.ts @@ -14,7 +14,9 @@ import type { } from 'src/core/server'; import { errors as LegacyESErrors } from 'elasticsearch'; import { ResponseError } from '@elastic/elasticsearch/lib/errors'; + import { appContextService } from '../services'; + import { IngestManagerError, RegistryError, diff --git a/x-pack/plugins/fleet/server/index.ts b/x-pack/plugins/fleet/server/index.ts index cb5eb6413fdf8..6a7d437e05543 100644 --- a/x-pack/plugins/fleet/server/index.ts +++ b/x-pack/plugins/fleet/server/index.ts @@ -8,13 +8,15 @@ import { schema } from '@kbn/config-schema'; import type { TypeOf } from '@kbn/config-schema'; import type { PluginConfigDescriptor, PluginInitializerContext } from 'src/core/server'; -import { FleetPlugin } from './plugin'; + import { AGENT_POLICY_ROLLOUT_RATE_LIMIT_INTERVAL_MS, AGENT_POLICY_ROLLOUT_RATE_LIMIT_REQUEST_PER_INTERVAL, AGENT_POLLING_REQUEST_TIMEOUT_MS, } from '../common'; +import { FleetPlugin } from './plugin'; + export { default as apm } from 'elastic-apm-node'; export { AgentService, diff --git a/x-pack/plugins/fleet/server/mocks.ts b/x-pack/plugins/fleet/server/mocks/index.ts similarity index 82% rename from x-pack/plugins/fleet/server/mocks.ts rename to x-pack/plugins/fleet/server/mocks/index.ts index 3a7f9ebcc9e53..cff80f533d5e3 100644 --- a/x-pack/plugins/fleet/server/mocks.ts +++ b/x-pack/plugins/fleet/server/mocks/index.ts @@ -4,19 +4,18 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - import { elasticsearchServiceMock, loggingSystemMock, savedObjectsServiceMock, -} from 'src/core/server/mocks'; -import { coreMock } from '../../../../src/core/server/mocks'; -import { licensingMock } from '../../../plugins/licensing/server/mocks'; -import type { FleetAppContext } from './plugin'; -import { encryptedSavedObjectsMock } from '../../encrypted_saved_objects/server/mocks'; -import { securityMock } from '../../security/server/mocks'; -import type { PackagePolicyServiceInterface } from './services/package_policy'; -import type { AgentPolicyServiceInterface, AgentService } from './services'; + coreMock, +} from '../../../../../src/core/server/mocks'; +import { licensingMock } from '../../../../plugins/licensing/server/mocks'; +import { encryptedSavedObjectsMock } from '../../../encrypted_saved_objects/server/mocks'; +import { securityMock } from '../../../security/server/mocks'; +import type { PackagePolicyServiceInterface } from '../services/package_policy'; +import type { AgentPolicyServiceInterface, AgentService } from '../services'; +import type { FleetAppContext } from '../plugin'; export const createAppContextStartContractMock = (): FleetAppContext => { return { diff --git a/x-pack/plugins/fleet/server/plugin.ts b/x-pack/plugins/fleet/server/plugin.ts index d4cd39b274f05..581478ee5190a 100644 --- a/x-pack/plugins/fleet/server/plugin.ts +++ b/x-pack/plugins/fleet/server/plugin.ts @@ -21,6 +21,7 @@ import { KibanaRequest, } from 'kibana/server'; import { UsageCollectionSetup } from 'src/plugins/usage_collection/server'; + import { DEFAULT_APP_CATEGORIES } from '../../../../src/core/server'; import { LicensingPluginSetup, ILicense } from '../../licensing/server'; import { @@ -29,6 +30,14 @@ import { } from '../../encrypted_saved_objects/server'; import { SecurityPluginSetup, SecurityPluginStart } from '../../security/server'; import { PluginSetupContract as FeaturesPluginSetup } from '../../features/server'; +import { + EsAssetReference, + FleetConfigType, + NewPackagePolicy, + UpdatePackagePolicy, +} from '../common'; +import { CloudSetup } from '../../cloud/server'; + import { PLUGIN_ID, OUTPUT_SAVED_OBJECT_TYPE, @@ -55,12 +64,6 @@ import { registerSettingsRoutes, registerAppRoutes, } from './routes'; -import { - EsAssetReference, - FleetConfigType, - NewPackagePolicy, - UpdatePackagePolicy, -} from '../common'; import { appContextService, licenseService, @@ -78,7 +81,6 @@ import { listAgents, getAgent, } from './services/agents'; -import { CloudSetup } from '../../cloud/server'; import { agentCheckinState } from './services/agents/checkin/state'; import { registerFleetUsageCollector } from './collectors/register'; import { getInstallation } from './services/epm/packages'; diff --git a/x-pack/plugins/fleet/server/routes/agent/acks_handlers.test.ts b/x-pack/plugins/fleet/server/routes/agent/acks_handlers.test.ts index b1bd10e8a4a77..c4cd58226697c 100644 --- a/x-pack/plugins/fleet/server/routes/agent/acks_handlers.test.ts +++ b/x-pack/plugins/fleet/server/routes/agent/acks_handlers.test.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { postAgentAcksHandlerBuilder } from './acks_handlers'; import type { ElasticsearchClient, KibanaResponseFactory, RequestHandlerContext, SavedObjectsClientContract, } from 'kibana/server'; + import { elasticsearchServiceMock, httpServerMock, @@ -21,6 +21,8 @@ import type { PostAgentAcksResponse } from '../../../common/types/rest_spec'; import { AckEventSchema } from '../../types/models'; import type { AcksService } from '../../services/agents'; +import { postAgentAcksHandlerBuilder } from './acks_handlers'; + describe('test acks schema', () => { it('validate that ack event schema expect action id', async () => { expect(() => diff --git a/x-pack/plugins/fleet/server/routes/agent/acks_handlers.ts b/x-pack/plugins/fleet/server/routes/agent/acks_handlers.ts index e05638b9e6d8e..44c15ecbfa313 100644 --- a/x-pack/plugins/fleet/server/routes/agent/acks_handlers.ts +++ b/x-pack/plugins/fleet/server/routes/agent/acks_handlers.ts @@ -8,6 +8,7 @@ // handlers that handle events from agents in response to actions received import type { RequestHandler } from 'kibana/server'; + import type { AcksService } from '../../services/agents'; import type { AgentEvent } from '../../../common/types/models'; import type { PostAgentAcksRequest, PostAgentAcksResponse } from '../../../common/types/rest_spec'; diff --git a/x-pack/plugins/fleet/server/routes/agent/actions_handlers.test.ts b/x-pack/plugins/fleet/server/routes/agent/actions_handlers.test.ts index 6c12a826a11df..3f300aef692ff 100644 --- a/x-pack/plugins/fleet/server/routes/agent/actions_handlers.test.ts +++ b/x-pack/plugins/fleet/server/routes/agent/actions_handlers.test.ts @@ -5,7 +5,6 @@ * 2.0. */ -import { NewAgentActionSchema } from '../../types/models'; import type { ElasticsearchClient, KibanaResponseFactory, @@ -17,14 +16,18 @@ import { savedObjectsClientMock, httpServerMock, } from 'src/core/server/mocks'; + +import { NewAgentActionSchema } from '../../types/models'; import type { ActionsService } from '../../services/agents'; import type { AgentAction } from '../../../common/types/models'; -import { postNewAgentActionHandlerBuilder } from './actions_handlers'; + import type { PostNewAgentActionRequest, PostNewAgentActionResponse, } from '../../../common/types/rest_spec'; +import { postNewAgentActionHandlerBuilder } from './actions_handlers'; + describe('test actions handlers schema', () => { it('validate that new agent actions schema is valid', async () => { expect( diff --git a/x-pack/plugins/fleet/server/routes/agent/actions_handlers.ts b/x-pack/plugins/fleet/server/routes/agent/actions_handlers.ts index 2d5cfa4fd5b4f..c0c9df1d86ede 100644 --- a/x-pack/plugins/fleet/server/routes/agent/actions_handlers.ts +++ b/x-pack/plugins/fleet/server/routes/agent/actions_handlers.ts @@ -9,6 +9,7 @@ import type { RequestHandler } from 'kibana/server'; import type { TypeOf } from '@kbn/config-schema'; + import { PostNewAgentActionRequestSchema } from '../../types/rest_spec'; import type { ActionsService } from '../../services/agents'; import type { PostNewAgentActionResponse } from '../../../common/types/rest_spec'; diff --git a/x-pack/plugins/fleet/server/routes/agent/handlers.ts b/x-pack/plugins/fleet/server/routes/agent/handlers.ts index d5e2df56da601..64d562fa5f7ab 100644 --- a/x-pack/plugins/fleet/server/routes/agent/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/agent/handlers.ts @@ -8,6 +8,7 @@ import type { RequestHandler } from 'src/core/server'; import type { TypeOf } from '@kbn/config-schema'; import { AbortController } from 'abort-controller'; + import type { GetAgentsResponse, GetOneAgentResponse, diff --git a/x-pack/plugins/fleet/server/routes/agent/index.ts b/x-pack/plugins/fleet/server/routes/agent/index.ts index 0b9e180a1cfd8..58bbde95b918b 100644 --- a/x-pack/plugins/fleet/server/routes/agent/index.ts +++ b/x-pack/plugins/fleet/server/routes/agent/index.ts @@ -7,6 +7,7 @@ import type { IRouter, RouteValidationResultFactory } from 'src/core/server'; import Ajv from 'ajv'; + import { PLUGIN_ID, AGENT_API_ROUTES, @@ -34,6 +35,10 @@ import { PostAgentUpgradeRequestSchema, PostBulkAgentUpgradeRequestSchema, } from '../../types'; +import * as AgentService from '../../services/agents'; +import { appContextService } from '../../services'; +import { FleetConfigType } from '../..'; + import { getAgentsHandler, getAgentHandler, @@ -47,11 +52,8 @@ import { postBulkAgentsReassignHandler, } from './handlers'; import { postAgentAcksHandlerBuilder } from './acks_handlers'; -import * as AgentService from '../../services/agents'; import { postNewAgentActionHandlerBuilder } from './actions_handlers'; -import { appContextService } from '../../services'; import { postAgentUnenrollHandler, postBulkAgentsUnenrollHandler } from './unenroll_handler'; -import type { FleetConfigType } from '../..'; import { postAgentUpgradeHandler, postBulkAgentsUpgradeHandler } from './upgrade_handler'; const ajv = new Ajv({ diff --git a/x-pack/plugins/fleet/server/routes/agent/unenroll_handler.ts b/x-pack/plugins/fleet/server/routes/agent/unenroll_handler.ts index 07ca776ef104b..079783cef6d8b 100644 --- a/x-pack/plugins/fleet/server/routes/agent/unenroll_handler.ts +++ b/x-pack/plugins/fleet/server/routes/agent/unenroll_handler.ts @@ -7,6 +7,7 @@ import type { RequestHandler } from 'src/core/server'; import type { TypeOf } from '@kbn/config-schema'; + import type { PostAgentUnenrollResponse, PostBulkAgentUnenrollResponse, diff --git a/x-pack/plugins/fleet/server/routes/agent/upgrade_handler.ts b/x-pack/plugins/fleet/server/routes/agent/upgrade_handler.ts index 4999801c4122a..dda63533d2f4c 100644 --- a/x-pack/plugins/fleet/server/routes/agent/upgrade_handler.ts +++ b/x-pack/plugins/fleet/server/routes/agent/upgrade_handler.ts @@ -8,6 +8,7 @@ import type { RequestHandler } from 'src/core/server'; import type { TypeOf } from '@kbn/config-schema'; import semverCoerce from 'semver/functions/coerce'; + import type { PostAgentUpgradeResponse, PostBulkAgentUpgradeResponse } from '../../../common/types'; import { PostAgentUpgradeRequestSchema, PostBulkAgentUpgradeRequestSchema } from '../../types'; import * as AgentService from '../../services/agents'; diff --git a/x-pack/plugins/fleet/server/routes/agent_policy/handlers.ts b/x-pack/plugins/fleet/server/routes/agent_policy/handlers.ts index a0a30b1c1190b..4a28263bc4fec 100644 --- a/x-pack/plugins/fleet/server/routes/agent_policy/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/agent_policy/handlers.ts @@ -8,6 +8,7 @@ import type { TypeOf } from '@kbn/config-schema'; import type { RequestHandler, ResponseHeaders } from 'src/core/server'; import bluebird from 'bluebird'; + import { fullAgentPolicyToYaml } from '../../../common/services'; import { appContextService, agentPolicyService, packagePolicyService } from '../../services'; import { listAgents } from '../../services/agents'; diff --git a/x-pack/plugins/fleet/server/routes/agent_policy/index.ts b/x-pack/plugins/fleet/server/routes/agent_policy/index.ts index 5cf58414f7992..a66a9ab9cadc7 100644 --- a/x-pack/plugins/fleet/server/routes/agent_policy/index.ts +++ b/x-pack/plugins/fleet/server/routes/agent_policy/index.ts @@ -6,6 +6,7 @@ */ import type { IRouter } from 'src/core/server'; + import { PLUGIN_ID, AGENT_POLICY_API_ROUTES } from '../../constants'; import { GetAgentPoliciesRequestSchema, @@ -16,6 +17,7 @@ import { DeleteAgentPolicyRequestSchema, GetFullAgentPolicyRequestSchema, } from '../../types'; + import { getAgentPoliciesHandler, getOneAgentPolicyHandler, diff --git a/x-pack/plugins/fleet/server/routes/app/index.ts b/x-pack/plugins/fleet/server/routes/app/index.ts index 04c5bf2df47be..ba7c649c4fa54 100644 --- a/x-pack/plugins/fleet/server/routes/app/index.ts +++ b/x-pack/plugins/fleet/server/routes/app/index.ts @@ -6,6 +6,7 @@ */ import type { IRouter, RequestHandler } from 'src/core/server'; + import { APP_API_ROUTES } from '../../constants'; import { appContextService } from '../../services'; import type { CheckPermissionsResponse } from '../../../common'; diff --git a/x-pack/plugins/fleet/server/routes/data_streams/handlers.ts b/x-pack/plugins/fleet/server/routes/data_streams/handlers.ts index 2826840d773e0..3d05cea261f70 100644 --- a/x-pack/plugins/fleet/server/routes/data_streams/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/data_streams/handlers.ts @@ -7,6 +7,7 @@ import { keyBy, keys, merge } from 'lodash'; import type { RequestHandler, SavedObjectsClientContract } from 'src/core/server'; + import type { DataStream } from '../../types'; import { KibanaAssetType, KibanaSavedObjectType } from '../../../common'; import type { GetDataStreamsResponse } from '../../../common'; diff --git a/x-pack/plugins/fleet/server/routes/data_streams/index.ts b/x-pack/plugins/fleet/server/routes/data_streams/index.ts index 05efff12d01da..2c1fa7b2f3b15 100644 --- a/x-pack/plugins/fleet/server/routes/data_streams/index.ts +++ b/x-pack/plugins/fleet/server/routes/data_streams/index.ts @@ -6,7 +6,9 @@ */ import type { IRouter } from 'src/core/server'; + import { PLUGIN_ID, DATA_STREAM_API_ROUTES } from '../../constants'; + import { getListHandler } from './handlers'; export const registerRoutes = (router: IRouter) => { diff --git a/x-pack/plugins/fleet/server/routes/enrollment_api_key/handler.ts b/x-pack/plugins/fleet/server/routes/enrollment_api_key/handler.ts index b41af3b0c770c..bf00676f99dad 100644 --- a/x-pack/plugins/fleet/server/routes/enrollment_api_key/handler.ts +++ b/x-pack/plugins/fleet/server/routes/enrollment_api_key/handler.ts @@ -7,6 +7,7 @@ import type { RequestHandler } from 'src/core/server'; import type { TypeOf } from '@kbn/config-schema'; + import { GetEnrollmentAPIKeysRequestSchema, PostEnrollmentAPIKeyRequestSchema, diff --git a/x-pack/plugins/fleet/server/routes/enrollment_api_key/index.ts b/x-pack/plugins/fleet/server/routes/enrollment_api_key/index.ts index cf736edd4633e..b37a88e70e085 100644 --- a/x-pack/plugins/fleet/server/routes/enrollment_api_key/index.ts +++ b/x-pack/plugins/fleet/server/routes/enrollment_api_key/index.ts @@ -6,6 +6,7 @@ */ import type { IRouter } from 'src/core/server'; + import { PLUGIN_ID, ENROLLMENT_API_KEY_ROUTES } from '../../constants'; import { GetEnrollmentAPIKeysRequestSchema, @@ -13,6 +14,7 @@ import { DeleteEnrollmentAPIKeyRequestSchema, PostEnrollmentAPIKeyRequestSchema, } from '../../types'; + import { getEnrollmentApiKeysHandler, getOneEnrollmentApiKeyHandler, diff --git a/x-pack/plugins/fleet/server/routes/epm/handlers.ts b/x-pack/plugins/fleet/server/routes/epm/handlers.ts index 09a53f2c0d8ff..9d2edb4f0f155 100644 --- a/x-pack/plugins/fleet/server/routes/epm/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/epm/handlers.ts @@ -5,10 +5,12 @@ * 2.0. */ +import path from 'path'; + import type { TypeOf } from '@kbn/config-schema'; import mime from 'mime-types'; -import path from 'path'; import type { RequestHandler, ResponseHeaders, KnownHeaders } from 'src/core/server'; + import type { GetInfoResponse, InstallPackageResponse, diff --git a/x-pack/plugins/fleet/server/routes/epm/index.ts b/x-pack/plugins/fleet/server/routes/epm/index.ts index 9ed4d7e11ad29..40316bd102e5f 100644 --- a/x-pack/plugins/fleet/server/routes/epm/index.ts +++ b/x-pack/plugins/fleet/server/routes/epm/index.ts @@ -6,7 +6,20 @@ */ import type { IRouter } from 'src/core/server'; + import { PLUGIN_ID, EPM_API_ROUTES } from '../../constants'; +import { + GetCategoriesRequestSchema, + GetPackagesRequestSchema, + GetFileRequestSchema, + GetInfoRequestSchema, + InstallPackageFromRegistryRequestSchema, + InstallPackageByUploadRequestSchema, + DeletePackageRequestSchema, + BulkUpgradePackagesFromRegistryRequestSchema, + GetStatsRequestSchema, +} from '../../types'; + import { getCategoriesHandler, getListHandler, @@ -19,17 +32,6 @@ import { bulkInstallPackagesFromRegistryHandler, getStatsHandler, } from './handlers'; -import { - GetCategoriesRequestSchema, - GetPackagesRequestSchema, - GetFileRequestSchema, - GetInfoRequestSchema, - InstallPackageFromRegistryRequestSchema, - InstallPackageByUploadRequestSchema, - DeletePackageRequestSchema, - BulkUpgradePackagesFromRegistryRequestSchema, - GetStatsRequestSchema, -} from '../../types'; const MAX_FILE_SIZE_BYTES = 104857600; // 100MB diff --git a/x-pack/plugins/fleet/server/routes/install_script/index.ts b/x-pack/plugins/fleet/server/routes/install_script/index.ts index 5fb2ea726c62b..c3b3541871d03 100644 --- a/x-pack/plugins/fleet/server/routes/install_script/index.ts +++ b/x-pack/plugins/fleet/server/routes/install_script/index.ts @@ -6,8 +6,10 @@ */ import url from 'url'; + import { BasePath, KibanaRequest } from 'src/core/server'; import type { IRouter } from 'src/core/server'; + import { INSTALL_SCRIPT_API_ROUTES } from '../../constants'; import { getScript } from '../../services/install_script'; import { InstallScriptRequestSchema } from '../../types'; diff --git a/x-pack/plugins/fleet/server/routes/limited_concurrency.test.ts b/x-pack/plugins/fleet/server/routes/limited_concurrency.test.ts index 626df529c1236..c645d8fceaab8 100644 --- a/x-pack/plugins/fleet/server/routes/limited_concurrency.test.ts +++ b/x-pack/plugins/fleet/server/routes/limited_concurrency.test.ts @@ -6,12 +6,14 @@ */ import { coreMock, httpServerMock, httpServiceMock } from 'src/core/server/mocks'; + +import type { FleetConfigType } from '../index'; + import { createLimitedPreAuthHandler, isLimitedRoute, registerLimitedConcurrencyRoutes, } from './limited_concurrency'; -import type { FleetConfigType } from '../index'; describe('registerLimitedConcurrencyRoutes', () => { test(`doesn't call registerOnPreAuth if maxConcurrentConnections is 0`, async () => { diff --git a/x-pack/plugins/fleet/server/routes/limited_concurrency.ts b/x-pack/plugins/fleet/server/routes/limited_concurrency.ts index ae4cab2839c79..78bdc4bb7554c 100644 --- a/x-pack/plugins/fleet/server/routes/limited_concurrency.ts +++ b/x-pack/plugins/fleet/server/routes/limited_concurrency.ts @@ -12,6 +12,7 @@ import type { OnPreAuthToolkit, OnPreAuthHandler, } from 'kibana/server'; + import { LIMITED_CONCURRENCY_ROUTE_TAG } from '../../common'; import type { FleetConfigType } from '../index'; diff --git a/x-pack/plugins/fleet/server/routes/output/handler.ts b/x-pack/plugins/fleet/server/routes/output/handler.ts index a1bbe1112d04b..fe2ee8e9bee18 100644 --- a/x-pack/plugins/fleet/server/routes/output/handler.ts +++ b/x-pack/plugins/fleet/server/routes/output/handler.ts @@ -7,6 +7,7 @@ import type { RequestHandler } from 'src/core/server'; import type { TypeOf } from '@kbn/config-schema'; + import { GetOneOutputRequestSchema, PutOutputRequestSchema } from '../../types'; import type { GetOneOutputResponse, GetOutputsResponse } from '../../../common'; import { outputService } from '../../services/output'; diff --git a/x-pack/plugins/fleet/server/routes/output/index.ts b/x-pack/plugins/fleet/server/routes/output/index.ts index ce4610cf7f85b..5bdbfc7387414 100644 --- a/x-pack/plugins/fleet/server/routes/output/index.ts +++ b/x-pack/plugins/fleet/server/routes/output/index.ts @@ -6,14 +6,16 @@ */ import type { IRouter } from 'src/core/server'; + import { PLUGIN_ID, OUTPUT_API_ROUTES } from '../../constants'; -import { getOneOuputHandler, getOutputsHandler, putOuputHandler } from './handler'; import { GetOneOutputRequestSchema, GetOutputsRequestSchema, PutOutputRequestSchema, } from '../../types'; +import { getOneOuputHandler, getOutputsHandler, putOuputHandler } from './handler'; + export const registerRoutes = (router: IRouter) => { router.get( { diff --git a/x-pack/plugins/fleet/server/routes/package_policy/handlers.test.ts b/x-pack/plugins/fleet/server/routes/package_policy/handlers.test.ts index a94313282a360..865f07c0f9271 100644 --- a/x-pack/plugins/fleet/server/routes/package_policy/handlers.test.ts +++ b/x-pack/plugins/fleet/server/routes/package_policy/handlers.test.ts @@ -8,13 +8,15 @@ import { httpServerMock, httpServiceMock } from 'src/core/server/mocks'; import { KibanaRequest } from 'kibana/server'; import type { IRouter, RequestHandler, RouteConfig } from 'kibana/server'; -import { registerRoutes } from './index'; + import { PACKAGE_POLICY_API_ROUTES } from '../../../common/constants'; import { appContextService, packagePolicyService } from '../../services'; import { createAppContextStartContractMock, xpackMocks } from '../../mocks'; import type { PackagePolicyServiceInterface, ExternalCallback } from '../..'; import { CreatePackagePolicyRequestSchema } from '../../types/rest_spec'; +import { registerRoutes } from './index'; + const packagePolicyServiceMock = packagePolicyService as jest.Mocked; jest.mock('../../services/package_policy', (): { diff --git a/x-pack/plugins/fleet/server/routes/package_policy/handlers.ts b/x-pack/plugins/fleet/server/routes/package_policy/handlers.ts index fb2c853f506c9..d456ef6b525b7 100644 --- a/x-pack/plugins/fleet/server/routes/package_policy/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/package_policy/handlers.ts @@ -7,6 +7,7 @@ import type { TypeOf } from '@kbn/config-schema'; import Boom from '@hapi/boom'; + import { SavedObjectsErrorHelpers } from '../../../../../../src/core/server'; import type { RequestHandler } from '../../../../../../src/core/server'; import { appContextService, packagePolicyService } from '../../services'; diff --git a/x-pack/plugins/fleet/server/routes/package_policy/index.ts b/x-pack/plugins/fleet/server/routes/package_policy/index.ts index 19fc261685ff7..b78771a1f62f7 100644 --- a/x-pack/plugins/fleet/server/routes/package_policy/index.ts +++ b/x-pack/plugins/fleet/server/routes/package_policy/index.ts @@ -6,6 +6,7 @@ */ import type { IRouter } from 'src/core/server'; + import { PLUGIN_ID, PACKAGE_POLICY_API_ROUTES } from '../../constants'; import { GetPackagePoliciesRequestSchema, @@ -14,6 +15,7 @@ import { UpdatePackagePolicyRequestSchema, DeletePackagePoliciesRequestSchema, } from '../../types'; + import { getPackagePoliciesHandler, getOnePackagePolicyHandler, diff --git a/x-pack/plugins/fleet/server/routes/security.ts b/x-pack/plugins/fleet/server/routes/security.ts index 001dbf4b9b2f4..60011dcf3d33f 100644 --- a/x-pack/plugins/fleet/server/routes/security.ts +++ b/x-pack/plugins/fleet/server/routes/security.ts @@ -6,6 +6,7 @@ */ import type { IRouter, RequestHandler } from 'src/core/server'; + import { appContextService } from '../services'; export function enforceSuperUser( diff --git a/x-pack/plugins/fleet/server/routes/settings/index.ts b/x-pack/plugins/fleet/server/routes/settings/index.ts index 2f71e3967c38c..2313f0ee170a0 100644 --- a/x-pack/plugins/fleet/server/routes/settings/index.ts +++ b/x-pack/plugins/fleet/server/routes/settings/index.ts @@ -7,6 +7,7 @@ import type { IRouter, RequestHandler } from 'src/core/server'; import type { TypeOf } from '@kbn/config-schema'; + import { PLUGIN_ID, SETTINGS_API_ROUTES } from '../../constants'; import { PutSettingsRequestSchema, GetSettingsRequestSchema } from '../../types'; import { defaultIngestErrorHandler } from '../../errors'; 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 4016e90ea19b3..469b2409f140a 100644 --- a/x-pack/plugins/fleet/server/routes/setup/handlers.test.ts +++ b/x-pack/plugins/fleet/server/routes/setup/handlers.test.ts @@ -6,13 +6,15 @@ */ import { httpServerMock } from 'src/core/server/mocks'; + import type { PostIngestSetupResponse } from '../../../common'; import { RegistryError } from '../../errors'; import { createAppContextStartContractMock, xpackMocks } from '../../mocks'; -import { FleetSetupHandler } from './handlers'; import { appContextService } from '../../services/app_context'; import { setupIngestManager } from '../../services/setup'; +import { FleetSetupHandler } from './handlers'; + jest.mock('../../services/setup', () => { return { setupIngestManager: jest.fn(), diff --git a/x-pack/plugins/fleet/server/routes/setup/handlers.ts b/x-pack/plugins/fleet/server/routes/setup/handlers.ts index 8d4d44276dfc1..0dc3a0109d682 100644 --- a/x-pack/plugins/fleet/server/routes/setup/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/setup/handlers.ts @@ -7,6 +7,7 @@ import type { RequestHandler } from 'src/core/server'; import type { TypeOf } from '@kbn/config-schema'; + import { outputService, appContextService } from '../../services'; import type { GetFleetStatusResponse, PostIngestSetupResponse } from '../../../common'; import { setupIngestManager, setupFleet } from '../../services/setup'; diff --git a/x-pack/plugins/fleet/server/routes/setup/index.ts b/x-pack/plugins/fleet/server/routes/setup/index.ts index 7e07723b4acd8..d8ba6e16e31bb 100644 --- a/x-pack/plugins/fleet/server/routes/setup/index.ts +++ b/x-pack/plugins/fleet/server/routes/setup/index.ts @@ -6,11 +6,13 @@ */ 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 { getFleetStatusHandler, createFleetSetupHandler, FleetSetupHandler } from './handlers'; import { PostFleetSetupRequestSchema } from '../../types'; +import { getFleetStatusHandler, createFleetSetupHandler, FleetSetupHandler } from './handlers'; + export const registerFleetSetupRoute = (router: IRouter) => { router.post( { diff --git a/x-pack/plugins/fleet/server/saved_objects/index.ts b/x-pack/plugins/fleet/server/saved_objects/index.ts index e41881c6f8b09..05e8fecdcaad1 100644 --- a/x-pack/plugins/fleet/server/saved_objects/index.ts +++ b/x-pack/plugins/fleet/server/saved_objects/index.ts @@ -6,12 +6,8 @@ */ import type { SavedObjectsServiceSetup, SavedObjectsType } from 'kibana/server'; + import type { EncryptedSavedObjectsPluginSetup } from '../../../encrypted_saved_objects/server'; -import { - migratePackagePolicyToV7110, - migratePackagePolicyToV7120, - // @ts-expect-error -} from './security_solution'; import { OUTPUT_SAVED_OBJECT_TYPE, AGENT_POLICY_SAVED_OBJECT_TYPE, @@ -24,6 +20,12 @@ import { ENROLLMENT_API_KEYS_SAVED_OBJECT_TYPE, GLOBAL_SETTINGS_SAVED_OBJECT_TYPE, } from '../constants'; + +import { + migratePackagePolicyToV7110, + migratePackagePolicyToV7120, + // @ts-expect-error +} from './security_solution'; import { migrateAgentToV7100, migrateAgentEventToV7100, diff --git a/x-pack/plugins/fleet/server/saved_objects/migrations/to_v7_10_0.ts b/x-pack/plugins/fleet/server/saved_objects/migrations/to_v7_10_0.ts index 976f02e1f242c..97a5dd6e13eda 100644 --- a/x-pack/plugins/fleet/server/saved_objects/migrations/to_v7_10_0.ts +++ b/x-pack/plugins/fleet/server/saved_objects/migrations/to_v7_10_0.ts @@ -6,6 +6,7 @@ */ import type { SavedObjectMigrationFn, SavedObjectUnsanitizedDoc } from 'kibana/server'; + import type { EncryptedSavedObjectsPluginSetup } from '../../../../encrypted_saved_objects/server'; import type { Agent, diff --git a/x-pack/plugins/fleet/server/saved_objects/migrations/to_v7_12_0.ts b/x-pack/plugins/fleet/server/saved_objects/migrations/to_v7_12_0.ts index 15e68ace987b9..94851cc11c72f 100644 --- a/x-pack/plugins/fleet/server/saved_objects/migrations/to_v7_12_0.ts +++ b/x-pack/plugins/fleet/server/saved_objects/migrations/to_v7_12_0.ts @@ -6,6 +6,7 @@ */ import type { SavedObjectMigrationFn } from 'kibana/server'; + import type { Agent, AgentPolicy } from '../../types'; export const migrateAgentToV7120: SavedObjectMigrationFn = ( diff --git a/x-pack/plugins/fleet/server/services/agent_policy.test.ts b/x-pack/plugins/fleet/server/services/agent_policy.test.ts index 800d4f479bfde..515d2b1195638 100644 --- a/x-pack/plugins/fleet/server/services/agent_policy.test.ts +++ b/x-pack/plugins/fleet/server/services/agent_policy.test.ts @@ -6,9 +6,11 @@ */ import { elasticsearchServiceMock, savedObjectsClientMock } from 'src/core/server/mocks'; + +import type { AgentPolicy, NewAgentPolicy, Output } from '../types'; + import { agentPolicyService } from './agent_policy'; import { agentPolicyUpdateEventHandler } from './agent_policy_update'; -import type { AgentPolicy, NewAgentPolicy, Output } from '../types'; function getSavedObjectMock(agentPolicyAttributes: any) { const mock = savedObjectsClientMock.create(); diff --git a/x-pack/plugins/fleet/server/services/agent_policy.ts b/x-pack/plugins/fleet/server/services/agent_policy.ts index bda754a1800b8..091adda0ed981 100644 --- a/x-pack/plugins/fleet/server/services/agent_policy.ts +++ b/x-pack/plugins/fleet/server/services/agent_policy.ts @@ -13,6 +13,7 @@ import type { SavedObjectsClientContract, SavedObjectsBulkUpdateResponse, } from 'src/core/server'; + import type { AuthenticatedUser } from '../../../security/server'; import { DEFAULT_AGENT_POLICY, @@ -40,13 +41,14 @@ import { AgentPolicyDeletionError, IngestManagerError, } from '../errors'; +import { getFullAgentPolicyKibanaConfig } from '../../common/services/full_agent_policy_kibana_config'; + import { createAgentPolicyAction, listAgents } from './agents'; import { packagePolicyService } from './package_policy'; import { outputService } from './output'; import { agentPolicyUpdateEventHandler } from './agent_policy_update'; import { getSettings } from './settings'; import { normalizeKuery, escapeSearchQueryPhrase } from './saved_object'; -import { getFullAgentPolicyKibanaConfig } from '../../common/services/full_agent_policy_kibana_config'; import { isAgentsSetup } from './agents/setup'; import { appContextService } from './app_context'; diff --git a/x-pack/plugins/fleet/server/services/agent_policy_update.ts b/x-pack/plugins/fleet/server/services/agent_policy_update.ts index b6acafc667c9b..a7ac7ce0ab659 100644 --- a/x-pack/plugins/fleet/server/services/agent_policy_update.ts +++ b/x-pack/plugins/fleet/server/services/agent_policy_update.ts @@ -7,6 +7,7 @@ import { KibanaRequest } from 'src/core/server'; import type { ElasticsearchClient, SavedObjectsClientContract } from 'src/core/server'; + import { generateEnrollmentAPIKey, deleteEnrollmentApiKeyForAgentPolicyId } from './api_keys'; import { isAgentsSetup, unenrollForAgentPolicyId } from './agents'; import { agentPolicyService } from './agent_policy'; diff --git a/x-pack/plugins/fleet/server/services/agents/acks.test.ts b/x-pack/plugins/fleet/server/services/agents/acks.test.ts index 1a4b89a9b2a94..139ba8ffc4329 100644 --- a/x-pack/plugins/fleet/server/services/agents/acks.test.ts +++ b/x-pack/plugins/fleet/server/services/agents/acks.test.ts @@ -8,6 +8,7 @@ import Boom from '@hapi/boom'; import type { SavedObjectsBulkResponse } from 'kibana/server'; import { elasticsearchServiceMock, savedObjectsClientMock } from 'src/core/server/mocks'; + import type { Agent, AgentActionSOAttributes, @@ -15,6 +16,7 @@ import type { AgentEvent, } from '../../../common/types/models'; import { AGENT_TYPE_PERMANENT, AGENT_ACTION_SAVED_OBJECT_TYPE } from '../../../common/constants'; + import { acknowledgeAgentActions } from './acks'; describe('test agent acks services', () => { diff --git a/x-pack/plugins/fleet/server/services/agents/acks.ts b/x-pack/plugins/fleet/server/services/agents/acks.ts index 0fecc18f7a622..6683ba44b77c0 100644 --- a/x-pack/plugins/fleet/server/services/agents/acks.ts +++ b/x-pack/plugins/fleet/server/services/agents/acks.ts @@ -14,6 +14,7 @@ import type { } from 'src/core/server'; import Boom from '@hapi/boom'; import LRU from 'lru-cache'; + import type { Agent, AgentAction, @@ -25,6 +26,7 @@ import type { AgentActionSOAttributes, } from '../../types'; import { AGENT_EVENT_SAVED_OBJECT_TYPE, AGENT_ACTION_SAVED_OBJECT_TYPE } from '../../constants'; + import { getAgentActionByIds } from './actions'; import { forceUnenrollAgent } from './unenroll'; import { ackAgentUpgraded } from './upgrade'; diff --git a/x-pack/plugins/fleet/server/services/agents/actions.test.ts b/x-pack/plugins/fleet/server/services/agents/actions.test.ts index 18e954d4aa9bd..1af6173f938d6 100644 --- a/x-pack/plugins/fleet/server/services/agents/actions.test.ts +++ b/x-pack/plugins/fleet/server/services/agents/actions.test.ts @@ -5,11 +5,14 @@ * 2.0. */ -import { createAgentAction } from './actions'; import type { SavedObject } from 'kibana/server'; -import type { AgentAction } from '../../../common/types/models'; + import { savedObjectsClientMock, elasticsearchServiceMock } from 'src/core/server/mocks'; +import type { AgentAction } from '../../../common/types/models'; + +import { createAgentAction } from './actions'; + describe('test agent actions services', () => { it('should create a new action', async () => { const mockSavedObjectsClient = savedObjectsClientMock.create(); diff --git a/x-pack/plugins/fleet/server/services/agents/actions.ts b/x-pack/plugins/fleet/server/services/agents/actions.ts index 58d52f408f1fb..299bc70d86995 100644 --- a/x-pack/plugins/fleet/server/services/agents/actions.ts +++ b/x-pack/plugins/fleet/server/services/agents/actions.ts @@ -6,6 +6,7 @@ */ import type { ElasticsearchClient, SavedObjectsClientContract } from 'kibana/server'; + import type { Agent, AgentAction, @@ -16,13 +17,14 @@ import type { FleetServerAgentAction, } from '../../../common/types/models'; import { AGENT_ACTION_SAVED_OBJECT_TYPE, AGENT_ACTIONS_INDEX } from '../../../common/constants'; +import { appContextService } from '../app_context'; +import { nodeTypes } from '../../../../../../src/plugins/data/common'; + import { isAgentActionSavedObject, isPolicyActionSavedObject, savedObjectToAgentAction, } from './saved_objects'; -import { appContextService } from '../app_context'; -import { nodeTypes } from '../../../../../../src/plugins/data/common'; const ONE_MONTH_IN_MS = 2592000000; diff --git a/x-pack/plugins/fleet/server/services/agents/authenticate.ts b/x-pack/plugins/fleet/server/services/agents/authenticate.ts index 10469fcb3a013..54ee6f35b2e1b 100644 --- a/x-pack/plugins/fleet/server/services/agents/authenticate.ts +++ b/x-pack/plugins/fleet/server/services/agents/authenticate.ts @@ -8,8 +8,10 @@ import Boom from '@hapi/boom'; import { KibanaRequest } from 'src/core/server'; import type { SavedObjectsClientContract, ElasticsearchClient } from 'src/core/server'; + import type { Agent } from '../../types'; import * as APIKeyService from '../api_keys'; + import { getAgentByAccessAPIKeyId } from './crud'; export async function authenticateAgentWithAccessToken( diff --git a/x-pack/plugins/fleet/server/services/agents/checkin/index.ts b/x-pack/plugins/fleet/server/services/agents/checkin/index.ts index 925006f9e67b3..c8bf79e08ab07 100644 --- a/x-pack/plugins/fleet/server/services/agents/checkin/index.ts +++ b/x-pack/plugins/fleet/server/services/agents/checkin/index.ts @@ -11,6 +11,7 @@ import type { SavedObjectsClientContract, SavedObjectsBulkCreateObject, } from 'src/core/server'; + import type { Agent, NewAgentEvent, @@ -19,10 +20,11 @@ import type { AgentEventSOAttributes, } from '../../../types'; import { AGENT_EVENT_SAVED_OBJECT_TYPE } from '../../../constants'; -import { agentCheckinState } from './state'; import { getAgentActionsForCheckin } from '../actions'; import { updateAgent } from '../crud'; +import { agentCheckinState } from './state'; + export async function agentCheckin( soClient: SavedObjectsClientContract, esClient: ElasticsearchClient, diff --git a/x-pack/plugins/fleet/server/services/agents/checkin/rxjs_utils.test.ts b/x-pack/plugins/fleet/server/services/agents/checkin/rxjs_utils.test.ts index 5386277dc0d1f..18f788b087250 100644 --- a/x-pack/plugins/fleet/server/services/agents/checkin/rxjs_utils.test.ts +++ b/x-pack/plugins/fleet/server/services/agents/checkin/rxjs_utils.test.ts @@ -6,6 +6,7 @@ */ import { TestScheduler } from 'rxjs/testing'; + import { createRateLimiter } from './rxjs_utils'; describe('createRateLimiter', () => { diff --git a/x-pack/plugins/fleet/server/services/agents/checkin/state.ts b/x-pack/plugins/fleet/server/services/agents/checkin/state.ts index de965646a59c3..c48e0380da2c4 100644 --- a/x-pack/plugins/fleet/server/services/agents/checkin/state.ts +++ b/x-pack/plugins/fleet/server/services/agents/checkin/state.ts @@ -6,11 +6,13 @@ */ import type { ElasticsearchClient, SavedObjectsClientContract } from 'src/core/server'; + import type { Agent } from '../../../types'; import { appContextService } from '../../app_context'; +import { AGENT_UPDATE_LAST_CHECKIN_INTERVAL_MS } from '../../../constants'; + import { agentCheckinStateConnectedAgentsFactory } from './state_connected_agents'; import { agentCheckinStateNewActionsFactory } from './state_new_actions'; -import { AGENT_UPDATE_LAST_CHECKIN_INTERVAL_MS } from '../../../constants'; function agentCheckinStateFactory() { const agentConnected = agentCheckinStateConnectedAgentsFactory(); diff --git a/x-pack/plugins/fleet/server/services/agents/checkin/state_connected_agents.ts b/x-pack/plugins/fleet/server/services/agents/checkin/state_connected_agents.ts index 6156212a63203..24769de2c717f 100644 --- a/x-pack/plugins/fleet/server/services/agents/checkin/state_connected_agents.ts +++ b/x-pack/plugins/fleet/server/services/agents/checkin/state_connected_agents.ts @@ -6,6 +6,7 @@ */ import { KibanaRequest } from 'src/core/server'; + import { appContextService } from '../../app_context'; import { bulkUpdateAgents } from '../crud'; diff --git a/x-pack/plugins/fleet/server/services/agents/checkin/state_new_actions.test.ts b/x-pack/plugins/fleet/server/services/agents/checkin/state_new_actions.test.ts index 1433eccab038b..5fbf080e5ac99 100644 --- a/x-pack/plugins/fleet/server/services/agents/checkin/state_new_actions.test.ts +++ b/x-pack/plugins/fleet/server/services/agents/checkin/state_new_actions.test.ts @@ -8,13 +8,15 @@ import type { ElasticsearchClient } from 'kibana/server'; import { savedObjectsClientMock } from 'src/core/server/mocks'; import { take } from 'rxjs/operators'; + +import { getNewActionsSince } from '../actions'; +import type { Agent, AgentAction, AgentPolicyAction } from '../../../types'; +import { outputType } from '../../../../common/constants'; + import { createAgentActionFromPolicyAction, createNewActionsSharedObservable, } from './state_new_actions'; -import { getNewActionsSince } from '../actions'; -import type { Agent, AgentAction, AgentPolicyAction } from '../../../types'; -import { outputType } from '../../../../common/constants'; jest.mock('../../app_context', () => ({ appContextService: { diff --git a/x-pack/plugins/fleet/server/services/agents/checkin/state_new_actions.ts b/x-pack/plugins/fleet/server/services/agents/checkin/state_new_actions.ts index c66bff30a2e57..4557f93e72ac3 100644 --- a/x-pack/plugins/fleet/server/services/agents/checkin/state_new_actions.ts +++ b/x-pack/plugins/fleet/server/services/agents/checkin/state_new_actions.ts @@ -7,7 +7,6 @@ import semverParse from 'semver/functions/parse'; import semverLt from 'semver/functions/lt'; - import { timer, from, Observable, TimeoutError, of, EMPTY } from 'rxjs'; import { omit } from 'lodash'; import { @@ -24,6 +23,7 @@ import { } from 'rxjs/operators'; import { KibanaRequest } from 'src/core/server'; import type { ElasticsearchClient, SavedObjectsClientContract } from 'src/core/server'; + import type { Agent, AgentAction, @@ -45,9 +45,10 @@ import { getAgentPolicyActionByIds, } from '../actions'; import { appContextService } from '../../app_context'; -import { toPromiseAbortable, AbortError, createRateLimiter } from './rxjs_utils'; import { getAgent, updateAgent } from '../crud'; +import { toPromiseAbortable, AbortError, createRateLimiter } from './rxjs_utils'; + function getInternalUserSOClient() { const fakeRequest = ({ headers: {}, diff --git a/x-pack/plugins/fleet/server/services/agents/crud.ts b/x-pack/plugins/fleet/server/services/agents/crud.ts index 60a2ed8f67cee..207e00c001595 100644 --- a/x-pack/plugins/fleet/server/services/agents/crud.ts +++ b/x-pack/plugins/fleet/server/services/agents/crud.ts @@ -6,8 +6,10 @@ */ import type { SavedObjectsClientContract, ElasticsearchClient } from 'src/core/server'; + import type { AgentSOAttributes, Agent, ListWithKuery } from '../../types'; import { appContextService, agentPolicyService } from '../../services'; + import * as crudServiceSO from './crud_so'; import * as crudServiceFleetServer from './crud_fleet_server'; diff --git a/x-pack/plugins/fleet/server/services/agents/crud_fleet_server.ts b/x-pack/plugins/fleet/server/services/agents/crud_fleet_server.ts index 53a22e842a544..8002e8fd121a1 100644 --- a/x-pack/plugins/fleet/server/services/agents/crud_fleet_server.ts +++ b/x-pack/plugins/fleet/server/services/agents/crud_fleet_server.ts @@ -8,17 +8,19 @@ import Boom from '@hapi/boom'; import type { SearchResponse } from 'elasticsearch'; import type { ElasticsearchClient } from 'src/core/server'; + import { isAgentUpgradeable, SO_SEARCH_LIMIT } from '../../../common'; import type { FleetServerAgent } from '../../../common'; import { AGENT_SAVED_OBJECT_TYPE, AGENTS_INDEX } from '../../constants'; import type { ESSearchHit } from '../../../../../typings/elasticsearch'; import type { AgentSOAttributes, Agent, ListWithKuery } from '../../types'; import { escapeSearchQueryPhrase, normalizeKuery } from '../saved_object'; -import { searchHitToAgent, agentSOAttributesToFleetServerAgentDoc } from './helpers'; import { appContextService } from '../../services'; import { esKuery } from '../../../../../../src/plugins/data/server'; import type { KueryNode } from '../../../../../../src/plugins/data/server'; +import { searchHitToAgent, agentSOAttributesToFleetServerAgentDoc } from './helpers'; + const ACTIVE_AGENT_CONDITION = 'active:true'; const INACTIVE_AGENT_CONDITION = `NOT (${ACTIVE_AGENT_CONDITION})`; diff --git a/x-pack/plugins/fleet/server/services/agents/crud_so.ts b/x-pack/plugins/fleet/server/services/agents/crud_so.ts index 2daeff9b7344d..028210b620a13 100644 --- a/x-pack/plugins/fleet/server/services/agents/crud_so.ts +++ b/x-pack/plugins/fleet/server/services/agents/crud_so.ts @@ -7,15 +7,17 @@ import Boom from '@hapi/boom'; import type { SavedObjectsBulkUpdateObject, SavedObjectsClientContract } from 'src/core/server'; + import { isAgentUpgradeable } from '../../../common'; import { AGENT_SAVED_OBJECT_TYPE } from '../../constants'; import type { AgentSOAttributes, Agent, ListWithKuery } from '../../types'; import { escapeSearchQueryPhrase, normalizeKuery, findAllSOs } from '../saved_object'; -import { savedObjectToAgent } from './saved_objects'; import { appContextService } from '../../services'; import { esKuery } from '../../../../../../src/plugins/data/server'; import type { KueryNode } from '../../../../../../src/plugins/data/server'; +import { savedObjectToAgent } from './saved_objects'; + const ACTIVE_AGENT_CONDITION = `${AGENT_SAVED_OBJECT_TYPE}.attributes.active:true`; const INACTIVE_AGENT_CONDITION = `NOT (${ACTIVE_AGENT_CONDITION})`; diff --git a/x-pack/plugins/fleet/server/services/agents/enroll.ts b/x-pack/plugins/fleet/server/services/agents/enroll.ts index 6ca19bf884cca..afa0c03a393f9 100644 --- a/x-pack/plugins/fleet/server/services/agents/enroll.ts +++ b/x-pack/plugins/fleet/server/services/agents/enroll.ts @@ -10,16 +10,17 @@ import uuid from 'uuid/v4'; import semverParse from 'semver/functions/parse'; import semverDiff from 'semver/functions/diff'; import semverLte from 'semver/functions/lte'; - import type { SavedObjectsClientContract } from 'src/core/server'; + import type { AgentType, Agent, AgentSOAttributes, FleetServerAgent } from '../../types'; -import { savedObjectToAgent } from './saved_objects'; import { AGENT_SAVED_OBJECT_TYPE, AGENTS_INDEX } from '../../constants'; import { IngestManagerError } from '../../errors'; import * as APIKeyService from '../api_keys'; import { agentPolicyService } from '../../services'; import { appContextService } from '../app_context'; +import { savedObjectToAgent } from './saved_objects'; + export async function enroll( soClient: SavedObjectsClientContract, type: AgentType, diff --git a/x-pack/plugins/fleet/server/services/agents/events.ts b/x-pack/plugins/fleet/server/services/agents/events.ts index 29b42a5de8282..e61ce04f1b640 100644 --- a/x-pack/plugins/fleet/server/services/agents/events.ts +++ b/x-pack/plugins/fleet/server/services/agents/events.ts @@ -6,6 +6,7 @@ */ import type { SavedObjectsClientContract } from 'src/core/server'; + import { AGENT_EVENT_SAVED_OBJECT_TYPE } from '../../constants'; import type { AgentEventSOAttributes, AgentEvent } from '../../types'; import { normalizeKuery } from '../saved_object'; diff --git a/x-pack/plugins/fleet/server/services/agents/reassign.test.ts b/x-pack/plugins/fleet/server/services/agents/reassign.test.ts index 466870bead71c..94c4c1ad57009 100644 --- a/x-pack/plugins/fleet/server/services/agents/reassign.test.ts +++ b/x-pack/plugins/fleet/server/services/agents/reassign.test.ts @@ -7,8 +7,10 @@ import { elasticsearchServiceMock, savedObjectsClientMock } from 'src/core/server/mocks'; import type { SavedObject } from 'kibana/server'; + import type { Agent, AgentPolicy } from '../../types'; import { AgentReassignmentError } from '../../errors'; + import { reassignAgent, reassignAgents } from './reassign'; const agentInManagedSO = { diff --git a/x-pack/plugins/fleet/server/services/agents/reassign.ts b/x-pack/plugins/fleet/server/services/agents/reassign.ts index 62d59aada3b7b..7c6a646cfded2 100644 --- a/x-pack/plugins/fleet/server/services/agents/reassign.ts +++ b/x-pack/plugins/fleet/server/services/agents/reassign.ts @@ -7,7 +7,10 @@ import type { SavedObjectsClientContract, ElasticsearchClient } from 'kibana/server'; import Boom from '@hapi/boom'; + import { agentPolicyService } from '../agent_policy'; +import { AgentReassignmentError } from '../../errors'; + import { getAgents, getAgentPolicyForAgent, @@ -15,8 +18,6 @@ import { updateAgent, bulkUpdateAgents, } from './crud'; -import { AgentReassignmentError } from '../../errors'; - import { createAgentAction, bulkCreateAgentActions } from './actions'; export async function reassignAgent( diff --git a/x-pack/plugins/fleet/server/services/agents/saved_objects.ts b/x-pack/plugins/fleet/server/services/agents/saved_objects.ts index 45d5a0de040ea..8438048f12a87 100644 --- a/x-pack/plugins/fleet/server/services/agents/saved_objects.ts +++ b/x-pack/plugins/fleet/server/services/agents/saved_objects.ts @@ -7,6 +7,7 @@ import Boom from '@hapi/boom'; import type { SavedObject } from 'src/core/server'; + import type { Agent, AgentSOAttributes, diff --git a/x-pack/plugins/fleet/server/services/agents/setup.ts b/x-pack/plugins/fleet/server/services/agents/setup.ts index b55eb8efb1370..c6c7b50c5d3ae 100644 --- a/x-pack/plugins/fleet/server/services/agents/setup.ts +++ b/x-pack/plugins/fleet/server/services/agents/setup.ts @@ -6,9 +6,11 @@ */ import type { SavedObjectsClientContract } from 'src/core/server'; + import { SO_SEARCH_LIMIT } from '../../constants'; import { agentPolicyService } from '../agent_policy'; import { outputService } from '../output'; + import { getLatestConfigChangeAction } from './actions'; export async function isAgentsSetup(soClient: SavedObjectsClientContract): Promise { diff --git a/x-pack/plugins/fleet/server/services/agents/status.test.ts b/x-pack/plugins/fleet/server/services/agents/status.test.ts index c6a021195f8f8..93ec138dc9fa1 100644 --- a/x-pack/plugins/fleet/server/services/agents/status.test.ts +++ b/x-pack/plugins/fleet/server/services/agents/status.test.ts @@ -6,10 +6,12 @@ */ import { elasticsearchServiceMock, savedObjectsClientMock } from 'src/core/server/mocks'; -import { getAgentStatusById } from './status'; +import type { SavedObject } from 'kibana/server'; + import { AGENT_TYPE_PERMANENT } from '../../../common/constants'; import type { AgentSOAttributes } from '../../../common/types/models'; -import type { SavedObject } from 'kibana/server'; + +import { getAgentStatusById } from './status'; describe('Agent status service', () => { it('should return inactive when agent is not active', async () => { diff --git a/x-pack/plugins/fleet/server/services/agents/status.ts b/x-pack/plugins/fleet/server/services/agents/status.ts index 29171adf92bb9..3d6067ae2a826 100644 --- a/x-pack/plugins/fleet/server/services/agents/status.ts +++ b/x-pack/plugins/fleet/server/services/agents/status.ts @@ -7,7 +7,7 @@ import type { ElasticsearchClient, SavedObjectsClientContract } from 'src/core/server'; import pMap from 'p-map'; -import { getAgent, listAgents } from './crud'; + import { AGENT_EVENT_SAVED_OBJECT_TYPE, AGENT_SAVED_OBJECT_TYPE } from '../../constants'; import type { AgentStatus } from '../../types'; import { AgentStatusKueryHelper } from '../../../common/services'; @@ -15,6 +15,8 @@ import { esKuery } from '../../../../../../src/plugins/data/server'; import type { KueryNode } from '../../../../../../src/plugins/data/server'; import { normalizeKuery } from '../saved_object'; import { appContextService } from '../app_context'; + +import { getAgent, listAgents } from './crud'; import { removeSOAttributes } from './crud_fleet_server'; export async function getAgentStatusById( diff --git a/x-pack/plugins/fleet/server/services/agents/unenroll.test.ts b/x-pack/plugins/fleet/server/services/agents/unenroll.test.ts index cd46cff0f8a17..b74df90cc86d9 100644 --- a/x-pack/plugins/fleet/server/services/agents/unenroll.test.ts +++ b/x-pack/plugins/fleet/server/services/agents/unenroll.test.ts @@ -7,8 +7,10 @@ import { elasticsearchServiceMock, savedObjectsClientMock } from 'src/core/server/mocks'; import type { SavedObject } from 'kibana/server'; + import type { Agent, AgentPolicy } from '../../types'; import { AgentUnenrollmentError } from '../../errors'; + import { unenrollAgent, unenrollAgents } from './unenroll'; const agentInManagedSO = { diff --git a/x-pack/plugins/fleet/server/services/agents/unenroll.ts b/x-pack/plugins/fleet/server/services/agents/unenroll.ts index 97dc7ea87706e..e7c5a30836aa8 100644 --- a/x-pack/plugins/fleet/server/services/agents/unenroll.ts +++ b/x-pack/plugins/fleet/server/services/agents/unenroll.ts @@ -6,7 +6,10 @@ */ import type { ElasticsearchClient, SavedObjectsClientContract } from 'src/core/server'; + import * as APIKeyService from '../api_keys'; +import { AgentUnenrollmentError } from '../../errors'; + import { createAgentAction, bulkCreateAgentActions } from './actions'; import { getAgent, @@ -16,7 +19,6 @@ import { listAllAgents, bulkUpdateAgents, } from './crud'; -import { AgentUnenrollmentError } from '../../errors'; async function unenrollAgentIsAllowed( soClient: SavedObjectsClientContract, diff --git a/x-pack/plugins/fleet/server/services/agents/update.ts b/x-pack/plugins/fleet/server/services/agents/update.ts index 81214b6fd0eb5..7e40b2baf02e5 100644 --- a/x-pack/plugins/fleet/server/services/agents/update.ts +++ b/x-pack/plugins/fleet/server/services/agents/update.ts @@ -6,8 +6,10 @@ */ import type { ElasticsearchClient, SavedObjectsClientContract } from 'src/core/server'; -import { listAgents } from './crud'; + import { AGENT_SAVED_OBJECT_TYPE } from '../../constants'; + +import { listAgents } from './crud'; import { unenrollAgent } from './unenroll'; export async function unenrollForAgentPolicyId( diff --git a/x-pack/plugins/fleet/server/services/agents/upgrade.ts b/x-pack/plugins/fleet/server/services/agents/upgrade.ts index 9986edd3d805f..6742e6ab84f73 100644 --- a/x-pack/plugins/fleet/server/services/agents/upgrade.ts +++ b/x-pack/plugins/fleet/server/services/agents/upgrade.ts @@ -6,10 +6,14 @@ */ import type { ElasticsearchClient, SavedObjectsClientContract } from 'src/core/server'; + import type { AgentAction, AgentActionSOAttributes } from '../../types'; import { AGENT_ACTION_SAVED_OBJECT_TYPE } from '../../constants'; import { agentPolicyService } from '../../services'; import { IngestManagerError } from '../../errors'; +import { isAgentUpgradeable } from '../../../common/services'; +import { appContextService } from '../app_context'; + import { bulkCreateAgentActions, createAgentAction } from './actions'; import { getAgents, @@ -18,8 +22,6 @@ import { bulkUpdateAgents, getAgentPolicyForAgent, } from './crud'; -import { isAgentUpgradeable } from '../../../common/services'; -import { appContextService } from '../app_context'; export async function sendUpgradeAgentAction({ soClient, diff --git a/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.ts b/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.ts index 5d86393f0905e..f8352b1d698a4 100644 --- a/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.ts +++ b/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.ts @@ -6,8 +6,10 @@ */ import type { SavedObjectsClientContract, ElasticsearchClient } from 'src/core/server'; + import type { EnrollmentAPIKey } from '../../types'; import { appContextService } from '../app_context'; + import * as enrollmentApiKeyServiceSO from './enrollment_api_key_so'; import * as enrollmentApiKeyServiceFleetServer from './enrollment_api_key_fleet_server'; diff --git a/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key_fleet_server.ts b/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key_fleet_server.ts index 5cde87da95cdf..b6d2e942207b5 100644 --- a/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key_fleet_server.ts +++ b/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key_fleet_server.ts @@ -10,13 +10,15 @@ import Boom from '@hapi/boom'; import type { GetResponse } from 'elasticsearch'; import { ResponseError } from '@elastic/elasticsearch/lib/errors'; import type { SavedObjectsClientContract, ElasticsearchClient } from 'src/core/server'; + import type { ESSearchResponse as SearchResponse } from '../../../../../typings/elasticsearch'; import type { EnrollmentAPIKey, FleetServerEnrollmentAPIKey } from '../../types'; import { ENROLLMENT_API_KEYS_INDEX } from '../../constants'; -import { createAPIKey, invalidateAPIKeys } from './security'; import { agentPolicyService } from '../agent_policy'; import { escapeSearchQueryPhrase } from '../saved_object'; +import { createAPIKey, invalidateAPIKeys } from './security'; + export async function listEnrollmentApiKeys( esClient: ElasticsearchClient, options: { diff --git a/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key_so.ts b/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key_so.ts index 4001cabe76aa3..9b2937f4d3224 100644 --- a/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key_so.ts +++ b/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key_so.ts @@ -8,13 +8,15 @@ import uuid from 'uuid'; import Boom from '@hapi/boom'; import type { SavedObjectsClientContract, SavedObject } from 'src/core/server'; + import type { EnrollmentAPIKey, EnrollmentAPIKeySOAttributes } from '../../types'; import { ENROLLMENT_API_KEYS_SAVED_OBJECT_TYPE } from '../../constants'; -import { createAPIKey, invalidateAPIKeys } from './security'; import { agentPolicyService } from '../agent_policy'; import { appContextService } from '../app_context'; import { normalizeKuery, escapeSearchQueryPhrase } from '../saved_object'; +import { createAPIKey, invalidateAPIKeys } from './security'; + export async function listEnrollmentApiKeys( soClient: SavedObjectsClientContract, options: { diff --git a/x-pack/plugins/fleet/server/services/api_keys/index.ts b/x-pack/plugins/fleet/server/services/api_keys/index.ts index 724583e42efe0..849867bdd5879 100644 --- a/x-pack/plugins/fleet/server/services/api_keys/index.ts +++ b/x-pack/plugins/fleet/server/services/api_keys/index.ts @@ -7,6 +7,7 @@ import { KibanaRequest } from 'src/core/server'; import type { SavedObjectsClientContract } from 'src/core/server'; + import { createAPIKey } from './security'; export { invalidateAPIKeys } from './security'; diff --git a/x-pack/plugins/fleet/server/services/api_keys/security.ts b/x-pack/plugins/fleet/server/services/api_keys/security.ts index 356f9012791eb..836e7b2343f6c 100644 --- a/x-pack/plugins/fleet/server/services/api_keys/security.ts +++ b/x-pack/plugins/fleet/server/services/api_keys/security.ts @@ -6,6 +6,7 @@ */ import type { Request } from '@hapi/hapi'; + import { KibanaRequest } from '../../../../../../src/core/server'; import type { SavedObjectsClientContract } from '../../../../../../src/core/server'; import { FleetAdminUserInvalidError, isESClientError } from '../../errors'; diff --git a/x-pack/plugins/fleet/server/services/app_context.ts b/x-pack/plugins/fleet/server/services/app_context.ts index f63d3b2d7ccab..cad730b81f98b 100644 --- a/x-pack/plugins/fleet/server/services/app_context.ts +++ b/x-pack/plugins/fleet/server/services/app_context.ts @@ -15,6 +15,7 @@ import type { HttpServiceSetup, Logger, } from 'src/core/server'; + import type { EncryptedSavedObjectsClient, EncryptedSavedObjectsPluginSetup, diff --git a/x-pack/plugins/fleet/server/services/config.ts b/x-pack/plugins/fleet/server/services/config.ts index d14e31e5b510f..128cb6b136c23 100644 --- a/x-pack/plugins/fleet/server/services/config.ts +++ b/x-pack/plugins/fleet/server/services/config.ts @@ -6,6 +6,7 @@ */ import { Observable, Subscription } from 'rxjs'; + import type { FleetConfigType } from '../'; /** 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 4509deee0d00f..a76a8b9672d21 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 @@ -183,71 +183,36 @@ input: logs it('should escape string values when necessary', () => { const stringTemplate = ` my-package: - opencurly: {{opencurly}} - closecurly: {{closecurly}} - opensquare: {{opensquare}} - closesquare: {{closesquare}} - ampersand: {{ampersand}} - asterisk: {{asterisk}} - question: {{question}} - pipe: {{pipe}} - hyphen: {{hyphen}} - openangle: {{openangle}} - closeangle: {{closeangle}} - equals: {{equals}} - exclamation: {{exclamation}} - percent: {{percent}} - at: {{at}} - colon: {{colon}} + asteriskOnly: {{asteriskOnly}} + startsWithAsterisk: {{startsWithAsterisk}} numeric: {{numeric}} - mixed: {{mixed}}`; + mixed: {{mixed}} + concatenatedEnd: {{a}}{{b}} + concatenatedMiddle: {{c}}{{d}} + mixedMultiline: |- + {{{ search }}} | streamstats`; - // List of special chars that may lead to YAML parsing errors when not quoted. - // See YAML specification section 5.3 Indicator characters - // https://yaml.org/spec/1.2/spec.html#id2772075 - // {,},[,],&,*,?,|,-,<,>,=,!,%,@,: const vars = { - opencurly: { value: '{', type: 'string' }, - closecurly: { value: '}', type: 'string' }, - opensquare: { value: '[', type: 'string' }, - closesquare: { value: ']', type: 'string' }, - comma: { value: ',', type: 'string' }, - ampersand: { value: '&', type: 'string' }, - asterisk: { value: '*', type: 'string' }, - question: { value: '?', type: 'string' }, - pipe: { value: '|', type: 'string' }, - hyphen: { value: '-', type: 'string' }, - openangle: { value: '<', type: 'string' }, - closeangle: { value: '>', type: 'string' }, - equals: { value: '=', type: 'string' }, - exclamation: { value: '!', type: 'string' }, - percent: { value: '%', type: 'string' }, - at: { value: '@', type: 'string' }, - colon: { value: ':', type: 'string' }, + asteriskOnly: { value: '"*"', type: 'string' }, + startsWithAsterisk: { value: '"*lala"', type: 'string' }, numeric: { value: '100', type: 'string' }, mixed: { value: '1s', type: 'string' }, + a: { value: '/opt/package/*', type: 'string' }, + b: { value: '/logs/my.log*', type: 'string' }, + c: { value: '/opt/*/package/', type: 'string' }, + d: { value: 'logs/*my.log', type: 'string' }, + search: { value: 'search sourcetype="access*"', type: 'text' }, }; const targetOutput = { 'my-package': { - opencurly: '{', - closecurly: '}', - opensquare: '[', - closesquare: ']', - ampersand: '&', - asterisk: '*', - question: '?', - pipe: '|', - hyphen: '-', - openangle: '<', - closeangle: '>', - equals: '=', - exclamation: '!', - percent: '%', - at: '@', - colon: ':', + asteriskOnly: '*', + startsWithAsterisk: '*lala', numeric: '100', mixed: '1s', + concatenatedEnd: '/opt/package/*/logs/my.log*', + concatenatedMiddle: '/opt/*/package/logs/*my.log', + mixedMultiline: 'search sourcetype="access*" | streamstats', }, }; 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 38631ad784ea9..26e1497e93852 100644 --- a/x-pack/plugins/fleet/server/services/epm/agent/agent.ts +++ b/x-pack/plugins/fleet/server/services/epm/agent/agent.ts @@ -7,6 +7,7 @@ import Handlebars from 'handlebars'; import { safeLoad, safeDump } from 'js-yaml'; + import type { PackagePolicyConfigRecord } from '../../../../common'; const handlebars = Handlebars.create(); @@ -58,13 +59,8 @@ function replaceVariablesInYaml(yamlVariables: { [k: string]: any }, yaml: any) } const maybeEscapeString = (value: string) => { - // List of special chars that may lead to YAML parsing errors when not quoted. - // See YAML specification section 5.3 Indicator characters - // https://yaml.org/spec/1.2/spec.html#id2772075 - const yamlSpecialCharsRegex = /[{}\[\],&*?|\-<>=!%@:]/; - - // In addition, numeric strings need to be quoted to stay strings. - if ((value.length && !isNaN(+value)) || yamlSpecialCharsRegex.test(value)) { + // Numeric strings need to be quoted to stay strings. + if (value.length && !isNaN(+value)) { return `"${value}"`; } return 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 8d4234e3cf538..a0c817b497e0d 100644 --- a/x-pack/plugins/fleet/server/services/epm/archive/cache.ts +++ b/x-pack/plugins/fleet/server/services/epm/archive/cache.ts @@ -5,9 +5,10 @@ * 2.0. */ -import type { ArchiveEntry } from './index'; import type { ArchivePackage, RegistryPackage } from '../../../../common'; +import type { ArchiveEntry } from './index'; + const archiveEntryCache: Map = new Map(); export const getArchiveEntry = (key: string) => archiveEntryCache.get(key); export const setArchiveEntry = (key: string, value: Buffer) => archiveEntryCache.set(key, value); diff --git a/x-pack/plugins/fleet/server/services/epm/archive/extract.ts b/x-pack/plugins/fleet/server/services/epm/archive/extract.ts index 8d576310813c0..0bdb07df26814 100644 --- a/x-pack/plugins/fleet/server/services/epm/archive/extract.ts +++ b/x-pack/plugins/fleet/server/services/epm/archive/extract.ts @@ -7,7 +7,9 @@ import tar from 'tar'; import yauzl from 'yauzl'; + import { bufferToStream, streamToBuffer } from '../streams'; + import type { ArchiveEntry } from './index'; export async function untarBuffer( 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 44046ac749f6c..809684df0592c 100644 --- a/x-pack/plugins/fleet/server/services/epm/archive/index.ts +++ b/x-pack/plugins/fleet/server/services/epm/archive/index.ts @@ -7,6 +7,7 @@ import type { AssetParts, InstallSource } from '../../../../common/types'; import { PackageInvalidArchiveError, PackageUnsupportedMediaTypeError } from '../../../errors'; + import { getArchiveEntry, setArchiveEntry, diff --git a/x-pack/plugins/fleet/server/services/epm/archive/storage.ts b/x-pack/plugins/fleet/server/services/epm/archive/storage.ts index 671d428918caf..8843171c4c6f4 100644 --- a/x-pack/plugins/fleet/server/services/epm/archive/storage.ts +++ b/x-pack/plugins/fleet/server/services/epm/archive/storage.ts @@ -6,12 +6,14 @@ */ import { extname } from 'path'; + import { uniq } from 'lodash'; import { safeLoad } from 'js-yaml'; import { isBinaryFile } from 'isbinaryfile'; import mime from 'mime-types'; import uuidv5 from 'uuid/v5'; import type { SavedObjectsClientContract, SavedObjectsBulkCreateObject } from 'src/core/server'; + import { ASSETS_SAVED_OBJECT_TYPE } from '../../../../common'; import type { InstallablePackage, @@ -19,10 +21,11 @@ import type { PackageAssetReference, RegistryDataStream, } from '../../../../common'; +import { pkgToPkgKey } from '../registry'; + import { getArchiveEntry, setArchiveEntry, setArchiveFilelist } from './index'; import type { ArchiveEntry } from './index'; import { parseAndVerifyPolicyTemplates, parseAndVerifyStreams } from './validation'; -import { pkgToPkgKey } from '../registry'; // could be anything, picked this from https://github.com/elastic/elastic-agent-client/issues/17 const MAX_ES_ASSET_BYTES = 4 * 1024 * 1024; diff --git a/x-pack/plugins/fleet/server/services/epm/archive/validation.ts b/x-pack/plugins/fleet/server/services/epm/archive/validation.ts index 03f30cab45734..769b9930d26fb 100644 --- a/x-pack/plugins/fleet/server/services/epm/archive/validation.ts +++ b/x-pack/plugins/fleet/server/services/epm/archive/validation.ts @@ -7,6 +7,7 @@ import yaml from 'js-yaml'; import { pick, uniq } from 'lodash'; + import type { ArchivePackage, RegistryPolicyTemplate, @@ -17,9 +18,10 @@ import type { PackageSpecManifest, } from '../../../../common/types'; import { PackageInvalidArchiveError } from '../../../errors'; -import { unpackBufferEntries } from './index'; import { pkgToPkgKey } from '../registry'; +import { unpackBufferEntries } from './index'; + const MANIFESTS: Record = {}; const MANIFEST_NAME = 'manifest.yml'; diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/datastream_ilm/install.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/datastream_ilm/install.ts index e18cf2eb52bcd..7d821e1416c9f 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/datastream_ilm/install.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/datastream_ilm/install.ts @@ -6,6 +6,7 @@ */ import type { SavedObjectsClientContract } from 'kibana/server'; + import { ElasticsearchAssetType } from '../../../../../common/types/models'; import type { EsAssetReference, @@ -14,10 +15,11 @@ import type { } from '../../../../../common/types/models'; import type { CallESAsCurrentUser } from '../../../../types'; import { getInstallation } from '../../packages'; -import { deleteIlmRefs, deleteIlms } from './remove'; import { saveInstalledEsRefs } from '../../packages/install'; import { getAsset } from '../transform/common'; +import { deleteIlmRefs, deleteIlms } from './remove'; + interface IlmInstallation { installationName: string; content: string; diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/datastream_ilm/remove.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/datastream_ilm/remove.ts index 7da980e61f0ec..651710c02fc38 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/datastream_ilm/remove.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/datastream_ilm/remove.ts @@ -6,6 +6,7 @@ */ import type { SavedObjectsClientContract } from 'kibana/server'; + import { ElasticsearchAssetType } from '../../../../types'; import type { CallESAsCurrentUser, EsAssetReference } from '../../../../types'; import { PACKAGES_SAVED_OBJECT_TYPE } from '../../../../../common/constants'; diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/index.test.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/index.test.ts index aa64cd7a6ed02..e4fae7ca0ca41 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/index.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/index.test.ts @@ -6,6 +6,7 @@ */ import type { RegistryDataStream } from '../../../types'; + import { getRegistryDataStreamAssetBaseName } from './index'; test('getBaseName', () => { diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/ingest_pipeline/ingest_pipelines.test.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/ingest_pipeline/ingest_pipelines.test.ts index 0a96186339bc0..097f9ce28c7d1 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/ingest_pipeline/ingest_pipelines.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/ingest_pipeline/ingest_pipelines.test.ts @@ -7,9 +7,11 @@ import { readFileSync } from 'fs'; import path from 'path'; -import { rewriteIngestPipeline, getPipelineNameForInstallation } from './install'; + import type { RegistryDataStream } from '../../../../types'; +import { rewriteIngestPipeline, getPipelineNameForInstallation } from './install'; + test('a json-format pipeline with pipeline references is correctly rewritten', () => { const inputStandard = readFileSync( path.join(__dirname, '/tests/ingest_pipelines/real_input_standard.json'), diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/ingest_pipeline/install.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/ingest_pipeline/install.ts index ff3262cb65418..735242c1e6984 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/ingest_pipeline/install.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/ingest_pipeline/install.ts @@ -6,6 +6,7 @@ */ import type { SavedObjectsClientContract } from 'src/core/server'; + import { ElasticsearchAssetType } from '../../../../types'; import type { EsAssetReference, @@ -17,6 +18,7 @@ import { getAsset, getPathParts } from '../../archive'; import type { ArchiveEntry } from '../../archive'; import { saveInstalledEsRefs } from '../../packages/install'; import { getInstallationObject } from '../../packages'; + import { deletePipelineRefs } from './remove'; interface RewriteSubstitution { diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/ingest_pipeline/remove.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/ingest_pipeline/remove.ts index d78c9d989bd4d..46f9be53f8864 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/ingest_pipeline/remove.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/ingest_pipeline/remove.ts @@ -6,6 +6,7 @@ */ import type { SavedObjectsClientContract } from 'src/core/server'; + import { appContextService } from '../../../'; import { ElasticsearchAssetType } from '../../../../types'; import type { CallESAsCurrentUser } from '../../../../types'; diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/__snapshots__/template.test.ts.snap b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/__snapshots__/template.test.ts.snap index 2d2478843c454..65eec939d5850 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/__snapshots__/template.test.ts.snap +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/__snapshots__/template.test.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`tests loading base.yml: base.yml 1`] = ` +exports[`EPM template tests loading base.yml: base.yml 1`] = ` { "priority": 200, "index_patterns": [ @@ -20,12 +20,12 @@ exports[`tests loading base.yml: base.yml 1`] = ` }, "refresh_interval": "5s", "number_of_shards": "1", + "number_of_routing_shards": "30", "query": { "default_field": [ - "message" + "long.nested.foo" ] - }, - "number_of_routing_shards": "30" + } } }, "mappings": { @@ -109,7 +109,7 @@ exports[`tests loading base.yml: base.yml 1`] = ` } `; -exports[`tests loading coredns.logs.yml: coredns.logs.yml 1`] = ` +exports[`EPM template tests loading coredns.logs.yml: coredns.logs.yml 1`] = ` { "priority": 200, "index_patterns": [ @@ -129,12 +129,17 @@ exports[`tests loading coredns.logs.yml: coredns.logs.yml 1`] = ` }, "refresh_interval": "5s", "number_of_shards": "1", + "number_of_routing_shards": "30", "query": { "default_field": [ - "message" + "coredns.id", + "coredns.query.class", + "coredns.query.name", + "coredns.query.type", + "coredns.response.code", + "coredns.response.flags" ] - }, - "number_of_routing_shards": "30" + } } }, "mappings": { @@ -218,7 +223,7 @@ exports[`tests loading coredns.logs.yml: coredns.logs.yml 1`] = ` } `; -exports[`tests loading system.yml: system.yml 1`] = ` +exports[`EPM template tests loading system.yml: system.yml 1`] = ` { "priority": 200, "index_patterns": [ @@ -238,12 +243,45 @@ exports[`tests loading system.yml: system.yml 1`] = ` }, "refresh_interval": "5s", "number_of_shards": "1", + "number_of_routing_shards": "30", "query": { "default_field": [ - "message" + "system.diskio.name", + "system.diskio.serial_number", + "system.filesystem.device_name", + "system.filesystem.type", + "system.filesystem.mount_point", + "system.network.name", + "system.process.state", + "system.process.cmdline", + "system.process.cgroup.id", + "system.process.cgroup.path", + "system.process.cgroup.cpu.id", + "system.process.cgroup.cpu.path", + "system.process.cgroup.cpuacct.id", + "system.process.cgroup.cpuacct.path", + "system.process.cgroup.memory.id", + "system.process.cgroup.memory.path", + "system.process.cgroup.blkio.id", + "system.process.cgroup.blkio.path", + "system.raid.name", + "system.raid.status", + "system.raid.level", + "system.raid.sync_action", + "system.socket.remote.host", + "system.socket.remote.etld_plus_one", + "system.socket.remote.host_error", + "system.socket.process.cmdline", + "system.users.id", + "system.users.seat", + "system.users.path", + "system.users.type", + "system.users.service", + "system.users.state", + "system.users.scope", + "system.users.remote_host" ] - }, - "number_of_routing_shards": "30" + } } }, "mappings": { diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.test.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.test.ts index 42e724794b791..d68d7715436a3 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.test.ts @@ -4,192 +4,206 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ +import { elasticsearchServiceMock } from 'src/core/server/mocks'; + +import { createAppContextStartContractMock } from '../../../../mocks'; +import { appContextService } from '../../../../services'; import type { RegistryDataStream } from '../../../../types'; import type { Field } from '../../fields/field'; -import { elasticsearchServiceMock } from 'src/core/server/mocks'; + import { installTemplate } from './install'; -test('tests installPackage to use correct priority and index_patterns for data stream with dataset_is_prefix not set', async () => { - const callCluster = elasticsearchServiceMock.createLegacyScopedClusterClient().callAsCurrentUser; - callCluster.mockImplementation(async (_, params) => { - if ( - params && - params.method === 'GET' && - params.path === '/_index_template/metrics-package.dataset' - ) { - return { index_templates: [] }; - } +describe('EPM install', () => { + beforeEach(async () => { + appContextService.start(createAppContextStartContractMock()); }); - const fields: Field[] = []; - const dataStreamDatasetIsPrefixUnset = { - type: 'metrics', - dataset: 'package.dataset', - title: 'test data stream', - release: 'experimental', - package: 'package', - path: 'path', - ingest_pipeline: 'default', - } as RegistryDataStream; - const pkg = { - name: 'package', - version: '0.0.1', - }; - const templateIndexPatternDatasetIsPrefixUnset = 'metrics-package.dataset-*'; - const templatePriorityDatasetIsPrefixUnset = 200; - await installTemplate({ - callCluster, - fields, - dataStream: dataStreamDatasetIsPrefixUnset, - packageVersion: pkg.version, - packageName: pkg.name, - }); - // @ts-ignore - const sentTemplate = callCluster.mock.calls[1][1].body; - expect(sentTemplate).toBeDefined(); - expect(sentTemplate.priority).toBe(templatePriorityDatasetIsPrefixUnset); - expect(sentTemplate.index_patterns).toEqual([templateIndexPatternDatasetIsPrefixUnset]); -}); + it('tests installPackage to use correct priority and index_patterns for data stream with dataset_is_prefix not set', async () => { + const callCluster = elasticsearchServiceMock.createLegacyScopedClusterClient() + .callAsCurrentUser; + callCluster.mockImplementation(async (_, params) => { + if ( + params && + params.method === 'GET' && + params.path === '/_index_template/metrics-package.dataset' + ) { + return { index_templates: [] }; + } + }); -test('tests installPackage to use correct priority and index_patterns for data stream with dataset_is_prefix set to false', async () => { - const callCluster = elasticsearchServiceMock.createLegacyScopedClusterClient().callAsCurrentUser; - callCluster.mockImplementation(async (_, params) => { - if ( - params && - params.method === 'GET' && - params.path === '/_index_template/metrics-package.dataset' - ) { - return { index_templates: [] }; - } + const fields: Field[] = []; + const dataStreamDatasetIsPrefixUnset = { + type: 'metrics', + dataset: 'package.dataset', + title: 'test data stream', + release: 'experimental', + package: 'package', + path: 'path', + ingest_pipeline: 'default', + } as RegistryDataStream; + const pkg = { + name: 'package', + version: '0.0.1', + }; + const templateIndexPatternDatasetIsPrefixUnset = 'metrics-package.dataset-*'; + const templatePriorityDatasetIsPrefixUnset = 200; + await installTemplate({ + callCluster, + fields, + dataStream: dataStreamDatasetIsPrefixUnset, + packageVersion: pkg.version, + packageName: pkg.name, + }); + // @ts-ignore + const sentTemplate = callCluster.mock.calls[1][1].body; + expect(sentTemplate).toBeDefined(); + expect(sentTemplate.priority).toBe(templatePriorityDatasetIsPrefixUnset); + expect(sentTemplate.index_patterns).toEqual([templateIndexPatternDatasetIsPrefixUnset]); }); - const fields: Field[] = []; - const dataStreamDatasetIsPrefixFalse = { - type: 'metrics', - dataset: 'package.dataset', - title: 'test data stream', - release: 'experimental', - package: 'package', - path: 'path', - ingest_pipeline: 'default', - dataset_is_prefix: false, - } as RegistryDataStream; - const pkg = { - name: 'package', - version: '0.0.1', - }; - const templateIndexPatternDatasetIsPrefixFalse = 'metrics-package.dataset-*'; - const templatePriorityDatasetIsPrefixFalse = 200; - await installTemplate({ - callCluster, - fields, - dataStream: dataStreamDatasetIsPrefixFalse, - packageVersion: pkg.version, - packageName: pkg.name, - }); - // @ts-ignore - const sentTemplate = callCluster.mock.calls[1][1].body; - expect(sentTemplate).toBeDefined(); - expect(sentTemplate.priority).toBe(templatePriorityDatasetIsPrefixFalse); - expect(sentTemplate.index_patterns).toEqual([templateIndexPatternDatasetIsPrefixFalse]); -}); + it('tests installPackage to use correct priority and index_patterns for data stream with dataset_is_prefix set to false', async () => { + const callCluster = elasticsearchServiceMock.createLegacyScopedClusterClient() + .callAsCurrentUser; + callCluster.mockImplementation(async (_, params) => { + if ( + params && + params.method === 'GET' && + params.path === '/_index_template/metrics-package.dataset' + ) { + return { index_templates: [] }; + } + }); -test('tests installPackage to use correct priority and index_patterns for data stream with dataset_is_prefix set to true', async () => { - const callCluster = elasticsearchServiceMock.createLegacyScopedClusterClient().callAsCurrentUser; - callCluster.mockImplementation(async (_, params) => { - if ( - params && - params.method === 'GET' && - params.path === '/_index_template/metrics-package.dataset' - ) { - return { index_templates: [] }; - } + const fields: Field[] = []; + const dataStreamDatasetIsPrefixFalse = { + type: 'metrics', + dataset: 'package.dataset', + title: 'test data stream', + release: 'experimental', + package: 'package', + path: 'path', + ingest_pipeline: 'default', + dataset_is_prefix: false, + } as RegistryDataStream; + const pkg = { + name: 'package', + version: '0.0.1', + }; + const templateIndexPatternDatasetIsPrefixFalse = 'metrics-package.dataset-*'; + const templatePriorityDatasetIsPrefixFalse = 200; + await installTemplate({ + callCluster, + fields, + dataStream: dataStreamDatasetIsPrefixFalse, + packageVersion: pkg.version, + packageName: pkg.name, + }); + // @ts-ignore + const sentTemplate = callCluster.mock.calls[1][1].body; + expect(sentTemplate).toBeDefined(); + expect(sentTemplate.priority).toBe(templatePriorityDatasetIsPrefixFalse); + expect(sentTemplate.index_patterns).toEqual([templateIndexPatternDatasetIsPrefixFalse]); }); - const fields: Field[] = []; - const dataStreamDatasetIsPrefixTrue = { - type: 'metrics', - dataset: 'package.dataset', - title: 'test data stream', - release: 'experimental', - package: 'package', - path: 'path', - ingest_pipeline: 'default', - dataset_is_prefix: true, - } as RegistryDataStream; - const pkg = { - name: 'package', - version: '0.0.1', - }; - const templateIndexPatternDatasetIsPrefixTrue = 'metrics-package.dataset.*-*'; - const templatePriorityDatasetIsPrefixTrue = 150; - await installTemplate({ - callCluster, - fields, - dataStream: dataStreamDatasetIsPrefixTrue, - packageVersion: pkg.version, - packageName: pkg.name, + it('tests installPackage to use correct priority and index_patterns for data stream with dataset_is_prefix set to true', async () => { + const callCluster = elasticsearchServiceMock.createLegacyScopedClusterClient() + .callAsCurrentUser; + callCluster.mockImplementation(async (_, params) => { + if ( + params && + params.method === 'GET' && + params.path === '/_index_template/metrics-package.dataset' + ) { + return { index_templates: [] }; + } + }); + + const fields: Field[] = []; + const dataStreamDatasetIsPrefixTrue = { + type: 'metrics', + dataset: 'package.dataset', + title: 'test data stream', + release: 'experimental', + package: 'package', + path: 'path', + ingest_pipeline: 'default', + dataset_is_prefix: true, + } as RegistryDataStream; + const pkg = { + name: 'package', + version: '0.0.1', + }; + const templateIndexPatternDatasetIsPrefixTrue = 'metrics-package.dataset.*-*'; + const templatePriorityDatasetIsPrefixTrue = 150; + await installTemplate({ + callCluster, + fields, + dataStream: dataStreamDatasetIsPrefixTrue, + packageVersion: pkg.version, + packageName: pkg.name, + }); + // @ts-ignore + const sentTemplate = callCluster.mock.calls[1][1].body; + expect(sentTemplate).toBeDefined(); + expect(sentTemplate.priority).toBe(templatePriorityDatasetIsPrefixTrue); + expect(sentTemplate.index_patterns).toEqual([templateIndexPatternDatasetIsPrefixTrue]); }); - // @ts-ignore - const sentTemplate = callCluster.mock.calls[1][1].body; - expect(sentTemplate).toBeDefined(); - expect(sentTemplate.priority).toBe(templatePriorityDatasetIsPrefixTrue); - expect(sentTemplate.index_patterns).toEqual([templateIndexPatternDatasetIsPrefixTrue]); -}); -test('tests installPackage remove the aliases property if the property existed', async () => { - const callCluster = elasticsearchServiceMock.createLegacyScopedClusterClient().callAsCurrentUser; - callCluster.mockImplementation(async (_, params) => { - if ( - params && - params.method === 'GET' && - params.path === '/_index_template/metrics-package.dataset' - ) { - return { - index_templates: [ - { - name: 'metrics-package.dataset', - index_template: { - index_patterns: ['metrics-package.dataset-*'], - template: { aliases: {} }, + it('tests installPackage remove the aliases property if the property existed', async () => { + const callCluster = elasticsearchServiceMock.createLegacyScopedClusterClient() + .callAsCurrentUser; + callCluster.mockImplementation(async (_, params) => { + if ( + params && + params.method === 'GET' && + params.path === '/_index_template/metrics-package.dataset' + ) { + return { + index_templates: [ + { + name: 'metrics-package.dataset', + index_template: { + index_patterns: ['metrics-package.dataset-*'], + template: { aliases: {} }, + }, }, - }, - ], - }; - } - }); + ], + }; + } + }); - const fields: Field[] = []; - const dataStreamDatasetIsPrefixUnset = { - type: 'metrics', - dataset: 'package.dataset', - title: 'test data stream', - release: 'experimental', - package: 'package', - path: 'path', - ingest_pipeline: 'default', - } as RegistryDataStream; - const pkg = { - name: 'package', - version: '0.0.1', - }; - const templateIndexPatternDatasetIsPrefixUnset = 'metrics-package.dataset-*'; - const templatePriorityDatasetIsPrefixUnset = 200; - await installTemplate({ - callCluster, - fields, - dataStream: dataStreamDatasetIsPrefixUnset, - packageVersion: pkg.version, - packageName: pkg.name, - }); + const fields: Field[] = []; + const dataStreamDatasetIsPrefixUnset = { + type: 'metrics', + dataset: 'package.dataset', + title: 'test data stream', + release: 'experimental', + package: 'package', + path: 'path', + ingest_pipeline: 'default', + } as RegistryDataStream; + const pkg = { + name: 'package', + version: '0.0.1', + }; + const templateIndexPatternDatasetIsPrefixUnset = 'metrics-package.dataset-*'; + const templatePriorityDatasetIsPrefixUnset = 200; + await installTemplate({ + callCluster, + fields, + dataStream: dataStreamDatasetIsPrefixUnset, + packageVersion: pkg.version, + packageName: pkg.name, + }); - // @ts-ignore - const removeAliases = callCluster.mock.calls[1][1].body; - expect(removeAliases.template.aliases).not.toBeDefined(); - // @ts-ignore - const sentTemplate = callCluster.mock.calls[2][1].body; - expect(sentTemplate).toBeDefined(); - expect(sentTemplate.priority).toBe(templatePriorityDatasetIsPrefixUnset); - expect(sentTemplate.index_patterns).toEqual([templateIndexPatternDatasetIsPrefixUnset]); + // @ts-ignore + const removeAliases = callCluster.mock.calls[1][1].body; + expect(removeAliases.template.aliases).not.toBeDefined(); + // @ts-ignore + const sentTemplate = callCluster.mock.calls[2][1].body; + expect(sentTemplate).toBeDefined(); + expect(sentTemplate.priority).toBe(templatePriorityDatasetIsPrefixUnset); + expect(sentTemplate.index_patterns).toEqual([templateIndexPatternDatasetIsPrefixUnset]); + }); }); diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.ts index 353331528ca3c..2769b97fe48a1 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.ts @@ -7,6 +7,7 @@ import Boom from '@hapi/boom'; import type { SavedObjectsClientContract } from 'src/core/server'; + import { ElasticsearchAssetType } from '../../../../types'; import type { RegistryDataStream, @@ -18,6 +19,9 @@ import type { import { loadFieldsFromYaml, processFields } from '../../fields/field'; import type { Field } from '../../fields/field'; import { getPipelineNameForInstallation } from '../ingest_pipeline/install'; +import { getAsset, getPathParts } from '../../archive'; +import { removeAssetsFromInstalledEsByType, saveInstalledEsRefs } from '../../packages/install'; + import { generateMappings, generateTemplateName, @@ -25,8 +29,6 @@ import { getTemplate, getTemplatePriority, } from './template'; -import { getAsset, getPathParts } from '../../archive'; -import { removeAssetsFromInstalledEsByType, saveInstalledEsRefs } from '../../packages/install'; export const installTemplates = async ( installablePackage: InstallablePackage, @@ -298,7 +300,8 @@ export async function installTemplate({ packageVersion: string; packageName: string; }): Promise { - const mappings = generateMappings(processFields(fields)); + const validFields = processFields(fields); + const mappings = generateMappings(validFields); const templateName = generateTemplateName(dataStream); const templateIndexPattern = generateTemplateIndexPattern(dataStream); const templatePriority = getTemplatePriority(dataStream); @@ -360,6 +363,7 @@ export async function installTemplate({ const template = getTemplate({ type: dataStream.type, templateIndexPattern, + fields: validFields, mappings, pipelineName, packageName, diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.test.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.test.ts index 95e9e8e6d5c71..df82aa90b5a13 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.test.ts @@ -6,11 +6,17 @@ */ import { readFileSync } from 'fs'; -import { safeLoad } from 'js-yaml'; import path from 'path'; + +import { safeLoad } from 'js-yaml'; + +import { createAppContextStartContractMock } from '../../../../mocks'; +import { appContextService } from '../../../../services'; + import type { RegistryDataStream } from '../../../../types'; import { processFields } from '../../fields/field'; import type { Field } from '../../fields/field'; + import { generateMappings, getTemplate, @@ -29,132 +35,145 @@ expect.addSnapshotSerializer({ }, }); -test('get template', () => { - const templateIndexPattern = 'logs-nginx.access-abcd-*'; - - const template = getTemplate({ - type: 'logs', - templateIndexPattern, - packageName: 'nginx', - mappings: { properties: {} }, - composedOfTemplates: [], - templatePriority: 200, +describe('EPM template', () => { + beforeEach(async () => { + appContextService.start(createAppContextStartContractMock()); }); - expect(template.index_patterns).toStrictEqual([templateIndexPattern]); -}); -test('adds composed_of correctly', () => { - const composedOfTemplates = ['component1', 'component2']; - - const template = getTemplate({ - type: 'logs', - templateIndexPattern: 'name-*', - packageName: 'nginx', - mappings: { properties: {} }, - composedOfTemplates, - templatePriority: 200, + it('get template', () => { + const templateIndexPattern = 'logs-nginx.access-abcd-*'; + + const template = getTemplate({ + type: 'logs', + templateIndexPattern, + packageName: 'nginx', + fields: [], + mappings: { properties: {} }, + composedOfTemplates: [], + templatePriority: 200, + }); + expect(template.index_patterns).toStrictEqual([templateIndexPattern]); }); - expect(template.composed_of).toStrictEqual(composedOfTemplates); -}); -test('adds empty composed_of correctly', () => { - const composedOfTemplates: string[] = []; - - const template = getTemplate({ - type: 'logs', - templateIndexPattern: 'name-*', - packageName: 'nginx', - mappings: { properties: {} }, - composedOfTemplates, - templatePriority: 200, + it('adds composed_of correctly', () => { + const composedOfTemplates = ['component1', 'component2']; + + const template = getTemplate({ + type: 'logs', + templateIndexPattern: 'name-*', + packageName: 'nginx', + fields: [], + mappings: { properties: {} }, + composedOfTemplates, + templatePriority: 200, + }); + expect(template.composed_of).toStrictEqual(composedOfTemplates); }); - expect(template.composed_of).toStrictEqual(composedOfTemplates); -}); -test('adds hidden field correctly', () => { - const templateIndexPattern = 'logs-nginx.access-abcd-*'; - - const templateWithHidden = getTemplate({ - type: 'logs', - templateIndexPattern, - packageName: 'nginx', - mappings: { properties: {} }, - composedOfTemplates: [], - templatePriority: 200, - hidden: true, + it('adds empty composed_of correctly', () => { + const composedOfTemplates: string[] = []; + + const template = getTemplate({ + type: 'logs', + templateIndexPattern: 'name-*', + packageName: 'nginx', + fields: [], + mappings: { properties: {} }, + composedOfTemplates, + templatePriority: 200, + }); + expect(template.composed_of).toStrictEqual(composedOfTemplates); }); - expect(templateWithHidden.data_stream.hidden).toEqual(true); - - const templateWithoutHidden = getTemplate({ - type: 'logs', - templateIndexPattern, - packageName: 'nginx', - mappings: { properties: {} }, - composedOfTemplates: [], - templatePriority: 200, - }); - expect(templateWithoutHidden.data_stream.hidden).toEqual(undefined); -}); -test('tests loading base.yml', () => { - const ymlPath = path.join(__dirname, '../../fields/tests/base.yml'); - const fieldsYML = readFileSync(ymlPath, 'utf-8'); - const fields: Field[] = safeLoad(fieldsYML); - - const processedFields = processFields(fields); - const mappings = generateMappings(processedFields); - const template = getTemplate({ - type: 'logs', - templateIndexPattern: 'foo-*', - packageName: 'nginx', - mappings, - composedOfTemplates: [], - templatePriority: 200, + it('adds hidden field correctly', () => { + const templateIndexPattern = 'logs-nginx.access-abcd-*'; + + const templateWithHidden = getTemplate({ + type: 'logs', + templateIndexPattern, + packageName: 'nginx', + fields: [], + mappings: { properties: {} }, + composedOfTemplates: [], + templatePriority: 200, + hidden: true, + }); + expect(templateWithHidden.data_stream.hidden).toEqual(true); + + const templateWithoutHidden = getTemplate({ + type: 'logs', + templateIndexPattern, + packageName: 'nginx', + fields: [], + mappings: { properties: {} }, + composedOfTemplates: [], + templatePriority: 200, + }); + expect(templateWithoutHidden.data_stream.hidden).toEqual(undefined); }); - expect(template).toMatchSnapshot(path.basename(ymlPath)); -}); - -test('tests loading coredns.logs.yml', () => { - const ymlPath = path.join(__dirname, '../../fields/tests/coredns.logs.yml'); - const fieldsYML = readFileSync(ymlPath, 'utf-8'); - const fields: Field[] = safeLoad(fieldsYML); - - const processedFields = processFields(fields); - const mappings = generateMappings(processedFields); - const template = getTemplate({ - type: 'logs', - templateIndexPattern: 'foo-*', - packageName: 'coredns', - mappings, - composedOfTemplates: [], - templatePriority: 200, + it('tests loading base.yml', () => { + const ymlPath = path.join(__dirname, '../../fields/tests/base.yml'); + const fieldsYML = readFileSync(ymlPath, 'utf-8'); + const fields: Field[] = safeLoad(fieldsYML); + + const processedFields = processFields(fields); + const mappings = generateMappings(processedFields); + const template = getTemplate({ + type: 'logs', + templateIndexPattern: 'foo-*', + packageName: 'nginx', + fields: processedFields, + mappings, + composedOfTemplates: [], + templatePriority: 200, + }); + + expect(template).toMatchSnapshot(path.basename(ymlPath)); }); - expect(template).toMatchSnapshot(path.basename(ymlPath)); -}); - -test('tests loading system.yml', () => { - const ymlPath = path.join(__dirname, '../../fields/tests/system.yml'); - const fieldsYML = readFileSync(ymlPath, 'utf-8'); - const fields: Field[] = safeLoad(fieldsYML); - - const processedFields = processFields(fields); - const mappings = generateMappings(processedFields); - const template = getTemplate({ - type: 'metrics', - templateIndexPattern: 'whatsthis-*', - packageName: 'system', - mappings, - composedOfTemplates: [], - templatePriority: 200, + it('tests loading coredns.logs.yml', () => { + const ymlPath = path.join(__dirname, '../../fields/tests/coredns.logs.yml'); + const fieldsYML = readFileSync(ymlPath, 'utf-8'); + const fields: Field[] = safeLoad(fieldsYML); + + const processedFields = processFields(fields); + const mappings = generateMappings(processedFields); + const template = getTemplate({ + type: 'logs', + templateIndexPattern: 'foo-*', + packageName: 'coredns', + fields: processedFields, + mappings, + composedOfTemplates: [], + templatePriority: 200, + }); + + expect(template).toMatchSnapshot(path.basename(ymlPath)); }); - expect(template).toMatchSnapshot(path.basename(ymlPath)); -}); + it('tests loading system.yml', () => { + const ymlPath = path.join(__dirname, '../../fields/tests/system.yml'); + const fieldsYML = readFileSync(ymlPath, 'utf-8'); + const fields: Field[] = safeLoad(fieldsYML); + + const processedFields = processFields(fields); + const mappings = generateMappings(processedFields); + const template = getTemplate({ + type: 'metrics', + templateIndexPattern: 'whatsthis-*', + packageName: 'system', + fields: processedFields, + mappings, + composedOfTemplates: [], + templatePriority: 200, + }); + + expect(template).toMatchSnapshot(path.basename(ymlPath)); + }); -test('tests processing text field with multi fields', () => { - const textWithMultiFieldsLiteralYml = ` + it('tests processing text field with multi fields', () => { + const textWithMultiFieldsLiteralYml = ` - name: textWithMultiFields type: text multi_fields: @@ -163,30 +182,30 @@ test('tests processing text field with multi fields', () => { - name: indexed type: text `; - const textWithMultiFieldsMapping = { - properties: { - textWithMultiFields: { - type: 'text', - fields: { - raw: { - ignore_above: 1024, - type: 'keyword', - }, - indexed: { - type: 'text', + const textWithMultiFieldsMapping = { + properties: { + textWithMultiFields: { + type: 'text', + fields: { + raw: { + ignore_above: 1024, + type: 'keyword', + }, + indexed: { + type: 'text', + }, }, }, }, - }, - }; - const fields: Field[] = safeLoad(textWithMultiFieldsLiteralYml); - const processedFields = processFields(fields); - const mappings = generateMappings(processedFields); - expect(mappings).toEqual(textWithMultiFieldsMapping); -}); + }; + const fields: Field[] = safeLoad(textWithMultiFieldsLiteralYml); + const processedFields = processFields(fields); + const mappings = generateMappings(processedFields); + expect(mappings).toEqual(textWithMultiFieldsMapping); + }); -test('tests processing keyword field with multi fields', () => { - const keywordWithMultiFieldsLiteralYml = ` + it('tests processing keyword field with multi fields', () => { + const keywordWithMultiFieldsLiteralYml = ` - name: keywordWithMultiFields type: keyword multi_fields: @@ -196,31 +215,31 @@ test('tests processing keyword field with multi fields', () => { type: text `; - const keywordWithMultiFieldsMapping = { - properties: { - keywordWithMultiFields: { - ignore_above: 1024, - type: 'keyword', - fields: { - raw: { - ignore_above: 1024, - type: 'keyword', - }, - indexed: { - type: 'text', + const keywordWithMultiFieldsMapping = { + properties: { + keywordWithMultiFields: { + ignore_above: 1024, + type: 'keyword', + fields: { + raw: { + ignore_above: 1024, + type: 'keyword', + }, + indexed: { + type: 'text', + }, }, }, }, - }, - }; - const fields: Field[] = safeLoad(keywordWithMultiFieldsLiteralYml); - const processedFields = processFields(fields); - const mappings = generateMappings(processedFields); - expect(mappings).toEqual(keywordWithMultiFieldsMapping); -}); + }; + const fields: Field[] = safeLoad(keywordWithMultiFieldsLiteralYml); + const processedFields = processFields(fields); + const mappings = generateMappings(processedFields); + expect(mappings).toEqual(keywordWithMultiFieldsMapping); + }); -test('tests processing keyword field with multi fields with analyzed text field', () => { - const keywordWithAnalyzedMultiFieldsLiteralYml = ` + it('tests processing keyword field with multi fields with analyzed text field', () => { + const keywordWithAnalyzedMultiFieldsLiteralYml = ` - name: keywordWithAnalyzedMultiField type: keyword multi_fields: @@ -230,29 +249,29 @@ test('tests processing keyword field with multi fields with analyzed text field' search_analyzer: standard `; - const keywordWithAnalyzedMultiFieldsMapping = { - properties: { - keywordWithAnalyzedMultiField: { - ignore_above: 1024, - type: 'keyword', - fields: { - analyzed: { - analyzer: 'autocomplete', - search_analyzer: 'standard', - type: 'text', + const keywordWithAnalyzedMultiFieldsMapping = { + properties: { + keywordWithAnalyzedMultiField: { + ignore_above: 1024, + type: 'keyword', + fields: { + analyzed: { + analyzer: 'autocomplete', + search_analyzer: 'standard', + type: 'text', + }, }, }, }, - }, - }; - const fields: Field[] = safeLoad(keywordWithAnalyzedMultiFieldsLiteralYml); - const processedFields = processFields(fields); - const mappings = generateMappings(processedFields); - expect(mappings).toEqual(keywordWithAnalyzedMultiFieldsMapping); -}); + }; + const fields: Field[] = safeLoad(keywordWithAnalyzedMultiFieldsLiteralYml); + const processedFields = processFields(fields); + const mappings = generateMappings(processedFields); + expect(mappings).toEqual(keywordWithAnalyzedMultiFieldsMapping); + }); -test('tests processing keyword field with multi fields with normalized keyword field', () => { - const keywordWithNormalizedMultiFieldsLiteralYml = ` + it('tests processing keyword field with multi fields with normalized keyword field', () => { + const keywordWithNormalizedMultiFieldsLiteralYml = ` - name: keywordWithNormalizedMultiField type: keyword multi_fields: @@ -261,235 +280,235 @@ test('tests processing keyword field with multi fields with normalized keyword f normalizer: lowercase `; - const keywordWithNormalizedMultiFieldsMapping = { - properties: { - keywordWithNormalizedMultiField: { - ignore_above: 1024, - type: 'keyword', - fields: { - normalized: { - type: 'keyword', - ignore_above: 1024, - normalizer: 'lowercase', + const keywordWithNormalizedMultiFieldsMapping = { + properties: { + keywordWithNormalizedMultiField: { + ignore_above: 1024, + type: 'keyword', + fields: { + normalized: { + type: 'keyword', + ignore_above: 1024, + normalizer: 'lowercase', + }, }, }, }, - }, - }; - const fields: Field[] = safeLoad(keywordWithNormalizedMultiFieldsLiteralYml); - const processedFields = processFields(fields); - const mappings = generateMappings(processedFields); - expect(mappings).toEqual(keywordWithNormalizedMultiFieldsMapping); -}); + }; + const fields: Field[] = safeLoad(keywordWithNormalizedMultiFieldsLiteralYml); + const processedFields = processFields(fields); + const mappings = generateMappings(processedFields); + expect(mappings).toEqual(keywordWithNormalizedMultiFieldsMapping); + }); -test('tests processing object field with no other attributes', () => { - const objectFieldLiteralYml = ` + it('tests processing object field with no other attributes', () => { + const objectFieldLiteralYml = ` - name: objectField type: object `; - const objectFieldMapping = { - properties: { - objectField: { - type: 'object', + const objectFieldMapping = { + properties: { + objectField: { + type: 'object', + }, }, - }, - }; - const fields: Field[] = safeLoad(objectFieldLiteralYml); - const processedFields = processFields(fields); - const mappings = generateMappings(processedFields); - expect(mappings).toEqual(objectFieldMapping); -}); + }; + const fields: Field[] = safeLoad(objectFieldLiteralYml); + const processedFields = processFields(fields); + const mappings = generateMappings(processedFields); + expect(mappings).toEqual(objectFieldMapping); + }); -test('tests processing object field with enabled set to false', () => { - const objectFieldEnabledFalseLiteralYml = ` + it('tests processing object field with enabled set to false', () => { + const objectFieldEnabledFalseLiteralYml = ` - name: objectField type: object enabled: false `; - const objectFieldEnabledFalseMapping = { - properties: { - objectField: { - type: 'object', - enabled: false, + const objectFieldEnabledFalseMapping = { + properties: { + objectField: { + type: 'object', + enabled: false, + }, }, - }, - }; - const fields: Field[] = safeLoad(objectFieldEnabledFalseLiteralYml); - const processedFields = processFields(fields); - const mappings = generateMappings(processedFields); - expect(mappings).toEqual(objectFieldEnabledFalseMapping); -}); + }; + const fields: Field[] = safeLoad(objectFieldEnabledFalseLiteralYml); + const processedFields = processFields(fields); + const mappings = generateMappings(processedFields); + expect(mappings).toEqual(objectFieldEnabledFalseMapping); + }); -test('tests processing object field with dynamic set to false', () => { - const objectFieldDynamicFalseLiteralYml = ` + it('tests processing object field with dynamic set to false', () => { + const objectFieldDynamicFalseLiteralYml = ` - name: objectField type: object dynamic: false `; - const objectFieldDynamicFalseMapping = { - properties: { - objectField: { - type: 'object', - dynamic: false, + const objectFieldDynamicFalseMapping = { + properties: { + objectField: { + type: 'object', + dynamic: false, + }, }, - }, - }; - const fields: Field[] = safeLoad(objectFieldDynamicFalseLiteralYml); - const processedFields = processFields(fields); - const mappings = generateMappings(processedFields); - expect(mappings).toEqual(objectFieldDynamicFalseMapping); -}); + }; + const fields: Field[] = safeLoad(objectFieldDynamicFalseLiteralYml); + const processedFields = processFields(fields); + const mappings = generateMappings(processedFields); + expect(mappings).toEqual(objectFieldDynamicFalseMapping); + }); -test('tests processing object field with dynamic set to true', () => { - const objectFieldDynamicTrueLiteralYml = ` + it('tests processing object field with dynamic set to true', () => { + const objectFieldDynamicTrueLiteralYml = ` - name: objectField type: object dynamic: true `; - const objectFieldDynamicTrueMapping = { - properties: { - objectField: { - type: 'object', - dynamic: true, + const objectFieldDynamicTrueMapping = { + properties: { + objectField: { + type: 'object', + dynamic: true, + }, }, - }, - }; - const fields: Field[] = safeLoad(objectFieldDynamicTrueLiteralYml); - const processedFields = processFields(fields); - const mappings = generateMappings(processedFields); - expect(mappings).toEqual(objectFieldDynamicTrueMapping); -}); + }; + const fields: Field[] = safeLoad(objectFieldDynamicTrueLiteralYml); + const processedFields = processFields(fields); + const mappings = generateMappings(processedFields); + expect(mappings).toEqual(objectFieldDynamicTrueMapping); + }); -test('tests processing object field with dynamic set to strict', () => { - const objectFieldDynamicStrictLiteralYml = ` + it('tests processing object field with dynamic set to strict', () => { + const objectFieldDynamicStrictLiteralYml = ` - name: objectField type: object dynamic: strict `; - const objectFieldDynamicStrictMapping = { - properties: { - objectField: { - type: 'object', - dynamic: 'strict', + const objectFieldDynamicStrictMapping = { + properties: { + objectField: { + type: 'object', + dynamic: 'strict', + }, }, - }, - }; - const fields: Field[] = safeLoad(objectFieldDynamicStrictLiteralYml); - const processedFields = processFields(fields); - const mappings = generateMappings(processedFields); - expect(mappings).toEqual(objectFieldDynamicStrictMapping); -}); + }; + const fields: Field[] = safeLoad(objectFieldDynamicStrictLiteralYml); + const processedFields = processFields(fields); + const mappings = generateMappings(processedFields); + expect(mappings).toEqual(objectFieldDynamicStrictMapping); + }); -test('tests processing object field with property', () => { - const objectFieldWithPropertyLiteralYml = ` + it('tests processing object field with property', () => { + const objectFieldWithPropertyLiteralYml = ` - name: a type: object - name: a.b type: keyword `; - const objectFieldWithPropertyMapping = { - properties: { - a: { - properties: { - b: { - ignore_above: 1024, - type: 'keyword', + const objectFieldWithPropertyMapping = { + properties: { + a: { + properties: { + b: { + ignore_above: 1024, + type: 'keyword', + }, }, }, }, - }, - }; - const fields: Field[] = safeLoad(objectFieldWithPropertyLiteralYml); - const processedFields = processFields(fields); - const mappings = generateMappings(processedFields); - expect(mappings).toEqual(objectFieldWithPropertyMapping); -}); + }; + const fields: Field[] = safeLoad(objectFieldWithPropertyLiteralYml); + const processedFields = processFields(fields); + const mappings = generateMappings(processedFields); + expect(mappings).toEqual(objectFieldWithPropertyMapping); + }); -test('tests processing object field with property, reverse order', () => { - const objectFieldWithPropertyReversedLiteralYml = ` + it('tests processing object field with property, reverse order', () => { + const objectFieldWithPropertyReversedLiteralYml = ` - name: a.b type: keyword - name: a type: object dynamic: false `; - const objectFieldWithPropertyReversedMapping = { - properties: { - a: { - dynamic: false, - properties: { - b: { - ignore_above: 1024, - type: 'keyword', + const objectFieldWithPropertyReversedMapping = { + properties: { + a: { + dynamic: false, + properties: { + b: { + ignore_above: 1024, + type: 'keyword', + }, }, }, }, - }, - }; - const fields: Field[] = safeLoad(objectFieldWithPropertyReversedLiteralYml); - const processedFields = processFields(fields); - const mappings = generateMappings(processedFields); - expect(mappings).toEqual(objectFieldWithPropertyReversedMapping); -}); + }; + const fields: Field[] = safeLoad(objectFieldWithPropertyReversedLiteralYml); + const processedFields = processFields(fields); + const mappings = generateMappings(processedFields); + expect(mappings).toEqual(objectFieldWithPropertyReversedMapping); + }); -test('tests processing nested field with property', () => { - const nestedYaml = ` + it('tests processing nested field with property', () => { + const nestedYaml = ` - name: a.b type: keyword - name: a type: nested dynamic: false `; - const expectedMapping = { - properties: { - a: { - dynamic: false, - type: 'nested', - properties: { - b: { - ignore_above: 1024, - type: 'keyword', + const expectedMapping = { + properties: { + a: { + dynamic: false, + type: 'nested', + properties: { + b: { + ignore_above: 1024, + type: 'keyword', + }, }, }, }, - }, - }; - const fields: Field[] = safeLoad(nestedYaml); - const processedFields = processFields(fields); - const mappings = generateMappings(processedFields); - expect(mappings).toEqual(expectedMapping); -}); + }; + const fields: Field[] = safeLoad(nestedYaml); + const processedFields = processFields(fields); + const mappings = generateMappings(processedFields); + expect(mappings).toEqual(expectedMapping); + }); -test('tests processing nested field with property, nested field first', () => { - const nestedYaml = ` + it('tests processing nested field with property, nested field first', () => { + const nestedYaml = ` - name: a type: nested include_in_parent: true - name: a.b type: keyword `; - const expectedMapping = { - properties: { - a: { - include_in_parent: true, - type: 'nested', - properties: { - b: { - ignore_above: 1024, - type: 'keyword', + const expectedMapping = { + properties: { + a: { + include_in_parent: true, + type: 'nested', + properties: { + b: { + ignore_above: 1024, + type: 'keyword', + }, }, }, }, - }, - }; - const fields: Field[] = safeLoad(nestedYaml); - const processedFields = processFields(fields); - const mappings = generateMappings(processedFields); - expect(mappings).toEqual(expectedMapping); -}); + }; + const fields: Field[] = safeLoad(nestedYaml); + const processedFields = processFields(fields); + const mappings = generateMappings(processedFields); + expect(mappings).toEqual(expectedMapping); + }); -test('tests processing nested leaf field with properties', () => { - const nestedYaml = ` + it('tests processing nested leaf field with properties', () => { + const nestedYaml = ` - name: a type: object dynamic: false @@ -497,98 +516,99 @@ test('tests processing nested leaf field with properties', () => { type: nested enabled: false `; - const expectedMapping = { - properties: { - a: { - dynamic: false, - properties: { - b: { - enabled: false, - type: 'nested', + const expectedMapping = { + properties: { + a: { + dynamic: false, + properties: { + b: { + enabled: false, + type: 'nested', + }, }, }, }, - }, - }; - const fields: Field[] = safeLoad(nestedYaml); - const processedFields = processFields(fields); - const mappings = generateMappings(processedFields); - expect(mappings).toEqual(expectedMapping); -}); + }; + const fields: Field[] = safeLoad(nestedYaml); + const processedFields = processFields(fields); + const mappings = generateMappings(processedFields); + expect(mappings).toEqual(expectedMapping); + }); -test('tests constant_keyword field type handling', () => { - const constantKeywordLiteralYaml = ` + it('tests constant_keyword field type handling', () => { + const constantKeywordLiteralYaml = ` - name: constantKeyword type: constant_keyword `; - const constantKeywordMapping = { - properties: { - constantKeyword: { - type: 'constant_keyword', + const constantKeywordMapping = { + properties: { + constantKeyword: { + type: 'constant_keyword', + }, }, - }, - }; - const fields: Field[] = safeLoad(constantKeywordLiteralYaml); - const processedFields = processFields(fields); - const mappings = generateMappings(processedFields); - expect(JSON.stringify(mappings)).toEqual(JSON.stringify(constantKeywordMapping)); -}); + }; + const fields: Field[] = safeLoad(constantKeywordLiteralYaml); + const processedFields = processFields(fields); + const mappings = generateMappings(processedFields); + expect(JSON.stringify(mappings)).toEqual(JSON.stringify(constantKeywordMapping)); + }); -test('tests priority and index pattern for data stream without dataset_is_prefix', () => { - const dataStreamDatasetIsPrefixUnset = { - type: 'metrics', - dataset: 'package.dataset', - title: 'test data stream', - release: 'experimental', - package: 'package', - path: 'path', - ingest_pipeline: 'default', - } as RegistryDataStream; - const templateIndexPatternDatasetIsPrefixUnset = 'metrics-package.dataset-*'; - const templatePriorityDatasetIsPrefixUnset = 200; - const templateIndexPattern = generateTemplateIndexPattern(dataStreamDatasetIsPrefixUnset); - const templatePriority = getTemplatePriority(dataStreamDatasetIsPrefixUnset); - - expect(templateIndexPattern).toEqual(templateIndexPatternDatasetIsPrefixUnset); - expect(templatePriority).toEqual(templatePriorityDatasetIsPrefixUnset); -}); + it('tests priority and index pattern for data stream without dataset_is_prefix', () => { + const dataStreamDatasetIsPrefixUnset = { + type: 'metrics', + dataset: 'package.dataset', + title: 'test data stream', + release: 'experimental', + package: 'package', + path: 'path', + ingest_pipeline: 'default', + } as RegistryDataStream; + const templateIndexPatternDatasetIsPrefixUnset = 'metrics-package.dataset-*'; + const templatePriorityDatasetIsPrefixUnset = 200; + const templateIndexPattern = generateTemplateIndexPattern(dataStreamDatasetIsPrefixUnset); + const templatePriority = getTemplatePriority(dataStreamDatasetIsPrefixUnset); + + expect(templateIndexPattern).toEqual(templateIndexPatternDatasetIsPrefixUnset); + expect(templatePriority).toEqual(templatePriorityDatasetIsPrefixUnset); + }); -test('tests priority and index pattern for data stream with dataset_is_prefix set to false', () => { - const dataStreamDatasetIsPrefixFalse = { - type: 'metrics', - dataset: 'package.dataset', - title: 'test data stream', - release: 'experimental', - package: 'package', - path: 'path', - ingest_pipeline: 'default', - dataset_is_prefix: false, - } as RegistryDataStream; - const templateIndexPatternDatasetIsPrefixFalse = 'metrics-package.dataset-*'; - const templatePriorityDatasetIsPrefixFalse = 200; - const templateIndexPattern = generateTemplateIndexPattern(dataStreamDatasetIsPrefixFalse); - const templatePriority = getTemplatePriority(dataStreamDatasetIsPrefixFalse); - - expect(templateIndexPattern).toEqual(templateIndexPatternDatasetIsPrefixFalse); - expect(templatePriority).toEqual(templatePriorityDatasetIsPrefixFalse); -}); + it('tests priority and index pattern for data stream with dataset_is_prefix set to false', () => { + const dataStreamDatasetIsPrefixFalse = { + type: 'metrics', + dataset: 'package.dataset', + title: 'test data stream', + release: 'experimental', + package: 'package', + path: 'path', + ingest_pipeline: 'default', + dataset_is_prefix: false, + } as RegistryDataStream; + const templateIndexPatternDatasetIsPrefixFalse = 'metrics-package.dataset-*'; + const templatePriorityDatasetIsPrefixFalse = 200; + const templateIndexPattern = generateTemplateIndexPattern(dataStreamDatasetIsPrefixFalse); + const templatePriority = getTemplatePriority(dataStreamDatasetIsPrefixFalse); + + expect(templateIndexPattern).toEqual(templateIndexPatternDatasetIsPrefixFalse); + expect(templatePriority).toEqual(templatePriorityDatasetIsPrefixFalse); + }); -test('tests priority and index pattern for data stream with dataset_is_prefix set to true', () => { - const dataStreamDatasetIsPrefixTrue = { - type: 'metrics', - dataset: 'package.dataset', - title: 'test data stream', - release: 'experimental', - package: 'package', - path: 'path', - ingest_pipeline: 'default', - dataset_is_prefix: true, - } as RegistryDataStream; - const templateIndexPatternDatasetIsPrefixTrue = 'metrics-package.dataset.*-*'; - const templatePriorityDatasetIsPrefixTrue = 150; - const templateIndexPattern = generateTemplateIndexPattern(dataStreamDatasetIsPrefixTrue); - const templatePriority = getTemplatePriority(dataStreamDatasetIsPrefixTrue); - - expect(templateIndexPattern).toEqual(templateIndexPatternDatasetIsPrefixTrue); - expect(templatePriority).toEqual(templatePriorityDatasetIsPrefixTrue); + it('tests priority and index pattern for data stream with dataset_is_prefix set to true', () => { + const dataStreamDatasetIsPrefixTrue = { + type: 'metrics', + dataset: 'package.dataset', + title: 'test data stream', + release: 'experimental', + package: 'package', + path: 'path', + ingest_pipeline: 'default', + dataset_is_prefix: true, + } as RegistryDataStream; + const templateIndexPatternDatasetIsPrefixTrue = 'metrics-package.dataset.*-*'; + const templatePriorityDatasetIsPrefixTrue = 150; + const templateIndexPattern = generateTemplateIndexPattern(dataStreamDatasetIsPrefixTrue); + const templatePriority = getTemplatePriority(dataStreamDatasetIsPrefixTrue); + + expect(templateIndexPattern).toEqual(templateIndexPatternDatasetIsPrefixTrue); + expect(templatePriority).toEqual(templatePriorityDatasetIsPrefixTrue); + }); }); diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.ts index a13ad007663d8..01b9a92045b29 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.ts @@ -13,6 +13,7 @@ import type { IndexTemplate, IndexTemplateMappings, } from '../../../../types'; +import { appContextService } from '../../../'; import { getRegistryDataStreamAssetBaseName } from '../index'; interface Properties { @@ -37,6 +38,9 @@ const DEFAULT_IGNORE_ABOVE = 1024; const DEFAULT_TEMPLATE_PRIORITY = 200; const DATASET_IS_PREFIX_TEMPLATE_PRIORITY = 150; +const QUERY_DEFAULT_FIELD_TYPES = ['keyword', 'text']; +const QUERY_DEFAULT_FIELD_LIMIT = 1024; + /** * getTemplate retrieves the default template but overwrites the index pattern with the given value. * @@ -45,6 +49,7 @@ const DATASET_IS_PREFIX_TEMPLATE_PRIORITY = 150; export function getTemplate({ type, templateIndexPattern, + fields, mappings, pipelineName, packageName, @@ -55,6 +60,7 @@ export function getTemplate({ }: { type: string; templateIndexPattern: string; + fields: Fields; mappings: IndexTemplateMappings; pipelineName?: string | undefined; packageName: string; @@ -66,6 +72,7 @@ export function getTemplate({ const template = getBaseTemplate( type, templateIndexPattern, + fields, mappings, packageName, composedOfTemplates, @@ -296,9 +303,28 @@ export function generateESIndexPatterns( return patterns; } +const flattenFieldsToNameAndType = ( + fields: Fields, + path: string = '' +): Array> => { + let newFields: Array> = []; + fields.forEach((field) => { + const fieldName = path ? `${path}.${field.name}` : field.name; + newFields.push({ + name: fieldName, + type: field.type, + }); + if (field.fields && field.fields.length) { + newFields = newFields.concat(flattenFieldsToNameAndType(field.fields, fieldName)); + } + }); + return newFields; +}; + function getBaseTemplate( type: string, templateIndexPattern: string, + fields: Fields, mappings: IndexTemplateMappings, packageName: string, composedOfTemplates: string[], @@ -306,6 +332,8 @@ function getBaseTemplate( ilmPolicy?: string | undefined, hidden?: boolean ): IndexTemplate { + const logger = appContextService.getLogger(); + // Meta information to identify Ingest Manager's managed templates and indices const _meta = { package: { @@ -315,6 +343,21 @@ function getBaseTemplate( managed: true, }; + // Find all field names to set `index.query.default_field` to, which will be + // the first 1024 keyword or text fields + const defaultFields = flattenFieldsToNameAndType(fields).filter( + (field) => field.type && QUERY_DEFAULT_FIELD_TYPES.includes(field.type) + ); + if (defaultFields.length > QUERY_DEFAULT_FIELD_LIMIT) { + logger.warn( + `large amount of default fields detected for index template ${templateIndexPattern} in package ${packageName}, applying the first ${QUERY_DEFAULT_FIELD_LIMIT} fields` + ); + } + const defaultFieldNames = (defaultFields.length > QUERY_DEFAULT_FIELD_LIMIT + ? defaultFields.slice(0, QUERY_DEFAULT_FIELD_LIMIT) + : defaultFields + ).map((field) => field.name); + return { priority: templatePriority, // To be completed with the correct index patterns @@ -338,13 +381,18 @@ function getBaseTemplate( refresh_interval: '5s', // Default in the stack now, still good to have it in number_of_shards: '1', - // All the default fields which should be queried have to be added here. - // So far we add all keyword and text fields here. - query: { - default_field: ['message'], - }, // We are setting 30 because it can be devided by several numbers. Useful when shrinking. number_of_routing_shards: '30', + // All the default fields which should be queried have to be added here. + // So far we add all keyword and text fields here if there are any, otherwise + // this setting is skipped. + ...(defaultFieldNames.length + ? { + query: { + default_field: defaultFieldNames, + }, + } + : {}), }, }, mappings: { diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/install.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/install.ts index e68c5070affd3..16b543846baee 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/install.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/install.ts @@ -6,17 +6,19 @@ */ import type { SavedObjectsClientContract } from 'kibana/server'; + import { saveInstalledEsRefs } from '../../packages/install'; import { getPathParts } from '../../archive'; import { ElasticsearchAssetType } from '../../../../../common/types/models'; import type { EsAssetReference, InstallablePackage } from '../../../../../common/types/models'; import type { CallESAsCurrentUser } from '../../../../types'; import { getInstallation } from '../../packages'; -import { deleteTransforms, deleteTransformRefs } from './remove'; -import { getAsset } from './common'; import { appContextService } from '../../../app_context'; import { isLegacyESClientError } from '../../../../errors'; +import { deleteTransforms, deleteTransformRefs } from './remove'; +import { getAsset } from './common'; + interface TransformInstallation { installationName: string; content: string; diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/remove.test.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/remove.test.ts index 6df9f34489aeb..5f1d8db121a41 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/remove.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/remove.test.ts @@ -6,11 +6,14 @@ */ import type { SavedObjectsClientContract } from 'kibana/server'; + // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { savedObjectsClientMock } from '../../../../../../../../src/core/server/saved_objects/service/saved_objects_client.mock'; -import { deleteTransformRefs } from './remove'; + import type { EsAssetReference } from '../../../../../common/types/models'; +import { deleteTransformRefs } from './remove'; + describe('test transform install', () => { let savedObjectsClient: jest.Mocked; beforeEach(() => { diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/remove.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/remove.ts index 510071f119910..2611978be20a2 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/remove.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/remove.ts @@ -6,6 +6,7 @@ */ import type { SavedObjectsClientContract } from 'kibana/server'; + import { ElasticsearchAssetType } from '../../../../types'; import type { CallESAsCurrentUser, EsAssetReference } from '../../../../types'; import { PACKAGES_SAVED_OBJECT_TYPE } from '../../../../../common/constants'; diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transform.test.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transform.test.ts index 602908c5908e5..254196b4af053 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transform.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transform.test.ts @@ -5,6 +5,7 @@ * 2.0. */ +// eslint-disable-next-line import/order import { createAppContextStartContractMock } from '../../../../mocks'; jest.mock('../../packages/get', () => { @@ -18,20 +19,23 @@ jest.mock('./common', () => { }); import { errors as LegacyESErrors } from 'elasticsearch'; -import { installTransform } from './install'; + import type { ILegacyScopedClusterClient, SavedObject, SavedObjectsClientContract, } from 'kibana/server'; + import { ElasticsearchAssetType } from '../../../../types'; import type { Installation, RegistryPackage } from '../../../../types'; import { getInstallation, getInstallationObject } from '../../packages'; -import { getAsset } from './common'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { savedObjectsClientMock } from '../../../../../../../../src/core/server/saved_objects/service/saved_objects_client.mock'; import { appContextService } from '../../../app_context'; +import { getAsset } from './common'; +import { installTransform } from './install'; + describe('test transform install', () => { let legacyScopedClusterClient: jest.Mocked; let savedObjectsClient: jest.Mocked; diff --git a/x-pack/plugins/fleet/server/services/epm/fields/field.test.ts b/x-pack/plugins/fleet/server/services/epm/fields/field.test.ts index 21c0fc52f6b3f..8be5f4655b480 100644 --- a/x-pack/plugins/fleet/server/services/epm/fields/field.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/fields/field.test.ts @@ -6,9 +6,11 @@ */ import { readFileSync } from 'fs'; +import path from 'path'; + import glob from 'glob'; import { safeLoad } from 'js-yaml'; -import path from 'path'; + import { getField, processFields } from './field'; import type { Field, Fields } from './field'; diff --git a/x-pack/plugins/fleet/server/services/epm/fields/field.ts b/x-pack/plugins/fleet/server/services/epm/fields/field.ts index 7144a4ca4e7f0..addcaf20cd146 100644 --- a/x-pack/plugins/fleet/server/services/epm/fields/field.ts +++ b/x-pack/plugins/fleet/server/services/epm/fields/field.ts @@ -6,6 +6,7 @@ */ import { safeLoad } from 'js-yaml'; + import type { InstallablePackage } from '../../../types'; import { getAssetsData } from '../packages/assets'; diff --git a/x-pack/plugins/fleet/server/services/epm/kibana/assets/install.ts b/x-pack/plugins/fleet/server/services/epm/kibana/assets/install.ts index a004bf0f21f62..4196138a2534f 100644 --- a/x-pack/plugins/fleet/server/services/epm/kibana/assets/install.ts +++ b/x-pack/plugins/fleet/server/services/epm/kibana/assets/install.ts @@ -10,6 +10,7 @@ import type { SavedObjectsBulkCreateObject, SavedObjectsClientContract, } from 'src/core/server'; + import { PACKAGES_SAVED_OBJECT_TYPE } from '../../../../../common'; import { getAsset, getPathParts } from '../../archive'; import { KibanaAssetType, KibanaSavedObjectType } from '../../../../types'; diff --git a/x-pack/plugins/fleet/server/services/epm/kibana/index_pattern/install.test.ts b/x-pack/plugins/fleet/server/services/epm/kibana/index_pattern/install.test.ts index e6d36235f0384..a0eaed04d649e 100644 --- a/x-pack/plugins/fleet/server/services/epm/kibana/index_pattern/install.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/kibana/index_pattern/install.test.ts @@ -7,8 +7,12 @@ import path from 'path'; import { readFileSync } from 'fs'; + import glob from 'glob'; import { safeLoad } from 'js-yaml'; + +import type { Fields, Field } from '../../fields/field'; + import { flattenFields, dedupeFields, @@ -19,7 +23,6 @@ import { createIndexPattern, } from './install'; import type { IndexPatternField } from './install'; -import type { Fields, Field } from '../../fields/field'; import { dupeFields } from './tests/test_data'; // Add our own serialiser to just do JSON.stringify diff --git a/x-pack/plugins/fleet/server/services/epm/kibana/index_pattern/install.ts b/x-pack/plugins/fleet/server/services/epm/kibana/index_pattern/install.ts index f45eeab8bc2ba..3ec9d2c65a6da 100644 --- a/x-pack/plugins/fleet/server/services/epm/kibana/index_pattern/install.ts +++ b/x-pack/plugins/fleet/server/services/epm/kibana/index_pattern/install.ts @@ -6,6 +6,7 @@ */ import type { SavedObjectsClientContract } from 'src/core/server'; + import { INDEX_PATTERN_SAVED_OBJECT_TYPE } from '../../../../constants'; import { loadFieldsFromYaml } from '../../fields/field'; import type { Fields, Field } from '../../fields/field'; diff --git a/x-pack/plugins/fleet/server/services/epm/packages/_install_package.test.ts b/x-pack/plugins/fleet/server/services/epm/packages/_install_package.test.ts index cf928d5b80d63..97c29ebff145a 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/_install_package.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/_install_package.test.ts @@ -8,6 +8,7 @@ import { LegacyScopedClusterClient } from 'src/core/server'; import type { SavedObjectsClientContract } from 'src/core/server'; import { savedObjectsClientMock, elasticsearchServiceMock } from 'src/core/server/mocks'; + import { appContextService } from '../../app_context'; import { createAppContextStartContractMock } from '../../../mocks'; @@ -20,6 +21,7 @@ jest.mock('./get'); import { updateCurrentWriteIndices } from '../elasticsearch/template/template'; import { installKibanaAssets } from '../kibana/assets/install'; import { installIndexPatterns } from '../kibana/index_pattern/install'; + import { _installPackage } from './_install_package'; const mockedUpdateCurrentWriteIndices = updateCurrentWriteIndices as jest.MockedFunction< diff --git a/x-pack/plugins/fleet/server/services/epm/packages/_install_package.ts b/x-pack/plugins/fleet/server/services/epm/packages/_install_package.ts index 206bef75df14b..2774149f252e3 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/_install_package.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/_install_package.ts @@ -6,6 +6,7 @@ */ import type { SavedObject, SavedObjectsClientContract } from 'src/core/server'; + import { MAX_TIME_COMPLETE_INSTALL, ASSETS_SAVED_OBJECT_TYPE } from '../../../../common'; import type { InstallablePackage, InstallSource, PackageAssetReference } from '../../../../common'; import { PACKAGES_SAVED_OBJECT_TYPE } from '../../../constants'; @@ -22,13 +23,14 @@ import { installPipelines, deletePreviousPipelines } from '../elasticsearch/inge import { installILMPolicy } from '../elasticsearch/ilm/install'; import { installKibanaAssets, getKibanaAssets } from '../kibana/assets/install'; import { updateCurrentWriteIndices } from '../elasticsearch/template/template'; -import { deleteKibanaSavedObjectsAssets } from './remove'; import { installTransform } from '../elasticsearch/transform/install'; -import { createInstallation, saveKibanaAssetsRefs, updateVersion } from './install'; import { installIlmForDataStream } from '../elasticsearch/datastream_ilm/install'; import { saveArchiveEntries } from '../archive/storage'; import { ConcurrentInstallOperationError } from '../../../errors'; +import { createInstallation, saveKibanaAssetsRefs, updateVersion } from './install'; +import { deleteKibanaSavedObjectsAssets } from './remove'; + // this is only exported for testing // use a leading underscore to indicate it's not the supported path // only the more explicit `installPackage*` functions should be used diff --git a/x-pack/plugins/fleet/server/services/epm/packages/assets.test.ts b/x-pack/plugins/fleet/server/services/epm/packages/assets.test.ts index 6e5c257badef7..999cf878d07b7 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/assets.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/assets.test.ts @@ -6,9 +6,11 @@ */ import type { InstallablePackage } from '../../../types'; -import { getAssets } from './assets'; + import { getArchiveFilelist } from '../archive/cache'; +import { getAssets } from './assets'; + jest.mock('../archive/cache', () => { return { getArchiveFilelist: jest.fn(), diff --git a/x-pack/plugins/fleet/server/services/epm/packages/bulk_install_packages.ts b/x-pack/plugins/fleet/server/services/epm/packages/bulk_install_packages.ts index 64fd132145ffc..e6df3d5e7a83d 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/bulk_install_packages.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/bulk_install_packages.ts @@ -6,8 +6,10 @@ */ import type { SavedObjectsClientContract } from 'src/core/server'; + import type { CallESAsCurrentUser } from '../../../types'; import * as Registry from '../registry'; + import { getInstallationObject } from './index'; import { upgradePackage } from './install'; import type { BulkInstallResponse, IBulkInstallPackageError } from './install'; diff --git a/x-pack/plugins/fleet/server/services/epm/packages/ensure_installed_default_packages.test.ts b/x-pack/plugins/fleet/server/services/epm/packages/ensure_installed_default_packages.test.ts index 6c2a98450c1a7..e01af7b64c0e3 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/ensure_installed_default_packages.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/ensure_installed_default_packages.test.ts @@ -5,24 +5,28 @@ * 2.0. */ +import type { SavedObject, SavedObjectsClientContract } from 'src/core/server'; + import { ElasticsearchAssetType, KibanaSavedObjectType } from '../../../types'; import type { Installation } from '../../../types'; -import type { SavedObject, SavedObjectsClientContract } from 'src/core/server'; jest.mock('./install'); jest.mock('./bulk_install_packages'); jest.mock('./get'); -import { bulkInstallPackages, isBulkInstallError } from './bulk_install_packages'; const { ensureInstalledDefaultPackages } = jest.requireActual('./install'); const { isBulkInstallError: actualIsBulkInstallError } = jest.requireActual( './bulk_install_packages' ); -import { getInstallation } from './get'; +// eslint-disable-next-line import/order import { savedObjectsClientMock } from 'src/core/server/mocks'; + import { appContextService } from '../../app_context'; import { createAppContextStartContractMock } from '../../../mocks'; +import { getInstallation } from './get'; +import { bulkInstallPackages, isBulkInstallError } from './bulk_install_packages'; + // if we add this assertion, TS will type check the return value // and the editor will also know about .mockImplementation, .mock.calls, etc const mockedBulkInstallPackages = bulkInstallPackages as jest.MockedFunction< diff --git a/x-pack/plugins/fleet/server/services/epm/packages/get.test.ts b/x-pack/plugins/fleet/server/services/epm/packages/get.test.ts index 354bcf88685cb..9be22e7618466 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/get.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/get.test.ts @@ -6,9 +6,11 @@ */ import type { SavedObjectsClientContract, SavedObjectsFindResult } from 'kibana/server'; + import { savedObjectsClientMock } from '../../../../../../../src/core/server/mocks'; import { PACKAGE_POLICY_SAVED_OBJECT_TYPE } from '../../../../common'; import type { PackagePolicySOAttributes } from '../../../../common'; + import { getPackageUsageStats } from './get'; describe('When using EPM `get` services', () => { 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 a32ac2ad4d88f..05c46fe409ad4 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/get.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/get.ts @@ -6,6 +6,7 @@ */ import type { SavedObjectsClientContract, SavedObjectsFindOptions } from 'src/core/server'; + import { isPackageLimited, installationStatuses, @@ -22,11 +23,12 @@ import { KibanaAssetType } from '../../../types'; import type { Installation, PackageInfo } from '../../../types'; import { IngestManagerError } from '../../../errors'; import * as Registry from '../registry'; -import { createInstallableFrom, isRequiredPackage } from './index'; import { getEsPackage } from '../archive/storage'; import { getArchivePackage } from '../archive'; import { normalizeKuery } from '../../saved_object'; +import { createInstallableFrom, isRequiredPackage } from './index'; + export { getFile, SearchParams } from '../registry'; function nameAsTitle(name: string) { diff --git a/x-pack/plugins/fleet/server/services/epm/packages/get_install_type.test.ts b/x-pack/plugins/fleet/server/services/epm/packages/get_install_type.test.ts index ae29a1c7956cf..155cd67e60287 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/get_install_type.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/get_install_type.test.ts @@ -5,11 +5,13 @@ * 2.0. */ -import { getInstallType } from './install'; import type { SavedObject } from 'src/core/server'; + import { ElasticsearchAssetType, KibanaSavedObjectType } from '../../../types'; import type { Installation } from '../../../types'; +import { getInstallType } from './install'; + const mockInstallation: SavedObject = { id: 'test-pkg', references: [], diff --git a/x-pack/plugins/fleet/server/services/epm/packages/index.ts b/x-pack/plugins/fleet/server/services/epm/packages/index.ts index 2dc845f94991e..c85376ef177b3 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/index.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/index.ts @@ -6,6 +6,7 @@ */ import type { SavedObject } from 'src/core/server'; + import { requiredPackages, installationStatuses } from '../../../../common'; import type { RequiredPackage, ValueOf } from '../../../../common'; import { KibanaAssetType } from '../../../types'; diff --git a/x-pack/plugins/fleet/server/services/epm/packages/install.ts b/x-pack/plugins/fleet/server/services/epm/packages/install.ts index 96b4b63312edd..5350d67b313c1 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/install.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/install.ts @@ -10,16 +10,16 @@ import semverLt from 'semver/functions/lt'; import Boom from '@hapi/boom'; import type { UnwrapPromise } from '@kbn/utility-types'; import type { SavedObject, SavedObjectsClientContract } from 'src/core/server'; + import { generateESIndexPatterns } from '../elasticsearch/template/template'; -import { - isRequiredPackage, - getInstallation, - getInstallationObject, - bulkInstallPackages, - isBulkInstallError, -} from './index'; + import { defaultPackages } from '../../../../common'; import type { BulkInstallPackageInfo, InstallablePackage, InstallSource } from '../../../../common'; +import { + IngestManagerError, + PackageOperationNotSupportedError, + PackageOutdatedError, +} from '../../../errors'; import { PACKAGES_SAVED_OBJECT_TYPE, MAX_TIME_COMPLETE_INSTALL } from '../../../constants'; import { KibanaAssetType } from '../../../types'; import type { @@ -30,18 +30,21 @@ import type { EsAssetReference, InstallType, } from '../../../types'; +import { appContextService } from '../../app_context'; import * as Registry from '../registry'; import { setPackageInfo, parseAndVerifyArchiveEntries, unpackBufferToCache } from '../archive'; import { toAssetReference } from '../kibana/assets/install'; import type { ArchiveAsset } from '../kibana/assets/install'; -import { removeInstallation } from './remove'; + import { - IngestManagerError, - PackageOperationNotSupportedError, - PackageOutdatedError, -} from '../../../errors'; + isRequiredPackage, + getInstallation, + getInstallationObject, + bulkInstallPackages, + isBulkInstallError, +} from './index'; +import { removeInstallation } from './remove'; import { getPackageSavedObjects } from './get'; -import { appContextService } from '../../app_context'; import { _installPackage } from './_install_package'; export async function installLatestPackage(options: { diff --git a/x-pack/plugins/fleet/server/services/epm/packages/remove.ts b/x-pack/plugins/fleet/server/services/epm/packages/remove.ts index 4d05daaf82500..0648404312ad7 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/remove.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/remove.ts @@ -7,6 +7,7 @@ import type { SavedObjectsClientContract } from 'src/core/server'; import Boom from '@hapi/boom'; + import { PACKAGE_POLICY_SAVED_OBJECT_TYPE, PACKAGES_SAVED_OBJECT_TYPE } from '../../../constants'; import { ElasticsearchAssetType } from '../../../types'; import type { @@ -17,7 +18,6 @@ import type { KibanaAssetReference, Installation, } from '../../../types'; -import { getInstallation, savedObjectTypes } from './index'; import { deletePipeline } from '../elasticsearch/ingest_pipeline/'; import { installIndexPatterns } from '../kibana/index_pattern/install'; import { deleteTransforms } from '../elasticsearch/transform/remove'; @@ -27,6 +27,8 @@ import { deletePackageCache } from '../archive'; import { deleteIlms } from '../elasticsearch/datastream_ilm/remove'; import { removeArchiveEntries } from '../archive/storage'; +import { getInstallation, savedObjectTypes } from './index'; + export async function removeInstallation(options: { savedObjectsClient: SavedObjectsClientContract; pkgkey: string; diff --git a/x-pack/plugins/fleet/server/services/epm/registry/index.test.ts b/x-pack/plugins/fleet/server/services/epm/registry/index.test.ts index e7ac5a0ce912e..16b57e1a9d011 100644 --- a/x-pack/plugins/fleet/server/services/epm/registry/index.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/registry/index.test.ts @@ -7,6 +7,7 @@ import type { AssetParts } from '../../../types'; import { getBufferExtractor, getPathParts, untarBuffer, unzipBuffer } from '../archive'; + import { splitPkgKey } from './index'; const testPaths = [ 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 8c5e2c9530b61..eb0725bf8ac42 100644 --- a/x-pack/plugins/fleet/server/services/epm/registry/index.ts +++ b/x-pack/plugins/fleet/server/services/epm/registry/index.ts @@ -5,10 +5,12 @@ * 2.0. */ +import { URL } from 'url'; + import mime from 'mime-types'; import semverValid from 'semver/functions/valid'; import { Response } from 'node-fetch'; -import { URL } from 'url'; + import { KibanaAssetType } from '../../../types'; import type { AssetsGroupedByServiceByType, @@ -26,12 +28,13 @@ import { getPackageInfo, setPackageInfo, } from '../archive'; -import { fetchUrl, getResponse, getResponseStream } from './requests'; import { streamToBuffer } from '../streams'; -import { getRegistryUrl } from './registry_url'; import { appContextService } from '../..'; import { PackageNotFoundError, PackageCacheError } from '../../../errors'; +import { fetchUrl, getResponse, getResponseStream } from './requests'; +import { getRegistryUrl } from './registry_url'; + export interface SearchParams { category?: CategoryId; experimental?: boolean; diff --git a/x-pack/plugins/fleet/server/services/epm/registry/proxy.test.ts b/x-pack/plugins/fleet/server/services/epm/registry/proxy.test.ts index ebaf17a610dae..7ce8f14c04dba 100644 --- a/x-pack/plugins/fleet/server/services/epm/registry/proxy.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/registry/proxy.test.ts @@ -7,6 +7,7 @@ import HttpProxyAgent from 'http-proxy-agent'; import { HttpsProxyAgent } from 'https-proxy-agent'; + import { getProxyAgent, getProxyAgentOptions } from './proxy'; describe('getProxyAgent', () => { diff --git a/x-pack/plugins/fleet/server/services/epm/registry/proxy.ts b/x-pack/plugins/fleet/server/services/epm/registry/proxy.ts index 0be25da2bca23..3c71fa0859fdb 100644 --- a/x-pack/plugins/fleet/server/services/epm/registry/proxy.ts +++ b/x-pack/plugins/fleet/server/services/epm/registry/proxy.ts @@ -8,6 +8,7 @@ import HttpProxyAgent from 'http-proxy-agent'; import HttpsProxyAgent, { HttpsProxyAgent as IHttpsProxyAgent } from 'https-proxy-agent'; import type { HttpsProxyAgentOptions } from 'https-proxy-agent'; + import { appContextService } from '../../index'; export interface RegistryProxySettings { diff --git a/x-pack/plugins/fleet/server/services/epm/registry/requests.test.ts b/x-pack/plugins/fleet/server/services/epm/registry/requests.test.ts index cd9ba20776b07..e1fac27e52042 100644 --- a/x-pack/plugins/fleet/server/services/epm/registry/requests.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/registry/requests.test.ts @@ -5,8 +5,9 @@ * 2.0. */ -import { fetchUrl } from './requests'; import { RegistryError, RegistryConnectionError, RegistryResponseError } from '../../../errors'; + +import { fetchUrl } from './requests'; jest.mock('node-fetch'); const { Response, FetchError } = jest.requireActual('node-fetch'); diff --git a/x-pack/plugins/fleet/server/services/epm/registry/requests.ts b/x-pack/plugins/fleet/server/services/epm/registry/requests.ts index 1b4abbc7e9b71..eff6927732573 100644 --- a/x-pack/plugins/fleet/server/services/epm/registry/requests.ts +++ b/x-pack/plugins/fleet/server/services/epm/registry/requests.ts @@ -8,9 +8,11 @@ import fetch, { FetchError, Response } from 'node-fetch'; import type { RequestInit } from 'node-fetch'; import pRetry from 'p-retry'; + import { streamToString } from '../streams'; import { appContextService } from '../../app_context'; import { RegistryError, RegistryConnectionError, RegistryResponseError } from '../../../errors'; + import { getProxyAgent, getRegistryProxyUrl } from './proxy'; type FailedAttemptErrors = pRetry.FailedAttemptError | FetchError | Error; diff --git a/x-pack/plugins/fleet/server/services/es_index_pattern.ts b/x-pack/plugins/fleet/server/services/es_index_pattern.ts index 015fb91a9660e..993a8bebe42c7 100644 --- a/x-pack/plugins/fleet/server/services/es_index_pattern.ts +++ b/x-pack/plugins/fleet/server/services/es_index_pattern.ts @@ -6,9 +6,11 @@ */ import type { SavedObjectsClientContract } from 'kibana/server'; -import { getInstallation } from './epm/packages'; + import type { ESIndexPatternService } from '../../server'; +import { getInstallation } from './epm/packages'; + export class ESIndexPatternSavedObjectService implements ESIndexPatternService { public async getESIndexPattern( savedObjectsClient: SavedObjectsClientContract, diff --git a/x-pack/plugins/fleet/server/services/fleet_server/elastic_index.test.ts b/x-pack/plugins/fleet/server/services/fleet_server/elastic_index.test.ts index 310db24b8184d..275ea421a508f 100644 --- a/x-pack/plugins/fleet/server/services/fleet_server/elastic_index.test.ts +++ b/x-pack/plugins/fleet/server/services/fleet_server/elastic_index.test.ts @@ -7,6 +7,9 @@ import { elasticsearchServiceMock } from 'src/core/server/mocks'; import hash from 'object-hash'; + +import { FLEET_SERVER_INDICES } from '../../../common'; + import { setupFleetServerIndexes } from './elastic_index'; import ESFleetAgentIndex from './elasticsearch/fleet_agents.json'; import ESFleetPoliciesIndex from './elasticsearch/fleet_policies.json'; @@ -15,7 +18,6 @@ import ESFleetServersIndex from './elasticsearch/fleet_servers.json'; import ESFleetEnrollmentApiKeysIndex from './elasticsearch/fleet_enrollment_api_keys.json'; import EsFleetActionsIndex from './elasticsearch/fleet_actions.json'; import EsFleetArtifactsIndex from './elasticsearch/fleet_artifacts.json'; -import { FLEET_SERVER_INDICES } from '../../../common'; const FLEET_INDEXES_MIGRATION_HASH: Record = { '.fleet-actions': hash(EsFleetActionsIndex), diff --git a/x-pack/plugins/fleet/server/services/fleet_server/elastic_index.ts b/x-pack/plugins/fleet/server/services/fleet_server/elastic_index.ts index 9722c28d96d23..d58228f57a1b2 100644 --- a/x-pack/plugins/fleet/server/services/fleet_server/elastic_index.ts +++ b/x-pack/plugins/fleet/server/services/fleet_server/elastic_index.ts @@ -10,6 +10,7 @@ import hash from 'object-hash'; import { FLEET_SERVER_INDICES, FLEET_SERVER_INDICES_VERSION } from '../../../common'; import { appContextService } from '../app_context'; + import ESFleetAgentIndex from './elasticsearch/fleet_agents.json'; import ESFleetPoliciesIndex from './elasticsearch/fleet_policies.json'; import ESFleetPoliciesLeaderIndex from './elasticsearch/fleet_policies_leader.json'; diff --git a/x-pack/plugins/fleet/server/services/fleet_server/index.ts b/x-pack/plugins/fleet/server/services/fleet_server/index.ts index 0b54dc0d168b4..d43cbaff26476 100644 --- a/x-pack/plugins/fleet/server/services/fleet_server/index.ts +++ b/x-pack/plugins/fleet/server/services/fleet_server/index.ts @@ -6,8 +6,10 @@ */ import { first } from 'rxjs/operators'; + import { appContextService } from '../app_context'; import { licenseService } from '../license'; + import { setupFleetServerIndexes } from './elastic_index'; import { runFleetServerMigration } from './saved_object_migrations'; diff --git a/x-pack/plugins/fleet/server/services/fleet_server/saved_object_migrations.ts b/x-pack/plugins/fleet/server/services/fleet_server/saved_object_migrations.ts index d160925544adf..fab3ac4a72813 100644 --- a/x-pack/plugins/fleet/server/services/fleet_server/saved_object_migrations.ts +++ b/x-pack/plugins/fleet/server/services/fleet_server/saved_object_migrations.ts @@ -7,6 +7,7 @@ import { isBoom } from '@hapi/boom'; import { KibanaRequest } from 'src/core/server'; + import { ENROLLMENT_API_KEYS_INDEX, ENROLLMENT_API_KEYS_SAVED_OBJECT_TYPE, diff --git a/x-pack/plugins/fleet/server/services/index.ts b/x-pack/plugins/fleet/server/services/index.ts index 3f28a3f987a8e..a3aace9b496f4 100644 --- a/x-pack/plugins/fleet/server/services/index.ts +++ b/x-pack/plugins/fleet/server/services/index.ts @@ -7,7 +7,9 @@ import { KibanaRequest } from 'kibana/server'; import type { ElasticsearchClient, SavedObjectsClientContract } from 'kibana/server'; + import type { AgentStatus, Agent, EsAssetReference } from '../types'; + import { getAgent, listAgents } from './agents'; import { agentPolicyService } from './agent_policy'; import * as settingsService from './settings'; diff --git a/x-pack/plugins/fleet/server/services/install_script/index.ts b/x-pack/plugins/fleet/server/services/install_script/index.ts index d6e36f43e792b..b978eddbfc673 100644 --- a/x-pack/plugins/fleet/server/services/install_script/index.ts +++ b/x-pack/plugins/fleet/server/services/install_script/index.ts @@ -6,6 +6,7 @@ */ import { appContextService } from '../app_context'; + import { macosInstallTemplate } from './install_templates/macos'; import { linuxInstallTemplate } from './install_templates/linux'; diff --git a/x-pack/plugins/fleet/server/services/output.ts b/x-pack/plugins/fleet/server/services/output.ts index 2301570c54cd2..c3850dd1b25b4 100644 --- a/x-pack/plugins/fleet/server/services/output.ts +++ b/x-pack/plugins/fleet/server/services/output.ts @@ -6,11 +6,13 @@ */ import type { SavedObjectsClientContract } from 'src/core/server'; + import type { NewOutput, Output, OutputSOAttributes } from '../types'; import { DEFAULT_OUTPUT, OUTPUT_SAVED_OBJECT_TYPE } from '../constants'; -import { appContextService } from './app_context'; import { decodeCloudId } from '../../common'; +import { appContextService } from './app_context'; + const SAVED_OBJECT_TYPE = OUTPUT_SAVED_OBJECT_TYPE; let cachedAdminUser: null | { username: string; password: string } = null; 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 e8991f2d66647..b5c465e443ea0 100644 --- a/x-pack/plugins/fleet/server/services/package_policy.test.ts +++ b/x-pack/plugins/fleet/server/services/package_policy.test.ts @@ -10,15 +10,19 @@ import { savedObjectsClientMock, httpServerMock, } from 'src/core/server/mocks'; -import { createPackagePolicyMock } from '../../common/mocks'; -import { packagePolicyService } from './package_policy'; -import type { PackageInfo, PackagePolicySOAttributes } from '../types'; + import type { SavedObjectsUpdateResponse } from 'src/core/server'; import { KibanaRequest } from 'kibana/server'; + +import type { PackageInfo, PackagePolicySOAttributes } from '../types'; +import { createPackagePolicyMock } from '../../common/mocks'; import type { ExternalCallback } from '..'; -import { appContextService } from './app_context'; + import { createAppContextStartContractMock, xpackMocks } from '../mocks'; +import { packagePolicyService } from './package_policy'; +import { appContextService } from './app_context'; + async function mockedGetAssetsData(_a: any, _b: any, dataset: string) { if (dataset === 'dataset1') { return [ diff --git a/x-pack/plugins/fleet/server/services/package_policy.ts b/x-pack/plugins/fleet/server/services/package_policy.ts index 3a350ded2d7ed..54772096fa88f 100644 --- a/x-pack/plugins/fleet/server/services/package_policy.ts +++ b/x-pack/plugins/fleet/server/services/package_policy.ts @@ -12,6 +12,7 @@ import type { SavedObjectsClientContract, } from 'src/core/server'; import uuid from 'uuid'; + import type { AuthenticatedUser } from '../../../security/server'; import { packageToPackagePolicy, @@ -38,6 +39,8 @@ import type { RegistryPackage, CallESAsCurrentUser, } from '../types'; +import { ExternalCallback } from '..'; + import { agentPolicyService } from './agent_policy'; import { outputService } from './output'; import * as Registry from './epm/registry'; @@ -46,7 +49,6 @@ import { getAssetsData } from './epm/packages/assets'; import { compileTemplate } from './epm/agent/agent'; import { normalizeKuery } from './saved_object'; import { appContextService } from '.'; -import type { ExternalCallback } from '..'; const SAVED_OBJECT_TYPE = PACKAGE_POLICY_SAVED_OBJECT_TYPE; diff --git a/x-pack/plugins/fleet/server/services/saved_object.ts b/x-pack/plugins/fleet/server/services/saved_object.ts index da416fa812cc4..bdecffb843e8e 100644 --- a/x-pack/plugins/fleet/server/services/saved_object.ts +++ b/x-pack/plugins/fleet/server/services/saved_object.ts @@ -6,6 +6,7 @@ */ import type { SavedObjectsClientContract, SavedObjectsFindResponse } from 'src/core/server'; + import { SO_SEARCH_LIMIT } from '../constants'; import type { ListWithKuery } from '../types'; diff --git a/x-pack/plugins/fleet/server/services/settings.ts b/x-pack/plugins/fleet/server/services/settings.ts index 01454c6217c05..3a322ebb7dd9d 100644 --- a/x-pack/plugins/fleet/server/services/settings.ts +++ b/x-pack/plugins/fleet/server/services/settings.ts @@ -5,11 +5,14 @@ * 2.0. */ +import url from 'url'; + import Boom from '@hapi/boom'; import type { SavedObjectsClientContract } from 'kibana/server'; -import url from 'url'; + import { GLOBAL_SETTINGS_SAVED_OBJECT_TYPE, decodeCloudId } from '../../common'; import type { SettingsSOAttributes, Settings, BaseSettings } from '../../common'; + import { appContextService } from './app_context'; export async function getSettings(soClient: SavedObjectsClientContract): Promise { diff --git a/x-pack/plugins/fleet/server/services/setup.test.ts b/x-pack/plugins/fleet/server/services/setup.test.ts index 479f28fa0a1ed..8120e41ade606 100644 --- a/x-pack/plugins/fleet/server/services/setup.test.ts +++ b/x-pack/plugins/fleet/server/services/setup.test.ts @@ -6,6 +6,7 @@ */ import { createAppContextStartContractMock, xpackMocks } from '../mocks'; + import { appContextService } from './app_context'; import { setupIngestManager } from './setup'; diff --git a/x-pack/plugins/fleet/server/services/setup.ts b/x-pack/plugins/fleet/server/services/setup.ts index b90f223629b60..0dd30b80869e1 100644 --- a/x-pack/plugins/fleet/server/services/setup.ts +++ b/x-pack/plugins/fleet/server/services/setup.ts @@ -7,21 +7,26 @@ import uuid from 'uuid'; import type { ElasticsearchClient, SavedObjectsClientContract } from 'src/core/server'; + import type { CallESAsCurrentUser } from '../types'; -import { agentPolicyService } from './agent_policy'; -import { outputService } from './output'; -import { - ensureInstalledDefaultPackages, - ensureInstalledPackage, - ensurePackagesCompletedInstall, -} from './epm/packages/install'; + import { packageToPackagePolicy, DEFAULT_AGENT_POLICIES_PACKAGES, FLEET_SERVER_PACKAGE, } from '../../common'; + import type { PackagePolicy, AgentPolicy, Installation, Output } from '../../common'; + import { SO_SEARCH_LIMIT } from '../constants'; + +import { agentPolicyService } from './agent_policy'; +import { outputService } from './output'; +import { + ensureInstalledDefaultPackages, + ensureInstalledPackage, + ensurePackagesCompletedInstall, +} from './epm/packages/install'; import { getPackageInfo } from './epm/packages'; import { packagePolicyService } from './package_policy'; import { generateEnrollmentAPIKey } from './api_keys'; diff --git a/x-pack/plugins/fleet/server/types/models/agent_policy.ts b/x-pack/plugins/fleet/server/types/models/agent_policy.ts index 5891320c2544b..90615c2df7bf6 100644 --- a/x-pack/plugins/fleet/server/types/models/agent_policy.ts +++ b/x-pack/plugins/fleet/server/types/models/agent_policy.ts @@ -6,9 +6,11 @@ */ import { schema } from '@kbn/config-schema'; -import { PackagePolicySchema, NamespaceSchema } from './package_policy'; + import { agentPolicyStatuses, dataTypes } from '../../../common'; +import { PackagePolicySchema, NamespaceSchema } from './package_policy'; + const AgentPolicyBaseSchema = { name: schema.string({ minLength: 1 }), namespace: NamespaceSchema, diff --git a/x-pack/plugins/fleet/server/types/models/output.ts b/x-pack/plugins/fleet/server/types/models/output.ts index bb9ce26de7f22..679500a6490e7 100644 --- a/x-pack/plugins/fleet/server/types/models/output.ts +++ b/x-pack/plugins/fleet/server/types/models/output.ts @@ -6,6 +6,7 @@ */ import { schema } from '@kbn/config-schema'; + import { outputType } from '../../../common/constants'; const OutputBaseSchema = { diff --git a/x-pack/plugins/fleet/server/types/models/package_policy.ts b/x-pack/plugins/fleet/server/types/models/package_policy.ts index 1d47ac9d3ea40..6248b375f8edb 100644 --- a/x-pack/plugins/fleet/server/types/models/package_policy.ts +++ b/x-pack/plugins/fleet/server/types/models/package_policy.ts @@ -6,6 +6,7 @@ */ import { schema } from '@kbn/config-schema'; + import { isValidNamespace } from '../../../common'; export const NamespaceSchema = schema.string({ diff --git a/x-pack/plugins/fleet/server/types/rest_spec/agent.ts b/x-pack/plugins/fleet/server/types/rest_spec/agent.ts index 847dd75c4fe65..e74a4e6ed55bd 100644 --- a/x-pack/plugins/fleet/server/types/rest_spec/agent.ts +++ b/x-pack/plugins/fleet/server/types/rest_spec/agent.ts @@ -6,6 +6,7 @@ */ import { schema } from '@kbn/config-schema'; + import { NewAgentActionSchema } from '../models'; export const GetAgentsRequestSchema = { diff --git a/x-pack/plugins/fleet/server/types/rest_spec/agent_policy.ts b/x-pack/plugins/fleet/server/types/rest_spec/agent_policy.ts index 48017522f0ba2..714ffab922dd9 100644 --- a/x-pack/plugins/fleet/server/types/rest_spec/agent_policy.ts +++ b/x-pack/plugins/fleet/server/types/rest_spec/agent_policy.ts @@ -6,7 +6,9 @@ */ import { schema } from '@kbn/config-schema'; + import { NewAgentPolicySchema } from '../models'; + import { ListWithKuerySchema } from './index'; export const GetAgentPoliciesRequestSchema = { diff --git a/x-pack/plugins/fleet/server/types/rest_spec/package_policy.ts b/x-pack/plugins/fleet/server/types/rest_spec/package_policy.ts index 86776a9a31e6a..3c6f54177096e 100644 --- a/x-pack/plugins/fleet/server/types/rest_spec/package_policy.ts +++ b/x-pack/plugins/fleet/server/types/rest_spec/package_policy.ts @@ -6,7 +6,9 @@ */ import { schema } from '@kbn/config-schema'; + import { NewPackagePolicySchema, UpdatePackagePolicySchema } from '../models'; + import { ListWithKuerySchema } from './index'; export const GetPackagePoliciesRequestSchema = { diff --git a/x-pack/plugins/fleet/server/types/rest_spec/settings.ts b/x-pack/plugins/fleet/server/types/rest_spec/settings.ts index 13077a560a1be..fa885d45c1115 100644 --- a/x-pack/plugins/fleet/server/types/rest_spec/settings.ts +++ b/x-pack/plugins/fleet/server/types/rest_spec/settings.ts @@ -6,6 +6,7 @@ */ import { schema } from '@kbn/config-schema'; + import { isDiffPathProtocol } from '../../../common'; export const GetSettingsRequestSchema = {}; diff --git a/x-pack/plugins/index_lifecycle_management/public/application/sections/policy_table/components/table_content.tsx b/x-pack/plugins/index_lifecycle_management/public/application/sections/policy_table/components/table_content.tsx index 76d2cf666f659..2c653ee5f76f6 100644 --- a/x-pack/plugins/index_lifecycle_management/public/application/sections/policy_table/components/table_content.tsx +++ b/x-pack/plugins/index_lifecycle_management/public/application/sections/policy_table/components/table_content.tsx @@ -319,7 +319,11 @@ export const TableContent: React.FunctionComponent = ({ const rows = sortedPolicies.map((policy) => { const { name } = policy; - return {renderRowCells(policy)}; + return ( + + {renderRowCells(policy)} + + ); }); const renderAddPolicyToTemplateConfirmModal = (policy: PolicyFromES): ReactElement => { diff --git a/x-pack/plugins/infra/public/alerting/inventory/components/expression.tsx b/x-pack/plugins/infra/public/alerting/inventory/components/expression.tsx index d43bbb6888a6e..7233ce3de7497 100644 --- a/x-pack/plugins/infra/public/alerting/inventory/components/expression.tsx +++ b/x-pack/plugins/infra/public/alerting/inventory/components/expression.tsx @@ -137,7 +137,7 @@ export const Expressions: React.FC = (props) => { const updateParams = useCallback( (id, e: InventoryMetricConditions) => { const exp = alertParams.criteria ? alertParams.criteria.slice() : []; - exp[id] = { ...exp[id], ...e }; + exp[id] = e; setAlertParams('criteria', exp); }, [setAlertParams, alertParams.criteria] diff --git a/x-pack/plugins/infra/public/alerting/metric_threshold/components/expression.tsx b/x-pack/plugins/infra/public/alerting/metric_threshold/components/expression.tsx index b2cca858cec4b..3b8afc173c2bd 100644 --- a/x-pack/plugins/infra/public/alerting/metric_threshold/components/expression.tsx +++ b/x-pack/plugins/infra/public/alerting/metric_threshold/components/expression.tsx @@ -98,7 +98,7 @@ export const Expressions: React.FC = (props) => { const updateParams = useCallback( (id, e: MetricExpression) => { const exp = alertParams.criteria ? alertParams.criteria.slice() : []; - exp[id] = { ...exp[id], ...e }; + exp[id] = e; setAlertParams('criteria', exp); }, [setAlertParams, alertParams.criteria] diff --git a/x-pack/plugins/infra/public/containers/logs/log_position/log_position_state.ts b/x-pack/plugins/infra/public/containers/logs/log_position/log_position_state.ts index 56f64b012fa06..59b7d00431459 100644 --- a/x-pack/plugins/infra/public/containers/logs/log_position/log_position_state.ts +++ b/x-pack/plugins/infra/public/containers/logs/log_position/log_position_state.ts @@ -21,6 +21,7 @@ interface DateRange { startTimestamp: number; endTimestamp: number; timestampsLastUpdate: number; + lastCompleteDateRangeExpressionUpdate: number; } interface VisiblePositions { @@ -46,6 +47,7 @@ export interface LogPositionStateParams { startTimestamp: number | null; endTimestamp: number | null; timestampsLastUpdate: number; + lastCompleteDateRangeExpressionUpdate: number; } export interface LogPositionCallbacks { @@ -121,6 +123,7 @@ export const useLogPositionState: () => LogPositionStateParams & LogPositionCall startTimestamp: datemathToEpochMillis(DEFAULT_DATE_RANGE.startDateExpression)!, endTimestamp: datemathToEpochMillis(DEFAULT_DATE_RANGE.endDateExpression, 'up')!, timestampsLastUpdate: Date.now(), + lastCompleteDateRangeExpressionUpdate: Date.now(), }); useEffect(() => { @@ -171,12 +174,18 @@ export const useLogPositionState: () => LogPositionStateParams & LogPositionCall jumpToTargetPosition(null); } - setDateRange({ + setDateRange((prevState) => ({ ...newDateRange, startTimestamp: nextStartTimestamp, endTimestamp: nextEndTimestamp, timestampsLastUpdate: Date.now(), - }); + // NOTE: Complete refers to the last time an update was requested with both expressions. These require a full refresh (unless streaming). Timerange expansion + // and pagination however do not. + lastCompleteDateRangeExpressionUpdate: + 'startDateExpression' in newDateRange && 'endDateExpression' in newDateRange + ? Date.now() + : prevState.lastCompleteDateRangeExpressionUpdate, + })); }, [setDateRange, dateRange, targetPosition] ); diff --git a/x-pack/plugins/infra/public/containers/logs/log_stream/use_fetch_log_entries_around.ts b/x-pack/plugins/infra/public/containers/logs/log_stream/use_fetch_log_entries_around.ts index d96cb7f2b713a..40a887686cb54 100644 --- a/x-pack/plugins/infra/public/containers/logs/log_stream/use_fetch_log_entries_around.ts +++ b/x-pack/plugins/infra/public/containers/logs/log_stream/use_fetch_log_entries_around.ts @@ -6,7 +6,7 @@ */ import { useCallback } from 'react'; -import { combineLatest, Observable, Subject } from 'rxjs'; +import { combineLatest, Observable, ReplaySubject } from 'rxjs'; import { last, map, startWith, switchMap } from 'rxjs/operators'; import { LogSourceColumnConfiguration } from '../../../../common/http_api/log_sources'; import { LogEntryCursor } from '../../../../common/log_entry'; @@ -53,7 +53,7 @@ export const useFetchLogEntriesAround = ({ type LogEntriesAfterRequest = NonNullable>; const logEntriesAroundSearchRequests$ = useObservable( - () => new Subject<[LogEntriesBeforeRequest, Observable]>(), + () => new ReplaySubject<[LogEntriesBeforeRequest, Observable]>(), [] ); diff --git a/x-pack/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/log_entry_example.tsx b/x-pack/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/log_entry_example.tsx index 4362f412d5a78..4e1815e754a59 100644 --- a/x-pack/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/log_entry_example.tsx +++ b/x-pack/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/log_entry_example.tsx @@ -111,10 +111,14 @@ export const LogEntryExampleMessage: React.FunctionComponent = ({ flyoutOptions: encode({ surroundingLogsId: id, }), - logFilter: encode({ - expression: `${partitionField}: ${dataset}`, - kind: 'kuery', - }), + ...(dataset + ? { + logFilter: encode({ + expression: `${partitionField}: ${dataset}`, + kind: 'kuery', + }), + } + : {}), }, }); diff --git a/x-pack/plugins/infra/public/pages/logs/stream/page_logs_content.tsx b/x-pack/plugins/infra/public/pages/logs/stream/page_logs_content.tsx index e3e576a22e6fb..70279678a3877 100644 --- a/x-pack/plugins/infra/public/pages/logs/stream/page_logs_content.tsx +++ b/x-pack/plugins/infra/public/pages/logs/stream/page_logs_content.tsx @@ -60,6 +60,7 @@ export const LogsPageLogsContent: React.FunctionComponent = () => { startDateExpression, endDateExpression, updateDateRange, + lastCompleteDateRangeExpressionUpdate, } = useContext(LogPositionState.Context); const { filterQuery, applyLogFilterQuery } = useContext(LogFilterState.Context); @@ -81,16 +82,16 @@ export const LogsPageLogsContent: React.FunctionComponent = () => { const prevStartTimestamp = usePrevious(startTimestamp); const prevEndTimestamp = usePrevious(endTimestamp); const prevFilterQuery = usePrevious(filterQuery); + const prevLastCompleteDateRangeExpressionUpdate = usePrevious( + lastCompleteDateRangeExpressionUpdate + ); // Refetch entries if... useEffect(() => { const isFirstLoad = !prevStartTimestamp || !prevEndTimestamp; - const newDateRangeDoesNotOverlap = - (prevStartTimestamp != null && - startTimestamp != null && - prevStartTimestamp < startTimestamp) || - (prevEndTimestamp != null && endTimestamp != null && prevEndTimestamp > endTimestamp); + const completeDateRangeExpressionHasChanged = + lastCompleteDateRangeExpressionUpdate !== prevLastCompleteDateRangeExpressionUpdate; const isCenterPointOutsideLoadedRange = targetPosition != null && @@ -101,7 +102,7 @@ export const LogsPageLogsContent: React.FunctionComponent = () => { if ( isFirstLoad || - newDateRangeDoesNotOverlap || + completeDateRangeExpressionHasChanged || isCenterPointOutsideLoadedRange || hasQueryChanged ) { @@ -124,6 +125,8 @@ export const LogsPageLogsContent: React.FunctionComponent = () => { bottomCursor, filterQuery, prevFilterQuery, + lastCompleteDateRangeExpressionUpdate, + prevLastCompleteDateRangeExpressionUpdate, ]); const { logSummaryHighlights, currentHighlightKey, logEntryHighlightsById } = useContext( diff --git a/x-pack/plugins/lens/public/pie_visualization/visualization.test.ts b/x-pack/plugins/lens/public/pie_visualization/visualization.test.ts index 0cdeaa8c043d8..2a961cef315bf 100644 --- a/x-pack/plugins/lens/public/pie_visualization/visualization.test.ts +++ b/x-pack/plugins/lens/public/pie_visualization/visualization.test.ts @@ -17,7 +17,7 @@ const pieVisualization = getPieVisualization({ paletteService: chartPluginMock.createPaletteRegistry(), }); -function exampleState(): PieVisualizationState { +function getExampleState(): PieVisualizationState { return { shape: 'pie', layers: [ @@ -38,9 +38,39 @@ function exampleState(): PieVisualizationState { describe('pie_visualization', () => { describe('#getErrorMessages', () => { it('returns undefined if no error is raised', () => { - const error = pieVisualization.getErrorMessages(exampleState()); + const error = pieVisualization.getErrorMessages(getExampleState()); expect(error).not.toBeDefined(); }); }); + describe('#setDimension', () => { + it('returns expected state', () => { + const prevState: PieVisualizationState = { + layers: [ + { + groups: ['a'], + layerId: LAYER_ID, + numberDisplay: 'percent', + categoryDisplay: 'default', + legendDisplay: 'default', + nestedLegend: false, + metric: undefined, + }, + ], + shape: 'donut', + }; + const setDimensionResult = pieVisualization.setDimension({ + prevState, + columnId: 'x', + layerId: LAYER_ID, + groupId: 'a', + }); + + expect(setDimensionResult).toEqual( + expect.objectContaining({ + shape: 'donut', + }) + ); + }); + }); }); diff --git a/x-pack/plugins/lens/public/pie_visualization/visualization.tsx b/x-pack/plugins/lens/public/pie_visualization/visualization.tsx index 00d0158364e45..ad8d87292b1d8 100644 --- a/x-pack/plugins/lens/public/pie_visualization/visualization.tsx +++ b/x-pack/plugins/lens/public/pie_visualization/visualization.tsx @@ -196,11 +196,6 @@ export const getPieVisualization = ({ setDimension({ prevState, layerId, columnId, groupId }) { return { ...prevState, - - shape: - prevState.shape === 'donut' && prevState.layers.every((l) => l.groups.length === 1) - ? 'pie' - : prevState.shape, layers: prevState.layers.map((l) => { if (l.layerId !== layerId) { return l; diff --git a/x-pack/plugins/lens/public/visualization_container.test.tsx b/x-pack/plugins/lens/public/visualization_container.test.tsx index 7fc94ee434eb3..04a21e7740009 100644 --- a/x-pack/plugins/lens/public/visualization_container.test.tsx +++ b/x-pack/plugins/lens/public/visualization_container.test.tsx @@ -28,6 +28,18 @@ describe('VisualizationContainer', () => { expect(reportingEl.prop('data-shared-item')).toBeTruthy(); }); + test('increments counter in data attribute for each render', () => { + const component = mount(Hello!); + + let reportingEl = component.find('[data-shared-item]').first(); + expect(reportingEl.prop('data-rendering-count')).toEqual(1); + + component.setProps({ children: 'Hello2!' }); + + reportingEl = component.find('[data-shared-item]').first(); + expect(reportingEl.prop('data-rendering-count')).toEqual(2); + }); + test('renders child content', () => { const component = mount( Hello! diff --git a/x-pack/plugins/lens/public/visualization_container.tsx b/x-pack/plugins/lens/public/visualization_container.tsx index 394f228e49622..89f7f3eb0d61e 100644 --- a/x-pack/plugins/lens/public/visualization_container.tsx +++ b/x-pack/plugins/lens/public/visualization_container.tsx @@ -7,7 +7,7 @@ import './visualization_container.scss'; -import React from 'react'; +import React, { useRef } from 'react'; import classNames from 'classnames'; interface Props extends React.HTMLAttributes { @@ -28,6 +28,8 @@ export function VisualizationContainer({ className, ...rest }: Props) { + const counterRef = useRef(0); + counterRef.current++; const attributes: Partial<{ 'data-title': string; 'data-description': string }> = {}; if (reportTitle) { attributes['data-title'] = reportTitle; @@ -39,6 +41,8 @@ export function VisualizationContainer({
{ - private stop$ = new Subject(); + private stop$ = new Subject(); private readonly logger: Logger; private readonly config: LicenseConfigType; private loggingSubscription?: Subscription; @@ -127,6 +128,8 @@ export class LicensingPlugin implements Plugin + new TestScheduler((actual, expected) => { + expect(actual).toEqual(expected); + }); + +const degradedStatus = { + level: ServiceStatusLevels.degraded, + summary: expect.any(String), +}; +const availableStatus = { + level: ServiceStatusLevels.available, + summary: expect.any(String), +}; +const unavailableStatus = { + level: ServiceStatusLevels.unavailable, + summary: expect.any(String), +}; + +describe('getPluginStatus$', () => { + it('emits an initial `degraded` status', () => { + getTestScheduler().run(({ expectObservable, hot }) => { + const license$ = hot('|'); + const stop$ = hot(''); + const expected = '(a|)'; + + expectObservable(getPluginStatus$(license$, stop$)).toBe(expected, { + a: degradedStatus, + }); + }); + }); + + it('emits an `available` status once the license emits', () => { + getTestScheduler().run(({ expectObservable, hot }) => { + const license$ = hot('--a', { + a: licenseMock.createLicenseMock(), + }); + const stop$ = hot(''); + const expected = 'a-b'; + + expectObservable(getPluginStatus$(license$, stop$)).toBe(expected, { + a: degradedStatus, + b: availableStatus, + }); + }); + }); + + it('emits an `unavailable` status if the license emits an error', () => { + getTestScheduler().run(({ expectObservable, hot }) => { + const errorLicense = licenseMock.createLicenseMock(); + errorLicense.error = 'some-error'; + + const license$ = hot('--a', { + a: errorLicense, + }); + const stop$ = hot(''); + const expected = 'a-b'; + + expectObservable(getPluginStatus$(license$, stop$)).toBe(expected, { + a: degradedStatus, + b: unavailableStatus, + }); + }); + }); + + it('can emit `available` after `unavailable`', () => { + getTestScheduler().run(({ expectObservable, hot }) => { + const errorLicense = licenseMock.createLicenseMock(); + errorLicense.error = 'some-error'; + const validLicense = licenseMock.createLicenseMock(); + + const license$ = hot('--a--b', { + a: errorLicense, + b: validLicense, + }); + const stop$ = hot(''); + const expected = 'a-b--c'; + + expectObservable(getPluginStatus$(license$, stop$)).toBe(expected, { + a: degradedStatus, + b: unavailableStatus, + c: availableStatus, + }); + }); + }); + + it('closes when `stop$` emits', () => { + getTestScheduler().run(({ expectObservable, hot }) => { + const license$ = hot('--a--b', { + a: licenseMock.createLicenseMock(), + b: licenseMock.createLicenseMock(), + }); + const stop$ = hot('----a', { a: undefined }); + const expected = 'a-b-|'; + + expectObservable(getPluginStatus$(license$, stop$)).toBe(expected, { + a: degradedStatus, + b: availableStatus, + }); + }); + }); +}); diff --git a/x-pack/plugins/licensing/server/plugin_status.ts b/x-pack/plugins/licensing/server/plugin_status.ts new file mode 100644 index 0000000000000..f830bd966b71b --- /dev/null +++ b/x-pack/plugins/licensing/server/plugin_status.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 { Observable } from 'rxjs'; +import { takeUntil, startWith, map } from 'rxjs/operators'; +import { ServiceStatus, ServiceStatusLevels } from '../../../../src/core/server'; +import { ILicense } from '../common/types'; + +export const getPluginStatus$ = ( + license$: Observable, + stop$: Observable +): Observable => { + return license$.pipe( + startWith(undefined), + takeUntil(stop$), + map((license) => { + if (license) { + if (license.error) { + return { + level: ServiceStatusLevels.unavailable, + summary: 'Error fetching license', + }; + } + return { + level: ServiceStatusLevels.available, + summary: 'License fetched', + }; + } + return { + level: ServiceStatusLevels.degraded, + summary: 'License not fetched yet', + }; + }) + ); +}; diff --git a/x-pack/plugins/lists/server/routes/delete_list_route.ts b/x-pack/plugins/lists/server/routes/delete_list_route.ts index 4732b25dbf5e7..3e9b76a1b330a 100644 --- a/x-pack/plugins/lists/server/routes/delete_list_route.ts +++ b/x-pack/plugins/lists/server/routes/delete_list_route.ts @@ -19,6 +19,7 @@ import { } from '../../common/schemas'; import { getSavedObjectType } from '../services/exception_lists/utils'; import { ExceptionListClient } from '../services/exception_lists/exception_list_client'; +import { escapeQuotes } from '../services/utils/escape_query'; import { getExceptionListClient, getListClient } from '.'; @@ -142,7 +143,7 @@ const getReferencedExceptionLists = async ( (item) => `${getSavedObjectType({ namespaceType: item.namespace_type, - })}.attributes.list_id: ${item.list_id}` + })}.attributes.list_id: "${escapeQuotes(item.list_id)}"` ) .join(' OR '); return exceptionLists.findExceptionList({ diff --git a/x-pack/plugins/lists/server/services/exception_lists/find_exception_list_items.test.ts b/x-pack/plugins/lists/server/services/exception_lists/find_exception_list_items.test.ts index 0d3dd2d9b65c3..3a2b12c358917 100644 --- a/x-pack/plugins/lists/server/services/exception_lists/find_exception_list_items.test.ts +++ b/x-pack/plugins/lists/server/services/exception_lists/find_exception_list_items.test.ts @@ -18,7 +18,18 @@ describe('find_exception_list_items', () => { savedObjectType: ['exception-list'], }); expect(filter).toEqual( - '(exception-list.attributes.list_type: item AND exception-list.attributes.list_id: some-list-id)' + '(exception-list.attributes.list_type: item AND exception-list.attributes.list_id: "some-list-id")' + ); + }); + + test('It should create a filter escaping quotes in list ids', () => { + const filter = getExceptionListsItemFilter({ + filter: [], + listId: ['list-id-"-with-quote'], + savedObjectType: ['exception-list'], + }); + expect(filter).toEqual( + '(exception-list.attributes.list_type: item AND exception-list.attributes.list_id: "list-id-\\"-with-quote")' ); }); @@ -29,7 +40,7 @@ describe('find_exception_list_items', () => { savedObjectType: ['exception-list'], }); expect(filter).toEqual( - '((exception-list.attributes.list_type: item AND exception-list.attributes.list_id: some-list-id) AND exception-list.attributes.name: "Sample Endpoint Exception List")' + '((exception-list.attributes.list_type: item AND exception-list.attributes.list_id: "some-list-id") AND exception-list.attributes.name: "Sample Endpoint Exception List")' ); }); @@ -40,7 +51,7 @@ describe('find_exception_list_items', () => { savedObjectType: ['exception-list', 'exception-list-agnostic'], }); expect(filter).toEqual( - '(exception-list.attributes.list_type: item AND exception-list.attributes.list_id: list-1) OR (exception-list-agnostic.attributes.list_type: item AND exception-list-agnostic.attributes.list_id: list-2)' + '(exception-list.attributes.list_type: item AND exception-list.attributes.list_id: "list-1") OR (exception-list-agnostic.attributes.list_type: item AND exception-list-agnostic.attributes.list_id: "list-2")' ); }); @@ -51,7 +62,7 @@ describe('find_exception_list_items', () => { savedObjectType: ['exception-list', 'exception-list-agnostic'], }); expect(filter).toEqual( - '((exception-list.attributes.list_type: item AND exception-list.attributes.list_id: list-1) AND exception-list.attributes.name: "Sample Endpoint Exception List") OR (exception-list-agnostic.attributes.list_type: item AND exception-list-agnostic.attributes.list_id: list-2)' + '((exception-list.attributes.list_type: item AND exception-list.attributes.list_id: "list-1") AND exception-list.attributes.name: "Sample Endpoint Exception List") OR (exception-list-agnostic.attributes.list_type: item AND exception-list-agnostic.attributes.list_id: "list-2")' ); }); @@ -62,7 +73,7 @@ describe('find_exception_list_items', () => { savedObjectType: ['exception-list', 'exception-list-agnostic', 'exception-list-agnostic'], }); expect(filter).toEqual( - '(exception-list.attributes.list_type: item AND exception-list.attributes.list_id: list-1) OR (exception-list-agnostic.attributes.list_type: item AND exception-list-agnostic.attributes.list_id: list-2) OR (exception-list-agnostic.attributes.list_type: item AND exception-list-agnostic.attributes.list_id: list-3)' + '(exception-list.attributes.list_type: item AND exception-list.attributes.list_id: "list-1") OR (exception-list-agnostic.attributes.list_type: item AND exception-list-agnostic.attributes.list_id: "list-2") OR (exception-list-agnostic.attributes.list_type: item AND exception-list-agnostic.attributes.list_id: "list-3")' ); }); @@ -73,7 +84,7 @@ describe('find_exception_list_items', () => { savedObjectType: ['exception-list', 'exception-list-agnostic', 'exception-list-agnostic'], }); expect(filter).toEqual( - '((exception-list.attributes.list_type: item AND exception-list.attributes.list_id: list-1) AND exception-list.attributes.name: "Sample Endpoint Exception List") OR (exception-list-agnostic.attributes.list_type: item AND exception-list-agnostic.attributes.list_id: list-2) OR (exception-list-agnostic.attributes.list_type: item AND exception-list-agnostic.attributes.list_id: list-3)' + '((exception-list.attributes.list_type: item AND exception-list.attributes.list_id: "list-1") AND exception-list.attributes.name: "Sample Endpoint Exception List") OR (exception-list-agnostic.attributes.list_type: item AND exception-list-agnostic.attributes.list_id: "list-2") OR (exception-list-agnostic.attributes.list_type: item AND exception-list-agnostic.attributes.list_id: "list-3")' ); }); @@ -88,7 +99,7 @@ describe('find_exception_list_items', () => { savedObjectType: ['exception-list', 'exception-list-agnostic', 'exception-list-agnostic'], }); expect(filter).toEqual( - '((exception-list.attributes.list_type: item AND exception-list.attributes.list_id: list-1) AND exception-list.attributes.name: "Sample Endpoint Exception List 1") OR ((exception-list-agnostic.attributes.list_type: item AND exception-list-agnostic.attributes.list_id: list-2) AND exception-list.attributes.name: "Sample Endpoint Exception List 2") OR ((exception-list-agnostic.attributes.list_type: item AND exception-list-agnostic.attributes.list_id: list-3) AND exception-list.attributes.name: "Sample Endpoint Exception List 3")' + '((exception-list.attributes.list_type: item AND exception-list.attributes.list_id: "list-1") AND exception-list.attributes.name: "Sample Endpoint Exception List 1") OR ((exception-list-agnostic.attributes.list_type: item AND exception-list-agnostic.attributes.list_id: "list-2") AND exception-list.attributes.name: "Sample Endpoint Exception List 2") OR ((exception-list-agnostic.attributes.list_type: item AND exception-list-agnostic.attributes.list_id: "list-3") AND exception-list.attributes.name: "Sample Endpoint Exception List 3")' ); }); }); diff --git a/x-pack/plugins/lists/server/services/exception_lists/find_exception_list_items.ts b/x-pack/plugins/lists/server/services/exception_lists/find_exception_list_items.ts index cc84314eaa7a0..155408dafc79d 100644 --- a/x-pack/plugins/lists/server/services/exception_lists/find_exception_list_items.ts +++ b/x-pack/plugins/lists/server/services/exception_lists/find_exception_list_items.ts @@ -24,6 +24,7 @@ import { SortFieldOrUndefined, SortOrderOrUndefined, } from '../../../common/schemas'; +import { escapeQuotes } from '../utils/escape_query'; import { getSavedObjectTypes, transformSavedObjectsToFoundExceptionListItem } from './utils'; import { getExceptionList } from './get_exception_list'; @@ -89,7 +90,8 @@ export const getExceptionListsItemFilter = ({ savedObjectType: SavedObjectType[]; }): string => { return listId.reduce((accum, singleListId, index) => { - const listItemAppend = `(${savedObjectType[index]}.attributes.list_type: item AND ${savedObjectType[index]}.attributes.list_id: ${singleListId})`; + const escapedListId = escapeQuotes(singleListId); + const listItemAppend = `(${savedObjectType[index]}.attributes.list_type: item AND ${savedObjectType[index]}.attributes.list_id: "${escapedListId}")`; const listItemAppendWithFilter = filter[index] != null ? `(${listItemAppend} AND ${filter[index]})` : listItemAppend; if (accum === '') { @@ -117,8 +119,9 @@ export const findValueListExceptionListItems = async ({ sortField, sortOrder, }: FindValueListExceptionListsItems): Promise => { + const escapedValueListId = escapeQuotes(valueListId); const savedObjectsFindResponse = await savedObjectsClient.find({ - filter: `(exception-list.attributes.list_type: item AND exception-list.attributes.entries.list.id:${valueListId}) OR (exception-list-agnostic.attributes.list_type: item AND exception-list-agnostic.attributes.entries.list.id:${valueListId}) `, + filter: `(exception-list.attributes.list_type: item AND exception-list.attributes.entries.list.id:"${escapedValueListId}") OR (exception-list-agnostic.attributes.list_type: item AND exception-list-agnostic.attributes.entries.list.id:"${escapedValueListId}") `, page, perPage, sortField, diff --git a/x-pack/plugins/lists/server/services/utils/escape_query.ts b/x-pack/plugins/lists/server/services/utils/escape_query.ts new file mode 100644 index 0000000000000..f654b8a2b9ebe --- /dev/null +++ b/x-pack/plugins/lists/server/services/utils/escape_query.ts @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export const escapeQuotes = (str: string): string => { + return str.replace(/[\\"]/g, '\\$&'); +}; diff --git a/x-pack/plugins/lists/server/services/utils/get_query_filter.test.ts b/x-pack/plugins/lists/server/services/utils/get_query_filter.test.ts index d189012aec0e1..0f6cc171bc04c 100644 --- a/x-pack/plugins/lists/server/services/utils/get_query_filter.test.ts +++ b/x-pack/plugins/lists/server/services/utils/get_query_filter.test.ts @@ -46,7 +46,7 @@ describe('get_query_filter', () => { minimum_should_match: 1, should: [ { - match: { + match_phrase: { list_id: 'list-123', }, }, @@ -74,7 +74,7 @@ describe('get_query_filter', () => { minimum_should_match: 1, should: [ { - match: { + match_phrase: { list_id: 'list-123', }, }, diff --git a/x-pack/plugins/lists/server/services/utils/get_query_filter.ts b/x-pack/plugins/lists/server/services/utils/get_query_filter.ts index 5cbad8c284a55..25c8f9880063f 100644 --- a/x-pack/plugins/lists/server/services/utils/get_query_filter.ts +++ b/x-pack/plugins/lists/server/services/utils/get_query_filter.ts @@ -9,6 +9,8 @@ import { DslQuery, EsQueryConfig } from 'src/plugins/data/common'; import { Filter, Query, esQuery } from '../../../../../../src/plugins/data/server'; +import { escapeQuotes } from './escape_query'; + export interface GetQueryFilterOptions { filter: string; } @@ -41,7 +43,10 @@ export const getQueryFilterWithListId = ({ filter, listId, }: GetQueryFilterWithListIdOptions): GetQueryFilterReturn => { + const escapedListId = escapeQuotes(listId); const filterWithListId = - filter.trim() !== '' ? `list_id: ${listId} AND (${filter})` : `list_id: ${listId}`; + filter.trim() !== '' + ? `list_id: "${escapedListId}" AND (${filter})` + : `list_id: "${escapedListId}"`; return getQueryFilter({ filter: filterWithListId }); }; diff --git a/x-pack/plugins/maps/common/descriptor_types/layer_descriptor_types.ts b/x-pack/plugins/maps/common/descriptor_types/layer_descriptor_types.ts index 7a21599605b52..7c4746fd2ccb3 100644 --- a/x-pack/plugins/maps/common/descriptor_types/layer_descriptor_types.ts +++ b/x-pack/plugins/maps/common/descriptor_types/layer_descriptor_types.ts @@ -27,6 +27,7 @@ export type LayerDescriptor = { __isPreviewLayer?: boolean; __errorMessage?: string; __trackedLayerDescriptor?: LayerDescriptor; + __areTilesLoaded?: boolean; alpha?: number; id: string; joins?: JoinDescriptor[]; diff --git a/x-pack/plugins/maps/common/get_centroid_features.test.ts b/x-pack/plugins/maps/common/get_centroid_features.test.ts index d409c9b71a59a..57879989644f1 100644 --- a/x-pack/plugins/maps/common/get_centroid_features.test.ts +++ b/x-pack/plugins/maps/common/get_centroid_features.test.ts @@ -281,3 +281,130 @@ test('should create centroid feature for multi polygon', () => { }, }); }); + +test('should create centroid feature for GeometryCollection with Point', () => { + const featureCollection: FeatureCollection = { + type: 'FeatureCollection', + features: [ + { + type: 'Feature', + geometry: { + type: 'GeometryCollection', + geometries: [ + { + type: 'Point', + coordinates: [100.0, 0.0], + }, + ], + }, + properties: { + prop0: 'value0', + prop1: 0.0, + }, + }, + ], + }; + const centroidFeatures = getCentroidFeatures(featureCollection); + expect(centroidFeatures.length).toBe(1); + expect(centroidFeatures[0]).toEqual({ + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [100.0, 0.0], + }, + properties: { + __kbn_is_centroid_feature__: true, + prop0: 'value0', + prop1: 0.0, + }, + }); +}); + +test('should create centroid feature for GeometryCollection with MultiPoint', () => { + const featureCollection: FeatureCollection = { + type: 'FeatureCollection', + features: [ + { + type: 'Feature', + geometry: { + type: 'GeometryCollection', + geometries: [ + { + type: 'MultiPoint', + coordinates: [ + [10, 40], + [40, 30], + [20, 20], + [30, 10], + ], + }, + ], + }, + properties: { + prop0: 'value0', + prop1: 0.0, + }, + }, + ], + }; + const centroidFeatures = getCentroidFeatures(featureCollection); + expect(centroidFeatures.length).toBe(1); + expect(centroidFeatures[0]).toEqual({ + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [10, 40], + }, + properties: { + __kbn_is_centroid_feature__: true, + prop0: 'value0', + prop1: 0.0, + }, + }); +}); + +test('should create centroid feature for GeometryCollection with Polygon', () => { + const featureCollection: FeatureCollection = { + type: 'FeatureCollection', + features: [ + { + type: 'Feature', + geometry: { + type: 'GeometryCollection', + geometries: [ + { + type: 'Polygon', + coordinates: [ + [ + [35, 10], + [45, 45], + [15, 40], + [10, 20], + [35, 10], + ], + ], + }, + ], + }, + properties: { + prop0: 'value0', + prop1: 0.0, + }, + }, + ], + }; + const centroidFeatures = getCentroidFeatures(featureCollection); + expect(centroidFeatures.length).toBe(1); + expect(centroidFeatures[0]).toEqual({ + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [27.526881720430108, 28.70967741935484], + }, + properties: { + __kbn_is_centroid_feature__: true, + prop0: 'value0', + prop1: 0.0, + }, + }); +}); diff --git a/x-pack/plugins/maps/common/get_centroid_features.ts b/x-pack/plugins/maps/common/get_centroid_features.ts index f8dd897d24e02..ce82b7d875fbd 100644 --- a/x-pack/plugins/maps/common/get_centroid_features.ts +++ b/x-pack/plugins/maps/common/get_centroid_features.ts @@ -9,8 +9,10 @@ import { Feature, FeatureCollection, Geometry, + GeometryCollection, LineString, MultiLineString, + MultiPoint, MultiPolygon, } from 'geojson'; import turfAlong from '@turf/along'; @@ -26,7 +28,7 @@ import { } from './constants'; export function getCentroidFeatures(featureCollection: FeatureCollection): Feature[] { - const centroidFeatures = []; + const centroids = []; for (let i = 0; i < featureCollection.features.length; i++) { const feature = featureCollection.features[i]; @@ -35,43 +37,68 @@ export function getCentroidFeatures(featureCollection: FeatureCollection): Featu continue; } - let centroidGeometry: Geometry | null = null; - if (feature.geometry.type === GEO_JSON_TYPE.LINE_STRING) { - centroidGeometry = getLineCentroid(feature); - } else if (feature.geometry.type === GEO_JSON_TYPE.MULTI_LINE_STRING) { - const coordinates = (feature.geometry as MultiLineString).coordinates; - let longestLine = coordinates[0]; - let longestLength = turfLength(lineString(longestLine)); - for (let j = 1; j < coordinates.length; j++) { - const nextLine = coordinates[j]; - const nextLength = turfLength(lineString(nextLine)); - if (nextLength > longestLength) { - longestLine = nextLine; - longestLength = nextLength; - } + const centroid = getCentroid(feature); + if (centroid) { + centroids.push(centroid); + } + } + return centroids; +} + +export function getCentroid(feature: Feature): Feature | null { + let centroidGeometry: Geometry | null = null; + if (feature.geometry.type === GEO_JSON_TYPE.LINE_STRING) { + centroidGeometry = getLineCentroid(feature); + } else if (feature.geometry.type === GEO_JSON_TYPE.MULTI_LINE_STRING) { + const coordinates = (feature.geometry as MultiLineString).coordinates; + let longestLine = coordinates[0]; + let longestLength = turfLength(lineString(longestLine)); + for (let j = 1; j < coordinates.length; j++) { + const nextLine = coordinates[j]; + const nextLength = turfLength(lineString(nextLine)); + if (nextLength > longestLength) { + longestLine = nextLine; + longestLength = nextLength; } - centroidGeometry = getLineCentroid(lineString(longestLine) as Feature); - } else if (feature.geometry.type === GEO_JSON_TYPE.POLYGON) { - centroidGeometry = turfCenterOfMass(feature).geometry; - } else if (feature.geometry.type === GEO_JSON_TYPE.MULTI_POLYGON) { - const coordinates = (feature.geometry as MultiPolygon).coordinates; - let largestPolygon = coordinates[0]; - let largestArea = turfArea(polygon(largestPolygon)); - for (let j = 1; j < coordinates.length; j++) { - const nextPolygon = coordinates[j]; - const nextArea = turfArea(polygon(nextPolygon)); - if (nextArea > largestArea) { - largestPolygon = nextPolygon; - largestArea = nextArea; - } + } + centroidGeometry = getLineCentroid(lineString(longestLine) as Feature); + } else if (feature.geometry.type === GEO_JSON_TYPE.POLYGON) { + centroidGeometry = turfCenterOfMass(feature).geometry; + } else if (feature.geometry.type === GEO_JSON_TYPE.MULTI_POLYGON) { + const coordinates = (feature.geometry as MultiPolygon).coordinates; + let largestPolygon = coordinates[0]; + let largestArea = turfArea(polygon(largestPolygon)); + for (let j = 1; j < coordinates.length; j++) { + const nextPolygon = coordinates[j]; + const nextArea = turfArea(polygon(nextPolygon)); + if (nextArea > largestArea) { + largestPolygon = nextPolygon; + largestArea = nextArea; } - centroidGeometry = turfCenterOfMass(polygon(largestPolygon)).geometry; - } else if (feature.geometry.type === GEO_JSON_TYPE.GEOMETRY_COLLECTION) { - throw new Error('Should not have features with geometrycollection'); } + centroidGeometry = turfCenterOfMass(polygon(largestPolygon)).geometry; + } else if ( + feature.geometry.type === GEO_JSON_TYPE.GEOMETRY_COLLECTION && + (feature.geometry as GeometryCollection).geometries.length + ) { + const firstGeometry = (feature.geometry as GeometryCollection).geometries[0]; + if (firstGeometry.type === GEO_JSON_TYPE.POINT) { + centroidGeometry = firstGeometry; + } else if (firstGeometry.type === GEO_JSON_TYPE.MULTI_POINT) { + centroidGeometry = { + type: 'Point', + coordinates: (firstGeometry as MultiPoint).coordinates[0], + }; + } else { + return getCentroid({ + ...feature, + geometry: firstGeometry, + }); + } + } - if (centroidGeometry) { - centroidFeatures.push({ + return centroidGeometry + ? ({ type: 'Feature', id: feature.id, properties: { @@ -79,10 +106,8 @@ export function getCentroidFeatures(featureCollection: FeatureCollection): Featu [KBN_IS_CENTROID_FEATURE]: true, }, geometry: centroidGeometry, - } as Feature); - } - } - return centroidFeatures; + } as Feature) + : null; } function getLineCentroid(feature: Feature): Geometry { diff --git a/x-pack/plugins/maps/public/actions/layer_actions.ts b/x-pack/plugins/maps/public/actions/layer_actions.ts index d68e4744975f1..fe62e9fe9da51 100644 --- a/x-pack/plugins/maps/public/actions/layer_actions.ts +++ b/x-pack/plugins/maps/public/actions/layer_actions.ts @@ -539,3 +539,12 @@ export function setHiddenLayers(hiddenLayerIds: string[]) { } }; } + +export function setAreTilesLoaded(layerId: string, areTilesLoaded: boolean) { + return { + type: UPDATE_LAYER_PROP, + id: layerId, + propName: '__areTilesLoaded', + newValue: areTilesLoaded, + }; +} diff --git a/x-pack/plugins/maps/public/classes/layers/layer.tsx b/x-pack/plugins/maps/public/classes/layers/layer.tsx index e3d5150c9cd09..a73449b0fa718 100644 --- a/x-pack/plugins/maps/public/classes/layers/layer.tsx +++ b/x-pack/plugins/maps/public/classes/layers/layer.tsx @@ -400,7 +400,11 @@ export class AbstractLayer implements ILayer { } isLayerLoading(): boolean { - return this._dataRequests.some((dataRequest) => dataRequest.isLoading()); + const areTilesLoading = + typeof this._descriptor.__areTilesLoaded !== 'undefined' + ? !this._descriptor.__areTilesLoaded + : false; + return areTilesLoading || this._dataRequests.some((dataRequest) => dataRequest.isLoading()); } isLoadingBounds() { diff --git a/x-pack/plugins/maps/public/classes/layers/tile_layer/tile_layer.d.ts b/x-pack/plugins/maps/public/classes/layers/tile_layer/tile_layer.d.ts index 3ef8f09189276..e83eff53c57c8 100644 --- a/x-pack/plugins/maps/public/classes/layers/tile_layer/tile_layer.d.ts +++ b/x-pack/plugins/maps/public/classes/layers/tile_layer/tile_layer.d.ts @@ -16,5 +16,6 @@ interface ITileLayerArguments { export class TileLayer extends AbstractLayer { static type: string; + constructor(args: ITileLayerArguments); } diff --git a/x-pack/plugins/maps/public/classes/layers/tile_layer/tile_layer.js b/x-pack/plugins/maps/public/classes/layers/tile_layer/tile_layer.js index d3aaefcd34197..0995d117aaa47 100644 --- a/x-pack/plugins/maps/public/classes/layers/tile_layer/tile_layer.js +++ b/x-pack/plugins/maps/public/classes/layers/tile_layer/tile_layer.js @@ -117,8 +117,4 @@ export class TileLayer extends AbstractLayer { getLayerTypeIconName() { return 'grid'; } - - isLayerLoading() { - return false; - } } diff --git a/x-pack/plugins/maps/public/connected_components/mb_map/index.ts b/x-pack/plugins/maps/public/connected_components/mb_map/index.ts index 352e9ae8382d4..2c92f67bd7410 100644 --- a/x-pack/plugins/maps/public/connected_components/mb_map/index.ts +++ b/x-pack/plugins/maps/public/connected_components/mb_map/index.ts @@ -18,6 +18,7 @@ import { clearGoto, setMapInitError, MapExtentState, + setAreTilesLoaded, } from '../../actions'; import { getLayerList, @@ -69,6 +70,9 @@ function mapDispatchToProps(dispatch: ThunkDispatch void; geoFields: GeoFieldWithIndex[]; renderTooltipContent?: RenderToolTipContent; + setAreTilesLoaded: (layerId: string, areTilesLoaded: boolean) => void; } interface State { @@ -86,6 +88,7 @@ export class MBMap extends Component { private _containerRef: HTMLDivElement | null = null; private _prevDisableInteractive?: boolean; private _navigationControl = new mapboxgl.NavigationControl({ showCompass: false }); + private _tileStatusTracker?: TileStatusTracker; state: State = { prevLayerList: undefined, @@ -123,6 +126,9 @@ export class MBMap extends Component { if (this._checker) { this._checker.destroy(); } + if (this._tileStatusTracker) { + this._tileStatusTracker.destroy(); + } if (this.state.mbMap) { this.state.mbMap.remove(); this.state.mbMap = undefined; @@ -199,6 +205,12 @@ export class MBMap extends Component { mbMap.dragRotate.disable(); mbMap.touchZoomRotate.disableRotation(); + this._tileStatusTracker = new TileStatusTracker({ + mbMap, + getCurrentLayerList: () => this.props.layerList, + setAreTilesLoaded: this.props.setAreTilesLoaded, + }); + const tooManyFeaturesImageSrc = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAA7DgAAOw4BzLahgwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAARLSURBVHic7ZnPbxRVAMe/7735sWO3293ZlUItJsivCxEE0oTYRgu1FqTQoFSwKTYx8SAH/wHjj4vRozGGi56sMcW2UfqTEuOhppE0KJc2GIuKQFDY7qzdtrudX88D3YTUdFuQN8+k87ltZt7uZz958/bNLAGwBWsYKltANmEA2QKyCQPIFpBNGEC2gGzCALIFZBMGkC0gmzCAbAHZhAFkC8gmDCBbQDZhANkCslnzARQZH6oDpNs0D5UDSUIInePcOpPLfdfnODNBuwQWIAWwNOABwHZN0x8npE6hNLJ4DPWRyFSf40wE5VOEQPBjcR0g3YlE4ybGmtK+/1NzJtOZA/xSYwZMs3nG962T2ez3It2AANaA/kSidYuivOQBs5WM1fUnk6f0u+GXJUqIuUtVXx00zRbRfkIDfBqL7a1WlIYbjvNtTTr99jXXHVpH6dMjK0R4cXq6c9rzxjcx9sKX8XitSEdhAToMI7VP10/97fsTh7PZrgWAN1lW72KE2vOm2b5chDTgtWQyn93x/bEEIetEOQIC14CxVOr1CkKefH929t0v8vn0vcdGEoljGxXl4C3PGz2YyXy+AHARDqtByAxoUdWKBKV70r4/vvTLA0CjZfX+5nkDGxirKzUTgkBIgNaysh3gnF627R+XO+dQJvP1ddcdrmSsbtA020pF+CAW21qrqmUiXIUEqGRsIwD0FQq/lzqv0bJ6rrvucBVjzwyb5ivLRTiiaW+8VV7eIEBVTAANiIIQd9RxZlc6t9Gyem647vn1jD07ZJonl4sQASoevqmgABzwwHnJzc69PGdZ3X+47sgGxuqHTPPE0ggeVtg5/QeEBMhxPg1Aa1DV2GrHPG9ZXy1G2D+wNALn9jyQEeHKAJgP+033Kgrdqij7AFwZtu3bqx3XWShMHtV1o1pRGo4YxiNd+fyEB2DKdX/4aG5u0hbwcylkBryTy/3scT6zW9Nq7ndso2Wdvea6Q1WUHuiPx1/WAXLBcWZXun94UMRcAoD/p+ddTFK6u8MwUvc7vsmyem+67oVqVT0wkEgcF+FYRNhW+L25uX6f84XThtHxIBudE5bVY/t++jFVrU/dvVSFICzAqG3PX/S8rihj2/61qK1AOUB7ksl2jdLUL7Z9rvgcQQRCFsEi5wqFmw26XnhCUQ63GcZmCly95Lrzpca0G0byk3j8tEnpU1c975tmyxoU5QcE8EAEAM5WVOzfoarHAeC2749dcpzxMwsLv07Ztg0AOzVNf03Ttu/S9T2PMlbjc25fdpyutmx2TLRbIAEA4M1otKo1EjmaoHQn4ZwBgA/kAVAK6MXXdzxv/ONcrq/HcbJBeAUWoEizqsaORaPbKglZrxMSZZyrM76f/ovzWx/m85PFWREUgQf4v7Hm/xcIA8gWkE0YQLaAbMIAsgVkEwaQLSCbMIBsAdmEAWQLyCYMIFtANmEA2QKyCQPIFpDNmg/wD3OFdEybUvJjAAAAAElFTkSuQmCC'; const tooManyFeaturesImage = new Image(); diff --git a/x-pack/plugins/maps/public/connected_components/mb_map/tile_status_tracker.test.ts b/x-pack/plugins/maps/public/connected_components/mb_map/tile_status_tracker.test.ts new file mode 100644 index 0000000000000..223efae657601 --- /dev/null +++ b/x-pack/plugins/maps/public/connected_components/mb_map/tile_status_tracker.test.ts @@ -0,0 +1,140 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +// eslint-disable-next-line max-classes-per-file +import { TileStatusTracker } from './tile_status_tracker'; +import { Map as MbMap } from 'mapbox-gl'; +import { ILayer } from '../../classes/layers/layer'; + +class MockMbMap { + public listeners: Array<{ type: string; callback: (e: unknown) => void }> = []; + + on(type: string, callback: (e: unknown) => void) { + this.listeners.push({ + type, + callback, + }); + } + + emit(type: string, e: unknown) { + this.listeners.forEach((listener) => { + if (listener.type === type) { + listener.callback(e); + } + }); + } + + off(type: string, callback: (e: unknown) => void) { + this.listeners = this.listeners.filter((listener) => { + return !(listener.type === type && listener.callback === callback); + }); + } +} + +class MockLayer { + readonly _id: string; + readonly _mbSourceId: string; + constructor(id: string, mbSourceId: string) { + this._id = id; + this._mbSourceId = mbSourceId; + } + getId() { + return this._id; + } + + ownsMbSourceId(mbSourceId: string) { + return this._mbSourceId === mbSourceId; + } +} + +function createMockLayer(id: string, mbSourceId: string): ILayer { + return (new MockLayer(id, mbSourceId) as unknown) as ILayer; +} + +function createMockMbDataEvent(mbSourceId: string, tileKey: string): unknown { + return { + sourceId: mbSourceId, + dataType: 'source', + tile: { + tileID: { + key: tileKey, + }, + }, + source: { + type: 'vector', + }, + }; +} + +async function sleep(timeout: number) { + return await new Promise((resolve) => { + setTimeout(() => { + resolve(true); + }, timeout); + }); +} + +describe('TileStatusTracker', () => { + test('should add and remove tiles', async () => { + const mockMbMap = new MockMbMap(); + const loadedMap: Map = new Map(); + new TileStatusTracker({ + mbMap: (mockMbMap as unknown) as MbMap, + setAreTilesLoaded: (layerId, areTilesLoaded) => { + loadedMap.set(layerId, areTilesLoaded); + }, + getCurrentLayerList: () => { + return [ + createMockLayer('foo', 'foosource'), + createMockLayer('bar', 'barsource'), + createMockLayer('foobar', 'foobarsource'), + ]; + }, + }); + + mockMbMap.emit('sourcedataloading', createMockMbDataEvent('foosource', 'aa11')); + + const aa11BarTile = createMockMbDataEvent('barsource', 'aa11'); + mockMbMap.emit('sourcedataloading', aa11BarTile); + + mockMbMap.emit('sourcedata', createMockMbDataEvent('foosource', 'aa11')); + + // simulate delay. Cache-checking is debounced. + await sleep(300); + + expect(loadedMap.get('foo')).toBe(true); + expect(loadedMap.get('bar')).toBe(false); // still outstanding tile requests + expect(loadedMap.has('foobar')).toBe(true); // never received tile requests + + (aa11BarTile as { tile: { aborted: boolean } })!.tile.aborted = true; // abort tile + mockMbMap.emit('sourcedataloading', createMockMbDataEvent('barsource', 'af1d')); + mockMbMap.emit('sourcedataloading', createMockMbDataEvent('foosource', 'af1d')); + mockMbMap.emit('error', createMockMbDataEvent('barsource', 'af1d')); + + // simulate delay. Cache-checking is debounced. + await sleep(300); + + expect(loadedMap.get('foo')).toBe(false); // still outstanding tile requests + expect(loadedMap.get('bar')).toBe(true); // tiles were aborted or errored + expect(loadedMap.has('foobar')).toBe(true); // never received tile requests + }); + + test('should cleanup listeners on destroy', async () => { + const mockMbMap = new MockMbMap(); + const tileStatusTracker = new TileStatusTracker({ + mbMap: (mockMbMap as unknown) as MbMap, + setAreTilesLoaded: () => {}, + getCurrentLayerList: () => { + return []; + }, + }); + + expect(mockMbMap.listeners.length).toBe(3); + tileStatusTracker.destroy(); + expect(mockMbMap.listeners.length).toBe(0); + }); +}); diff --git a/x-pack/plugins/maps/public/connected_components/mb_map/tile_status_tracker.ts b/x-pack/plugins/maps/public/connected_components/mb_map/tile_status_tracker.ts new file mode 100644 index 0000000000000..be946a12fe225 --- /dev/null +++ b/x-pack/plugins/maps/public/connected_components/mb_map/tile_status_tracker.ts @@ -0,0 +1,132 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { Map as MapboxMap, MapSourceDataEvent } from 'mapbox-gl'; +import _ from 'lodash'; +import { ILayer } from '../../classes/layers/layer'; +import { SPATIAL_FILTERS_LAYER_ID } from '../../../common/constants'; + +interface MbTile { + // references internal object from mapbox + aborted?: boolean; +} + +interface Tile { + mbKey: string; + mbSourceId: string; + mbTile: MbTile; +} + +export class TileStatusTracker { + private _tileCache: Tile[]; + private readonly _mbMap: MapboxMap; + private readonly _setAreTilesLoaded: (layerId: string, areTilesLoaded: boolean) => void; + private readonly _getCurrentLayerList: () => ILayer[]; + private readonly _onSourceDataLoading = (e: MapSourceDataEvent) => { + if ( + e.sourceId && + e.sourceId !== SPATIAL_FILTERS_LAYER_ID && + e.dataType === 'source' && + e.tile && + (e.source.type === 'vector' || e.source.type === 'raster') + ) { + const tracked = this._tileCache.find((tile) => { + return ( + tile.mbKey === ((e.tile.tileID.key as unknown) as string) && + tile.mbSourceId === e.sourceId + ); + }); + + if (!tracked) { + this._tileCache.push({ + mbKey: (e.tile.tileID.key as unknown) as string, + mbSourceId: e.sourceId, + mbTile: e.tile, + }); + this._updateTileStatus(); + } + } + }; + + private readonly _onError = (e: MapSourceDataEvent) => { + if ( + e.sourceId && + e.sourceId !== SPATIAL_FILTERS_LAYER_ID && + e.tile && + (e.source.type === 'vector' || e.source.type === 'raster') + ) { + this._removeTileFromCache(e.sourceId, (e.tile.tileID.key as unknown) as string); + } + }; + private readonly _onSourceData = (e: MapSourceDataEvent) => { + if ( + e.sourceId && + e.sourceId !== SPATIAL_FILTERS_LAYER_ID && + e.dataType === 'source' && + e.tile && + (e.source.type === 'vector' || e.source.type === 'raster') + ) { + this._removeTileFromCache(e.sourceId, (e.tile.tileID.key as unknown) as string); + } + }; + + constructor({ + mbMap, + setAreTilesLoaded, + getCurrentLayerList, + }: { + mbMap: MapboxMap; + setAreTilesLoaded: (layerId: string, areTilesLoaded: boolean) => void; + getCurrentLayerList: () => ILayer[]; + }) { + this._tileCache = []; + this._setAreTilesLoaded = setAreTilesLoaded; + this._getCurrentLayerList = getCurrentLayerList; + + this._mbMap = mbMap; + this._mbMap.on('sourcedataloading', this._onSourceDataLoading); + this._mbMap.on('error', this._onError); + this._mbMap.on('sourcedata', this._onSourceData); + } + + _updateTileStatus = _.debounce(() => { + this._tileCache = this._tileCache.filter((tile) => { + return typeof tile.mbTile.aborted === 'boolean' ? !tile.mbTile.aborted : true; + }); + const layerList = this._getCurrentLayerList(); + for (let i = 0; i < layerList.length; i++) { + const layer: ILayer = layerList[i]; + let atLeastOnePendingTile = false; + for (let j = 0; j < this._tileCache.length; j++) { + const tile = this._tileCache[j]; + if (layer.ownsMbSourceId(tile.mbSourceId)) { + atLeastOnePendingTile = true; + break; + } + } + this._setAreTilesLoaded(layer.getId(), !atLeastOnePendingTile); + } + }, 100); + + _removeTileFromCache = (mbSourceId: string, mbKey: string) => { + const trackedIndex = this._tileCache.findIndex((tile) => { + return tile.mbKey === ((mbKey as unknown) as string) && tile.mbSourceId === mbSourceId; + }); + + if (trackedIndex >= 0) { + this._tileCache.splice(trackedIndex, 1); + this._updateTileStatus(); + } + }; + + destroy() { + this._mbMap.off('error', this._onError); + this._mbMap.off('sourcedata', this._onSourceData); + this._mbMap.off('sourcedataloading', this._onSourceDataLoading); + this._tileCache.length = 0; + } +} diff --git a/x-pack/plugins/maps/public/connected_components/widget_overlay/layer_control/__snapshots__/view.test.js.snap b/x-pack/plugins/maps/public/connected_components/widget_overlay/layer_control/__snapshots__/view.test.js.snap index 0af4eb0793f03..05c2ad69af771 100644 --- a/x-pack/plugins/maps/public/connected_components/widget_overlay/layer_control/__snapshots__/view.test.js.snap +++ b/x-pack/plugins/maps/public/connected_components/widget_overlay/layer_control/__snapshots__/view.test.js.snap @@ -109,7 +109,23 @@ exports[`LayerControl isLayerTOCOpen Should render expand button with error icon `; -exports[`LayerControl isLayerTOCOpen Should render expand button with loading icon when layer is loading 1`] = ` +exports[`LayerControl isLayerTOCOpen spinner icon Should not render expand button with loading icon when layer is invisible 1`] = ` + + + +`; + +exports[`LayerControl isLayerTOCOpen spinner icon Should render expand button with loading icon when layer is loading 1`] = ` { /> ); tooltipContent = this.props.layer.getErrors(); - } else if (this.props.layer.isLayerLoading()) { - icon = ; } else if (!this.props.layer.isVisible()) { icon = ; tooltipContent = i18n.translate('xpack.maps.layer.layerHiddenTooltip', { defaultMessage: `Layer is hidden.`, }); + } else if (this.props.layer.isLayerLoading()) { + icon = ; } else if (!this.props.layer.showAtZoomLevel(this.props.zoom)) { const minZoom = this.props.layer.getMinZoom(); const maxZoom = this.props.layer.getMaxZoom(); diff --git a/x-pack/plugins/maps/public/connected_components/widget_overlay/layer_control/view.js b/x-pack/plugins/maps/public/connected_components/widget_overlay/layer_control/view.js index b24dc515c8615..6a859befa18c1 100644 --- a/x-pack/plugins/maps/public/connected_components/widget_overlay/layer_control/view.js +++ b/x-pack/plugins/maps/public/connected_components/widget_overlay/layer_control/view.js @@ -65,7 +65,7 @@ export function LayerControl({ return layer.hasErrors(); }); const isLoading = layerList.some((layer) => { - return layer.isLayerLoading(); + return layer.isLayerLoading() && layer.isVisible(); }); return ( diff --git a/x-pack/plugins/maps/public/connected_components/widget_overlay/layer_control/view.test.js b/x-pack/plugins/maps/public/connected_components/widget_overlay/layer_control/view.test.js index 25baabe74e0b6..e4af1ad4f46ca 100644 --- a/x-pack/plugins/maps/public/connected_components/widget_overlay/layer_control/view.test.js +++ b/x-pack/plugins/maps/public/connected_components/widget_overlay/layer_control/view.test.js @@ -47,28 +47,44 @@ describe('LayerControl', () => { describe('isLayerTOCOpen', () => { test('Should render expand button', () => { const component = shallow(); - expect(component).toMatchSnapshot(); }); - test('Should render expand button with loading icon when layer is loading', () => { + describe('spinner icon', () => { + const isLayerLoading = true; + let isVisible = true; const mockLayerThatIsLoading = { hasErrors: () => { return false; }, isLayerLoading: () => { - return true; + return isLayerLoading; + }, + isVisible: () => { + return isVisible; }, }; - const component = shallow( - - ); - - expect(component).toMatchSnapshot(); + test('Should render expand button with loading icon when layer is loading', () => { + const component = shallow( + + ); + expect(component).toMatchSnapshot(); + }); + test('Should not render expand button with loading icon when layer is invisible', () => { + isVisible = false; + const component = shallow( + + ); + expect(component).toMatchSnapshot(); + }); }); test('Should render expand button with error icon when layer has error', () => { diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/advanced_step/advanced_step_form.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/advanced_step/advanced_step_form.tsx index 71770dcf952d9..21243351dab7d 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/advanced_step/advanced_step_form.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/advanced_step/advanced_step_form.tsx @@ -560,7 +560,7 @@ export const AdvancedStepForm: FC = ({ })} helpText={i18n.translate('xpack.ml.dataframe.analytics.create.maxNumThreadsHelpText', { defaultMessage: - 'The maximum number of threads to be used by the analysis. The default value is 1', + 'The maximum number of threads to be used by the analysis. The default value is 1.', })} isInvalid={maxNumThreads === 0} error={ diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/advanced_step/outlier_hyper_parameters.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/advanced_step/outlier_hyper_parameters.tsx index d591c8c602753..d347a8147469d 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/advanced_step/outlier_hyper_parameters.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/advanced_step/outlier_hyper_parameters.tsx @@ -30,7 +30,7 @@ export const OutlierHyperParameters: FC = ({ actions, state, advancedPara })} helpText={i18n.translate('xpack.ml.dataframe.analytics.create.methodHelpText', { defaultMessage: - 'Sets the method that outlier detection uses. If not set, uses an ensemble of different methods and normalises and combines their individual outlier scores to obtain the overall outlier score. We recommend to use the ensemble method', + 'Sets the method that outlier detection uses. If not set, uses an ensemble of different methods, normalizes and combines their individual outlier scores to obtain the overall outlier score. It is recommended to use the ensemble method.', })} isInvalid={advancedParamErrors[ANALYSIS_ADVANCED_FIELDS.METHOD] !== undefined} error={advancedParamErrors[ANALYSIS_ADVANCED_FIELDS.METHOD]} @@ -56,7 +56,7 @@ export const OutlierHyperParameters: FC = ({ actions, state, advancedPara })} helpText={i18n.translate('xpack.ml.dataframe.analytics.create.nNeighborsHelpText', { defaultMessage: - 'The value for how many nearest neighbors each method of outlier detection will use to calculate its outlier score. When not set, different values will be used for different ensemble members. Must be a positive integer', + 'The value for how many nearest neighbors each method of outlier detection uses to calculate its outlier score. When not set, different values are used for different ensemble members. Must be a positive integer.', })} isInvalid={advancedParamErrors[ANALYSIS_ADVANCED_FIELDS.N_NEIGHBORS] !== undefined} error={advancedParamErrors[ANALYSIS_ADVANCED_FIELDS.N_NEIGHBORS]} @@ -66,7 +66,7 @@ export const OutlierHyperParameters: FC = ({ actions, state, advancedPara 'xpack.ml.dataframe.analytics.create.nNeighborsInputAriaLabel', { defaultMessage: - 'The value for how many nearest neighbors each method of outlier detection will use to calculate its outlier score.', + 'The value for how many nearest neighbors each method of outlier detection uses to calculate its outlier score.', } )} data-test-subj="mlAnalyticsCreateJobWizardnNeighborsInput" diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx index aa008192bbce0..206fb511a4d25 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx @@ -539,7 +539,7 @@ export const ConfigurationStepForm: FC = ({ 'xpack.ml.dataframe.analytics.create.scatterplotMatrixLabelHelpText', { defaultMessage: - 'Visualizes the relationships between pairs of selected included fields', + 'Visualizes the relationships between pairs of selected included fields.', } )} fullWidth diff --git a/x-pack/plugins/ml/server/lib/alerts/alerting_service.ts b/x-pack/plugins/ml/server/lib/alerts/alerting_service.ts index b6d0e9ae261c7..e0fec5938d521 100644 --- a/x-pack/plugins/ml/server/lib/alerts/alerting_service.ts +++ b/x-pack/plugins/ml/server/lib/alerts/alerting_service.ts @@ -258,7 +258,9 @@ export function alertingServiceProvider(mlClient: MlClient, esClient: Elasticsea } else if (source.result_type === ANOMALY_RESULT_TYPE.RECORD) { const fieldName = getEntityFieldName(source); const fieldValue = getEntityFieldValue(source); - alertInstanceKey += `_${source.detector_index}_${source.function}_${fieldName}_${fieldValue}`; + const entity = + fieldName !== undefined && fieldValue !== undefined ? `_${fieldName}_${fieldValue}` : ''; + alertInstanceKey += `_${source.detector_index}_${source.function}${entity}`; } return alertInstanceKey; }; diff --git a/x-pack/plugins/security/.eslintrc.json b/x-pack/plugins/security/.eslintrc.json deleted file mode 100644 index 2b63a9259d220..0000000000000 --- a/x-pack/plugins/security/.eslintrc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "rules": { - "@typescript-eslint/consistent-type-imports": 1 - } -} diff --git a/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx b/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx index cf9ac50b0daf0..5d6b4a1b4fdaf 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx @@ -49,11 +49,11 @@ import type { RoleIndexPrivilege, } from '../../../../common/model'; import { - copyRole, - getExtendedRoleDeprecationNotice, isRoleDeprecated as checkIfRoleDeprecated, isRoleReadOnly as checkIfRoleReadOnly, isRoleReserved as checkIfRoleReserved, + copyRole, + getExtendedRoleDeprecationNotice, prepareRoleClone, } from '../../../../common/model'; import type { UserAPIClient } from '../../users'; diff --git a/x-pack/plugins/security/server/authorization/authorization_service.test.ts b/x-pack/plugins/security/server/authorization/authorization_service.test.ts index 62c7dd9f8891c..ff6f510f64b28 100644 --- a/x-pack/plugins/security/server/authorization/authorization_service.test.ts +++ b/x-pack/plugins/security/server/authorization/authorization_service.test.ts @@ -11,6 +11,7 @@ import { nextTick } from '@kbn/test/jest'; import { coreMock, elasticsearchServiceMock, loggingSystemMock } from 'src/core/server/mocks'; // Note: this import must be before other relative imports for the mocks to work as intended. +// eslint-disable-next-line import/order import { mockAuthorizationModeFactory, mockCheckPrivilegesDynamicallyWithRequestFactory, diff --git a/x-pack/plugins/security/server/authorization/privileges/privileges.ts b/x-pack/plugins/security/server/authorization/privileges/privileges.ts index de0db392bdc86..28d3ddefc62b5 100644 --- a/x-pack/plugins/security/server/authorization/privileges/privileges.ts +++ b/x-pack/plugins/security/server/authorization/privileges/privileges.ts @@ -8,8 +8,8 @@ import { uniq } from 'lodash'; import type { - KibanaFeature, PluginSetupContract as FeaturesPluginSetup, + KibanaFeature, } from '../../../../features/server'; import type { SecurityLicense } from '../../../common/licensing'; import type { RawKibanaPrivileges } from '../../../common/model'; diff --git a/x-pack/plugins/security_solution/common/endpoint/models/event.ts b/x-pack/plugins/security_solution/common/endpoint/models/event.ts index 692c1d3757b8a..9c102e77b6946 100644 --- a/x-pack/plugins/security_solution/common/endpoint/models/event.ts +++ b/x-pack/plugins/security_solution/common/endpoint/models/event.ts @@ -160,12 +160,12 @@ export function md5HashForProcess(event: SafeResolverEvent): string | undefined /** * First non-null value for the `event.process.args` field. */ -export function argsForProcess(event: SafeResolverEvent): string | undefined { +export function argsForProcess(event: SafeResolverEvent): string[] | undefined { if (isLegacyEventSafeVersion(event)) { // There is not currently a key for this on Legacy event types return undefined; } - return firstNonNullValue(event.process?.args); + return values(event.process?.args); } /** diff --git a/x-pack/plugins/security_solution/cypress/integration/timelines/data_providers.spec.ts b/x-pack/plugins/security_solution/cypress/integration/timelines/data_providers.spec.ts index 3505a9b6a7918..7d72747c84935 100644 --- a/x-pack/plugins/security_solution/cypress/integration/timelines/data_providers.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/timelines/data_providers.spec.ts @@ -10,6 +10,7 @@ import { TIMELINE_DATA_PROVIDERS_EMPTY, TIMELINE_DROPPED_DATA_PROVIDERS, TIMELINE_DATA_PROVIDERS_ACTION_MENU, + TIMELINE_FLYOUT_HEADER, } from '../../screens/timeline'; import { HOSTS_NAMES_DRAGGABLE } from '../../screens/hosts/all_hosts'; @@ -60,8 +61,13 @@ describe('timeline data providers', () => { openTimelineUsingToggle(); cy.get(TIMELINE_DATA_PROVIDERS_ACTION_MENU).should('not.exist'); - cy.get(TIMELINE_DROPPED_DATA_PROVIDERS).first().focus(); - cy.get(TIMELINE_DROPPED_DATA_PROVIDERS).first().parent().type('{enter}'); + cy.get(`${TIMELINE_FLYOUT_HEADER} ${TIMELINE_DROPPED_DATA_PROVIDERS}`) + .pipe(($el) => $el.trigger('focus')) + .should('exist'); + cy.get(`${TIMELINE_FLYOUT_HEADER} ${TIMELINE_DROPPED_DATA_PROVIDERS}`) + .first() + .parent() + .type('{enter}'); cy.get(TIMELINE_DATA_PROVIDERS_ACTION_MENU).should('exist'); }); diff --git a/x-pack/plugins/security_solution/cypress/screens/create_new_rule.ts b/x-pack/plugins/security_solution/cypress/screens/create_new_rule.ts index 3c7da2e298847..b2b7e434348b4 100644 --- a/x-pack/plugins/security_solution/cypress/screens/create_new_rule.ts +++ b/x-pack/plugins/security_solution/cypress/screens/create_new_rule.ts @@ -26,6 +26,8 @@ export const ANOMALY_THRESHOLD_INPUT = '[data-test-subj="anomalyThresholdSlider" export const ADVANCED_SETTINGS_BTN = '[data-test-subj="advancedSettings"] .euiAccordion__button'; +export const BACK_TO_ALL_RULES_LINK = '[data-test-subj="ruleDetailsBackToAllRules"]'; + export const COMBO_BOX_CLEAR_BTN = '[data-test-subj="comboBoxClearButton"]'; export const COMBO_BOX_INPUT = '[data-test-subj="comboBoxInput"]'; diff --git a/x-pack/plugins/security_solution/cypress/screens/timeline.ts b/x-pack/plugins/security_solution/cypress/screens/timeline.ts index 92f96a591ab5d..de2c937e0ae75 100644 --- a/x-pack/plugins/security_solution/cypress/screens/timeline.ts +++ b/x-pack/plugins/security_solution/cypress/screens/timeline.ts @@ -118,6 +118,8 @@ export const TIMELINE_DATA_PROVIDERS = '[data-test-subj="dataProviders"]'; export const TIMELINE_DATA_PROVIDERS_ACTION_MENU = '[data-test-subj="providerActions"]'; +export const TIMELINE_ADD_FIELD_BUTTON = '[data-test-subj="addField"]'; + export const TIMELINE_DATA_PROVIDERS_EMPTY = '[data-test-subj="dataProviders"] [data-test-subj="empty"]'; diff --git a/x-pack/plugins/security_solution/cypress/tasks/common.ts b/x-pack/plugins/security_solution/cypress/tasks/common.ts index 293cd8fbeaa85..db8d834171128 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/common.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/common.ts @@ -27,14 +27,14 @@ export const drag = (subject: JQuery) => { clientY: subjectLocation.top, force: true, }) - .wait(300) + .wait(3000) .trigger('mousemove', { button: primaryButton, clientX: subjectLocation.left + dndSloppyClickDetectionThreshold, clientY: subjectLocation.top, force: true, }) - .wait(300); + .wait(3000); }; /** Drags the subject being dragged on the specified drop target, but does not drop it */ diff --git a/x-pack/plugins/security_solution/cypress/tasks/create_new_rule.ts b/x-pack/plugins/security_solution/cypress/tasks/create_new_rule.ts index 11d98f7b808ed..b317f158ae614 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/create_new_rule.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/create_new_rule.ts @@ -21,25 +21,42 @@ import { ADD_REFERENCE_URL_BTN, ADVANCED_SETTINGS_BTN, ANOMALY_THRESHOLD_INPUT, + AT_LEAST_ONE_INDEX_PATTERN, + AT_LEAST_ONE_VALID_MATCH, + BACK_TO_ALL_RULES_LINK, + COMBO_BOX_CLEAR_BTN, COMBO_BOX_INPUT, CREATE_AND_ACTIVATE_BTN, CUSTOM_QUERY_INPUT, + CUSTOM_QUERY_REQUIRED, + DEFAULT_RISK_SCORE_INPUT, DEFINE_CONTINUE_BUTTON, DEFINE_EDIT_TAB, + EQL_QUERY_INPUT, + EQL_QUERY_PREVIEW_HISTOGRAM, + EQL_QUERY_VALIDATION_SPINNER, + EQL_TYPE, FALSE_POSITIVES_INPUT, IMPORT_QUERY_FROM_SAVED_TIMELINE_LINK, INDICATOR_MATCH_TYPE, INPUT, + INVALID_MATCH_CONTENT, INVESTIGATION_NOTES_TEXTAREA, LOOK_BACK_INTERVAL, LOOK_BACK_TIME_TYPE, MACHINE_LEARNING_DROPDOWN, MACHINE_LEARNING_LIST, MACHINE_LEARNING_TYPE, + MITRE_ATTACK_ADD_SUBTECHNIQUE_BUTTON, + MITRE_ATTACK_ADD_TACTIC_BUTTON, + MITRE_ATTACK_ADD_TECHNIQUE_BUTTON, + MITRE_ATTACK_SUBTECHNIQUE_DROPDOWN, + MITRE_ATTACK_TACTIC_DROPDOWN, + MITRE_ATTACK_TECHNIQUE_DROPDOWN, MITRE_TACTIC, + QUERY_PREVIEW_BUTTON, REFERENCE_URLS_INPUT, REFRESH_BUTTON, - DEFAULT_RISK_SCORE_INPUT, RISK_MAPPING_OVERRIDE_OPTION, RISK_OVERRIDE, RULE_DESCRIPTION_INPUT, @@ -47,6 +64,8 @@ import { RULE_NAME_OVERRIDE, RULE_STATUS, RULE_TIMESTAMP_OVERRIDE, + RULES_CREATION_FORM, + RULES_CREATION_PREVIEW, RUNS_EVERY_INTERVAL, RUNS_EVERY_TIME_TYPE, SCHEDULE_CONTINUE_BUTTON, @@ -55,36 +74,18 @@ import { SEVERITY_MAPPING_OVERRIDE_OPTION, SEVERITY_OVERRIDE_ROW, TAGS_INPUT, - THRESHOLD_FIELD_SELECTION, - THRESHOLD_INPUT_AREA, - THRESHOLD_TYPE, - EQL_TYPE, - EQL_QUERY_INPUT, - QUERY_PREVIEW_BUTTON, - EQL_QUERY_PREVIEW_HISTOGRAM, - EQL_QUERY_VALIDATION_SPINNER, - COMBO_BOX_CLEAR_BTN, - MITRE_ATTACK_TACTIC_DROPDOWN, - MITRE_ATTACK_TECHNIQUE_DROPDOWN, - MITRE_ATTACK_SUBTECHNIQUE_DROPDOWN, - MITRE_ATTACK_ADD_TACTIC_BUTTON, - MITRE_ATTACK_ADD_SUBTECHNIQUE_BUTTON, - MITRE_ATTACK_ADD_TECHNIQUE_BUTTON, THREAT_COMBO_BOX_INPUT, THREAT_ITEM_ENTRY_DELETE_BUTTON, + THREAT_MAPPING_COMBO_BOX_INPUT, THREAT_MATCH_AND_BUTTON, - INVALID_MATCH_CONTENT, - THREAT_MATCH_OR_BUTTON, - AT_LEAST_ONE_VALID_MATCH, - AT_LEAST_ONE_INDEX_PATTERN, - CUSTOM_QUERY_REQUIRED, - RULES_CREATION_FORM, - RULES_CREATION_PREVIEW, + THREAT_MATCH_CUSTOM_QUERY_INPUT, THREAT_MATCH_INDICATOR_INDEX, THREAT_MATCH_INDICATOR_INDICATOR_INDEX, - THREAT_MATCH_CUSTOM_QUERY_INPUT, + THREAT_MATCH_OR_BUTTON, THREAT_MATCH_QUERY_INPUT, - THREAT_MAPPING_COMBO_BOX_INPUT, + THRESHOLD_FIELD_SELECTION, + THRESHOLD_INPUT_AREA, + THRESHOLD_TYPE, } from '../screens/create_new_rule'; import { TOAST_ERROR } from '../screens/shared'; import { SERVER_SIDE_EVENT_COUNT } from '../screens/timeline'; @@ -95,6 +96,8 @@ export const createAndActivateRule = () => { cy.get(SCHEDULE_CONTINUE_BUTTON).click({ force: true }); cy.get(CREATE_AND_ACTIVATE_BTN).click({ force: true }); cy.get(CREATE_AND_ACTIVATE_BTN).should('not.exist'); + cy.get(BACK_TO_ALL_RULES_LINK).click({ force: true }); + cy.get(BACK_TO_ALL_RULES_LINK).should('not.exist'); }; export const fillAboutRule = ( diff --git a/x-pack/plugins/security_solution/cypress/tasks/hosts/all_hosts.ts b/x-pack/plugins/security_solution/cypress/tasks/hosts/all_hosts.ts index 98e3d74ad3bc4..6ec5920ebf7c8 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/hosts/all_hosts.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/hosts/all_hosts.ts @@ -6,7 +6,7 @@ */ import { ALL_HOSTS_TABLE, HOSTS_NAMES_DRAGGABLE, HOSTS_NAMES } from '../../screens/hosts/all_hosts'; -import { TIMELINE_DATA_PROVIDERS, TIMELINE_DATA_PROVIDERS_EMPTY } from '../../screens/timeline'; +import { TIMELINE_ADD_FIELD_BUTTON, TIMELINE_DATA_PROVIDERS_EMPTY } from '../../screens/timeline'; import { drag, dragWithoutDrop, drop } from '../../tasks/common'; @@ -14,7 +14,7 @@ export const dragAndDropFirstHostToTimeline = () => { cy.get(HOSTS_NAMES_DRAGGABLE) .first() .then((firstHost) => drag(firstHost)); - cy.get(TIMELINE_DATA_PROVIDERS) + cy.get(TIMELINE_ADD_FIELD_BUTTON) .filter(':visible') .then((dataProvidersDropArea) => drop(dataProvidersDropArea)); }; diff --git a/x-pack/plugins/security_solution/public/app/app.tsx b/x-pack/plugins/security_solution/public/app/app.tsx index 95ab822ed50c8..451e29543fa03 100644 --- a/x-pack/plugins/security_solution/public/app/app.tsx +++ b/x-pack/plugins/security_solution/public/app/app.tsx @@ -6,15 +6,12 @@ */ import { History } from 'history'; -import React, { memo, useMemo, FC } from 'react'; +import React, { memo, FC } from 'react'; import { ApolloProvider } from 'react-apollo'; import { Store, Action } from 'redux'; import { Provider as ReduxStoreProvider } from 'react-redux'; -import { ThemeProvider } from 'styled-components'; import { EuiErrorBoundary } from '@elastic/eui'; -import euiDarkVars from '@elastic/eui/dist/eui_theme_dark.json'; -import euiLightVars from '@elastic/eui/dist/eui_theme_light.json'; import { AppLeaveHandler } from '../../../../../src/core/public'; import { ManageUserInfo } from '../detections/components/user_info'; @@ -30,6 +27,7 @@ import { ApolloClientContext } from '../common/utils/apollo_context'; import { ManageGlobalTimeline } from '../timelines/components/manage_timeline'; import { StartServices } from '../types'; import { PageRouter } from './routes'; +import { EuiThemeProvider } from '../../../../../src/plugins/kibana_react/common'; interface StartAppComponent extends AppFrontendLibs { children: React.ReactNode; @@ -46,15 +44,7 @@ const StartAppComponent: FC = ({ store, }) => { const { i18n } = useKibana().services; - const [darkMode] = useUiSetting$(DEFAULT_DARK_MODE); - const theme = useMemo( - () => ({ - eui: darkMode ? euiDarkVars : euiLightVars, - darkMode, - }), - [darkMode] - ); return ( @@ -64,7 +54,7 @@ const StartAppComponent: FC = ({ - + @@ -72,7 +62,7 @@ const StartAppComponent: FC = ({ - + diff --git a/x-pack/plugins/security_solution/public/common/components/and_or_badge/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/and_or_badge/index.test.tsx index a6dd64737f5ee..e36123ac817ec 100644 --- a/x-pack/plugins/security_solution/public/common/components/and_or_badge/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/and_or_badge/index.test.tsx @@ -10,8 +10,9 @@ import { ThemeProvider } from 'styled-components'; import { mount } from 'enzyme'; import { AndOrBadge } from './'; +import { getMockTheme } from '../../lib/kibana/kibana_react.mock'; -const mockTheme = { eui: { euiColorLightShade: '#ece' } }; +const mockTheme = getMockTheme({ eui: { euiColorLightShade: '#ece' } }); describe('AndOrBadge', () => { test('it renders top and bottom antenna bars when "includeAntennas" is true', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/and_or_badge/rounded_badge_antenna.test.tsx b/x-pack/plugins/security_solution/public/common/components/and_or_badge/rounded_badge_antenna.test.tsx index c6536a05be45d..eaf4dfa3c66e8 100644 --- a/x-pack/plugins/security_solution/public/common/components/and_or_badge/rounded_badge_antenna.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/and_or_badge/rounded_badge_antenna.test.tsx @@ -10,8 +10,9 @@ import { ThemeProvider } from 'styled-components'; import { mount } from 'enzyme'; import { RoundedBadgeAntenna } from './rounded_badge_antenna'; +import { getMockTheme } from '../../lib/kibana/kibana_react.mock'; -const mockTheme = { eui: { euiColorLightShade: '#ece' } }; +const mockTheme = getMockTheme({ eui: { euiColorLightShade: '#ece' } }); describe('RoundedBadgeAntenna', () => { test('it renders top and bottom antenna bars', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/charts/areachart.tsx b/x-pack/plugins/security_solution/public/common/components/charts/areachart.tsx index 53f613821196d..9a00736c4a605 100644 --- a/x-pack/plugins/security_solution/public/common/components/charts/areachart.tsx +++ b/x-pack/plugins/security_solution/public/common/components/charts/areachart.tsx @@ -62,6 +62,15 @@ const checkIfAnyValidSeriesExist = ( ): data is ChartSeriesData[] => Array.isArray(data) && data.some(checkIfAllTheDataInTheSeriesAreValid); +const axisStyle = { + tickLine: { + visible: false, + }, + tickLabel: { + padding: 3, + }, +}; + // https://ela.st/multi-areaseries export const AreaChartBaseComponent = ({ data, @@ -111,23 +120,10 @@ export const AreaChartBaseComponent = ({ position={Position.Bottom} showOverlappingTicks={false} tickFormat={xTickFormatter} - style={{ - tickLine: { - visible: false, - }, - }} + style={axisStyle} /> - +
) : null; diff --git a/x-pack/plugins/security_solution/public/common/components/empty_value/empty_value.test.tsx b/x-pack/plugins/security_solution/public/common/components/empty_value/empty_value.test.tsx index e3c74bf425628..8bf2bba491051 100644 --- a/x-pack/plugins/security_solution/public/common/components/empty_value/empty_value.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/empty_value/empty_value.test.tsx @@ -18,9 +18,10 @@ import { getEmptyValue, getOrEmptyTag, } from '.'; +import { getMockTheme } from '../../lib/kibana/kibana_react.mock'; describe('EmptyValue', () => { - const mockTheme = { eui: { euiColorMediumShade: '#ece' } }; + const mockTheme = getMockTheme({ eui: { euiColorMediumShade: '#ece' } }); test('it renders against snapshot', () => { const wrapper = shallow(

{getEmptyString()}

); diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_modal/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_modal/index.test.tsx index 9ba6fe104be45..456dabec06c24 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_modal/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_modal/index.test.tsx @@ -30,8 +30,9 @@ import { } from '../../../../../common/detection_engine/schemas/response/rules_schema.mocks'; import { useRuleAsync } from '../../../../detections/containers/detection_engine/rules/use_rule_async'; import { AlertData } from '../types'; +import { getMockTheme } from '../../../lib/kibana/kibana_react.mock'; -const mockTheme = { +const mockTheme = getMockTheme({ eui: { euiBreakpoints: { l: '1200px', @@ -40,7 +41,7 @@ const mockTheme = { m: '10px', }, }, -}; +}); jest.mock('../../../../detections/containers/detection_engine/alerts/use_signal_index'); jest.mock('../../../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/builder/and_badge.test.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/builder/and_badge.test.tsx index 5299e4e61ab21..16678e4da2a1d 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/builder/and_badge.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/builder/and_badge.test.tsx @@ -10,8 +10,9 @@ import { ThemeProvider } from 'styled-components'; import { mount } from 'enzyme'; import { BuilderAndBadgeComponent } from './and_badge'; +import { getMockTheme } from '../../../lib/kibana/kibana_react.mock'; -const mockTheme = { eui: { euiColorLightShade: '#ece' } }; +const mockTheme = getMockTheme({ eui: { euiColorLightShade: '#ece' } }); describe('BuilderAndBadgeComponent', () => { test('it renders exceptionItemEntryFirstRowAndBadge for very first exception item in builder', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/builder/exception_item.test.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/builder/exception_item.test.tsx index 1ea54473032cc..cbeb987f49b7b 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/builder/exception_item.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/builder/exception_item.test.tsx @@ -16,12 +16,13 @@ import { getEntryMatchMock } from '../../../../../../lists/common/schemas/types/ import { getEntryMatchAnyMock } from '../../../../../../lists/common/schemas/types/entry_match_any.mock'; import { BuilderExceptionListItemComponent } from './exception_item'; +import { getMockTheme } from '../../../lib/kibana/kibana_react.mock'; -const mockTheme = { +const mockTheme = getMockTheme({ eui: { euiColorLightShade: '#ece', }, -}; +}); jest.mock('../../../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/builder/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/builder/index.test.tsx index d9402272bd9a2..4d0e3306e3315 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/builder/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/builder/index.test.tsx @@ -21,12 +21,13 @@ import { useKibana } from '../../../../common/lib/kibana'; import { getEmptyValue } from '../../empty_value'; import { ExceptionBuilderComponent } from './'; +import { getMockTheme } from '../../../lib/kibana/kibana_react.mock'; -const mockTheme = { +const mockTheme = getMockTheme({ eui: { euiColorLightShade: '#ece', }, -}; +}); jest.mock('../../../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_modal/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_modal/index.test.tsx index ec44f815ae243..a30e6f769c47e 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_modal/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_modal/index.test.tsx @@ -27,8 +27,9 @@ import { getRulesSchemaMock, } from '../../../../../common/detection_engine/schemas/response/rules_schema.mocks'; import { useRuleAsync } from '../../../../detections/containers/detection_engine/rules/use_rule_async'; +import { getMockTheme } from '../../../lib/kibana/kibana_react.mock'; -const mockTheme = { +const mockTheme = getMockTheme({ eui: { euiBreakpoints: { l: '1200px', @@ -37,7 +38,7 @@ const mockTheme = { m: '10px', }, }, -}; +}); jest.mock('../../../../common/lib/kibana'); jest.mock('../../../../detections/containers/detection_engine/rules'); diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/exceptionable_fields.json b/x-pack/plugins/security_solution/public/common/components/exceptions/exceptionable_fields.json index a59e440918175..2866cbc6baf92 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/exceptionable_fields.json +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/exceptionable_fields.json @@ -129,4 +129,4 @@ "user.hash", "user.id", "Ransomware.feature" -] \ No newline at end of file +] diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item/exception_details.test.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item/exception_details.test.tsx index b96ae5c06dd22..b6cf55585c0d3 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item/exception_details.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item/exception_details.test.tsx @@ -13,12 +13,13 @@ import moment from 'moment-timezone'; import { ExceptionDetails } from './exception_details'; import { getExceptionListItemSchemaMock } from '../../../../../../../lists/common/schemas/response/exception_list_item_schema.mock'; import { getCommentsArrayMock } from '../../../../../../../lists/common/schemas/types/comment.mock'; +import { getMockTheme } from '../../../../lib/kibana/kibana_react.mock'; -const mockTheme = { +const mockTheme = getMockTheme({ eui: { euiColorLightestShade: '#ece', }, -}; +}); describe('ExceptionDetails', () => { beforeEach(() => { diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item/exception_entries.test.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item/exception_entries.test.tsx index d29b8930c7b3e..228de32fee7d2 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item/exception_entries.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item/exception_entries.test.tsx @@ -12,8 +12,11 @@ import { mount } from 'enzyme'; import { ExceptionEntries } from './exception_entries'; import { getFormattedEntryMock } from '../../exceptions.mock'; import { getEmptyValue } from '../../../empty_value'; +import { getMockTheme } from '../../../../lib/kibana/kibana_react.mock'; -const mockTheme = { eui: { euiSize: '10px', euiColorPrimary: '#ece', euiColorDanger: '#ece' } }; +const mockTheme = getMockTheme({ + eui: { euiSize: '10px', euiColorPrimary: '#ece', euiColorDanger: '#ece' }, +}); describe('ExceptionEntries', () => { test('it does NOT render the and badge if only one exception item entry exists', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item/index.test.tsx index 72ce56f250b48..8b915379f48bb 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item/index.test.tsx @@ -12,17 +12,18 @@ import { mount } from 'enzyme'; import { ExceptionItem } from './'; import { getExceptionListItemSchemaMock } from '../../../../../../../lists/common/schemas/response/exception_list_item_schema.mock'; import { getCommentsArrayMock } from '../../../../../../../lists/common/schemas/types/comment.mock'; +import { getMockTheme } from '../../../../lib/kibana/kibana_react.mock'; jest.mock('../../../../lib/kibana'); -const mockTheme = { +const mockTheme = getMockTheme({ eui: { euiColorDanger: '#ece', euiColorLightestShade: '#ece', euiColorPrimary: '#ece', - euiFontWeightSemiBold: 'bold', + euiFontWeightSemiBold: 1, }, -}; +}); describe('ExceptionItem', () => { it('it renders ExceptionDetails and ExceptionEntries', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exceptions_utility.test.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exceptions_utility.test.tsx index 42ce0c792dfa3..9bbd490f1ed16 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exceptions_utility.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exceptions_utility.test.tsx @@ -10,8 +10,9 @@ import { ThemeProvider } from 'styled-components'; import { mountWithIntl } from '@kbn/test/jest'; import { ExceptionsViewerUtility } from './exceptions_utility'; +import { getMockTheme } from '../../../lib/kibana/kibana_react.mock'; -const mockTheme = { +const mockTheme = getMockTheme({ eui: { euiBreakpoints: { l: '1200px', @@ -21,7 +22,7 @@ const mockTheme = { }, euiBorderThin: '1px solid #ece', }, -}; +}); describe('ExceptionsViewerUtility', () => { it('it renders correct pluralized text when more than one exception exists', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exceptions_viewer_items.test.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exceptions_viewer_items.test.tsx index 167b95995212b..1350f8c2d36bd 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exceptions_viewer_items.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exceptions_viewer_items.test.tsx @@ -12,14 +12,15 @@ import { mount } from 'enzyme'; import * as i18n from '../translations'; import { getExceptionListItemSchemaMock } from '../../../../../../lists/common/schemas/response/exception_list_item_schema.mock'; import { ExceptionsViewerItems } from './exceptions_viewer_items'; +import { getMockTheme } from '../../../lib/kibana/kibana_react.mock'; -const mockTheme = { +const mockTheme = getMockTheme({ eui: { euiSize: '10px', euiColorPrimary: '#ece', euiColorDanger: '#ece', }, -}; +}); describe('ExceptionsViewerItems', () => { it('it renders empty prompt if "showEmpty" is "true"', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/index.test.tsx index 64ecea71b120e..3fe6497105af1 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/index.test.tsx @@ -18,8 +18,9 @@ import { } from '../../../../../public/lists_plugin_deps'; import { getExceptionListSchemaMock } from '../../../../../../lists/common/schemas/response/exception_list_schema.mock'; import { getFoundExceptionListItemSchemaMock } from '../../../../../../lists/common/schemas/response/found_exception_list_item_schema.mock'; +import { getMockTheme } from '../../../lib/kibana/kibana_react.mock'; -const mockTheme = { +const mockTheme = getMockTheme({ eui: { euiColorEmptyShade: '#ece', euiBreakpoints: { @@ -29,7 +30,7 @@ const mockTheme = { m: '10px', }, }, -}; +}); jest.mock('../../../../common/lib/kibana'); jest.mock('../../../../../public/lists_plugin_deps'); diff --git a/x-pack/plugins/security_solution/public/common/components/inspect/modal.test.tsx b/x-pack/plugins/security_solution/public/common/components/inspect/modal.test.tsx index 731ff049d9b42..572513180025f 100644 --- a/x-pack/plugins/security_solution/public/common/components/inspect/modal.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/inspect/modal.test.tsx @@ -11,14 +11,15 @@ import { ThemeProvider } from 'styled-components'; import { NO_ALERT_INDEX } from '../../../../common/constants'; import { ModalInspectQuery, formatIndexPatternRequested } from './modal'; +import { getMockTheme } from '../../lib/kibana/kibana_react.mock'; -const mockTheme = { +const mockTheme = getMockTheme({ eui: { euiBreakpoints: { l: '1200px', }, }, -}; +}); const request = '{"index": ["auditbeat-*","filebeat-*","packetbeat-*","winlogbeat-*"],"allowNoIndices": true, "ignoreUnavailable": true, "body": { "aggregations": {"hosts": {"cardinality": {"field": "host.name" } }, "hosts_histogram": {"auto_date_histogram": {"field": "@timestamp","buckets": "6"},"aggs": { "count": {"cardinality": {"field": "host.name" }}}}}, "query": {"bool": {"filter": [{"range": { "@timestamp": {"gte": 1562290224506,"lte": 1562376624506 }}}]}}, "size": 0, "track_total_hits": false}}'; diff --git a/x-pack/plugins/security_solution/public/common/components/ml_popover/ml_popover.tsx b/x-pack/plugins/security_solution/public/common/components/ml_popover/ml_popover.tsx index 1f216bb8da1a3..561805217e8a1 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml_popover/ml_popover.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml_popover/ml_popover.tsx @@ -27,6 +27,10 @@ import { useSecurityJobs } from './hooks/use_security_jobs'; const PopoverContentsDiv = styled.div` max-width: 684px; + max-height: 90vh; + overflow-y: auto; + overflow-x: hidden; + padding-bottom: 15px; `; PopoverContentsDiv.displayName = 'PopoverContentsDiv'; diff --git a/x-pack/plugins/security_solution/public/common/components/paginated_table/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/paginated_table/index.test.tsx index c20f1ae66c797..3439bb0a7ddb3 100644 --- a/x-pack/plugins/security_solution/public/common/components/paginated_table/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/paginated_table/index.test.tsx @@ -14,6 +14,7 @@ import { Direction } from '../../../graphql/types'; import { BasicTableProps, PaginatedTable } from './index'; import { getHostsColumns, mockData, rowItems, sortedHosts } from './index.mock'; import { ThemeProvider } from 'styled-components'; +import { getMockTheme } from '../../lib/kibana/kibana_react.mock'; jest.mock('react', () => { const r = jest.requireActual('react'); @@ -21,7 +22,7 @@ jest.mock('react', () => { return { ...r, memo: (x: any) => x }; }); -const mockTheme = { +const mockTheme = getMockTheme({ eui: { euiColorEmptyShade: '#ece', euiSizeL: '10px', @@ -32,7 +33,7 @@ const mockTheme = { m: '10px', }, }, -}; +}); describe('Paginated Table Component', () => { let loadPage: jest.Mock; diff --git a/x-pack/plugins/security_solution/public/common/components/stat_items/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/stat_items/index.test.tsx index 9a6e430e392a3..4c4cc1f838a50 100644 --- a/x-pack/plugins/security_solution/public/common/components/stat_items/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/stat_items/index.test.tsx @@ -31,11 +31,11 @@ import { mockNarrowDateRange, } from '../../../network/components/kpi_network/mock'; import { - mockGlobalState, apolloClientObservable, - SUB_PLUGINS_REDUCER, - kibanaObservable, createSecuritySolutionStorageMock, + kibanaObservable, + mockGlobalState, + SUB_PLUGINS_REDUCER, } from '../../mock'; import { State, createStore } from '../../store'; import { Provider as ReduxStoreProvider } from 'react-redux'; @@ -43,6 +43,7 @@ import { HostsKpiStrategyResponse, NetworkKpiStrategyResponse, } from '../../../../common/search_strategy'; +import { getMockTheme } from '../../lib/kibana/kibana_react.mock'; const from = '2019-06-15T06:00:00.000Z'; const to = '2019-06-18T06:00:00.000Z'; @@ -56,7 +57,7 @@ jest.mock('../charts/barchart', () => { }); describe('Stat Items Component', () => { - const mockTheme = { eui: { euiColorMediumShade: '#ece' } }; + const mockTheme = getMockTheme({ eui: { euiColorMediumShade: '#ece' } }); const state: State = mockGlobalState; const { storage } = createSecuritySolutionStorageMock(); const store = createStore( diff --git a/x-pack/plugins/security_solution/public/common/components/threat_match/and_badge.test.tsx b/x-pack/plugins/security_solution/public/common/components/threat_match/and_badge.test.tsx index effa8426341be..28b4e60fe48d0 100644 --- a/x-pack/plugins/security_solution/public/common/components/threat_match/and_badge.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/threat_match/and_badge.test.tsx @@ -10,12 +10,13 @@ import { ThemeProvider } from 'styled-components'; import { mount } from 'enzyme'; import { AndBadgeComponent } from './and_badge'; +import { getMockTheme } from '../../lib/kibana/kibana_react.mock'; -const mockTheme = { +const mockTheme = getMockTheme({ eui: { euiColorLightShade: '#ece', }, -}; +}); describe('AndBadgeComponent', () => { test('it renders entryItemIndexItemEntryFirstRowAndBadge for very first item', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/threat_match/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/threat_match/index.test.tsx index 6aa33c3bcf4ca..058703ce369f7 100644 --- a/x-pack/plugins/security_solution/public/common/components/threat_match/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/threat_match/index.test.tsx @@ -17,12 +17,13 @@ import { useKibana } from '../../../common/lib/kibana'; import { ThreatMatchComponent } from './'; import { ThreatMapEntries } from './types'; import { IndexPattern } from 'src/plugins/data/public'; +import { getMockTheme } from '../../lib/kibana/kibana_react.mock'; -const mockTheme = { +const mockTheme = getMockTheme({ eui: { euiColorLightShade: '#ece', }, -}; +}); jest.mock('../../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/common/components/threat_match/list_item.test.tsx b/x-pack/plugins/security_solution/public/common/components/threat_match/list_item.test.tsx index 8a9adf075cbc8..39fc5dee82e8c 100644 --- a/x-pack/plugins/security_solution/public/common/components/threat_match/list_item.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/threat_match/list_item.test.tsx @@ -15,12 +15,13 @@ import { fields } from '../../../../../../../src/plugins/data/common/index_patte import { ListItemComponent } from './list_item'; import { ThreatMapEntries } from './types'; import { IndexPattern } from 'src/plugins/data/public'; +import { getMockTheme } from '../../lib/kibana/kibana_react.mock'; -const mockTheme = { +const mockTheme = getMockTheme({ eui: { euiColorLightShade: '#ece', }, -}; +}); jest.mock('../../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/common/lib/kibana/kibana_react.mock.ts b/x-pack/plugins/security_solution/public/common/lib/kibana/kibana_react.mock.ts index 17ab5026f757f..e504344f3d25f 100644 --- a/x-pack/plugins/security_solution/public/common/lib/kibana/kibana_react.mock.ts +++ b/x-pack/plugins/security_solution/public/common/lib/kibana/kibana_react.mock.ts @@ -9,6 +9,7 @@ import React from 'react'; +import { RecursivePartial } from '@elastic/eui/src/components/common'; import { coreMock } from '../../../../../../../src/core/public/mocks'; import { KibanaContextProvider } from '../../../../../../../src/plugins/kibana_react/public'; import { dataPluginMock } from '../../../../../../../src/plugins/data/public/mocks'; @@ -36,6 +37,7 @@ import { import { StartServices } from '../../../types'; import { createSecuritySolutionStorageMock } from '../../mock/mock_local_storage'; import { MlUrlGenerator } from '../../../../../ml/public'; +import { EuiTheme } from '../../../../../../../src/plugins/kibana_react/common'; const mockUiSettings: Record = { [DEFAULT_TIME_RANGE]: { from: 'now-15m', to: 'now', mode: 'quick' }, @@ -148,3 +150,6 @@ export const createKibanaContextProviderMock = () => { return ({ children }: { children: React.ReactNode }) => React.createElement(KibanaContextProvider, { services }, children); }; + +export const getMockTheme = (partialTheme: RecursivePartial): EuiTheme => + partialTheme as EuiTheme; diff --git a/x-pack/plugins/security_solution/public/common/mock/global_state.ts b/x-pack/plugins/security_solution/public/common/mock/global_state.ts index 5eae3a4d72988..c933afc98856b 100644 --- a/x-pack/plugins/security_solution/public/common/mock/global_state.ts +++ b/x-pack/plugins/security_solution/public/common/mock/global_state.ts @@ -214,7 +214,7 @@ export const mockGlobalState: State = { description: '', eqlOptions: { eventCategoryField: 'event.category', - tiebreakerField: 'event.sequence', + tiebreakerField: '', timestampField: '@timestamp', }, eventIdToNoteIds: {}, diff --git a/x-pack/plugins/security_solution/public/common/mock/index.ts b/x-pack/plugins/security_solution/public/common/mock/index.ts index a29b34ef4a1e5..469c3d9101eb4 100644 --- a/x-pack/plugins/security_solution/public/common/mock/index.ts +++ b/x-pack/plugins/security_solution/public/common/mock/index.ts @@ -9,11 +9,11 @@ export * from './global_state'; export * from './header'; export * from './hook_wrapper'; export * from './index_pattern'; -export * from './mock_timeline_data'; export * from './mock_detail_item'; +export * from './mock_ecs'; export * from './mock_local_storage'; +export * from './mock_timeline_data'; export * from './netflow'; export * from './test_providers'; -export * from './utils'; -export * from './mock_ecs'; export * from './timeline_results'; +export * from './utils'; diff --git a/x-pack/plugins/security_solution/public/common/mock/timeline_results.ts b/x-pack/plugins/security_solution/public/common/mock/timeline_results.ts index 26b30e0d1f89a..a9214eed60b36 100644 --- a/x-pack/plugins/security_solution/public/common/mock/timeline_results.ts +++ b/x-pack/plugins/security_solution/public/common/mock/timeline_results.ts @@ -2238,7 +2238,7 @@ export const defaultTimelineProps: CreateTimelineProps = { eventCategoryField: 'event.category', query: '', size: 100, - tiebreakerField: 'event.sequence', + tiebreakerField: '', timestampField: '@timestamp', }, eventIdToNoteIds: {}, 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 7d577659d66e2..a8aa42a3a59ff 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 @@ -157,7 +157,7 @@ describe('alert actions', () => { eventCategoryField: 'event.category', query: '', size: 100, - tiebreakerField: 'event.sequence', + tiebreakerField: '', timestampField: '@timestamp', }, eventIdToNoteIds: {}, diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/footer.test.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/footer.test.tsx new file mode 100644 index 0000000000000..4de87ed33a87b --- /dev/null +++ b/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/footer.test.tsx @@ -0,0 +1,58 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { mount } from 'enzyme'; + +import { TestProviders } from '../../../../common/mock'; +import { EqlQueryBarFooter } from './footer'; + +jest.mock('../../../../common/lib/kibana', () => { + const originalModule = jest.requireActual('../../../../common/lib/kibana'); + return { + ...originalModule, + useKibana: () => ({ + services: { + docLinks: { links: { query: { eql: 'url-eql_doc' } } }, + }, + }), + }; +}); + +describe('EQL footer', () => { + describe('EQL Settings', () => { + beforeEach(() => { + jest.resetAllMocks(); + }); + + it('EQL settings button is enable when popover is NOT open', () => { + const wrapper = mount( + + + + ); + + expect( + wrapper.find(`[data-test-subj="eql-settings-trigger"]`).first().prop('isDisabled') + ).toBeFalsy(); + }); + + it('disable EQL settings button when popover is open', () => { + const wrapper = mount( + + + + ); + wrapper.find(`[data-test-subj="eql-settings-trigger"]`).first().simulate('click'); + wrapper.update(); + + expect( + wrapper.find(`[data-test-subj="eql-settings-trigger"]`).first().prop('isDisabled') + ).toBeTruthy(); + }); + }); +}); diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/footer.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/footer.tsx index b2b5badac2127..6c31eef221ee1 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/footer.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/footer.tsx @@ -75,8 +75,14 @@ export const EqlQueryBarFooter: FC = ({ const [openEqlSettings, setIsOpenEqlSettings] = useState(false); const [localSize, setLocalSize] = useState(optionsSelected?.size ?? 100); const debounceSize = useRef(); - const openEqlSettingsHandler = useCallback(() => setIsOpenEqlSettings(true), []); - const closeEqlSettingsHandler = useCallback(() => setIsOpenEqlSettings(false), []); + + const openEqlSettingsHandler = useCallback(() => { + setIsOpenEqlSettings(true); + }, []); + const closeEqlSettingsHandler = useCallback(() => { + setIsOpenEqlSettings(false); + }, []); + const handleEventCategoryField = useCallback( (opt: EuiComboBoxOptionOption[]) => { if (onOptionsChange) { @@ -174,13 +180,15 @@ export const EqlQueryBarFooter: FC = ({ } isOpen={openEqlSettings} closePopover={closeEqlSettingsHandler} anchorPosition="downCenter" - ownFocus={true} + ownFocus={false} > {i18n.EQL_SETTINGS_TITLE}
diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/query_preview/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/query_preview/index.test.tsx index 4d43040880ae1..3de3d3f6cbc29 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/query_preview/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/query_preview/index.test.tsx @@ -16,12 +16,13 @@ import { PreviewQuery } from './'; import { getMockEqlResponse } from '../../../../common/hooks/eql/eql_search_response.mock'; import { useMatrixHistogram } from '../../../../common/containers/matrix_histogram'; import { useEqlPreview } from '../../../../common/hooks/eql/'; +import { getMockTheme } from '../../../../common/lib/kibana/kibana_react.mock'; -const mockTheme = { +const mockTheme = getMockTheme({ eui: { euiSuperDatePickerWidth: '180px', }, -}; +}); jest.mock('../../../../common/lib/kibana'); jest.mock('../../../../common/containers/matrix_histogram'); @@ -132,19 +133,17 @@ describe('PreviewQuery', () => { test('it renders query histogram when rule type is query and preview button clicked', () => { const wrapper = mount( - - - - - + + + ); wrapper.find('[data-test-subj="queryPreviewButton"] button').at(0).simulate('click'); @@ -159,19 +158,17 @@ describe('PreviewQuery', () => { test('it renders noise warning when rule type is query, timeframe is last hour and hit average is greater than 1/hour', async () => { const wrapper = mount( - - - - - + + + ); (useMatrixHistogram as jest.Mock).mockReturnValue([ @@ -195,19 +192,17 @@ describe('PreviewQuery', () => { test('it renders query histogram when rule type is saved_query and preview button clicked', () => { const wrapper = mount( - - - - - + + + ); wrapper.find('[data-test-subj="queryPreviewButton"] button').at(0).simulate('click'); @@ -222,19 +217,17 @@ describe('PreviewQuery', () => { test('it renders eql histogram when preview button clicked and rule type is eql', () => { const wrapper = mount( - - - - - + + + ); wrapper.find('[data-test-subj="queryPreviewButton"] button').at(0).simulate('click'); @@ -249,19 +242,17 @@ describe('PreviewQuery', () => { test('it renders noise warning when rule type is eql, timeframe is last hour and hit average is greater than 1/hour', async () => { const wrapper = mount( - - - - - + + + ); (useEqlPreview as jest.Mock).mockReturnValue([ @@ -285,26 +276,24 @@ describe('PreviewQuery', () => { test('it renders threshold histogram when preview button clicked, rule type is threshold, and threshold field is defined', () => { const wrapper = mount( - - - - - + + + ); (useMatrixHistogram as jest.Mock).mockReturnValue([ @@ -334,26 +323,24 @@ describe('PreviewQuery', () => { test('it renders noise warning when rule type is threshold, and threshold field is defined, timeframe is last hour and hit average is greater than 1/hour', async () => { const wrapper = mount( - - - - - + + + ); (useMatrixHistogram as jest.Mock).mockReturnValue([ @@ -380,26 +367,24 @@ describe('PreviewQuery', () => { test('it renders query histogram when preview button clicked, rule type is threshold, and threshold field is not defined', () => { const wrapper = mount( - - - - - + + + ); wrapper.find('[data-test-subj="queryPreviewButton"] button').at(0).simulate('click'); @@ -414,26 +399,24 @@ describe('PreviewQuery', () => { test('it renders query histogram when preview button clicked, rule type is threshold, and threshold field is empty string', () => { const wrapper = mount( - - - - - + + + ); wrapper.find('[data-test-subj="queryPreviewButton"] button').at(0).simulate('click'); @@ -448,19 +431,17 @@ describe('PreviewQuery', () => { test('it hides histogram when timeframe changes', () => { const wrapper = mount( - - - - - + + + ); wrapper.find('[data-test-subj="queryPreviewButton"] button').at(0).simulate('click'); diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/index.test.tsx index c1773b2fffbab..51c2cad069d7d 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/index.test.tsx @@ -22,12 +22,13 @@ import { RuleStep, } from '../../../pages/detection_engine/rules/types'; import { fillEmptySeverityMappings } from '../../../pages/detection_engine/rules/helpers'; +import { getMockTheme } from '../../../../common/lib/kibana/kibana_react.mock'; -const mockTheme = { +const mockTheme = getMockTheme({ eui: { euiColorLightestShade: '#ece', }, -}; +}); jest.mock('../../../../common/containers/source'); jest.mock('@elastic/eui', () => { diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/index.test.tsx index 52bb844d24339..5061f12c0d22f 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/index.test.tsx @@ -15,12 +15,13 @@ import { mockAboutStepRule } from '../../../pages/detection_engine/rules/all/__m import { HeaderSection } from '../../../../common/components/header_section'; import { StepAboutRule } from '../step_about_rule'; import { AboutStepRule } from '../../../pages/detection_engine/rules/types'; +import { getMockTheme } from '../../../../common/lib/kibana/kibana_react.mock'; jest.mock('../../../../common/lib/kibana'); -const mockTheme = { +const mockTheme = getMockTheme({ eui: { euiSizeL: '10px', euiBreakpoints: { s: '450px' }, paddingSizes: { m: '10px' } }, -}; +}); describe('StepAboutRuleToggleDetails', () => { let mockRule: AboutStepRule; diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_create_rule.test.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_create_rule.test.tsx index 7eb552bcbc2ee..0074808057ca7 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_create_rule.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_create_rule.test.tsx @@ -9,6 +9,7 @@ import { renderHook, act } from '@testing-library/react-hooks'; import { useCreateRule, ReturnCreateRule } from './use_create_rule'; import { getCreateRulesSchemaMock } from '../../../../../common/detection_engine/schemas/request/rule_schemas.mock'; +import { getRulesSchemaMock } from '../../../../../common/detection_engine/schemas/response/rules_schema.mocks'; jest.mock('./api'); @@ -16,7 +17,7 @@ describe('useCreateRule', () => { test('init', async () => { const { result } = renderHook(() => useCreateRule()); - expect(result.current).toEqual([{ isLoading: false, isSaved: false }, result.current[1]]); + expect(result.current).toEqual([{ isLoading: false, ruleId: null }, result.current[1]]); }); test('saving rule with isLoading === true', async () => { @@ -27,11 +28,11 @@ describe('useCreateRule', () => { await waitForNextUpdate(); result.current[1](getCreateRulesSchemaMock()); rerender(); - expect(result.current).toEqual([{ isLoading: true, isSaved: false }, result.current[1]]); + expect(result.current).toEqual([{ isLoading: true, ruleId: null }, result.current[1]]); }); }); - test('saved rule with isSaved === true', async () => { + test('updates ruleId after the rule has been saved', async () => { await act(async () => { const { result, waitForNextUpdate } = renderHook(() => useCreateRule() @@ -39,7 +40,10 @@ describe('useCreateRule', () => { await waitForNextUpdate(); result.current[1](getCreateRulesSchemaMock()); await waitForNextUpdate(); - expect(result.current).toEqual([{ isLoading: false, isSaved: true }, result.current[1]]); + expect(result.current).toEqual([ + { isLoading: false, ruleId: getRulesSchemaMock().id }, + result.current[1], + ]); }); }); }); diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_create_rule.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_create_rule.tsx index 1a31654bf311e..e9a807d772d8b 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_create_rule.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_create_rule.tsx @@ -16,28 +16,31 @@ import { transformOutput } from './transforms'; interface CreateRuleReturn { isLoading: boolean; - isSaved: boolean; + ruleId: string | null; } export type ReturnCreateRule = [CreateRuleReturn, Dispatch]; export const useCreateRule = (): ReturnCreateRule => { const [rule, setRule] = useState(null); - const [isSaved, setIsSaved] = useState(false); + const [ruleId, setRuleId] = useState(null); const [isLoading, setIsLoading] = useState(false); const [, dispatchToaster] = useStateToaster(); useEffect(() => { let isSubscribed = true; const abortCtrl = new AbortController(); - setIsSaved(false); + setRuleId(null); const saveRule = async () => { if (rule != null) { try { setIsLoading(true); - await createRule({ rule: transformOutput(rule), signal: abortCtrl.signal }); + const createRuleResponse = await createRule({ + rule: transformOutput(rule), + signal: abortCtrl.signal, + }); if (isSubscribed) { - setIsSaved(true); + setRuleId(createRuleResponse.id); } } catch (error) { if (isSubscribed) { @@ -57,5 +60,5 @@ export const useCreateRule = (): ReturnCreateRule => { }; }, [rule, dispatchToaster]); - return [{ isLoading, isSaved }, setRule]; + return [{ isLoading, ruleId }, setRule]; }; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/utility_bar.test.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/utility_bar.test.tsx index 687142cc7ed17..049a1a9b9da14 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/utility_bar.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/utility_bar.test.tsx @@ -11,8 +11,11 @@ import { ThemeProvider } from 'styled-components'; import { waitFor } from '@testing-library/react'; import { AllRulesUtilityBar } from './utility_bar'; +import { getMockTheme } from '../../../../../common/lib/kibana/kibana_react.mock'; -const mockTheme = { eui: { euiBreakpoints: { l: '1200px' }, paddingSizes: { m: '10px' } } }; +const mockTheme = getMockTheme({ + eui: { euiBreakpoints: { l: '1200px' }, paddingSizes: { m: '10px' } }, +}); describe('AllRules', () => { it('renders AllRulesUtilityBar total rules and selected rules', () => { diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/create/index.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/create/index.tsx index 58d6bccd52785..deebe26fe4a51 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/create/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/create/index.tsx @@ -22,8 +22,9 @@ import { CreateRulesSchema } from '../../../../../../common/detection_engine/sch import { useListsConfig } from '../../../../containers/detection_engine/lists/use_lists_config'; import { - getRulesUrl, getDetectionEngineUrl, + getRuleDetailsUrl, + getRulesUrl, } from '../../../../../common/components/link_to/redirect_to_detection_engine'; import { WrapperPage } from '../../../../../common/components/wrapper_page'; import { displaySuccessToast, useStateToaster } from '../../../../../common/components/toasters'; @@ -138,7 +139,7 @@ const CreateRulePageComponent: React.FC = () => { [RuleStep.scheduleRule]: false, [RuleStep.ruleActions]: false, }); - const [{ isLoading, isSaved }, setRule] = useCreateRule(); + const [{ isLoading, ruleId }, setRule] = useCreateRule(); const ruleType = stepsData.current[RuleStep.defineRule].data?.ruleType; const ruleName = stepsData.current[RuleStep.aboutRule].data?.name; const actionMessageParams = useMemo(() => getActionMessageParams(ruleType), [ruleType]); @@ -263,9 +264,9 @@ const CreateRulePageComponent: React.FC = () => { /> ); - if (isSaved && ruleName) { + if (ruleName && ruleId) { displaySuccessToast(i18n.SUCCESSFULLY_CREATED_RULES(ruleName), dispatchToaster); - history.replace(getRulesUrl()); + history.replace(getRuleDetailsUrl(ruleId)); return null; } diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/components/antivirus_registration_form/index.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/components/antivirus_registration_form/index.tsx index 7be2c9870b2f7..51edf1a200c53 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/components/antivirus_registration_form/index.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/components/antivirus_registration_form/index.tsx @@ -54,7 +54,14 @@ export const AntivirusRegistrationForm = memo(() => { ); return ( - + {TRANSLATIONS.description} ( ConfigFormHeading.displayName = 'ConfigFormHeading'; export const ConfigForm: FC = memo( - ({ type, supportedOss, dataTestSubj, rightCorner, children }) => ( + ({ type, supportedOss, osRestriction, dataTestSubj, rightCorner, children }) => ( - + {TITLES.type} {type} {TITLES.os} - {supportedOss.map((os) => OS_TITLES[os]).join(', ')} + + + {supportedOss.map((os) => OS_TITLES[os]).join(', ')} + + {osRestriction && ( + + + + + + + + + + + + + )} + - + {rightCorner} diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_details.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_details.test.tsx index 1ae4144a26835..ff5f410611099 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_details.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_details.test.tsx @@ -326,7 +326,7 @@ describe('Policy Details', () => { const userNotificationCustomMessageTextArea = policyView.find( 'EuiTextArea[data-test-subj="malwareUserNotificationCustomMessage"]' ); - const tooltip = policyView.find('EuiIconTip'); + const tooltip = policyView.find('EuiIconTip[data-test-subj="malwareTooltip"]'); expect(userNotificationCheckbox).toHaveLength(0); expect(userNotificationCustomMessageTextArea).toHaveLength(0); expect(tooltip).toHaveLength(0); diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/protections/malware.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/protections/malware.tsx index ec0b563421537..a5be095abfc59 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/protections/malware.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/protections/malware.tsx @@ -211,14 +211,14 @@ export const MalwareProtections = React.memo(() => { - + - + { - + - + ({ htmlIdGenerator: () => () => 'mockId', diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/trusted_apps_list/index.test.tsx b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/trusted_apps_list/index.test.tsx index eb6e99a8d585d..d054061dbba31 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/trusted_apps_list/index.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/trusted_apps_list/index.test.tsx @@ -20,13 +20,14 @@ import { createGlobalNoMiddlewareStore, } from '../../../test_utils'; -const mockTheme = { +import { TrustedAppsList } from '.'; +import { getMockTheme } from '../../../../../../common/lib/kibana/kibana_react.mock'; + +const mockTheme = getMockTheme({ eui: { euiColorLightestShade: '#ece', }, -}; - -import { TrustedAppsList } from '.'; +}); jest.mock('@elastic/eui/lib/services/accessibility/html_id_generator', () => ({ htmlIdGenerator: () => () => 'mockId', diff --git a/x-pack/plugins/security_solution/public/resolver/mocks/endpoint_event.ts b/x-pack/plugins/security_solution/public/resolver/mocks/endpoint_event.ts index 04541189683a2..59089af4a22f5 100644 --- a/x-pack/plugins/security_solution/public/resolver/mocks/endpoint_event.ts +++ b/x-pack/plugins/security_solution/public/resolver/mocks/endpoint_event.ts @@ -51,7 +51,7 @@ export function mockEndpointEvent({ process: { entity_id: entityID, executable: 'executable', - args: 'args', + args: ['args0', 'args1', 'args2'], name: processName, pid, hash: { 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 eeb9d65cd6ace..332f806b59ec7 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 @@ -34,7 +34,7 @@ describe(`Resolver: when analyzing a tree with no ancestors and two children and /** * These are the details we expect to see in the node detail view when the origin is selected. */ - const originEventDetailEntries: ReadonlyMap = new Map([ + const originEventDetailEntries: Array<[string, string]> = [ ['@timestamp', 'Sep 23, 2020 @ 08:25:32.316'], ['process.executable', 'executable'], ['process.pid', '0'], @@ -42,8 +42,10 @@ describe(`Resolver: when analyzing a tree with no ancestors and two children and ['user.domain', 'user.domain'], ['process.parent.pid', '0'], ['process.hash.md5', 'hash.md5'], - ['process.args', 'args'], - ]); + ['process.args', 'args0'], + ['process.args', 'args1'], + ['process.args', 'args2'], + ]; beforeEach(() => { // create a mock data access layer @@ -129,11 +131,16 @@ describe(`Resolver: when analyzing a tree with no ancestors and two children and describe.each([...originEventDetailEntries])( 'when the user hovers over the description for the field (%p) with their mouse', (fieldTitleText, value) => { + // If there are multiple values for a field, i.e. an array, this is the index for the value we are testing. + const entryIndex = originEventDetailEntries + .filter(([fieldName]) => fieldName === fieldTitleText) + .findIndex(([_, fieldValue]) => fieldValue === value); beforeEach(async () => { const dt = await simulator().resolveWrapper(() => { return simulator() .testSubject('resolver:node-detail:entry-title') - .filterWhere((title) => title.text() === fieldTitleText); + .filterWhere((title) => title.text() === fieldTitleText) + .at(entryIndex); }); expect(dt).toHaveLength(1); @@ -184,7 +191,9 @@ describe(`Resolver: when analyzing a tree with no ancestors and two children and ['user.domain', 'user.domain'], ['process.parent.pid', '0'], ['process.hash.md5', 'hash.md5'], - ['process.args', 'args'], + ['process.args', 'args0'], + ['process.args', 'args1'], + ['process.args', 'args2'], ]); }); }); diff --git a/x-pack/plugins/security_solution/public/resolver/view/panels/node_detail.tsx b/x-pack/plugins/security_solution/public/resolver/view/panels/node_detail.tsx index da52994c4e71e..ed3507d8f4bc3 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/panels/node_detail.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/panels/node_detail.tsx @@ -122,8 +122,12 @@ const NodeDetailView = memo(function ({ description: eventModel.argsForProcess(processEvent), }; - // This is the data in {title, description} form for the EuiDescriptionList to display - const processDescriptionListData = [ + const flattenedEntries: Array<{ + title: string; + description: string | string[] | number | undefined; + }> = []; + + const flattenedDescriptionListData = [ createdEntry, pathEntry, pidEntry, @@ -132,7 +136,21 @@ const NodeDetailView = memo(function ({ parentPidEntry, md5Entry, commandLineEntry, - ] + ].reduce((flattenedList, entry) => { + if (Array.isArray(entry.description)) { + return [ + ...flattenedList, + ...entry.description.map((value) => { + return { title: entry.title, description: value }; + }), + ]; + } else { + return [...flattenedList, entry]; + } + }, flattenedEntries); + + // This is the data in {title, description} form for the EuiDescriptionList to display + const processDescriptionListData = flattenedDescriptionListData .filter((entry) => { return entry.description !== undefined; }) diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/helpers.test.ts b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/helpers.test.ts index e62b19ce599f6..705ddd62470a7 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/helpers.test.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/helpers.test.ts @@ -289,7 +289,7 @@ describe('helpers', () => { deletedEventIds: [], eqlOptions: { eventCategoryField: 'event.category', - tiebreakerField: 'event.sequence', + tiebreakerField: '', timestampField: '@timestamp', query: '', size: 100, @@ -399,7 +399,7 @@ describe('helpers', () => { deletedEventIds: [], eqlOptions: { eventCategoryField: 'event.category', - tiebreakerField: 'event.sequence', + tiebreakerField: '', timestampField: '@timestamp', query: '', size: 100, @@ -509,7 +509,7 @@ describe('helpers', () => { deletedEventIds: [], eqlOptions: { eventCategoryField: 'event.category', - tiebreakerField: 'event.sequence', + tiebreakerField: '', timestampField: '@timestamp', query: '', size: 100, @@ -617,7 +617,7 @@ describe('helpers', () => { deletedEventIds: [], eqlOptions: { eventCategoryField: 'event.category', - tiebreakerField: 'event.sequence', + tiebreakerField: '', timestampField: '@timestamp', query: '', size: 100, @@ -763,7 +763,7 @@ describe('helpers', () => { deletedEventIds: [], eqlOptions: { eventCategoryField: 'event.category', - tiebreakerField: 'event.sequence', + tiebreakerField: '', timestampField: '@timestamp', query: '', size: 100, @@ -898,7 +898,7 @@ describe('helpers', () => { deletedEventIds: [], eqlOptions: { eventCategoryField: 'event.category', - tiebreakerField: 'event.sequence', + tiebreakerField: '', timestampField: '@timestamp', query: '', size: 100, @@ -1049,7 +1049,7 @@ describe('helpers', () => { deletedEventIds: [], eqlOptions: { eventCategoryField: 'event.category', - tiebreakerField: 'event.sequence', + tiebreakerField: '', timestampField: '@timestamp', query: '', size: 100, @@ -1159,7 +1159,7 @@ describe('helpers', () => { deletedEventIds: [], eqlOptions: { eventCategoryField: 'event.category', - tiebreakerField: 'event.sequence', + tiebreakerField: '', timestampField: '@timestamp', query: '', size: 100, diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline.test.tsx index 0cf7f2891dfbf..a215f02863123 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline.test.tsx @@ -19,6 +19,7 @@ import { mockTimelineResults } from '../../../common/mock/timeline_results'; import { OpenTimeline } from './open_timeline'; import { DEFAULT_SORT_DIRECTION, DEFAULT_SORT_FIELD } from './constants'; import { TimelineType, TimelineStatus } from '../../../../common/types/timeline'; +import { getMockTheme } from '../../../common/lib/kibana/kibana_react.mock'; jest.mock('../../../common/lib/kibana'); @@ -31,7 +32,7 @@ jest.mock('react-router-dom', () => { }; }); -const mockTheme = { +const mockTheme = getMockTheme({ eui: { euiSizeL: '10px', paddingSizes: { @@ -41,7 +42,7 @@ const mockTheme = { l: '1200px', }, }, -}; +}); describe('OpenTimeline', () => { const title = 'All Timelines / Open Timelines'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline_modal/open_timeline_modal_body.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline_modal/open_timeline_modal_body.test.tsx index 38186d35d2d2d..794cd275528e4 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline_modal/open_timeline_modal_body.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline_modal/open_timeline_modal_body.test.tsx @@ -18,18 +18,19 @@ import { mockTimelineResults } from '../../../../common/mock/timeline_results'; import { OpenTimelineModalBody } from './open_timeline_modal_body'; import { DEFAULT_SORT_DIRECTION, DEFAULT_SORT_FIELD } from '../constants'; import { TimelineType, TimelineStatus } from '../../../../../common/types/timeline'; +import { getMockTheme } from '../../../../common/lib/kibana/kibana_react.mock'; jest.mock('../../../../common/lib/kibana'); describe('OpenTimelineModal', () => { - const mockTheme = { + const mockTheme = getMockTheme({ eui: { euiColorMediumShade: '#ece', euiBreakpoints: { s: '500px', }, }, - }; + }); const title = 'All Timelines / Open Timelines'; let mockResults: OpenTimelineResult[]; diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/search_row/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/search_row/index.test.tsx index d75823b771681..1c650b0ae0a11 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/search_row/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/search_row/index.test.tsx @@ -15,12 +15,13 @@ import { TimelineType } from '../../../../../common/types/timeline'; import { SearchRow } from '.'; import * as i18n from '../translations'; +import { getMockTheme } from '../../../../common/lib/kibana/kibana_react.mock'; -const mockTheme = { +const mockTheme = getMockTheme({ eui: { euiSizeL: '10px', }, -}; +}); describe('SearchRow', () => { test('it renders a search input with the expected placeholder when the query is empty', () => { diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/actions_columns.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/actions_columns.test.tsx index 5f0c000094960..2a77f872117f6 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/actions_columns.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/actions_columns.test.tsx @@ -17,8 +17,9 @@ import { mockTimelineResults } from '../../../../common/mock/timeline_results'; import { OpenTimelineResult } from '../types'; import { TimelinesTableProps } from '.'; import { getMockTimelinesTableProps } from './mocks'; +import { getMockTheme } from '../../../../common/lib/kibana/kibana_react.mock'; -const mockTheme = { eui: { euiColorMediumShade: '#ece' } }; +const mockTheme = getMockTheme({ eui: { euiColorMediumShade: '#ece' } }); jest.mock('../../../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/common_columns.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/common_columns.test.tsx index 3c70cc70a66de..1826413110f1e 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/common_columns.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/common_columns.test.tsx @@ -21,8 +21,9 @@ import { TimelinesTable, TimelinesTableProps } from '.'; import * as i18n from '../translations'; import { getMockTimelinesTableProps } from './mocks'; +import { getMockTheme } from '../../../../common/lib/kibana/kibana_react.mock'; -const mockTheme = { eui: { euiColorMediumShade: '#ece' } }; +const mockTheme = getMockTheme({ eui: { euiColorMediumShade: '#ece' } }); jest.mock('../../../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/extended_columns.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/extended_columns.test.tsx index 83e21267bce28..e8960d2e0ad93 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/extended_columns.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/extended_columns.test.tsx @@ -19,8 +19,9 @@ import { TimelinesTable, TimelinesTableProps } from '.'; import * as i18n from '../translations'; import { getMockTimelinesTableProps } from './mocks'; +import { getMockTheme } from '../../../../common/lib/kibana/kibana_react.mock'; -const mockTheme = { eui: { euiColorMediumShade: '#ece' } }; +const mockTheme = getMockTheme({ eui: { euiColorMediumShade: '#ece' } }); jest.mock('../../../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/icon_header_columns.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/icon_header_columns.test.tsx index a8ed5f02fa3ef..a92d3a4eac4b0 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/icon_header_columns.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/icon_header_columns.test.tsx @@ -15,8 +15,9 @@ import { mockTimelineResults } from '../../../../common/mock/timeline_results'; import { TimelinesTable, TimelinesTableProps } from '.'; import { OpenTimelineResult } from '../types'; import { getMockTimelinesTableProps } from './mocks'; +import { getMockTheme } from '../../../../common/lib/kibana/kibana_react.mock'; -const mockTheme = { eui: { euiColorMediumShade: '#ece' } }; +const mockTheme = getMockTheme({ eui: { euiColorMediumShade: '#ece' } }); jest.mock('../../../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/index.test.tsx index 01a855524ac0d..c1aecd4a33825 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/index.test.tsx @@ -17,8 +17,9 @@ import { TimelinesTable, TimelinesTableProps } from '.'; import { getMockTimelinesTableProps } from './mocks'; import * as i18n from '../translations'; +import { getMockTheme } from '../../../../common/lib/kibana/kibana_react.mock'; -const mockTheme = { eui: { euiColorMediumShade: '#ece' } }; +const mockTheme = getMockTheme({ eui: { euiColorMediumShade: '#ece' } }); jest.mock('../../../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/title_row/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/title_row/index.test.tsx index 4661f72901eb6..a94777d0e573b 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/title_row/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/title_row/index.test.tsx @@ -11,10 +11,11 @@ import React from 'react'; import { ThemeProvider } from 'styled-components'; import { TitleRow } from '.'; +import { getMockTheme } from '../../../../common/lib/kibana/kibana_react.mock'; -const mockTheme = { - eui: { euiSizeS: '10px', euiLineHeight: '20px', euiBreakpoints: { s: '10px' }, euiSize: '10px' }, -}; +const mockTheme = getMockTheme({ + eui: { euiSizeS: '10px', euiLineHeight: 10, euiBreakpoints: { s: '10px' }, euiSize: '10px' }, +}); describe('TitleRow', () => { const title = 'All Timelines / Open Timelines'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/unknown_column_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/unknown_column_renderer.test.tsx index 6d7a9e5aecfd9..d3c5da72cd2ad 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/unknown_column_renderer.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/unknown_column_renderer.test.tsx @@ -15,12 +15,13 @@ import { defaultHeaders, mockTimelineData } from '../../../../../common/mock'; import { getEmptyValue } from '../../../../../common/components/empty_value'; import { unknownColumnRenderer } from './unknown_column_renderer'; import { getValues } from './helpers'; +import { getMockTheme } from '../../../../../common/lib/kibana/kibana_react.mock'; -const mockTheme = { +const mockTheme = getMockTheme({ eui: { euiColorMediumShade: '#ece', }, -}; +}); describe('unknown_column_renderer', () => { let mockDatum: TimelineNonEcsData[]; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/pinned_tab_content/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/pinned_tab_content/index.tsx index 68461a7234d09..62aa4f0c2456d 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/pinned_tab_content/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/pinned_tab_content/index.tsx @@ -21,6 +21,7 @@ import { StatefulBody } from '../body'; import { Footer, footerHeight } from '../footer'; import { requiredFieldsForActions } from '../../../../detections/components/alerts_table/default_config'; import { EventDetailsWidthProvider } from '../../../../common/components/events_viewer/event_details_width_context'; +import { sourcererSelectors } from '../../../../common/store/sourcerer'; import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; import { timelineDefaults } from '../../../store/timeline/defaults'; import { useSourcererScope } from '../../../../common/containers/sourcerer'; @@ -30,6 +31,7 @@ import { State } from '../../../../common/store'; import { calculateTotalPages } from '../helpers'; import { TimelineTabs } from '../../../../../common/types/timeline'; import { DetailsPanel } from '../../side_panel'; +import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; const StyledEuiFlyoutBody = styled(EuiFlyoutBody)` overflow-y: hidden; @@ -97,6 +99,12 @@ export const PinnedTabContentComponent: React.FC = ({ SourcererScopeName.timeline ); + const existingIndexNamesSelector = useMemo( + () => sourcererSelectors.getAllExistingIndexNamesSelector(), + [] + ); + const existingIndexNames = useDeepEqualSelector(existingIndexNamesSelector); + const filterQuery = useMemo(() => { if (isEmpty(pinnedEventIds)) { return ''; @@ -159,7 +167,7 @@ export const PinnedTabContentComponent: React.FC = ({ docValueFields, endDate: '', id: `pinned-${timelineId}`, - indexNames: [''], + indexNames: existingIndexNames, fields: timelineQueryFields, limit: itemsPerPage, filterQuery, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/eql/selectors.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/eql/selectors.tsx index 83418d5f2561f..9c3555f2fb710 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/eql/selectors.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/eql/selectors.tsx @@ -16,7 +16,7 @@ export const getEqlOptions = () => eventCategoryField: [{ label: 'event.category' }], tiebreakerField: [ { - label: 'event.sequence', + label: '', }, ], timestampField: [ diff --git a/x-pack/plugins/security_solution/public/timelines/store/timeline/defaults.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/defaults.ts index 77d5b5d3caed8..5f9e64843573f 100644 --- a/x-pack/plugins/security_solution/public/timelines/store/timeline/defaults.ts +++ b/x-pack/plugins/security_solution/public/timelines/store/timeline/defaults.ts @@ -25,7 +25,7 @@ export const timelineDefaults: SubsetTimelineModel & description: '', eqlOptions: { eventCategoryField: 'event.category', - tiebreakerField: 'event.sequence', + tiebreakerField: '', timestampField: '@timestamp', query: '', size: 100, diff --git a/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.test.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.test.ts index d9accd5512de6..57fa86f853c8d 100644 --- a/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.test.ts +++ b/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.test.ts @@ -91,7 +91,7 @@ describe('Epic Timeline', () => { description: '', eqlOptions: { eventCategoryField: 'event.category', - tiebreakerField: 'event.sequence', + tiebreakerField: '', timestampField: '@timestamp', }, eventIdToNoteIds: {}, @@ -241,7 +241,7 @@ describe('Epic Timeline', () => { description: '', eqlOptions: { eventCategoryField: 'event.category', - tiebreakerField: 'event.sequence', + tiebreakerField: '', timestampField: '@timestamp', }, eventType: 'all', 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 e9f2d6c468207..acdf064c2355f 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 @@ -79,7 +79,7 @@ const basicTimeline: TimelineModel = { description: '', eqlOptions: { eventCategoryField: 'event.category', - tiebreakerField: 'event.sequence', + tiebreakerField: '', timestampField: '@timestamp', }, eventIdToNoteIds: {}, diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.ts b/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.ts index a3d41d35aaa92..58a73d31708a1 100644 --- a/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.ts +++ b/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.ts @@ -30,10 +30,10 @@ import { isAtLeast, LicenseService } from '../../../../common/license/license'; export class PolicyWatcher { private logger: Logger; - private soClient: SavedObjectsClientContract; private esClient: ElasticsearchClient; private policyService: PackagePolicyServiceInterface; private subscription: Subscription | undefined; + private soStart: SavedObjectsServiceStart; constructor( policyService: PackagePolicyServiceInterface, soStart: SavedObjectsServiceStart, @@ -41,9 +41,9 @@ export class PolicyWatcher { logger: Logger ) { this.policyService = policyService; - this.soClient = this.makeInternalSOClient(soStart); this.esClient = esStart.client.asInternalUser; this.logger = logger; + this.soStart = soStart; } /** @@ -89,7 +89,7 @@ export class PolicyWatcher { }; do { try { - response = await this.policyService.list(this.soClient, { + response = await this.policyService.list(this.makeInternalSOClient(this.soStart), { page: page++, perPage: 100, kuery: `${PACKAGE_POLICY_SAVED_OBJECT_TYPE}.package.name: endpoint`, @@ -119,12 +119,17 @@ export class PolicyWatcher { license ); try { - await this.policyService.update(this.soClient, this.esClient, policy.id, updatePolicy); + await this.policyService.update( + this.makeInternalSOClient(this.soStart), + this.esClient, + policy.id, + updatePolicy + ); } catch (e) { // try again for transient issues try { await this.policyService.update( - this.soClient, + this.makeInternalSOClient(this.soStart), this.esClient, policy.id, updatePolicy diff --git a/x-pack/plugins/snapshot_restore/__jest__/client_integration/policy_add.test.ts b/x-pack/plugins/snapshot_restore/__jest__/client_integration/policy_add.test.ts index d7ce5168be66e..6e884069f1373 100644 --- a/x-pack/plugins/snapshot_restore/__jest__/client_integration/policy_add.test.ts +++ b/x-pack/plugins/snapshot_restore/__jest__/client_integration/policy_add.test.ts @@ -78,29 +78,51 @@ describe('', () => { test('should require a policy name', async () => { const { form, find } = testBed; + // Verify required validation form.setInputValue('nameInput', ''); find('nameInput').simulate('blur'); - expect(form.getErrorsMessages()).toEqual(['Policy name is required.']); + + // Enter valid policy name and verify no error messages + form.setInputValue('nameInput', 'my_policy'); + find('nameInput').simulate('blur'); + + expect(form.getErrorsMessages()).toEqual([]); }); - test('should require a snapshot name', () => { + test('should require a snapshot name that is lowercase', () => { const { form, find } = testBed; + // Verify required validation form.setInputValue('snapshotNameInput', ''); find('snapshotNameInput').simulate('blur'); - expect(form.getErrorsMessages()).toEqual(['Snapshot name is required.']); + + // Verify lowercase validation + form.setInputValue('snapshotNameInput', 'MY_SNAPSHOT'); + find('snapshotNameInput').simulate('blur'); + expect(form.getErrorsMessages()).toEqual(['Snapshot name needs to be lowercase.']); + + // Enter valid snapshot name and verify no error messages + form.setInputValue('snapshotNameInput', 'my_snapshot'); + find('snapshotNameInput').simulate('blur'); + + expect(form.getErrorsMessages()).toEqual([]); }); it('should require a schedule', () => { const { form, find } = testBed; + // Verify required validation find('showAdvancedCronLink').simulate('click'); form.setInputValue('advancedCronInput', ''); find('advancedCronInput').simulate('blur'); - expect(form.getErrorsMessages()).toEqual(['Schedule is required.']); + + // Enter valid schedule and verify no error messages + form.setInputValue('advancedCronInput', '0 30 1 * * ?'); + find('advancedCronInput').simulate('blur'); + expect(form.getErrorsMessages()).toEqual([]); }); }); diff --git a/x-pack/plugins/snapshot_restore/public/application/components/policy_form/steps/index.ts b/x-pack/plugins/snapshot_restore/public/application/components/policy_form/steps/index.ts index b71104cc003f0..5e4b71e4ed2a2 100644 --- a/x-pack/plugins/snapshot_restore/public/application/components/policy_form/steps/index.ts +++ b/x-pack/plugins/snapshot_restore/public/application/components/policy_form/steps/index.ts @@ -6,13 +6,16 @@ */ import { SlmPolicyPayload } from '../../../../../common/types'; -import { PolicyValidation } from '../../../services/validation'; +import { PolicyValidation, ValidatePolicyHelperData } from '../../../services/validation'; export interface StepProps { policy: SlmPolicyPayload; indices: string[]; dataStreams: string[]; - updatePolicy: (updatedSettings: Partial, validationHelperData?: any) => void; + updatePolicy: ( + updatedSettings: Partial, + validationHelperData?: ValidatePolicyHelperData + ) => void; isEditing: boolean; currentUrl: string; errors: PolicyValidation['errors']; diff --git a/x-pack/plugins/snapshot_restore/public/application/components/policy_form/steps/step_logistics.tsx b/x-pack/plugins/snapshot_restore/public/application/components/policy_form/steps/step_logistics.tsx index 5545e8a87d99d..6443d774c9ac7 100644 --- a/x-pack/plugins/snapshot_restore/public/application/components/policy_form/steps/step_logistics.tsx +++ b/x-pack/plugins/snapshot_restore/public/application/components/policy_form/steps/step_logistics.tsx @@ -46,11 +46,8 @@ export const PolicyStepLogistics: React.FunctionComponent = ({ const { error: errorLoadingRepositories, isLoading: isLoadingRepositories, - data: { repositories, managedRepository } = { + data: { repositories } = { repositories: [], - managedRepository: { - name: undefined, - }, }, resendRequest: reloadRepositories, } = useLoadRepositories(); @@ -119,16 +116,9 @@ export const PolicyStepLogistics: React.FunctionComponent = ({ fullWidth onBlur={() => setTouched({ ...touched, name: true })} onChange={(e) => { - updatePolicy( - { - name: e.target.value, - }, - { - managedRepository, - isEditing, - policyName: policy.name, - } - ); + updatePolicy({ + name: e.target.value, + }); }} placeholder={i18n.translate( 'xpack.snapshotRestore.policyForm.stepLogistics.namePlaceholder', @@ -251,16 +241,9 @@ export const PolicyStepLogistics: React.FunctionComponent = ({ ); } else { if (!policy.repository) { - updatePolicy( - { - repository: repositories[0].name, - }, - { - managedRepository, - isEditing, - policyName: policy.name, - } - ); + updatePolicy({ + repository: repositories[0].name, + }); } } @@ -286,16 +269,9 @@ export const PolicyStepLogistics: React.FunctionComponent = ({ value={!doesRepositoryExist ? '' : policy.repository} onBlur={() => setTouched({ ...touched, repository: true })} onChange={(e) => { - updatePolicy( - { - repository: e.target.value, - }, - { - managedRepository, - isEditing, - policyName: policy.name, - } - ); + updatePolicy({ + repository: e.target.value, + }); }} fullWidth data-test-subj="repositorySelect" @@ -354,16 +330,9 @@ export const PolicyStepLogistics: React.FunctionComponent = ({ defaultValue={policy.snapshotName} fullWidth onChange={(e) => { - updatePolicy( - { - snapshotName: e.target.value, - }, - { - managedRepository, - isEditing, - policyName: policy.name, - } - ); + updatePolicy({ + snapshotName: e.target.value, + }); }} onBlur={() => setTouched({ ...touched, snapshotName: true })} placeholder={i18n.translate( @@ -433,16 +402,9 @@ export const PolicyStepLogistics: React.FunctionComponent = ({ defaultValue={policy.schedule} fullWidth onChange={(e) => { - updatePolicy( - { - schedule: e.target.value, - }, - { - managedRepository, - isEditing, - policyName: policy.name, - } - ); + updatePolicy({ + schedule: e.target.value, + }); }} onBlur={() => setTouched({ ...touched, schedule: true })} placeholder={DEFAULT_POLICY_SCHEDULE} @@ -456,16 +418,9 @@ export const PolicyStepLogistics: React.FunctionComponent = ({ { setIsAdvancedCronVisible(false); - updatePolicy( - { - schedule: simpleCron.expression, - }, - { - managedRepository, - isEditing, - policyName: policy.name, - } - ); + updatePolicy({ + schedule: simpleCron.expression, + }); }} data-test-subj="showBasicCronLink" > @@ -493,16 +448,9 @@ export const PolicyStepLogistics: React.FunctionComponent = ({ frequency, }); setFieldToPreferredValueMap(newFieldToPreferredValueMap); - updatePolicy( - { - schedule: expression, - }, - { - managedRepository, - isEditing, - policyName: policy.name, - } - ); + updatePolicy({ + schedule: expression, + }); }} /> diff --git a/x-pack/plugins/snapshot_restore/public/application/services/validation/validate_policy.ts b/x-pack/plugins/snapshot_restore/public/application/services/validation/validate_policy.ts index f200fe3a8210c..3d6005f86857a 100644 --- a/x-pack/plugins/snapshot_restore/public/application/services/validation/validate_policy.ts +++ b/x-pack/plugins/snapshot_restore/public/application/services/validation/validate_policy.ts @@ -28,12 +28,6 @@ const isSnapshotNameNotLowerCase = (str: string): boolean => { }; export interface ValidatePolicyHelperData { - managedRepository?: { - name: string; - policy: string; - }; - isEditing?: boolean; - policyName?: string; /** * Whether to block on the indices configured for this snapshot. * @@ -58,13 +52,7 @@ export const validatePolicy = ( const i18n = textService.i18n; const { name, snapshotName, schedule, repository, config, retention } = policy; - const { - managedRepository, - isEditing, - policyName, - validateIndicesCount, - repositoryDoesNotExist, - } = validationHelperData; + const { validateIndicesCount, repositoryDoesNotExist } = validationHelperData; const validation: PolicyValidation = { isValid: true, @@ -160,22 +148,6 @@ export const validatePolicy = ( ); } - if ( - managedRepository && - managedRepository.name === repository && - managedRepository.policy && - !(isEditing && managedRepository.policy === policyName) - ) { - validation.errors.repository.push( - i18n.translate('xpack.snapshotRestore.policyValidation.invalidRepoErrorMessage', { - defaultMessage: 'Policy "{policyName}" is already associated with this repository.', - values: { - policyName: managedRepository.policy, - }, - }) - ); - } - if (retention && retention.expireAfterValue && retention.expireAfterValue < 0) { validation.errors.expireAfterValue.push( i18n.translate( diff --git a/x-pack/plugins/spaces/.eslintrc.json b/x-pack/plugins/spaces/.eslintrc.json deleted file mode 100644 index 2b63a9259d220..0000000000000 --- a/x-pack/plugins/spaces/.eslintrc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "rules": { - "@typescript-eslint/consistent-type-imports": 1 - } -} diff --git a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_flyout_internal.tsx b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_flyout_internal.tsx index 9dbeb70d46cfb..8f219b7154def 100644 --- a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_flyout_internal.tsx +++ b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_flyout_internal.tsx @@ -28,11 +28,11 @@ import type { ProcessedImportResponse } from 'src/plugins/saved_objects_manageme import type { Space } from 'src/plugins/spaces_oss/common'; import { processImportResponse } from '../../../../../../src/plugins/saved_objects_management/public'; +import { useSpaces } from '../../spaces_context'; import type { CopyOptions, ImportRetry, SavedObjectTarget } from '../types'; import { CopyToSpaceFlyoutFooter } from './copy_to_space_flyout_footer'; import { CopyToSpaceForm } from './copy_to_space_form'; import { ProcessingCopyToSpace } from './processing_copy_to_space'; -import { useSpaces } from '../../spaces_context'; export interface CopyToSpaceFlyoutProps { onClose: () => void; diff --git a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/lib/summarize_copy_result.test.ts b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/lib/summarize_copy_result.test.ts index 43435b322d6b0..5a0ad95b6bead 100644 --- a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/lib/summarize_copy_result.test.ts +++ b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/lib/summarize_copy_result.test.ts @@ -11,8 +11,8 @@ import type { SavedObjectsManagementRecord, } from 'src/plugins/saved_objects_management/public'; -import { summarizeCopyResult } from './summarize_copy_result'; import type { SavedObjectTarget } from '../types'; +import { summarizeCopyResult } from './summarize_copy_result'; // Sample data references: // diff --git a/x-pack/plugins/spaces/public/create_feature_catalogue_entry.ts b/x-pack/plugins/spaces/public/create_feature_catalogue_entry.ts index acaa361bca9fa..86b2f0d3ac7fe 100644 --- a/x-pack/plugins/spaces/public/create_feature_catalogue_entry.ts +++ b/x-pack/plugins/spaces/public/create_feature_catalogue_entry.ts @@ -6,7 +6,6 @@ */ import { i18n } from '@kbn/i18n'; - import type { FeatureCatalogueEntry } from 'src/plugins/home/public'; import { FeatureCatalogueCategory } from '../../../../src/plugins/home/public'; diff --git a/x-pack/plugins/spaces/public/share_saved_objects_to_space/share_saved_objects_to_space_action.tsx b/x-pack/plugins/spaces/public/share_saved_objects_to_space/share_saved_objects_to_space_action.tsx index 4e07f6799e9c6..657ff8ac0bc70 100644 --- a/x-pack/plugins/spaces/public/share_saved_objects_to_space/share_saved_objects_to_space_action.tsx +++ b/x-pack/plugins/spaces/public/share_saved_objects_to_space/share_saved_objects_to_space_action.tsx @@ -9,7 +9,7 @@ import React, { useMemo } from 'react'; import { i18n } from '@kbn/i18n'; import type { SavedObjectsManagementRecord } from 'src/plugins/saved_objects_management/public'; -import type { SpacesApiUi, ShareToSpaceFlyoutProps } from 'src/plugins/spaces_oss/public'; +import type { ShareToSpaceFlyoutProps, SpacesApiUi } from 'src/plugins/spaces_oss/public'; import { SavedObjectsManagementAction } from '../../../../../src/plugins/saved_objects_management/public'; diff --git a/x-pack/plugins/spaces/public/share_saved_objects_to_space/share_saved_objects_to_space_column.tsx b/x-pack/plugins/spaces/public/share_saved_objects_to_space/share_saved_objects_to_space_column.tsx index c9909af16e387..609811cd6b7ce 100644 --- a/x-pack/plugins/spaces/public/share_saved_objects_to_space/share_saved_objects_to_space_column.tsx +++ b/x-pack/plugins/spaces/public/share_saved_objects_to_space/share_saved_objects_to_space_column.tsx @@ -9,7 +9,7 @@ import React, { useMemo } from 'react'; import { i18n } from '@kbn/i18n'; import type { SavedObjectsManagementColumn } from 'src/plugins/saved_objects_management/public'; -import type { SpacesApiUi, SpaceListProps } from 'src/plugins/spaces_oss/public'; +import type { SpaceListProps, SpacesApiUi } from 'src/plugins/spaces_oss/public'; interface WrapperProps { spacesApiUi: SpacesApiUi; diff --git a/x-pack/plugins/spaces/public/spaces_context/wrapper_internal.tsx b/x-pack/plugins/spaces/public/spaces_context/wrapper_internal.tsx index 7c33f859a8c3e..dd6408e9550ee 100644 --- a/x-pack/plugins/spaces/public/spaces_context/wrapper_internal.tsx +++ b/x-pack/plugins/spaces/public/spaces_context/wrapper_internal.tsx @@ -14,7 +14,7 @@ import type { SpacesContextProps } from 'src/plugins/spaces_oss/public'; import type { SpacesManager } from '../spaces_manager'; import type { ShareToSpacesData, ShareToSpaceTarget } from '../types'; import { createSpacesReactContext } from './context'; -import type { SpacesReactContext, InternalProps } from './types'; +import type { InternalProps, SpacesReactContext } from './types'; interface Services { application: ApplicationStart; diff --git a/x-pack/plugins/stack_alerts/public/alert_types/es_query/expression.tsx b/x-pack/plugins/stack_alerts/public/alert_types/es_query/expression.tsx index 6adcada9b273a..c8bf85badafbc 100644 --- a/x-pack/plugins/stack_alerts/public/alert_types/es_query/expression.tsx +++ b/x-pack/plugins/stack_alerts/public/alert_types/es_query/expression.tsx @@ -270,7 +270,7 @@ export const EsQueryAlertTypeExpression: React.FunctionComponent<
@@ -281,7 +281,7 @@ export const EsQueryAlertTypeExpression: React.FunctionComponent< label={ } isInvalid={errors.esQuery.length > 0} @@ -290,7 +290,7 @@ export const EsQueryAlertTypeExpression: React.FunctionComponent< } @@ -302,7 +302,7 @@ export const EsQueryAlertTypeExpression: React.FunctionComponent< theme="github" data-test-subj="queryJsonEditor" aria-label={i18n.translate('xpack.stackAlerts.esQuery.ui.queryEditor', { - defaultMessage: 'ES query editor', + defaultMessage: 'Elasticsearch query editor', })} value={xJson} onChange={(xjson: string) => { diff --git a/x-pack/plugins/stack_alerts/public/alert_types/es_query/index.ts b/x-pack/plugins/stack_alerts/public/alert_types/es_query/index.ts index 6d42ee714a222..43f36c3ea44db 100644 --- a/x-pack/plugins/stack_alerts/public/alert_types/es_query/index.ts +++ b/x-pack/plugins/stack_alerts/public/alert_types/es_query/index.ts @@ -15,7 +15,7 @@ export function getAlertType(): AlertTypeModel { return { id: '.es-query', description: i18n.translate('xpack.stackAlerts.esQuery.ui.alertType.descriptionText', { - defaultMessage: 'Alert on matches against an ES query.', + defaultMessage: 'Alert on matches against an Elasticsearch query.', }), iconClass: 'logoElastic', documentationUrl: (docLinks) => docLinks.links.alerting.esQuery, @@ -24,7 +24,7 @@ export function getAlertType(): AlertTypeModel { defaultActionMessage: i18n.translate( 'xpack.stackAlerts.esQuery.ui.alertType.defaultActionMessage', { - defaultMessage: `ES query alert '\\{\\{alertName\\}\\}' is active: + defaultMessage: `Elasticsearch query alert '\\{\\{alertName\\}\\}' is active: - Value: \\{\\{context.value\\}\\} - Conditions Met: \\{\\{context.conditions\\}\\} over \\{\\{params.timeWindowSize\\}\\}\\{\\{params.timeWindowUnit\\}\\} diff --git a/x-pack/plugins/stack_alerts/public/alert_types/es_query/validation.ts b/x-pack/plugins/stack_alerts/public/alert_types/es_query/validation.ts index e6449dd4a6089..a392563323aa7 100644 --- a/x-pack/plugins/stack_alerts/public/alert_types/es_query/validation.ts +++ b/x-pack/plugins/stack_alerts/public/alert_types/es_query/validation.ts @@ -48,7 +48,7 @@ export const validateExpression = (alertParams: EsQueryAlertParams): ValidationR if (!esQuery) { errors.esQuery.push( i18n.translate('xpack.stackAlerts.esQuery.ui.validation.error.requiredQueryText', { - defaultMessage: 'ES query is required.', + defaultMessage: 'Elasticsearch query is required.', }) ); } else { diff --git a/x-pack/plugins/stack_alerts/server/alert_types/es_query/alert_type.test.ts b/x-pack/plugins/stack_alerts/server/alert_types/es_query/alert_type.test.ts index c38dad5134373..d844651d0b8aa 100644 --- a/x-pack/plugins/stack_alerts/server/alert_types/es_query/alert_type.test.ts +++ b/x-pack/plugins/stack_alerts/server/alert_types/es_query/alert_type.test.ts @@ -17,7 +17,7 @@ describe('alertType', () => { it('alert type creation structure is the expected value', async () => { expect(alertType.id).toBe('.es-query'); - expect(alertType.name).toBe('ES query'); + expect(alertType.name).toBe('Elasticsearch query'); expect(alertType.actionGroups).toEqual([{ id: 'query matched', name: 'Query matched' }]); expect(alertType.actionVariables).toMatchInlineSnapshot(` @@ -54,7 +54,7 @@ describe('alertType', () => { "name": "index", }, Object { - "description": "The string representation of the ES query.", + "description": "The string representation of the Elasticsearch query.", "name": "esQuery", }, Object { diff --git a/x-pack/plugins/stack_alerts/server/alert_types/es_query/alert_type.ts b/x-pack/plugins/stack_alerts/server/alert_types/es_query/alert_type.ts index 8fe988d95d72f..acc61c147f915 100644 --- a/x-pack/plugins/stack_alerts/server/alert_types/es_query/alert_type.ts +++ b/x-pack/plugins/stack_alerts/server/alert_types/es_query/alert_type.ts @@ -30,7 +30,7 @@ export function getAlertType( logger: Logger ): AlertType { const alertTypeName = i18n.translate('xpack.stackAlerts.esQuery.alertTypeTitle', { - defaultMessage: 'ES query', + defaultMessage: 'Elasticsearch query', }); const actionGroupName = i18n.translate('xpack.stackAlerts.esQuery.actionGroupThresholdMetTitle', { @@ -82,7 +82,7 @@ export function getAlertType( const actionVariableContextQueryLabel = i18n.translate( 'xpack.stackAlerts.esQuery.actionVariableContextQueryLabel', { - defaultMessage: 'The string representation of the ES query.', + defaultMessage: 'The string representation of the Elasticsearch query.', } ); diff --git a/x-pack/plugins/stack_alerts/server/alert_types/index_threshold/README.md b/x-pack/plugins/stack_alerts/server/alert_types/index_threshold/README.md index de5b57dfbffc6..4aebb51a85a89 100644 --- a/x-pack/plugins/stack_alerts/server/alert_types/index_threshold/README.md +++ b/x-pack/plugins/stack_alerts/server/alert_types/index_threshold/README.md @@ -2,7 +2,7 @@ directory in plugin: `server/alert_types/index_threshold` -The index threshold alert type is designed to run an ES query over indices, +The index threshold alert type is designed to run an Elasticsearch query over indices, aggregating field values from documents, comparing them to threshold values, and scheduling actions to run when the thresholds are met. @@ -91,7 +91,7 @@ scheduled against them independently). The time window is set to 5 seconds. That means, every time the alert runs it's queries (every second, in the example above), it will run it's -ES query over the last 5 seconds. Thus, the queries, over time, will overlap. +Elasticsearch query over the last 5 seconds. Thus, the queries, over time, will overlap. Sometimes that's what you want. Other times, maybe you just want to do sampling, running an alert every hour, with a 5 minute window. Up to the you! diff --git a/x-pack/plugins/stack_alerts/server/plugin.test.ts b/x-pack/plugins/stack_alerts/server/plugin.test.ts index 9d5184011dc7b..7ad1bdec15eaf 100644 --- a/x-pack/plugins/stack_alerts/server/plugin.test.ts +++ b/x-pack/plugins/stack_alerts/server/plugin.test.ts @@ -83,7 +83,7 @@ describe('AlertingBuiltins Plugin', () => { }, ], "id": ".es-query", - "name": "ES query", + "name": "Elasticsearch query", } `); diff --git a/x-pack/plugins/task_manager/README.md b/x-pack/plugins/task_manager/README.md index c20bc4b29bcc8..400636824a764 100644 --- a/x-pack/plugins/task_manager/README.md +++ b/x-pack/plugins/task_manager/README.md @@ -1,6 +1,7 @@ # Kibana task manager The task manager is a generic system for running background tasks. +Documentation: https://www.elastic.co/guide/en/kibana/master/task-manager-production-considerations.html It supports: - Single-run and recurring tasks @@ -495,11 +496,9 @@ Our current model, then, is this: ## Limitations in v1.0 -In v1, the system only understands 1 minute increments (e.g. '1m', '7m'). Tasks which need something more robust will need to specify their own "runAt" in their run method's return value. - There is only a rudimentary mechanism for coordinating tasks and handling expired tasks. Tasks are considered expired if their runAt has arrived, and their status is still 'running'. -There is no task history. Each run overwrites the previous run's state. One-time tasks are removed from the index upon completion regardless of success / failure. +There is no task history. Each run overwrites the previous run's state. One-time tasks are removed from the index upon completion. The task manager's public API is create / delete / list. Updates aren't directly supported, and listing should be scoped so that users only see their own tasks. @@ -522,4 +521,5 @@ The task manager's public API is create / delete / list. Updates aren't directly Task Manager exposes runtime statistics which enable basic observability into its inner workings and makes it possible to monitor the system from external services. -Learn More: [./MONITORING](./MONITORING.MD) +Public Documentation: https://www.elastic.co/guide/en/kibana/master/task-manager-health-monitoring.html +Developer Documentation: [./MONITORING](./MONITORING.MD) \ No newline at end of file diff --git a/x-pack/plugins/task_manager/server/MONITORING.md b/x-pack/plugins/task_manager/server/MONITORING.md index 771005f28b3f4..02946b9b3e53f 100644 --- a/x-pack/plugins/task_manager/server/MONITORING.md +++ b/x-pack/plugins/task_manager/server/MONITORING.md @@ -32,21 +32,8 @@ xpack.task_manager.monitored_task_execution_thresholds: ``` ## Consuming Health Stats -Task Manager exposes a `/api/task_manager/_health` api which returns the _latest_ stats. -Calling this API is designed to be fast and doesn't actually perform any checks- rather it returns the result of the latest stats in the system, and is design in such a way that you could call it from an external service on a regular basis without worrying that you'll be adding substantial load to the system. -Additionally, the metrics are logged out into Task Manager's `DEBUG` logger at a regular cadence (dictated by the Polling Interval). -If you wish to enable DEBUG logging in your Kibana instance, you will need to add the following to your `Kibana.yml`: -``` -logging: - loggers: - - context: plugins.taskManager - appenders: [console] - level: debug -``` - -Please bear in mind that these stats are logged as often as your `poll_interval` configuration, which means it could add substantial noise to your logs. -We would recommend only enabling this level of logging temporarily. +Public Documentation: https://www.elastic.co/guide/en/kibana/master/task-manager-health-monitoring.html#task-manager-consuming-health-stats ### Understanding the Exposed Stats @@ -60,6 +47,8 @@ An `OK` status will only be displayed when all sections are marked as `OK`. The root `timestamp` is the time in which the summary was exposed (either to the DEBUG logger or the http api) and the `last_update` is the last time any one of the sections was updated. +Follow this step-by-step guide to make sense of the stats: https://www.elastic.co/guide/en/kibana/master/task-manager-troubleshooting.html#task-manager-diagnosing-root-cause + #### The Configuration Section The `configuration` section summarizes Task Manager's current configuration, including dynamic configurations which change over time, such as `poll_interval` and `max_workers` which adjust in reaction to changing load on the system. @@ -85,232 +74,3 @@ These include: - The `Success | Retry | Failure ratio` by task type. This is different than the workload stats which tell you what's in the queue, but ca't keep track of retries and of non recurring tasks as they're wiped off the index when completed. These are "Hot" stats which are updated reactively as Tasks are executed and interacted with. - -### Example Stats - -For example, if you _curl_ the `/api/task_manager/_health` endpoint, you might get these stats: -``` -{ - /* the time these stats were returned by the api */ - "timestamp": "2020-10-05T18:26:11.346Z", - /* the overall status of the system */ - "status": "OK", - /* last time any stat was updated in this output */ - "last_update": "2020-10-05T17:57:55.411Z", - "stats": { - "configuration": { /* current configuration of TM */ - "timestamp": "2020-10-05T17:56:06.507Z", - "status": "OK", - "value": { - "max_workers": 10, - "poll_interval": 3000, - "request_capacity": 1000, - "max_poll_inactivity_cycles": 10, - "monitored_aggregated_stats_refresh_rate": 60000, - "monitored_stats_running_average_window": 50 - } - }, - "workload": { /* The workload of this deployment */ - "timestamp": "2020-10-05T17:57:06.534Z", - "status": "OK", - "value": { - "count": 6, /* count of tasks in the system */ - "task_types": { /* what tasks are there and what status are they in */ - "actions_telemetry": { - "count": 1, - "status": { - "idle": 1 - } - }, - "alerting_telemetry": { - "count": 1, - "status": { - "idle": 1 - } - }, - "apm-telemetry-task": { - "count": 1, - "status": { - "idle": 1 - } - }, - "endpoint:user-artifact-packager": { - "count": 1, - "status": { - "idle": 1 - } - }, - "lens_telemetry": { - "count": 1, - "status": { - "idle": 1 - } - }, - "session_cleanup": { - "count": 1, - "status": { - "idle": 1 - } - } - }, - - /* Frequency of recurring tasks schedules */ - "schedule": [ - ["60s", 1], /* 1 task, every 60s */ - ["3600s", 3], /* 3 tasks every hour */ - ["720m", 1] - ], - /* There are no overdue tasks in this system at the moment */ - "overdue": 0, - /* This is the schedule density, it shows a histogram of all the polling intervals in the next minute (or, if - pollInterval is configured unusually high it will show a min of 2 refresh intervals into the future, and a max of 50 buckets). - Here we see that on the 3rd polling interval from *now* (which is ~9 seconds from now, as pollInterval is `3s`) there is one task due to run. - We also see that there are 5 due two intervals later, which is fine as we have a max workers of `10` - */ - "estimated_schedule_density": [0, 0, 1, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] - } - }, - "runtime": { - "timestamp": "2020-10-05T17:57:55.411Z", - "status": "OK", - "value": { - "polling": { - /* When was the last polling cycle? */ - "last_successful_poll": "2020-10-05T17:57:55.411Z", - /* When was the last time Task Manager adjusted it's polling delay? */ - "last_polling_delay": "2020-10-05T17:57:55.411Z", - /* Running average of polling duration measuring the time from the scheduled polling cycle - start until all claimed tasks are marked as running */ - "duration": { - "p50": 4, - "p90": 12, - "p95": 12, - "p99": 12 - }, - /* Running average of number of version clashes caused by the markAvailableTasksAsClaimed stage - of the polling cycle */ - "claim_conflicts": { - "p50": 0, - "p90": 0, - "p95": 0, - "p99": 0 - }, - /* Running average of mismatch between the number of tasks updated by the markAvailableTasksAsClaimed stage - of the polling cycle and the number of docs found by the sweepForClaimedTasks stage */ - "claim_mismatches": { - "p50": 0, - "p90": 0, - "p95": 0, - "p99": 0 - }, - /* What is the frequency of polling cycle result? - Here we see 94% of "NoTasksClaimed" and 6% "PoolFilled" */ - "result_frequency_percent_as_number": { - /* This tells us that the polling cycle didnt claim any new tasks */ - "NoTasksClaimed": 94, - /* This is a legacy result we are renaming in 8.0.0 - - it tells us when a polling cycle resulted in claiming more tasks - than we had workers for, butt he name doesn't make much sense outside of the context of the code */ - "RanOutOfCapacity": 0, - /* This is a legacy result we are renaming in 8.0.0 - - it tells us when a polling cycle resulted in tasks being claimed but less the the available workers */ - "PoolFilled": 6, - /* This tells us when a polling cycle resulted in no tasks being claimed due to there being no available workers */ - "NoAvailableWorkers": 0, - /* This tells us when a polling cycle resulted in tasks being claimed at 100% capacity of the available workers */ - "RunningAtCapacity": 0, - /* This tells us when the poller failed to claim */ - "Failed": 0 - } - }, - /* on average, 50% of the tasks in this deployment run at most 1.7s after their scheduled time */ - "drift": { - "p50": 1720, - "p90": 2274, - "p95": 2574, - "p99": 3221 - }, - /* on average, 50% of the tasks polling cycles in this deployment result at most in 25% of workers being in use. - We track this in percentages rather than absolute count as max_workers can change over time in response - to changing circumstance. */ - "load": { - "p50": 25, - "p90": 80, - "p95": 100, - "p99": 100 - }, - "execution": { - "duration": { - /* on average, the `endpoint:user-artifact-packager` tasks take 15ms to run */ - "endpoint:user-artifact-packager": { - "mean": 15, - "median": 14.5 - }, - "session_cleanup": { - "mean": 28, - "median": 28 - }, - "lens_telemetry": { - "mean": 100, - "median": 100 - }, - "actions_telemetry": { - "mean": 135, - "median": 135 - }, - "alerting_telemetry": { - "mean": 197, - "median": 197 - }, - "apm-telemetry-task": { - "mean": 1347, - "median": 1347 - } - }, - "result_frequency_percent_as_number": { - /* and 100% of `endpoint:user-artifact-packager` have completed in success (within the running average window, - so the past 50 runs (by default, configrable by `monitored_stats_running_average_window`) */ - "endpoint:user-artifact-packager": { - "status": "OK", - "Success": 100, - "RetryScheduled": 0, - "Failed": 0 - }, - "session_cleanup": { - /* `error` status as 90% of results are `Failed` */ - "status": "error", - "Success": 5, - "RetryScheduled": 5, - "Failed": 90 - }, - "lens_telemetry": { - "status": "OK", - "Success": 100, - "RetryScheduled": 0, - "Failed": 0 - }, - "actions_telemetry": { - "status": "OK", - "Success": 100, - "RetryScheduled": 0, - "Failed": 0 - }, - "alerting_telemetry": { - "status": "OK", - "Success": 100, - "RetryScheduled": 0, - "Failed": 0 - }, - "apm-telemetry-task": { - "status": "OK", - "Success": 100, - "RetryScheduled": 0, - "Failed": 0 - } - } - } - } - } - } -} -``` diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 6e1f96e80b573..6daf76144253b 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -19866,7 +19866,6 @@ "xpack.snapshotRestore.policyValidation.invalidNegativeDeleteAfterErrorMessage": "次の期間後削除は負数にすることができません。", "xpack.snapshotRestore.policyValidation.invalidNegativeMaxCountErrorMessage": "最大カウントは負数にすることができません。", "xpack.snapshotRestore.policyValidation.invalidNegativeMinCountErrorMessage": "最小カウントは負数にすることができません。", - "xpack.snapshotRestore.policyValidation.invalidRepoErrorMessage": "ポリシー\"{policyName}\"は既にこのリポジトリに関連付けられています。", "xpack.snapshotRestore.policyValidation.nameRequiredErroMessage": "ポリシー名が必要です。", "xpack.snapshotRestore.policyValidation.repositoryRequiredErrorMessage": "レポジトリが必要です。", "xpack.snapshotRestore.policyValidation.scheduleRequiredErrorMessage": "スケジュールが必要です。", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index b5a4b8a708513..83dc1397d3b12 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -19912,7 +19912,6 @@ "xpack.snapshotRestore.policyValidation.invalidNegativeDeleteAfterErrorMessage": "“在指定时间后删除”不能为负。", "xpack.snapshotRestore.policyValidation.invalidNegativeMaxCountErrorMessage": "“最大计数”不能为负。", "xpack.snapshotRestore.policyValidation.invalidNegativeMinCountErrorMessage": "“最小计数”不能为负。", - "xpack.snapshotRestore.policyValidation.invalidRepoErrorMessage": "策略“{policyName}”已与此存储库关联。", "xpack.snapshotRestore.policyValidation.nameRequiredErroMessage": "策略名称必填。", "xpack.snapshotRestore.policyValidation.repositoryRequiredErrorMessage": "存储库必填。", "xpack.snapshotRestore.policyValidation.scheduleRequiredErrorMessage": "计划必填。", diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/solution_filter.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/solution_filter.tsx index 194d511f51945..f49d1ef49f6ed 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/solution_filter.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/solution_filter.tsx @@ -44,7 +44,7 @@ export const SolutionFilter: React.FunctionComponent = ({ > } diff --git a/x-pack/plugins/upgrade_assistant/common/constants.ts b/x-pack/plugins/upgrade_assistant/common/constants.ts index 654a1a3331733..87b014c5bbc5b 100644 --- a/x-pack/plugins/upgrade_assistant/common/constants.ts +++ b/x-pack/plugins/upgrade_assistant/common/constants.ts @@ -13,3 +13,10 @@ import SemVer from 'semver/classes/semver'; */ export const mockKibanaVersion = '8.0.0'; export const mockKibanaSemverVersion = new SemVer(mockKibanaVersion); + +/* + * This will be set to true up until the last minor before the next major. + * In readonly mode, the user will not be able to perform any actions in the UI + * and will be presented with a message indicating as such. + */ +export const UA_READONLY_MODE = true; diff --git a/x-pack/plugins/upgrade_assistant/public/application/app.tsx b/x-pack/plugins/upgrade_assistant/public/application/app.tsx index f8a15b38d8c8e..d54a6957f4b6e 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/app.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/app.tsx @@ -7,37 +7,19 @@ import React from 'react'; import { I18nStart } from 'src/core/public'; -import { EuiPageHeader, EuiPageHeaderSection, EuiTitle } from '@elastic/eui'; -import { FormattedMessage } from '@kbn/i18n/react'; -import { UpgradeAssistantTabs } from './components/tabs'; -import { AppContextProvider, ContextValue, AppContext } from './app_context'; +import { AppContextProvider, ContextValue } from './app_context'; +import { PageContent } from './components/page_content'; export interface AppDependencies extends ContextValue { i18n: I18nStart; } export const RootComponent = ({ i18n, ...contextValue }: AppDependencies) => { - const { nextMajor } = contextValue.kibanaVersionInfo; return (
- - - -

- -

-
-
-
- - {({ http }) => } - +
diff --git a/x-pack/plugins/upgrade_assistant/public/application/app_context.tsx b/x-pack/plugins/upgrade_assistant/public/application/app_context.tsx index 5aaf69e151573..2a16be7ec5204 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/app_context.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/app_context.tsx @@ -19,6 +19,7 @@ export interface ContextValue { isCloudEnabled: boolean; docLinks: DocLinksStart; kibanaVersionInfo: KibanaVersionContext; + isReadOnlyMode: boolean; } export const AppContext = createContext({} as any); diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/coming_soon_prompt.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/coming_soon_prompt.tsx new file mode 100644 index 0000000000000..b7869226a84b0 --- /dev/null +++ b/x-pack/plugins/upgrade_assistant/public/application/components/coming_soon_prompt.tsx @@ -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 React from 'react'; +import { EuiEmptyPrompt, EuiPageContent, EuiLink } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n/react'; +import { useAppContext } from '../app_context'; + +export const ComingSoonPrompt: React.FunctionComponent = () => { + const { kibanaVersionInfo, docLinks } = useAppContext(); + const { nextMajor, currentMajor } = kibanaVersionInfo; + const { ELASTIC_WEBSITE_URL } = docLinks; + + return ( + + + + + } + body={ + <> +

+ +

+ + {currentMajor === 7 && ( +

+ + + +

+ )} + + } + /> +
+ ); +}; diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/page_content.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/page_content.tsx new file mode 100644 index 0000000000000..4497a7603d8d9 --- /dev/null +++ b/x-pack/plugins/upgrade_assistant/public/application/components/page_content.tsx @@ -0,0 +1,44 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { EuiPageHeader, EuiPageHeaderSection, EuiTitle } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n/react'; + +import { useAppContext } from '../app_context'; +import { ComingSoonPrompt } from './coming_soon_prompt'; +import { UpgradeAssistantTabs } from './tabs'; + +export const PageContent: React.FunctionComponent = () => { + const { kibanaVersionInfo, isReadOnlyMode, http } = useAppContext(); + const { nextMajor } = kibanaVersionInfo; + + // Read-only mode will be enabled up until the last minor before the next major release + if (isReadOnlyMode) { + return ; + } + + return ( + <> + + + +

+ +

+
+
+
+ + + + ); +}; diff --git a/x-pack/plugins/upgrade_assistant/public/application/mount_management_section.ts b/x-pack/plugins/upgrade_assistant/public/application/mount_management_section.ts index 41871c9d9da9c..905f8201e0648 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/mount_management_section.ts +++ b/x-pack/plugins/upgrade_assistant/public/application/mount_management_section.ts @@ -7,6 +7,7 @@ import { CoreSetup } from 'src/core/public'; import { ManagementAppMountParams } from '../../../../../src/plugins/management/public'; +import { UA_READONLY_MODE } from '../../common/constants'; import { renderApp } from './render_app'; import { KibanaVersionContext } from './app_context'; @@ -24,5 +25,6 @@ export async function mountManagementSection( i18n, docLinks, kibanaVersionInfo, + isReadOnlyMode: UA_READONLY_MODE, }); } diff --git a/x-pack/plugins/upgrade_assistant/tests_client_integration/helpers/index.ts b/x-pack/plugins/upgrade_assistant/tests_client_integration/helpers/index.ts new file mode 100644 index 0000000000000..358c854a0af9f --- /dev/null +++ b/x-pack/plugins/upgrade_assistant/tests_client_integration/helpers/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 { setup, OverviewTestBed } from './overview.helpers'; diff --git a/x-pack/plugins/upgrade_assistant/tests_client_integration/helpers/overview.helpers.ts b/x-pack/plugins/upgrade_assistant/tests_client_integration/helpers/overview.helpers.ts new file mode 100644 index 0000000000000..768c87051a670 --- /dev/null +++ b/x-pack/plugins/upgrade_assistant/tests_client_integration/helpers/overview.helpers.ts @@ -0,0 +1,25 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { registerTestBed, TestBed, TestBedConfig } from '@kbn/test/jest'; +import { PageContent } from '../../public/application/components/page_content'; +import { WithAppDependencies } from './setup_environment'; + +const testBedConfig: TestBedConfig = { + doMountAsync: true, +}; + +export type OverviewTestBed = TestBed; + +export const setup = async (overrides?: any): Promise => { + const initTestBed = registerTestBed(WithAppDependencies(PageContent, overrides), testBedConfig); + const testBed = await initTestBed(); + + return testBed; +}; + +export type OverviewTestSubjects = 'comingSoonPrompt' | 'upgradeAssistantPageContent'; diff --git a/x-pack/plugins/upgrade_assistant/tests_client_integration/helpers/setup_environment.tsx b/x-pack/plugins/upgrade_assistant/tests_client_integration/helpers/setup_environment.tsx new file mode 100644 index 0000000000000..75a0ce4d47e77 --- /dev/null +++ b/x-pack/plugins/upgrade_assistant/tests_client_integration/helpers/setup_environment.tsx @@ -0,0 +1,37 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import axios from 'axios'; + +import { docLinksServiceMock } from '../../../../../src/core/public/mocks'; +import { HttpSetup } from '../../../../../src/core/public'; + +import { mockKibanaSemverVersion, UA_READONLY_MODE } from '../../common/constants'; +import { AppContextProvider } from '../../public/application/app_context'; + +const mockHttpClient = axios.create(); + +const contextValue = { + http: (mockHttpClient as unknown) as HttpSetup, + isCloudEnabled: false, + docLinks: docLinksServiceMock.createStartContract(), + kibanaVersionInfo: { + currentMajor: mockKibanaSemverVersion.major, + prevMajor: mockKibanaSemverVersion.major - 1, + nextMajor: mockKibanaSemverVersion.major + 1, + }, + isReadOnlyMode: UA_READONLY_MODE, +}; + +export const WithAppDependencies = (Comp: any, overrides: any = {}) => (props: any) => { + return ( + + + + ); +}; diff --git a/x-pack/plugins/upgrade_assistant/tests_client_integration/overview.test.ts b/x-pack/plugins/upgrade_assistant/tests_client_integration/overview.test.ts new file mode 100644 index 0000000000000..b475c8b89c616 --- /dev/null +++ b/x-pack/plugins/upgrade_assistant/tests_client_integration/overview.test.ts @@ -0,0 +1,46 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { act } from 'react-dom/test-utils'; + +import { OverviewTestBed, setup } from './helpers'; + +describe('', () => { + let testBed: OverviewTestBed; + + beforeEach(async () => { + await act(async () => { + testBed = await setup(); + }); + }); + + describe('Coming soon prompt', () => { + // Default behavior up until the last minor before the next major release + test('renders the coming soon prompt by default', () => { + const { exists } = testBed; + + expect(exists('comingSoonPrompt')).toBe(true); + }); + }); + + describe('Tabs', () => { + beforeEach(async () => { + await act(async () => { + // Override the default context value to verify tab content renders as expected + // This will be the default behavior on the last minor before the next major release (e.g., v7.15) + testBed = await setup({ isReadOnlyMode: false }); + }); + }); + + test('renders the coming soon prompt by default', () => { + const { exists } = testBed; + + expect(exists('comingSoonPrompt')).toBe(false); + expect(exists('upgradeAssistantPageContent')).toBe(true); + }); + }); +}); diff --git a/x-pack/plugins/upgrade_assistant/tsconfig.json b/x-pack/plugins/upgrade_assistant/tsconfig.json index 220ae4d0f0160..0d65c8ddd8fed 100644 --- a/x-pack/plugins/upgrade_assistant/tsconfig.json +++ b/x-pack/plugins/upgrade_assistant/tsconfig.json @@ -11,6 +11,7 @@ "common/**/*", "public/**/*", "server/**/*", + "tests_client_integration/**/*", // have to declare *.json explicitly due to https://github.com/microsoft/TypeScript/issues/25636 "public/**/*.json", "server/**/*.json" diff --git a/x-pack/test/accessibility/apps/upgrade_assistant.ts b/x-pack/test/accessibility/apps/upgrade_assistant.ts index 332a54006b0ec..96b3e6673de70 100644 --- a/x-pack/test/accessibility/apps/upgrade_assistant.ts +++ b/x-pack/test/accessibility/apps/upgrade_assistant.ts @@ -18,27 +18,37 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.upgradeAssistant.navigateToPage(); }); - it('Overview Tab', async () => { - await retry.waitFor('Upgrade Assistant overview tab to be visible', async () => { - return testSubjects.exists('upgradeAssistantOverviewTabDetail'); + it('Overview page', async () => { + await retry.waitFor('Upgrade Assistant overview page to be visible', async () => { + return testSubjects.exists('comingSoonPrompt'); }); await a11y.testAppSnapshot(); }); - it('Cluster Tab', async () => { - await testSubjects.click('upgradeAssistantClusterTab'); - await retry.waitFor('Upgrade Assistant Cluster tab to be visible', async () => { - return testSubjects.exists('upgradeAssistantClusterTabDetail'); + // These tests will be skipped until the last minor of the next major release + describe.skip('tabs', () => { + it('Overview Tab', async () => { + await retry.waitFor('Upgrade Assistant overview tab to be visible', async () => { + return testSubjects.exists('upgradeAssistantOverviewTabDetail'); + }); + await a11y.testAppSnapshot(); }); - await a11y.testAppSnapshot(); - }); - it('Indices Tab', async () => { - await testSubjects.click('upgradeAssistantIndicesTab'); - await retry.waitFor('Upgrade Assistant Cluster tab to be visible', async () => { - return testSubjects.exists('upgradeAssistantIndexTabDetail'); + it('Cluster Tab', async () => { + await testSubjects.click('upgradeAssistantClusterTab'); + await retry.waitFor('Upgrade Assistant Cluster tab to be visible', async () => { + return testSubjects.exists('upgradeAssistantClusterTabDetail'); + }); + await a11y.testAppSnapshot(); + }); + + it('Indices Tab', async () => { + await testSubjects.click('upgradeAssistantIndicesTab'); + await retry.waitFor('Upgrade Assistant Cluster tab to be visible', async () => { + return testSubjects.exists('upgradeAssistantIndexTabDetail'); + }); + await a11y.testAppSnapshot(); }); - await a11y.testAppSnapshot(); }); }); } diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/email.ts b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/email.ts index a15bd0a268df5..518bfcef9e0d3 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/email.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/email.ts @@ -18,11 +18,11 @@ export default function emailTest({ getService }: FtrProviderContext) { it('should return 200 when creating an email action successfully', async () => { const { body: createdAction } = await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'An email action', - actionTypeId: '.email', + connector_type_id: '.email', config: { service: '__json', from: 'bob@example.com', @@ -38,9 +38,9 @@ export default function emailTest({ getService }: FtrProviderContext) { createdActionId = createdAction.id; expect(createdAction).to.eql({ id: createdActionId, - isPreconfigured: false, + is_preconfigured: false, name: 'An email action', - actionTypeId: '.email', + connector_type_id: '.email', config: { service: '__json', hasAuth: true, @@ -54,14 +54,14 @@ export default function emailTest({ getService }: FtrProviderContext) { expect(typeof createdActionId).to.be('string'); const { body: fetchedAction } = await supertest - .get(`/api/actions/action/${createdActionId}`) + .get(`/api/actions/connector/${createdActionId}`) .expect(200); expect(fetchedAction).to.eql({ id: fetchedAction.id, - isPreconfigured: false, + is_preconfigured: false, name: 'An email action', - actionTypeId: '.email', + connector_type_id: '.email', config: { from: 'bob@example.com', service: '__json', @@ -75,7 +75,7 @@ export default function emailTest({ getService }: FtrProviderContext) { it('should return the message data when firing the __json service', async () => { await supertest - .post(`/api/actions/action/${createdActionId}/_execute`) + .post(`/api/actions/connector/${createdActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { @@ -119,7 +119,7 @@ export default function emailTest({ getService }: FtrProviderContext) { it('should render html from markdown', async () => { await supertest - .post(`/api/actions/action/${createdActionId}/_execute`) + .post(`/api/actions/connector/${createdActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { @@ -142,7 +142,7 @@ export default function emailTest({ getService }: FtrProviderContext) { it('should allow customizing the kibana footer link', async () => { await supertest - .post(`/api/actions/action/${createdActionId}/_execute`) + .post(`/api/actions/connector/${createdActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { @@ -169,11 +169,11 @@ export default function emailTest({ getService }: FtrProviderContext) { it('should respond with a 400 Bad Request when creating an email action with an invalid config', async () => { await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'An email action', - actionTypeId: '.email', + connector_type_id: '.email', config: {}, }) .expect(400) @@ -189,11 +189,11 @@ export default function emailTest({ getService }: FtrProviderContext) { it('should respond with a 400 Bad Request when creating an email action with a server not added to allowedHosts', async () => { await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'An email action', - actionTypeId: '.email', + connector_type_id: '.email', config: { service: 'gmail', // not added to allowedHosts in the config for this test from: 'bob@example.com', @@ -214,11 +214,11 @@ export default function emailTest({ getService }: FtrProviderContext) { }); await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'An email action', - actionTypeId: '.email', + connector_type_id: '.email', config: { host: 'stmp.gmail.com', // not added to allowedHosts in the config for this test port: 666, @@ -242,11 +242,11 @@ export default function emailTest({ getService }: FtrProviderContext) { it('should handle creating an email action with a server added to allowedHosts', async () => { const { body: createdAction } = await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'An email action', - actionTypeId: '.email', + connector_type_id: '.email', config: { host: 'some.non.existent.com', // added to allowedHosts in the config for this test port: 666, @@ -263,11 +263,11 @@ export default function emailTest({ getService }: FtrProviderContext) { it('should handle an email action with no auth', async () => { const { body: createdAction } = await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'An email action with no auth', - actionTypeId: '.email', + connector_type_id: '.email', config: { service: '__json', from: 'jim@example.com', @@ -276,7 +276,7 @@ export default function emailTest({ getService }: FtrProviderContext) { .expect(200); await supertest - .post(`/api/actions/action/${createdAction.id}/_execute`) + .post(`/api/actions/connector/${createdAction.id}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/es_index.ts b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/es_index.ts index dfc3de5609a18..432598e66bcc4 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/es_index.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/es_index.ts @@ -26,11 +26,11 @@ export default function indexTest({ getService }: FtrProviderContext) { it('should be created successfully', async () => { // create action with no config const { body: createdAction } = await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'An index action', - actionTypeId: '.index', + connector_type_id: '.index', config: { index: ES_TEST_INDEX_NAME, }, @@ -40,9 +40,9 @@ export default function indexTest({ getService }: FtrProviderContext) { expect(createdAction).to.eql({ id: createdAction.id, - isPreconfigured: false, + is_preconfigured: false, name: 'An index action', - actionTypeId: '.index', + connector_type_id: '.index', config: { index: ES_TEST_INDEX_NAME, refresh: false, @@ -53,24 +53,24 @@ export default function indexTest({ getService }: FtrProviderContext) { expect(typeof createdActionID).to.be('string'); const { body: fetchedAction } = await supertest - .get(`/api/actions/action/${createdActionID}`) + .get(`/api/actions/connector/${createdActionID}`) .expect(200); expect(fetchedAction).to.eql({ id: fetchedAction.id, - isPreconfigured: false, + is_preconfigured: false, name: 'An index action', - actionTypeId: '.index', + connector_type_id: '.index', config: { index: ES_TEST_INDEX_NAME, refresh: false, executionTimeField: null }, }); // create action with all config props const { body: createdActionWithIndex } = await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'An index action with index config', - actionTypeId: '.index', + connector_type_id: '.index', config: { index: ES_TEST_INDEX_NAME, refresh: true, @@ -81,9 +81,9 @@ export default function indexTest({ getService }: FtrProviderContext) { expect(createdActionWithIndex).to.eql({ id: createdActionWithIndex.id, - isPreconfigured: false, + is_preconfigured: false, name: 'An index action with index config', - actionTypeId: '.index', + connector_type_id: '.index', config: { index: ES_TEST_INDEX_NAME, refresh: true, @@ -94,14 +94,14 @@ export default function indexTest({ getService }: FtrProviderContext) { expect(typeof createdActionIDWithIndex).to.be('string'); const { body: fetchedActionWithIndex } = await supertest - .get(`/api/actions/action/${createdActionIDWithIndex}`) + .get(`/api/actions/connector/${createdActionIDWithIndex}`) .expect(200); expect(fetchedActionWithIndex).to.eql({ id: fetchedActionWithIndex.id, - isPreconfigured: false, + is_preconfigured: false, name: 'An index action with index config', - actionTypeId: '.index', + connector_type_id: '.index', config: { index: ES_TEST_INDEX_NAME, refresh: true, @@ -112,11 +112,11 @@ export default function indexTest({ getService }: FtrProviderContext) { it('should respond with error when creation unsuccessful', async () => { await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'An index action', - actionTypeId: '.index', + connector_type_id: '.index', config: { index: 666 }, }) .expect(400) @@ -132,11 +132,11 @@ export default function indexTest({ getService }: FtrProviderContext) { it('should execute successly when expected for a single body', async () => { const { body: createdAction } = await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'An index action', - actionTypeId: '.index', + connector_type_id: '.index', config: { index: ES_TEST_INDEX_NAME, refresh: true, @@ -145,7 +145,7 @@ export default function indexTest({ getService }: FtrProviderContext) { }) .expect(200); const { body: result } = await supertest - .post(`/api/actions/action/${createdAction.id}/_execute`) + .post(`/api/actions/connector/${createdAction.id}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { @@ -162,11 +162,11 @@ export default function indexTest({ getService }: FtrProviderContext) { it('should execute successly when expected for with multiple bodies', async () => { const { body: createdAction } = await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'An index action', - actionTypeId: '.index', + connector_type_id: '.index', config: { index: ES_TEST_INDEX_NAME, refresh: true, @@ -175,7 +175,7 @@ export default function indexTest({ getService }: FtrProviderContext) { }) .expect(200); const { body: result } = await supertest - .post(`/api/actions/action/${createdAction.id}/_execute`) + .post(`/api/actions/connector/${createdAction.id}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { @@ -206,11 +206,11 @@ export default function indexTest({ getService }: FtrProviderContext) { it('should execute successly with refresh false', async () => { const { body: createdAction } = await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'An index action', - actionTypeId: '.index', + connector_type_id: '.index', config: { index: ES_TEST_INDEX_NAME, refresh: false, @@ -220,7 +220,7 @@ export default function indexTest({ getService }: FtrProviderContext) { }) .expect(200); const { body: result } = await supertest - .post(`/api/actions/action/${createdAction.id}/_execute`) + .post(`/api/actions/connector/${createdAction.id}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { @@ -235,11 +235,11 @@ export default function indexTest({ getService }: FtrProviderContext) { expect(items.length).to.be.lessThan(2); const { body: createdActionWithRefresh } = await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'An index action', - actionTypeId: '.index', + connector_type_id: '.index', config: { index: ES_TEST_INDEX_NAME, refresh: true, @@ -248,7 +248,7 @@ export default function indexTest({ getService }: FtrProviderContext) { }) .expect(200); const { body: result2 } = await supertest - .post(`/api/actions/action/${createdActionWithRefresh.id}/_execute`) + .post(`/api/actions/connector/${createdActionWithRefresh.id}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/es_index_preconfigured.ts b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/es_index_preconfigured.ts index 69c1e54486d65..48f042473c14e 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/es_index_preconfigured.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/es_index_preconfigured.ts @@ -24,7 +24,7 @@ export default function indexTest({ getService }: FtrProviderContext) { it('should execute successfully when expected for a single body', async () => { const { body: result } = await supertest - .post(`/api/actions/action/${ACTION_ID}/_execute`) + .post(`/api/actions/connector/${ACTION_ID}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/jira.ts b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/jira.ts index 8bd0b8a790d40..d2e2b4be9b94c 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/jira.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/jira.ts @@ -60,11 +60,11 @@ export default function jiraTest({ getService }: FtrProviderContext) { describe('Jira - Action Creation', () => { it('should return 200 when creating a jira action successfully', async () => { const { body: createdAction } = await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'A jira action', - actionTypeId: '.jira', + connector_type_id: '.jira', config: { ...mockJira.config, apiUrl: jiraSimulatorURL, @@ -75,9 +75,9 @@ export default function jiraTest({ getService }: FtrProviderContext) { expect(createdAction).to.eql({ id: createdAction.id, - isPreconfigured: false, + is_preconfigured: false, name: 'A jira action', - actionTypeId: '.jira', + connector_type_id: '.jira', config: { apiUrl: jiraSimulatorURL, projectKey: mockJira.config.projectKey, @@ -85,14 +85,14 @@ export default function jiraTest({ getService }: FtrProviderContext) { }); const { body: fetchedAction } = await supertest - .get(`/api/actions/action/${createdAction.id}`) + .get(`/api/actions/connector/${createdAction.id}`) .expect(200); expect(fetchedAction).to.eql({ id: fetchedAction.id, - isPreconfigured: false, + is_preconfigured: false, name: 'A jira action', - actionTypeId: '.jira', + connector_type_id: '.jira', config: { apiUrl: jiraSimulatorURL, projectKey: mockJira.config.projectKey, @@ -102,11 +102,11 @@ export default function jiraTest({ getService }: FtrProviderContext) { it('should respond with a 400 Bad Request when creating a jira action with no apiUrl', async () => { await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'A jira action', - actionTypeId: '.jira', + connector_type_id: '.jira', config: { projectKey: 'CK' }, }) .expect(400) @@ -122,11 +122,11 @@ export default function jiraTest({ getService }: FtrProviderContext) { it('should respond with a 400 Bad Request when creating a jira action with no projectKey', async () => { await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'A jira action', - actionTypeId: '.jira', + connector_type_id: '.jira', config: { apiUrl: jiraSimulatorURL }, }) .expect(400) @@ -142,11 +142,11 @@ export default function jiraTest({ getService }: FtrProviderContext) { it('should respond with a 400 Bad Request when creating a jira action with a not present in allowedHosts apiUrl', async () => { await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'A jira action', - actionTypeId: '.jira', + connector_type_id: '.jira', config: { apiUrl: 'http://jira.mynonexistent.com', projectKey: mockJira.config.projectKey, @@ -166,11 +166,11 @@ export default function jiraTest({ getService }: FtrProviderContext) { it('should respond with a 400 Bad Request when creating a jira action without secrets', async () => { await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'A jira action', - actionTypeId: '.jira', + connector_type_id: '.jira', config: { apiUrl: jiraSimulatorURL, projectKey: mockJira.config.projectKey, @@ -195,11 +195,11 @@ export default function jiraTest({ getService }: FtrProviderContext) { before(async () => { const { body } = await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'A jira simulator', - actionTypeId: '.jira', + connector_type_id: '.jira', config: { apiUrl: jiraSimulatorURL, projectKey: mockJira.config.projectKey, @@ -220,14 +220,14 @@ export default function jiraTest({ getService }: FtrProviderContext) { describe('Validation', () => { it('should handle failing with a simulated success without action', async () => { await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: {}, }) .then((resp: any) => { - expect(Object.keys(resp.body)).to.eql(['status', 'actionId', 'message', 'retry']); - expect(resp.body.actionId).to.eql(simulatedActionId); + expect(Object.keys(resp.body)).to.eql(['status', 'message', 'retry', 'connector_id']); + expect(resp.body.connector_id).to.eql(simulatedActionId); expect(resp.body.status).to.eql('error'); expect(resp.body.retry).to.eql(false); // Node.js 12 oddity: @@ -261,14 +261,14 @@ export default function jiraTest({ getService }: FtrProviderContext) { it('should handle failing with a simulated success without unsupported action', async () => { await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { subAction: 'non-supported' }, }) .then((resp: any) => { expect(resp.body).to.eql({ - actionId: simulatedActionId, + connector_id: simulatedActionId, status: 'error', retry: false, message: @@ -279,14 +279,14 @@ export default function jiraTest({ getService }: FtrProviderContext) { it('should handle failing with a simulated success without subActionParams', async () => { await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { subAction: 'pushToService' }, }) .then((resp: any) => { expect(resp.body).to.eql({ - actionId: simulatedActionId, + connector_id: simulatedActionId, status: 'error', retry: false, message: @@ -297,7 +297,7 @@ export default function jiraTest({ getService }: FtrProviderContext) { it('should handle failing with a simulated success without title', async () => { await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { @@ -312,7 +312,7 @@ export default function jiraTest({ getService }: FtrProviderContext) { }) .then((resp: any) => { expect(resp.body).to.eql({ - actionId: simulatedActionId, + connector_id: simulatedActionId, status: 'error', retry: false, message: @@ -323,7 +323,7 @@ export default function jiraTest({ getService }: FtrProviderContext) { it('should handle failing with a simulated success without commentId', async () => { await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { @@ -340,7 +340,7 @@ export default function jiraTest({ getService }: FtrProviderContext) { }) .then((resp: any) => { expect(resp.body).to.eql({ - actionId: simulatedActionId, + connector_id: simulatedActionId, status: 'error', retry: false, message: @@ -351,7 +351,7 @@ export default function jiraTest({ getService }: FtrProviderContext) { it('should handle failing with a simulated success without comment message', async () => { await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { @@ -367,7 +367,7 @@ export default function jiraTest({ getService }: FtrProviderContext) { }) .then((resp: any) => { expect(resp.body).to.eql({ - actionId: simulatedActionId, + connector_id: simulatedActionId, status: 'error', retry: false, message: @@ -378,7 +378,7 @@ export default function jiraTest({ getService }: FtrProviderContext) { it('should handle failing with a simulated success when labels containing a space', async () => { await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { @@ -395,7 +395,7 @@ export default function jiraTest({ getService }: FtrProviderContext) { }) .then((resp: any) => { expect(resp.body).to.eql({ - actionId: simulatedActionId, + connector_id: simulatedActionId, status: 'error', retry: false, message: @@ -408,7 +408,7 @@ export default function jiraTest({ getService }: FtrProviderContext) { describe('Execution', () => { it('should handle creating an incident without comments', async () => { const { body } = await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { @@ -427,7 +427,7 @@ export default function jiraTest({ getService }: FtrProviderContext) { expect(proxyHaveBeenCalled).to.equal(true); expect(body).to.eql({ status: 'ok', - actionId: simulatedActionId, + connector_id: simulatedActionId, data: { id: '123', title: 'CK-1', diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/pagerduty.ts b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/pagerduty.ts index 405085c4f3ffb..dcdd8e86ec177 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/pagerduty.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/pagerduty.ts @@ -45,11 +45,11 @@ export default function pagerdutyTest({ getService }: FtrProviderContext) { it('should return successfully when passed valid create parameters', async () => { const { body: createdAction } = await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'A pagerduty action', - actionTypeId: '.pagerduty', + connector_type_id: '.pagerduty', config: { apiUrl: pagerdutySimulatorURL, }, @@ -61,9 +61,9 @@ export default function pagerdutyTest({ getService }: FtrProviderContext) { expect(createdAction).to.eql({ id: createdAction.id, - isPreconfigured: false, + is_preconfigured: false, name: 'A pagerduty action', - actionTypeId: '.pagerduty', + connector_type_id: '.pagerduty', config: { apiUrl: pagerdutySimulatorURL, }, @@ -72,14 +72,14 @@ export default function pagerdutyTest({ getService }: FtrProviderContext) { expect(typeof createdAction.id).to.be('string'); const { body: fetchedAction } = await supertest - .get(`/api/actions/action/${createdAction.id}`) + .get(`/api/actions/connector/${createdAction.id}`) .expect(200); expect(fetchedAction).to.eql({ id: fetchedAction.id, - isPreconfigured: false, + is_preconfigured: false, name: 'A pagerduty action', - actionTypeId: '.pagerduty', + connector_type_id: '.pagerduty', config: { apiUrl: pagerdutySimulatorURL, }, @@ -88,11 +88,11 @@ export default function pagerdutyTest({ getService }: FtrProviderContext) { it('should return unsuccessfully when passed invalid create parameters', async () => { await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'A pagerduty action', - actionTypeId: '.pagerduty', + connector_type_id: '.pagerduty', config: { apiUrl: pagerdutySimulatorURL, }, @@ -111,11 +111,11 @@ export default function pagerdutyTest({ getService }: FtrProviderContext) { it('should return unsuccessfully when default pagerduty url is not present in allowedHosts', async () => { await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'A pagerduty action', - actionTypeId: '.pagerduty', + connector_type_id: '.pagerduty', secrets: {}, }) .expect(400) @@ -131,11 +131,11 @@ export default function pagerdutyTest({ getService }: FtrProviderContext) { it('should create pagerduty simulator action successfully', async () => { const { body: createdSimulatedAction } = await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'A pagerduty simulator', - actionTypeId: '.pagerduty', + connector_type_id: '.pagerduty', config: { apiUrl: pagerdutySimulatorURL, }, @@ -150,7 +150,7 @@ export default function pagerdutyTest({ getService }: FtrProviderContext) { it('should handle executing with a simulated success', async () => { const { body: result } = await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { @@ -162,7 +162,7 @@ export default function pagerdutyTest({ getService }: FtrProviderContext) { expect(proxyHaveBeenCalled).to.equal(true); expect(result).to.eql({ status: 'ok', - actionId: simulatedActionId, + connector_id: simulatedActionId, data: { message: 'Event processed', status: 'success', @@ -172,7 +172,7 @@ export default function pagerdutyTest({ getService }: FtrProviderContext) { it('should handle a 40x pagerduty error', async () => { const { body: result } = await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { @@ -186,7 +186,7 @@ export default function pagerdutyTest({ getService }: FtrProviderContext) { it('should handle a 429 pagerduty error', async () => { const { body: result } = await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { @@ -204,7 +204,7 @@ export default function pagerdutyTest({ getService }: FtrProviderContext) { it('should handle a 500 pagerduty error', async () => { const { body: result } = await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/resilient.ts b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/resilient.ts index 682714758c0a0..18f082c688907 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/resilient.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/resilient.ts @@ -63,11 +63,11 @@ export default function resilientTest({ getService }: FtrProviderContext) { describe('IBM Resilient - Action Creation', () => { it('should return 200 when creating a ibm resilient action successfully', async () => { const { body: createdAction } = await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'An IBM Resilient action', - actionTypeId: '.resilient', + connector_type_id: '.resilient', config: { ...mockResilient.config, apiUrl: resilientSimulatorURL, @@ -78,9 +78,9 @@ export default function resilientTest({ getService }: FtrProviderContext) { expect(createdAction).to.eql({ id: createdAction.id, - isPreconfigured: false, + is_preconfigured: false, name: 'An IBM Resilient action', - actionTypeId: '.resilient', + connector_type_id: '.resilient', config: { apiUrl: resilientSimulatorURL, orgId: mockResilient.config.orgId, @@ -88,14 +88,14 @@ export default function resilientTest({ getService }: FtrProviderContext) { }); const { body: fetchedAction } = await supertest - .get(`/api/actions/action/${createdAction.id}`) + .get(`/api/actions/connector/${createdAction.id}`) .expect(200); expect(fetchedAction).to.eql({ id: fetchedAction.id, - isPreconfigured: false, + is_preconfigured: false, name: 'An IBM Resilient action', - actionTypeId: '.resilient', + connector_type_id: '.resilient', config: { apiUrl: resilientSimulatorURL, orgId: mockResilient.config.orgId, @@ -105,11 +105,11 @@ export default function resilientTest({ getService }: FtrProviderContext) { it('should respond with a 400 Bad Request when creating a ibm resilient action with no apiUrl', async () => { await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'An IBM Resilient', - actionTypeId: '.resilient', + connector_type_id: '.resilient', config: { orgId: '201' }, }) .expect(400) @@ -125,11 +125,11 @@ export default function resilientTest({ getService }: FtrProviderContext) { it('should respond with a 400 Bad Request when creating a ibm resilient action with no orgId', async () => { await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'An IBM Resilient', - actionTypeId: '.resilient', + connector_type_id: '.resilient', config: { apiUrl: resilientSimulatorURL }, }) .expect(400) @@ -145,11 +145,11 @@ export default function resilientTest({ getService }: FtrProviderContext) { it('should respond with a 400 Bad Request when creating a ibm resilient action with a not present in allowedHosts apiUrl', async () => { await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'An IBM Resilient', - actionTypeId: '.resilient', + connector_type_id: '.resilient', config: { apiUrl: 'http://resilient.mynonexistent.com', orgId: mockResilient.config.orgId, @@ -169,11 +169,11 @@ export default function resilientTest({ getService }: FtrProviderContext) { it('should respond with a 400 Bad Request when creating a ibm resilient action without secrets', async () => { await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'An IBM Resilient', - actionTypeId: '.resilient', + connector_type_id: '.resilient', config: { apiUrl: resilientSimulatorURL, orgId: mockResilient.config.orgId, @@ -197,11 +197,11 @@ export default function resilientTest({ getService }: FtrProviderContext) { let proxyHaveBeenCalled = false; before(async () => { const { body } = await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'A ibm resilient simulator', - actionTypeId: '.resilient', + connector_type_id: '.resilient', config: { apiUrl: resilientSimulatorURL, orgId: mockResilient.config.orgId, @@ -222,14 +222,14 @@ export default function resilientTest({ getService }: FtrProviderContext) { describe('Validation', () => { it('should handle failing with a simulated success without action', async () => { await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: {}, }) .then((resp: any) => { - expect(Object.keys(resp.body)).to.eql(['status', 'actionId', 'message', 'retry']); - expect(resp.body.actionId).to.eql(simulatedActionId); + expect(Object.keys(resp.body)).to.eql(['status', 'message', 'retry', 'connector_id']); + expect(resp.body.connector_id).to.eql(simulatedActionId); expect(resp.body.status).to.eql('error'); expect(resp.body.retry).to.eql(false); // Node.js 12 oddity: @@ -263,14 +263,14 @@ export default function resilientTest({ getService }: FtrProviderContext) { it('should handle failing with a simulated success without unsupported action', async () => { await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { subAction: 'non-supported' }, }) .then((resp: any) => { expect(resp.body).to.eql({ - actionId: simulatedActionId, + connector_id: simulatedActionId, status: 'error', retry: false, message: @@ -281,14 +281,14 @@ export default function resilientTest({ getService }: FtrProviderContext) { it('should handle failing with a simulated success without subActionParams', async () => { await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { subAction: 'pushToService' }, }) .then((resp: any) => { expect(resp.body).to.eql({ - actionId: simulatedActionId, + connector_id: simulatedActionId, status: 'error', retry: false, message: @@ -299,7 +299,7 @@ export default function resilientTest({ getService }: FtrProviderContext) { it('should handle failing with a simulated success without title', async () => { await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { @@ -314,7 +314,7 @@ export default function resilientTest({ getService }: FtrProviderContext) { }) .then((resp: any) => { expect(resp.body).to.eql({ - actionId: simulatedActionId, + connector_id: simulatedActionId, status: 'error', retry: false, message: @@ -325,7 +325,7 @@ export default function resilientTest({ getService }: FtrProviderContext) { it('should handle failing with a simulated success without commentId', async () => { await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { @@ -341,7 +341,7 @@ export default function resilientTest({ getService }: FtrProviderContext) { }) .then((resp: any) => { expect(resp.body).to.eql({ - actionId: simulatedActionId, + connector_id: simulatedActionId, status: 'error', retry: false, message: @@ -352,7 +352,7 @@ export default function resilientTest({ getService }: FtrProviderContext) { it('should handle failing with a simulated success without comment message', async () => { await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { @@ -368,7 +368,7 @@ export default function resilientTest({ getService }: FtrProviderContext) { }) .then((resp: any) => { expect(resp.body).to.eql({ - actionId: simulatedActionId, + connector_id: simulatedActionId, status: 'error', retry: false, message: @@ -381,7 +381,7 @@ export default function resilientTest({ getService }: FtrProviderContext) { describe('Execution', () => { it('should handle creating an incident without comments', async () => { const { body } = await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { @@ -397,7 +397,7 @@ export default function resilientTest({ getService }: FtrProviderContext) { expect(proxyHaveBeenCalled).to.equal(true); expect(body).to.eql({ status: 'ok', - actionId: simulatedActionId, + connector_id: simulatedActionId, data: { id: '123', title: '123', diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/server_log.ts b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/server_log.ts index 5357c94d7e0f2..3e8b11ee62162 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/server_log.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/server_log.ts @@ -18,41 +18,41 @@ export default function serverLogTest({ getService }: FtrProviderContext) { it('should return 200 when creating a builtin server-log action', async () => { const { body: createdAction } = await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'A server.log action', - actionTypeId: '.server-log', + connector_type_id: '.server-log', }) .expect(200); serverLogActionId = createdAction.id; expect(createdAction).to.eql({ id: createdAction.id, - isPreconfigured: false, + is_preconfigured: false, name: 'A server.log action', - actionTypeId: '.server-log', + connector_type_id: '.server-log', config: {}, }); expect(typeof createdAction.id).to.be('string'); const { body: fetchedAction } = await supertest - .get(`/api/actions/action/${createdAction.id}`) + .get(`/api/actions/connector/${createdAction.id}`) .expect(200); expect(fetchedAction).to.eql({ id: fetchedAction.id, - isPreconfigured: false, + is_preconfigured: false, name: 'A server.log action', - actionTypeId: '.server-log', + connector_type_id: '.server-log', config: {}, }); }); it('should handle firing the action', async () => { const { body: result } = await supertest - .post(`/api/actions/action/${serverLogActionId}/_execute`) + .post(`/api/actions/connector/${serverLogActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/servicenow.ts b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/servicenow.ts index 2d584f764e5e4..264e9cf42d97e 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/servicenow.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/servicenow.ts @@ -65,11 +65,11 @@ export default function servicenowTest({ getService }: FtrProviderContext) { describe('ServiceNow - Action Creation', () => { it('should return 200 when creating a servicenow action successfully', async () => { const { body: createdAction } = await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'A servicenow action', - actionTypeId: '.servicenow', + connector_type_id: '.servicenow', config: { apiUrl: servicenowSimulatorURL, }, @@ -79,23 +79,23 @@ export default function servicenowTest({ getService }: FtrProviderContext) { expect(createdAction).to.eql({ id: createdAction.id, - isPreconfigured: false, + is_preconfigured: false, name: 'A servicenow action', - actionTypeId: '.servicenow', + connector_type_id: '.servicenow', config: { apiUrl: servicenowSimulatorURL, }, }); const { body: fetchedAction } = await supertest - .get(`/api/actions/action/${createdAction.id}`) + .get(`/api/actions/connector/${createdAction.id}`) .expect(200); expect(fetchedAction).to.eql({ id: fetchedAction.id, - isPreconfigured: false, + is_preconfigured: false, name: 'A servicenow action', - actionTypeId: '.servicenow', + connector_type_id: '.servicenow', config: { apiUrl: servicenowSimulatorURL, }, @@ -104,11 +104,11 @@ export default function servicenowTest({ getService }: FtrProviderContext) { it('should respond with a 400 Bad Request when creating a servicenow action with no apiUrl', async () => { await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'A servicenow action', - actionTypeId: '.servicenow', + connector_type_id: '.servicenow', config: {}, }) .expect(400) @@ -124,11 +124,11 @@ export default function servicenowTest({ getService }: FtrProviderContext) { it('should respond with a 400 Bad Request when creating a servicenow action with a not present in allowedHosts apiUrl', async () => { await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'A servicenow action', - actionTypeId: '.servicenow', + connector_type_id: '.servicenow', config: { apiUrl: 'http://servicenow.mynonexistent.com', }, @@ -147,11 +147,11 @@ export default function servicenowTest({ getService }: FtrProviderContext) { it('should respond with a 400 Bad Request when creating a servicenow action without secrets', async () => { await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'A servicenow action', - actionTypeId: '.servicenow', + connector_type_id: '.servicenow', config: { apiUrl: servicenowSimulatorURL, }, @@ -174,11 +174,11 @@ export default function servicenowTest({ getService }: FtrProviderContext) { let proxyHaveBeenCalled = false; before(async () => { const { body } = await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'A servicenow simulator', - actionTypeId: '.servicenow', + connector_type_id: '.servicenow', config: { apiUrl: servicenowSimulatorURL, }, @@ -198,14 +198,14 @@ export default function servicenowTest({ getService }: FtrProviderContext) { describe('Validation', () => { it('should handle failing with a simulated success without action', async () => { await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: {}, }) .then((resp: any) => { - expect(Object.keys(resp.body)).to.eql(['status', 'actionId', 'message', 'retry']); - expect(resp.body.actionId).to.eql(simulatedActionId); + expect(Object.keys(resp.body)).to.eql(['status', 'message', 'retry', 'connector_id']); + expect(resp.body.connector_id).to.eql(simulatedActionId); expect(resp.body.status).to.eql('error'); expect(resp.body.retry).to.eql(false); // Node.js 12 oddity: @@ -239,14 +239,14 @@ export default function servicenowTest({ getService }: FtrProviderContext) { it('should handle failing with a simulated success without unsupported action', async () => { await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { subAction: 'non-supported' }, }) .then((resp: any) => { expect(resp.body).to.eql({ - actionId: simulatedActionId, + connector_id: simulatedActionId, status: 'error', retry: false, message: @@ -257,14 +257,14 @@ export default function servicenowTest({ getService }: FtrProviderContext) { it('should handle failing with a simulated success without subActionParams', async () => { await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { subAction: 'pushToService' }, }) .then((resp: any) => { expect(resp.body).to.eql({ - actionId: simulatedActionId, + connector_id: simulatedActionId, status: 'error', retry: false, message: @@ -275,7 +275,7 @@ export default function servicenowTest({ getService }: FtrProviderContext) { it('should handle failing with a simulated success without title', async () => { await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { @@ -287,7 +287,7 @@ export default function servicenowTest({ getService }: FtrProviderContext) { }) .then((resp: any) => { expect(resp.body).to.eql({ - actionId: simulatedActionId, + connector_id: simulatedActionId, status: 'error', retry: false, message: @@ -298,7 +298,7 @@ export default function servicenowTest({ getService }: FtrProviderContext) { it('should handle failing with a simulated success without commentId', async () => { await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { @@ -314,7 +314,7 @@ export default function servicenowTest({ getService }: FtrProviderContext) { }) .then((resp: any) => { expect(resp.body).to.eql({ - actionId: simulatedActionId, + connector_id: simulatedActionId, status: 'error', retry: false, message: @@ -325,7 +325,7 @@ export default function servicenowTest({ getService }: FtrProviderContext) { it('should handle failing with a simulated success without comment message', async () => { await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { @@ -341,7 +341,7 @@ export default function servicenowTest({ getService }: FtrProviderContext) { }) .then((resp: any) => { expect(resp.body).to.eql({ - actionId: simulatedActionId, + connector_id: simulatedActionId, status: 'error', retry: false, message: @@ -353,7 +353,7 @@ export default function servicenowTest({ getService }: FtrProviderContext) { describe('getChoices', () => { it('should fail when field is not provided', async () => { await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { @@ -363,7 +363,7 @@ export default function servicenowTest({ getService }: FtrProviderContext) { }) .then((resp: any) => { expect(resp.body).to.eql({ - actionId: simulatedActionId, + connector_id: simulatedActionId, status: 'error', retry: false, message: @@ -377,7 +377,7 @@ export default function servicenowTest({ getService }: FtrProviderContext) { describe('Execution', () => { it('should handle creating an incident without comments', async () => { const { body: result } = await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { @@ -393,7 +393,7 @@ export default function servicenowTest({ getService }: FtrProviderContext) { expect(proxyHaveBeenCalled).to.equal(true); expect(result).to.eql({ status: 'ok', - actionId: simulatedActionId, + connector_id: simulatedActionId, data: { id: '123', title: 'INC01', @@ -406,7 +406,7 @@ export default function servicenowTest({ getService }: FtrProviderContext) { describe('getChoices', () => { it('should get choices', async () => { const { body: result } = await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { @@ -419,7 +419,7 @@ export default function servicenowTest({ getService }: FtrProviderContext) { expect(proxyHaveBeenCalled).to.equal(true); expect(result).to.eql({ status: 'ok', - actionId: simulatedActionId, + connector_id: simulatedActionId, data: [ { dependent_value: '', diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/slack.ts b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/slack.ts index 42cc93d50ea11..85c46ff98acd1 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/slack.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/slack.ts @@ -45,11 +45,11 @@ export default function slackTest({ getService }: FtrProviderContext) { it('should return 200 when creating a slack action successfully', async () => { const { body: createdAction } = await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'A slack action', - actionTypeId: '.slack', + connector_type_id: '.slack', secrets: { webhookUrl: slackSimulatorURL, }, @@ -58,34 +58,34 @@ export default function slackTest({ getService }: FtrProviderContext) { expect(createdAction).to.eql({ id: createdAction.id, - isPreconfigured: false, + is_preconfigured: false, name: 'A slack action', - actionTypeId: '.slack', + connector_type_id: '.slack', config: {}, }); expect(typeof createdAction.id).to.be('string'); const { body: fetchedAction } = await supertest - .get(`/api/actions/action/${createdAction.id}`) + .get(`/api/actions/connector/${createdAction.id}`) .expect(200); expect(fetchedAction).to.eql({ id: fetchedAction.id, - isPreconfigured: false, + is_preconfigured: false, name: 'A slack action', - actionTypeId: '.slack', + connector_type_id: '.slack', config: {}, }); }); it('should respond with a 400 Bad Request when creating a slack action with no webhookUrl', async () => { await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'A slack action', - actionTypeId: '.slack', + connector_type_id: '.slack', secrets: {}, }) .expect(400) @@ -101,11 +101,11 @@ export default function slackTest({ getService }: FtrProviderContext) { it('should respond with a 400 Bad Request when creating a slack action with not present in allowedHosts webhookUrl', async () => { await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'A slack action', - actionTypeId: '.slack', + connector_type_id: '.slack', secrets: { webhookUrl: 'http://slack.mynonexistent.com/other/stuff/in/the/path', }, @@ -122,11 +122,11 @@ export default function slackTest({ getService }: FtrProviderContext) { it('should respond with a 400 Bad Request when creating a slack action with a webhookUrl with no hostname', async () => { await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'A slack action', - actionTypeId: '.slack', + connector_type_id: '.slack', secrets: { webhookUrl: 'fee-fi-fo-fum', }, @@ -144,11 +144,11 @@ export default function slackTest({ getService }: FtrProviderContext) { it('should create our slack simulator action successfully', async () => { const { body: createdSimulatedAction } = await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ name: 'A slack simulator', - actionTypeId: '.slack', + connector_type_id: '.slack', secrets: { webhookUrl: slackSimulatorURL, }, @@ -160,7 +160,7 @@ export default function slackTest({ getService }: FtrProviderContext) { it('should handle firing with a simulated success', async () => { const { body: result } = await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { @@ -174,7 +174,7 @@ export default function slackTest({ getService }: FtrProviderContext) { it('should handle an empty message error', async () => { const { body: result } = await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { @@ -188,7 +188,7 @@ export default function slackTest({ getService }: FtrProviderContext) { it('should handle a 40x slack error', async () => { const { body: result } = await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { @@ -203,7 +203,7 @@ export default function slackTest({ getService }: FtrProviderContext) { it('should handle a 429 slack error', async () => { const dateStart = new Date().getTime(); const { body: result } = await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { @@ -221,7 +221,7 @@ export default function slackTest({ getService }: FtrProviderContext) { it('should handle a 500 slack error', async () => { const { body: result } = await supertest - .post(`/api/actions/action/${simulatedActionId}/_execute`) + .post(`/api/actions/connector/${simulatedActionId}/_execute`) .set('kbn-xsrf', 'foo') .send({ params: { diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/webhook.ts b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/webhook.ts index 61def8b6536ee..d48fb99088d61 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/webhook.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/webhook.ts @@ -54,11 +54,11 @@ export default function webhookTest({ getService }: FtrProviderContext) { }; const { body: createdAction } = await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'test') .send({ name: 'A generic Webhook action', - actionTypeId: '.webhook', + connector_type_id: '.webhook', secrets: { user, password, @@ -99,11 +99,11 @@ export default function webhookTest({ getService }: FtrProviderContext) { it('should return 200 when creating a webhook action successfully', async () => { const { body: createdAction } = await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'test') .send({ name: 'A generic Webhook action', - actionTypeId: '.webhook', + connector_type_id: '.webhook', secrets: { user: 'username', password: 'mypassphrase', @@ -116,9 +116,9 @@ export default function webhookTest({ getService }: FtrProviderContext) { expect(createdAction).to.eql({ id: createdAction.id, - isPreconfigured: false, + is_preconfigured: false, name: 'A generic Webhook action', - actionTypeId: '.webhook', + connector_type_id: '.webhook', config: { ...defaultValues, url: webhookSimulatorURL, @@ -128,14 +128,14 @@ export default function webhookTest({ getService }: FtrProviderContext) { expect(typeof createdAction.id).to.be('string'); const { body: fetchedAction } = await supertest - .get(`/api/actions/action/${createdAction.id}`) + .get(`/api/actions/connector/${createdAction.id}`) .expect(200); expect(fetchedAction).to.eql({ id: fetchedAction.id, - isPreconfigured: false, + is_preconfigured: false, name: 'A generic Webhook action', - actionTypeId: '.webhook', + connector_type_id: '.webhook', config: { ...defaultValues, url: webhookSimulatorURL, @@ -145,11 +145,11 @@ export default function webhookTest({ getService }: FtrProviderContext) { it('should remove headers when a webhook is updated', async () => { const { body: createdAction } = await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'test') .send({ name: 'A generic Webhook action', - actionTypeId: '.webhook', + connector_type_id: '.webhook', secrets: { user: 'username', password: 'mypassphrase', @@ -165,9 +165,9 @@ export default function webhookTest({ getService }: FtrProviderContext) { expect(createdAction).to.eql({ id: createdAction.id, - isPreconfigured: false, + is_preconfigured: false, name: 'A generic Webhook action', - actionTypeId: '.webhook', + connector_type_id: '.webhook', config: { ...defaultValues, url: webhookSimulatorURL, @@ -178,7 +178,7 @@ export default function webhookTest({ getService }: FtrProviderContext) { }); await supertest - .put(`/api/actions/action/${createdAction.id}`) + .put(`/api/actions/connector/${createdAction.id}`) .set('kbn-xsrf', 'foo') .send({ name: 'A generic Webhook action', @@ -196,14 +196,14 @@ export default function webhookTest({ getService }: FtrProviderContext) { .expect(200); const { body: fetchedAction } = await supertest - .get(`/api/actions/action/${createdAction.id}`) + .get(`/api/actions/connector/${createdAction.id}`) .expect(200); expect(fetchedAction).to.eql({ id: fetchedAction.id, - isPreconfigured: false, + is_preconfigured: false, name: 'A generic Webhook action', - actionTypeId: '.webhook', + connector_type_id: '.webhook', config: { ...defaultValues, url: webhookSimulatorURL, @@ -217,7 +217,7 @@ export default function webhookTest({ getService }: FtrProviderContext) { it('should send authentication to the webhook target', async () => { const webhookActionId = await createWebhookAction(webhookSimulatorURL, {}, kibanaURL); const { body: result } = await supertest - .post(`/api/actions/action/${webhookActionId}/_execute`) + .post(`/api/actions/connector/${webhookActionId}/_execute`) .set('kbn-xsrf', 'test') .send({ params: { @@ -236,7 +236,7 @@ export default function webhookTest({ getService }: FtrProviderContext) { kibanaURL ); const { body: result } = await supertest - .post(`/api/actions/action/${webhookActionId}/_execute`) + .post(`/api/actions/connector/${webhookActionId}/_execute`) .set('kbn-xsrf', 'test') .send({ params: { @@ -255,7 +255,7 @@ export default function webhookTest({ getService }: FtrProviderContext) { kibanaURL ); const { body: result } = await supertest - .post(`/api/actions/action/${webhookActionId}/_execute`) + .post(`/api/actions/connector/${webhookActionId}/_execute`) .set('kbn-xsrf', 'test') .send({ params: { @@ -270,11 +270,11 @@ export default function webhookTest({ getService }: FtrProviderContext) { it('should handle target webhooks that are not added to allowedHosts', async () => { const { body: result } = await supertest - .post('/api/actions/action') + .post('/api/actions/connector') .set('kbn-xsrf', 'test') .send({ name: 'A generic Webhook action', - actionTypeId: '.webhook', + connector_type_id: '.webhook', secrets: { user: 'username', password: 'mypassphrase', @@ -296,7 +296,7 @@ export default function webhookTest({ getService }: FtrProviderContext) { kibanaURL ); const { body: result } = await supertest - .post(`/api/actions/action/${webhookActionId}/_execute`) + .post(`/api/actions/connector/${webhookActionId}/_execute`) .set('kbn-xsrf', 'test') .send({ params: { @@ -312,7 +312,7 @@ export default function webhookTest({ getService }: FtrProviderContext) { it('should handle failing webhook targets', async () => { const webhookActionId = await createWebhookAction(webhookSimulatorURL, {}, kibanaURL); const { body: result } = await supertest - .post(`/api/actions/action/${webhookActionId}/_execute`) + .post(`/api/actions/connector/${webhookActionId}/_execute`) .set('kbn-xsrf', 'test') .send({ params: { @@ -323,7 +323,7 @@ export default function webhookTest({ getService }: FtrProviderContext) { expect(result.status).to.eql('error'); expect(result.message).to.match(/error calling webhook, retry later/); - expect(result.serviceMessage).to.eql('[500] Internal Server Error'); + expect(result.service_message).to.eql('[500] Internal Server Error'); }); after(() => { diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/list_action_types.ts b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/connector_types.ts similarity index 96% rename from x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/list_action_types.ts rename to x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/connector_types.ts index 6625af3147450..a76654415c16d 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/list_action_types.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/connector_types.ts @@ -20,7 +20,7 @@ export default function listActionTypesTests({ getService }: FtrProviderContext) describe(scenario.id, () => { it('should return 200 with list of action types containing defaults', async () => { const response = await supertestWithoutAuth - .get(`${getUrlPrefix(space.id)}/api/actions/list_action_types`) + .get(`${getUrlPrefix(space.id)}/api/actions/connector_types`) .auth(user.username, user.password); function createActionTypeMatcher(id: string, name: string) { diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/create.ts b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/create.ts index 103811ae98c56..5e83ce7821d74 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/create.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/create.ts @@ -25,12 +25,12 @@ export default function createActionTests({ getService }: FtrProviderContext) { describe(scenario.id, () => { it('should handle create action request appropriately', async () => { const response = await supertestWithoutAuth - .post(`${getUrlPrefix(space.id)}/api/actions/action`) + .post(`${getUrlPrefix(space.id)}/api/actions/connector`) .auth(user.username, user.password) .set('kbn-xsrf', 'foo') .send({ name: 'My action', - actionTypeId: 'test.index-record', + connector_type_id: 'test.index-record', config: { unencrypted: `This value shouldn't get encrypted`, }, @@ -58,9 +58,9 @@ export default function createActionTests({ getService }: FtrProviderContext) { objectRemover.add(space.id, response.body.id, 'action', 'actions'); expect(response.body).to.eql({ id: response.body.id, - isPreconfigured: false, + is_preconfigured: false, name: 'My action', - actionTypeId: 'test.index-record', + connector_type_id: 'test.index-record', config: { unencrypted: `This value shouldn't get encrypted`, }, @@ -81,12 +81,12 @@ export default function createActionTests({ getService }: FtrProviderContext) { it(`should handle create action request appropriately when action type isn't registered`, async () => { const response = await supertestWithoutAuth - .post(`${getUrlPrefix(space.id)}/api/actions/action`) + .post(`${getUrlPrefix(space.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .auth(user.username, user.password) .send({ name: 'My action', - actionTypeId: 'test.unregistered-action-type', + connector_type_id: 'test.unregistered-action-type', config: {}, }); @@ -119,7 +119,7 @@ export default function createActionTests({ getService }: FtrProviderContext) { it('should handle create action request appropriately when payload is empty and invalid', async () => { const response = await supertestWithoutAuth - .post(`${getUrlPrefix(space.id)}/api/actions/action`) + .post(`${getUrlPrefix(space.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .auth(user.username, user.password) .send({}); @@ -146,12 +146,12 @@ export default function createActionTests({ getService }: FtrProviderContext) { it(`should handle create action request appropriately when config isn't valid`, async () => { const response = await supertestWithoutAuth - .post(`${getUrlPrefix(space.id)}/api/actions/action`) + .post(`${getUrlPrefix(space.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .auth(user.username, user.password) .send({ name: 'my name', - actionTypeId: 'test.index-record', + connector_type_id: 'test.index-record', config: { unencrypted: 'my unencrypted text', }, @@ -187,12 +187,12 @@ export default function createActionTests({ getService }: FtrProviderContext) { it(`should handle create action requests for action types that are not enabled`, async () => { const response = await supertestWithoutAuth - .post(`${getUrlPrefix(space.id)}/api/actions/action`) + .post(`${getUrlPrefix(space.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .auth(user.username, user.password) .send({ name: 'my name', - actionTypeId: 'test.not-enabled', + connector_type_id: 'test.not-enabled', }); switch (scenario.id) { diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/delete.ts b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/delete.ts index 404e5e21a2d83..a0aae0a1bd64d 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/delete.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/delete.ts @@ -26,11 +26,11 @@ export default function deleteActionTests({ getService }: FtrProviderContext) { describe(scenario.id, () => { it('should handle delete action request appropriately', async () => { const { body: createdAction } = await supertest - .post(`${getUrlPrefix(space.id)}/api/actions/action`) + .post(`${getUrlPrefix(space.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'My action', - actionTypeId: 'test.index-record', + connector_type_id: 'test.index-record', config: { unencrypted: `This value shouldn't get encrypted`, }, @@ -41,7 +41,7 @@ export default function deleteActionTests({ getService }: FtrProviderContext) { .expect(200); const response = await supertestWithoutAuth - .delete(`${getUrlPrefix(space.id)}/api/actions/action/${createdAction.id}`) + .delete(`${getUrlPrefix(space.id)}/api/actions/connector/${createdAction.id}`) .auth(user.username, user.password) .set('kbn-xsrf', 'foo'); @@ -71,11 +71,11 @@ export default function deleteActionTests({ getService }: FtrProviderContext) { it(`shouldn't delete action from another space`, async () => { const { body: createdAction } = await supertest - .post(`${getUrlPrefix(space.id)}/api/actions/action`) + .post(`${getUrlPrefix(space.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'My action', - actionTypeId: 'test.index-record', + connector_type_id: 'test.index-record', config: { unencrypted: `This value shouldn't get encrypted`, }, @@ -87,7 +87,7 @@ export default function deleteActionTests({ getService }: FtrProviderContext) { objectRemover.add(space.id, createdAction.id, 'action', 'actions'); const response = await supertestWithoutAuth - .delete(`${getUrlPrefix('other')}/api/actions/action/${createdAction.id}`) + .delete(`${getUrlPrefix('other')}/api/actions/connector/${createdAction.id}`) .auth(user.username, user.password) .set('kbn-xsrf', 'foo'); @@ -120,7 +120,7 @@ export default function deleteActionTests({ getService }: FtrProviderContext) { it(`should handle delete request appropriately when action doesn't exist`, async () => { const response = await supertestWithoutAuth - .delete(`${getUrlPrefix(space.id)}/api/actions/action/2`) + .delete(`${getUrlPrefix(space.id)}/api/actions/connector/2`) .set('kbn-xsrf', 'foo') .auth(user.username, user.password); @@ -148,7 +148,7 @@ export default function deleteActionTests({ getService }: FtrProviderContext) { it(`shouldn't delete action from preconfigured list`, async () => { const response = await supertestWithoutAuth - .delete(`${getUrlPrefix(space.id)}/api/actions/action/my-slack1`) + .delete(`${getUrlPrefix(space.id)}/api/actions/connector/my-slack1`) .auth(user.username, user.password) .set('kbn-xsrf', 'foo'); diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/execute.ts b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/execute.ts index 5e438eb9506ed..f3c3ee74551c0 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/execute.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/execute.ts @@ -48,11 +48,11 @@ export default function ({ getService }: FtrProviderContext) { describe(scenario.id, () => { it('should handle execute request appropriately', async () => { const { body: createdAction } = await supertest - .post(`${getUrlPrefix(space.id)}/api/actions/action`) + .post(`${getUrlPrefix(space.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'My action', - actionTypeId: 'test.index-record', + connector_type_id: 'test.index-record', config: { unencrypted: `This value shouldn't get encrypted`, }, @@ -65,7 +65,7 @@ export default function ({ getService }: FtrProviderContext) { const reference = `actions-execute-1:${user.username}`; const response = await supertestWithoutAuth - .post(`${getUrlPrefix(space.id)}/api/actions/action/${createdAction.id}/_execute`) + .post(`${getUrlPrefix(space.id)}/api/actions/connector/${createdAction.id}/_execute`) .auth(user.username, user.password) .set('kbn-xsrf', 'foo') .send({ @@ -117,7 +117,7 @@ export default function ({ getService }: FtrProviderContext) { await validateEventLog({ spaceId: space.id, - actionId: createdAction.id, + connectorId: createdAction.id, outcome: 'success', message: `action executed: test.index-record:${createdAction.id}: My action`, }); @@ -129,11 +129,11 @@ export default function ({ getService }: FtrProviderContext) { it(`shouldn't execute an action from another space`, async () => { const { body: createdAction } = await supertest - .post(`${getUrlPrefix(space.id)}/api/actions/action`) + .post(`${getUrlPrefix(space.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'My action', - actionTypeId: 'test.index-record', + connector_type_id: 'test.index-record', config: { unencrypted: `This value shouldn't get encrypted`, }, @@ -146,7 +146,7 @@ export default function ({ getService }: FtrProviderContext) { const reference = `actions-execute-4:${user.username}`; const response = await supertestWithoutAuth - .post(`${getUrlPrefix('other')}/api/actions/action/${createdAction.id}/_execute`) + .post(`${getUrlPrefix('other')}/api/actions/connector/${createdAction.id}/_execute`) .auth(user.username, user.password) .set('kbn-xsrf', 'foo') .send({ @@ -186,11 +186,11 @@ export default function ({ getService }: FtrProviderContext) { it('should handle execute request appropriately after action is updated', async () => { const { body: createdAction } = await supertest - .post(`${getUrlPrefix(space.id)}/api/actions/action`) + .post(`${getUrlPrefix(space.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'My action', - actionTypeId: 'test.index-record', + connector_type_id: 'test.index-record', config: { unencrypted: `This value shouldn't get encrypted`, }, @@ -202,7 +202,7 @@ export default function ({ getService }: FtrProviderContext) { objectRemover.add(space.id, createdAction.id, 'action', 'actions'); await supertest - .put(`${getUrlPrefix(space.id)}/api/actions/action/${createdAction.id}`) + .put(`${getUrlPrefix(space.id)}/api/actions/connector/${createdAction.id}`) .set('kbn-xsrf', 'foo') .send({ name: 'My action updated', @@ -217,7 +217,7 @@ export default function ({ getService }: FtrProviderContext) { const reference = `actions-execute-2:${user.username}`; const response = await supertestWithoutAuth - .post(`${getUrlPrefix(space.id)}/api/actions/action/${createdAction.id}/_execute`) + .post(`${getUrlPrefix(space.id)}/api/actions/connector/${createdAction.id}/_execute`) .auth(user.username, user.password) .set('kbn-xsrf', 'foo') .send({ @@ -274,7 +274,7 @@ export default function ({ getService }: FtrProviderContext) { it(`should handle execute request appropriately when action doesn't exist`, async () => { const response = await supertestWithoutAuth - .post(`${getUrlPrefix(space.id)}/api/actions/action/1/_execute`) + .post(`${getUrlPrefix(space.id)}/api/actions/connector/1/_execute`) .auth(user.username, user.password) .set('kbn-xsrf', 'foo') .send({ @@ -310,7 +310,7 @@ export default function ({ getService }: FtrProviderContext) { it('should handle execute request appropriately when payload is empty and invalid', async () => { const response = await supertestWithoutAuth - .post(`${getUrlPrefix(space.id)}/api/actions/action/1/_execute`) + .post(`${getUrlPrefix(space.id)}/api/actions/connector/1/_execute`) .auth(user.username, user.password) .set('kbn-xsrf', 'foo') .send({}); @@ -338,11 +338,11 @@ export default function ({ getService }: FtrProviderContext) { it('should handle execute request appropriately after changing config properties', async () => { const { body: createdAction } = await supertest - .post(`${getUrlPrefix(space.id)}/api/actions/action`) + .post(`${getUrlPrefix(space.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'test email action', - actionTypeId: '.email', + connector_type_id: '.email', config: { from: 'email-from-1@example.com', // this host is specifically added to allowedHosts in: @@ -359,7 +359,7 @@ export default function ({ getService }: FtrProviderContext) { objectRemover.add(space.id, createdAction.id, 'action', 'actions'); await supertest - .put(`${getUrlPrefix(space.id)}/api/actions/action/${createdAction.id}`) + .put(`${getUrlPrefix(space.id)}/api/actions/connector/${createdAction.id}`) .set('kbn-xsrf', 'foo') .send({ name: 'a test email action 2', @@ -375,7 +375,7 @@ export default function ({ getService }: FtrProviderContext) { .expect(200); const response = await supertestWithoutAuth - .post(`${getUrlPrefix(space.id)}/api/actions/action/${createdAction.id}/_execute`) + .post(`${getUrlPrefix(space.id)}/api/actions/connector/${createdAction.id}/_execute`) .auth(user.username, user.password) .set('kbn-xsrf', 'foo') .send({ @@ -413,17 +413,17 @@ export default function ({ getService }: FtrProviderContext) { let searchResult: any; const reference = `actions-execute-3:${user.username}`; const { body: createdAction } = await supertest - .post(`${getUrlPrefix(space.id)}/api/actions/action`) + .post(`${getUrlPrefix(space.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'My action', - actionTypeId: 'test.authorization', + connector_type_id: 'test.authorization', }) .expect(200); objectRemover.add(space.id, createdAction.id, 'action', 'actions'); const response = await supertestWithoutAuth - .post(`${getUrlPrefix(space.id)}/api/actions/action/${createdAction.id}/_execute`) + .post(`${getUrlPrefix(space.id)}/api/actions/connector/${createdAction.id}/_execute`) .auth(user.username, user.password) .set('kbn-xsrf', 'foo') .send({ @@ -503,21 +503,21 @@ export default function ({ getService }: FtrProviderContext) { interface ValidateEventLogParams { spaceId: string; - actionId: string; + connectorId: string; outcome: string; message: string; errorMessage?: string; } async function validateEventLog(params: ValidateEventLogParams): Promise { - const { spaceId, actionId, outcome, message, errorMessage } = params; + const { spaceId, connectorId, outcome, message, errorMessage } = params; const events: IValidatedEvent[] = await retry.try(async () => { return await getEventLog({ getService, spaceId, type: 'action', - id: actionId, + id: connectorId, provider: 'actions', actions: new Map([['execute', { equal: 1 }]]), filter: 'event.action:(execute)', @@ -550,7 +550,7 @@ export default function ({ getService }: FtrProviderContext) { { rel: 'primary', type: 'action', - id: actionId, + id: connectorId, namespace: spaceId, }, ]); diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/get.ts b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/get.ts index 5cbda5f15d839..0a2b2c7520e36 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/get.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/get.ts @@ -25,11 +25,11 @@ export default function getActionTests({ getService }: FtrProviderContext) { describe(scenario.id, () => { it('should handle get action request appropriately', async () => { const { body: createdAction } = await supertest - .post(`${getUrlPrefix(space.id)}/api/actions/action`) + .post(`${getUrlPrefix(space.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'My action', - actionTypeId: 'test.index-record', + connector_type_id: 'test.index-record', config: { unencrypted: `This value shouldn't get encrypted`, }, @@ -41,7 +41,7 @@ export default function getActionTests({ getService }: FtrProviderContext) { objectRemover.add(space.id, createdAction.id, 'action', 'actions'); const response = await supertestWithoutAuth - .get(`${getUrlPrefix(space.id)}/api/actions/action/${createdAction.id}`) + .get(`${getUrlPrefix(space.id)}/api/actions/connector/${createdAction.id}`) .auth(user.username, user.password); switch (scenario.id) { @@ -62,8 +62,8 @@ export default function getActionTests({ getService }: FtrProviderContext) { expect(response.statusCode).to.eql(200); expect(response.body).to.eql({ id: createdAction.id, - isPreconfigured: false, - actionTypeId: 'test.index-record', + is_preconfigured: false, + connector_type_id: 'test.index-record', name: 'My action', config: { unencrypted: `This value shouldn't get encrypted`, @@ -77,11 +77,11 @@ export default function getActionTests({ getService }: FtrProviderContext) { it(`action shouldn't be acessible from another space`, async () => { const { body: createdAction } = await supertest - .post(`${getUrlPrefix(space.id)}/api/actions/action`) + .post(`${getUrlPrefix(space.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'My action', - actionTypeId: 'test.index-record', + connector_type_id: 'test.index-record', config: { unencrypted: `This value shouldn't get encrypted`, }, @@ -93,7 +93,7 @@ export default function getActionTests({ getService }: FtrProviderContext) { objectRemover.add(space.id, createdAction.id, 'action', 'actions'); const response = await supertestWithoutAuth - .get(`${getUrlPrefix('other')}/api/actions/action/${createdAction.id}`) + .get(`${getUrlPrefix('other')}/api/actions/connector/${createdAction.id}`) .auth(user.username, user.password); switch (scenario.id) { @@ -125,7 +125,7 @@ export default function getActionTests({ getService }: FtrProviderContext) { it('should handle get preconfigured action request appropriately', async () => { const response = await supertestWithoutAuth - .get(`${getUrlPrefix(space.id)}/api/actions/action/my-slack1`) + .get(`${getUrlPrefix(space.id)}/api/actions/connector/my-slack1`) .auth(user.username, user.password); switch (scenario.id) { @@ -146,9 +146,9 @@ export default function getActionTests({ getService }: FtrProviderContext) { expect(response.statusCode).to.eql(200); expect(response.body).to.eql({ id: 'my-slack1', - actionTypeId: '.slack', + connector_type_id: '.slack', name: 'Slack#xyz', - isPreconfigured: true, + is_preconfigured: true, }); break; default: diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/get_all.ts b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/get_all.ts index 1a460dd630e01..2142520894669 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/get_all.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/get_all.ts @@ -25,11 +25,11 @@ export default function getAllActionTests({ getService }: FtrProviderContext) { describe(scenario.id, () => { it('should handle get all action request appropriately', async () => { const { body: createdAction } = await supertest - .post(`${getUrlPrefix(space.id)}/api/actions/action`) + .post(`${getUrlPrefix(space.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'My action', - actionTypeId: 'test.index-record', + connector_type_id: 'test.index-record', config: { unencrypted: `This value shouldn't get encrypted`, }, @@ -41,7 +41,7 @@ export default function getAllActionTests({ getService }: FtrProviderContext) { objectRemover.add(space.id, createdAction.id, 'action', 'actions'); const response = await supertestWithoutAuth - .get(`${getUrlPrefix(space.id)}/api/actions`) + .get(`${getUrlPrefix(space.id)}/api/actions/connectors`) .auth(user.username, user.password); switch (scenario.id) { @@ -63,41 +63,41 @@ export default function getAllActionTests({ getService }: FtrProviderContext) { expect(response.body).to.eql([ { id: createdAction.id, - isPreconfigured: false, + is_preconfigured: false, name: 'My action', - actionTypeId: 'test.index-record', + connector_type_id: 'test.index-record', config: { unencrypted: `This value shouldn't get encrypted`, }, - referencedByCount: 0, + referenced_by_count: 0, }, { id: 'preconfigured-es-index-action', - isPreconfigured: true, - actionTypeId: '.index', + is_preconfigured: true, + connector_type_id: '.index', name: 'preconfigured_es_index_action', - referencedByCount: 0, + referenced_by_count: 0, }, { id: 'my-slack1', - isPreconfigured: true, - actionTypeId: '.slack', + is_preconfigured: true, + connector_type_id: '.slack', name: 'Slack#xyz', - referencedByCount: 0, + referenced_by_count: 0, }, { id: 'custom-system-abc-connector', - isPreconfigured: true, - actionTypeId: 'system-abc-action-type', + is_preconfigured: true, + connector_type_id: 'system-abc-action-type', name: 'SystemABC', - referencedByCount: 0, + referenced_by_count: 0, }, { id: 'preconfigured.test.index-record', - isPreconfigured: true, - actionTypeId: 'test.index-record', + is_preconfigured: true, + connector_type_id: 'test.index-record', name: 'Test:_Preconfigured_Index_Record', - referencedByCount: 0, + referenced_by_count: 0, }, ]); break; @@ -106,13 +106,13 @@ export default function getAllActionTests({ getService }: FtrProviderContext) { } }); - it('should handle get all request appropriately with proper referencedByCount', async () => { + it('should handle get all request appropriately with proper referenced_by_count', async () => { const { body: createdAction } = await supertest - .post(`${getUrlPrefix(space.id)}/api/actions/action`) + .post(`${getUrlPrefix(space.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'My action', - actionTypeId: 'test.index-record', + connector_type_id: 'test.index-record', config: { unencrypted: `This value shouldn't get encrypted`, }, @@ -148,7 +148,7 @@ export default function getAllActionTests({ getService }: FtrProviderContext) { objectRemover.add(space.id, createdAlert.id, 'alert', 'alerts'); const response = await supertestWithoutAuth - .get(`${getUrlPrefix(space.id)}/api/actions`) + .get(`${getUrlPrefix(space.id)}/api/actions/connectors`) .auth(user.username, user.password); switch (scenario.id) { @@ -170,41 +170,41 @@ export default function getAllActionTests({ getService }: FtrProviderContext) { expect(response.body).to.eql([ { id: createdAction.id, - isPreconfigured: false, + is_preconfigured: false, name: 'My action', - actionTypeId: 'test.index-record', + connector_type_id: 'test.index-record', config: { unencrypted: `This value shouldn't get encrypted`, }, - referencedByCount: 1, + referenced_by_count: 1, }, { id: 'preconfigured-es-index-action', - isPreconfigured: true, - actionTypeId: '.index', + is_preconfigured: true, + connector_type_id: '.index', name: 'preconfigured_es_index_action', - referencedByCount: 0, + referenced_by_count: 0, }, { id: 'my-slack1', - isPreconfigured: true, - actionTypeId: '.slack', + is_preconfigured: true, + connector_type_id: '.slack', name: 'Slack#xyz', - referencedByCount: 1, + referenced_by_count: 1, }, { id: 'custom-system-abc-connector', - isPreconfigured: true, - actionTypeId: 'system-abc-action-type', + is_preconfigured: true, + connector_type_id: 'system-abc-action-type', name: 'SystemABC', - referencedByCount: 0, + referenced_by_count: 0, }, { id: 'preconfigured.test.index-record', - isPreconfigured: true, - actionTypeId: 'test.index-record', + is_preconfigured: true, + connector_type_id: 'test.index-record', name: 'Test:_Preconfigured_Index_Record', - referencedByCount: 0, + referenced_by_count: 0, }, ]); break; @@ -215,11 +215,11 @@ export default function getAllActionTests({ getService }: FtrProviderContext) { it(`shouldn't get actions from another space`, async () => { const { body: createdAction } = await supertest - .post(`${getUrlPrefix(space.id)}/api/actions/action`) + .post(`${getUrlPrefix(space.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'My action', - actionTypeId: 'test.index-record', + connector_type_id: 'test.index-record', config: { unencrypted: `This value shouldn't get encrypted`, }, @@ -231,7 +231,7 @@ export default function getAllActionTests({ getService }: FtrProviderContext) { objectRemover.add(space.id, createdAction.id, 'action', 'actions'); const response = await supertestWithoutAuth - .get(`${getUrlPrefix('other')}/api/actions`) + .get(`${getUrlPrefix('other')}/api/actions/connectors`) .auth(user.username, user.password); switch (scenario.id) { @@ -253,31 +253,31 @@ export default function getAllActionTests({ getService }: FtrProviderContext) { expect(response.body).to.eql([ { id: 'preconfigured-es-index-action', - isPreconfigured: true, - actionTypeId: '.index', + is_preconfigured: true, + connector_type_id: '.index', name: 'preconfigured_es_index_action', - referencedByCount: 0, + referenced_by_count: 0, }, { id: 'my-slack1', - isPreconfigured: true, - actionTypeId: '.slack', + is_preconfigured: true, + connector_type_id: '.slack', name: 'Slack#xyz', - referencedByCount: 0, + referenced_by_count: 0, }, { id: 'custom-system-abc-connector', - isPreconfigured: true, - actionTypeId: 'system-abc-action-type', + is_preconfigured: true, + connector_type_id: 'system-abc-action-type', name: 'SystemABC', - referencedByCount: 0, + referenced_by_count: 0, }, { id: 'preconfigured.test.index-record', - isPreconfigured: true, - actionTypeId: 'test.index-record', + is_preconfigured: true, + connector_type_id: 'test.index-record', name: 'Test:_Preconfigured_Index_Record', - referencedByCount: 0, + referenced_by_count: 0, }, ]); break; diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/index.ts b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/index.ts index 9af6c9ad0109c..b5ff287ac58f6 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/index.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/index.ts @@ -34,7 +34,7 @@ export default function actionsTests({ loadTestFile, getService }: FtrProviderCo loadTestFile(require.resolve('./execute')); loadTestFile(require.resolve('./get_all')); loadTestFile(require.resolve('./get')); - loadTestFile(require.resolve('./list_action_types')); + loadTestFile(require.resolve('./connector_types')); loadTestFile(require.resolve('./update')); }); } diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/manual/pr_40694.js b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/manual/pr_40694.js index e6ee275103041..5b422bcd0614d 100755 --- a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/manual/pr_40694.js +++ b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/manual/pr_40694.js @@ -16,8 +16,8 @@ if (require.main === module) main(); async function main() { let response; - response = await httpPost('api/actions/action', { - actionTypeId: '.email', + response = await httpPost('api/actions/connector', { + connector_type_id: '.email', name: 'an email action', config: { from: 'patrick.mueller@elastic.co', @@ -32,12 +32,12 @@ async function main() { }); console.log(`result of create: ${JSON.stringify(response, null, 4)}`); - const actionId = response.id; + const connectorId = response.id; - response = await httpGet(`api/actions/${actionId}`); + response = await httpGet(`api/actions/${connectorId}`); console.log(`action after create: ${JSON.stringify(response, null, 4)}`); - response = await httpPut(`api/actions/action/${actionId}`, { + response = await httpPut(`api/actions/connector/${connectorId}`, { name: 'an email action', config: { from: 'patrick.mueller@elastic.co', @@ -51,10 +51,10 @@ async function main() { console.log(`response from update: ${JSON.stringify(response, null, 4)}`); - response = await httpGet(`api/actions/${actionId}`); + response = await httpGet(`api/actions/${connectorId}`); console.log(`action after update: ${JSON.stringify(response, null, 4)}`); - response = await httpPost(`api/actions/action/${actionId}/_execute`, { + response = await httpPost(`api/actions/connector/${connectorId}/_execute`, { params: { to: ['patrick.mueller@elastic.co'], subject: 'the email subject', diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/update.ts b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/update.ts index ded02f1982be7..15cf409970184 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/update.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/update.ts @@ -25,11 +25,11 @@ export default function updateActionTests({ getService }: FtrProviderContext) { describe(scenario.id, () => { it('should handle update action request appropriately', async () => { const { body: createdAction } = await supertest - .post(`${getUrlPrefix(space.id)}/api/actions/action`) + .post(`${getUrlPrefix(space.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'My action', - actionTypeId: 'test.index-record', + connector_type_id: 'test.index-record', config: { unencrypted: `This value shouldn't get encrypted`, }, @@ -41,7 +41,7 @@ export default function updateActionTests({ getService }: FtrProviderContext) { objectRemover.add(space.id, createdAction.id, 'action', 'actions'); const response = await supertestWithoutAuth - .put(`${getUrlPrefix(space.id)}/api/actions/action/${createdAction.id}`) + .put(`${getUrlPrefix(space.id)}/api/actions/connector/${createdAction.id}`) .auth(user.username, user.password) .set('kbn-xsrf', 'foo') .send({ @@ -72,8 +72,8 @@ export default function updateActionTests({ getService }: FtrProviderContext) { expect(response.statusCode).to.eql(200); expect(response.body).to.eql({ id: createdAction.id, - isPreconfigured: false, - actionTypeId: 'test.index-record', + is_preconfigured: false, + connector_type_id: 'test.index-record', name: 'My action updated', config: { unencrypted: `This value shouldn't get encrypted`, @@ -94,11 +94,11 @@ export default function updateActionTests({ getService }: FtrProviderContext) { it(`shouldn't update action from another space`, async () => { const { body: createdAction } = await supertest - .post(`${getUrlPrefix(space.id)}/api/actions/action`) + .post(`${getUrlPrefix(space.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'My action', - actionTypeId: 'test.index-record', + connector_type_id: 'test.index-record', config: { unencrypted: `This value shouldn't get encrypted`, }, @@ -110,7 +110,7 @@ export default function updateActionTests({ getService }: FtrProviderContext) { objectRemover.add(space.id, createdAction.id, 'action', 'actions'); const response = await supertestWithoutAuth - .put(`${getUrlPrefix('other')}/api/actions/action/${createdAction.id}`) + .put(`${getUrlPrefix('other')}/api/actions/connector/${createdAction.id}`) .auth(user.username, user.password) .set('kbn-xsrf', 'foo') .send({ @@ -152,7 +152,7 @@ export default function updateActionTests({ getService }: FtrProviderContext) { it('should handle update action request appropriately when passing a null config', async () => { const response = await supertestWithoutAuth - .put(`${getUrlPrefix(space.id)}/api/actions/action/1`) + .put(`${getUrlPrefix(space.id)}/api/actions/connector/1`) .set('kbn-xsrf', 'foo') .auth(user.username, user.password) .send({ @@ -182,7 +182,7 @@ export default function updateActionTests({ getService }: FtrProviderContext) { it(`should handle update action request appropriately when action doesn't exist`, async () => { const response = await supertestWithoutAuth - .put(`${getUrlPrefix(space.id)}/api/actions/action/1`) + .put(`${getUrlPrefix(space.id)}/api/actions/connector/1`) .set('kbn-xsrf', 'foo') .auth(user.username, user.password) .send({ @@ -224,7 +224,7 @@ export default function updateActionTests({ getService }: FtrProviderContext) { it('should handle update action request appropriately when payload is empty and invalid', async () => { const response = await supertestWithoutAuth - .put(`${getUrlPrefix(space.id)}/api/actions/action/1`) + .put(`${getUrlPrefix(space.id)}/api/actions/connector/1`) .set('kbn-xsrf', 'foo') .auth(user.username, user.password) .send({}); @@ -252,11 +252,11 @@ export default function updateActionTests({ getService }: FtrProviderContext) { it('should handle update action request appropriately when secrets are not valid', async () => { const { body: createdAction } = await supertest - .post(`${getUrlPrefix(space.id)}/api/actions/action`) + .post(`${getUrlPrefix(space.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'My action', - actionTypeId: 'test.index-record', + connector_type_id: 'test.index-record', config: { unencrypted: `This value shouldn't get encrypted`, }, @@ -268,7 +268,7 @@ export default function updateActionTests({ getService }: FtrProviderContext) { objectRemover.add(space.id, createdAction.id, 'action', 'actions'); const response = await supertestWithoutAuth - .put(`${getUrlPrefix(space.id)}/api/actions/action/${createdAction.id}`) + .put(`${getUrlPrefix(space.id)}/api/actions/connector/${createdAction.id}`) .set('kbn-xsrf', 'foo') .auth(user.username, user.password) .send({ @@ -311,7 +311,7 @@ export default function updateActionTests({ getService }: FtrProviderContext) { it(`shouldn't update action from preconfigured list`, async () => { const response = await supertestWithoutAuth - .put(`${getUrlPrefix(space.id)}/api/actions/action/custom-system-abc-connector`) + .put(`${getUrlPrefix(space.id)}/api/actions/connector/custom-system-abc-connector`) .auth(user.username, user.password) .set('kbn-xsrf', 'foo') .send({ diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/list_action_types.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/connector_types.ts similarity index 55% rename from x-pack/test/alerting_api_integration/spaces_only/tests/actions/list_action_types.ts rename to x-pack/test/alerting_api_integration/spaces_only/tests/actions/connector_types.ts index c999def5ead27..bb7fbbf0802d2 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/list_action_types.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/connector_types.ts @@ -14,10 +14,10 @@ import { FtrProviderContext } from '../../../common/ftr_provider_context'; export default function listActionTypesTests({ getService }: FtrProviderContext) { const supertest = getService('supertest'); - describe('list_action_types', () => { - it('should return 200 with list of action types containing defaults', async () => { + describe('connector_types', () => { + it('should return 200 with list of connector types containing defaults', async () => { const response = await supertest.get( - `${getUrlPrefix(Spaces.space1.id)}/api/actions/list_action_types` + `${getUrlPrefix(Spaces.space1.id)}/api/actions/connector_types` ); function createActionTypeMatcher(id: string, name: string) { @@ -33,5 +33,26 @@ export default function listActionTypesTests({ getService }: FtrProviderContext) response.body.some(createActionTypeMatcher('test.index-record', 'Test: Index Record')) ).to.be(true); }); + + describe('legacy', () => { + it('should return 200 with list of action types containing defaults', async () => { + const response = await supertest.get( + `${getUrlPrefix(Spaces.space1.id)}/api/actions/list_action_types` + ); + + function createActionTypeMatcher(id: string, name: string) { + return (actionType: { id: string; name: string }) => { + return actionType.id === id && actionType.name === name; + }; + } + + expect(response.status).to.eql(200); + // Check for values explicitly in order to avoid this test failing each time plugins register + // a new action type + expect( + response.body.some(createActionTypeMatcher('test.index-record', 'Test: Index Record')) + ).to.be(true); + }); + }); }); } diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/create.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/create.ts index de06f3fc990b6..c91c05bda606e 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/create.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/create.ts @@ -19,13 +19,13 @@ export default function createActionTests({ getService }: FtrProviderContext) { after(() => objectRemover.removeAll()); - it('should handle create action request appropriately', async () => { + it('should handle create connector request appropriately', async () => { const response = await supertest - .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action`) + .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'My action', - actionTypeId: 'test.index-record', + connector_type_id: 'test.index-record', config: { unencrypted: `This value shouldn't get encrypted`, }, @@ -38,9 +38,9 @@ export default function createActionTests({ getService }: FtrProviderContext) { objectRemover.add(Spaces.space1.id, response.body.id, 'action', 'actions'); expect(response.body).to.eql({ id: response.body.id, - isPreconfigured: false, + is_preconfigured: false, name: 'My action', - actionTypeId: 'test.index-record', + connector_type_id: 'test.index-record', config: { unencrypted: `This value shouldn't get encrypted`, }, @@ -56,6 +56,45 @@ export default function createActionTests({ getService }: FtrProviderContext) { }); }); + describe('legacy', () => { + it('should handle create action request appropriately', async () => { + const response = await supertest + .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action`) + .set('kbn-xsrf', 'foo') + .send({ + name: 'My action', + actionTypeId: 'test.index-record', + config: { + unencrypted: `This value shouldn't get encrypted`, + }, + secrets: { + encrypted: 'This value should be encrypted', + }, + }); + + expect(response.status).to.eql(200); + objectRemover.add(Spaces.space1.id, response.body.id, 'action', 'actions'); + expect(response.body).to.eql({ + id: response.body.id, + isPreconfigured: false, + name: 'My action', + actionTypeId: 'test.index-record', + config: { + unencrypted: `This value shouldn't get encrypted`, + }, + }); + expect(typeof response.body.id).to.be('string'); + + // Ensure AAD isn't broken + await checkAAD({ + supertest, + spaceId: Spaces.space1.id, + type: 'action', + id: response.body.id, + }); + }); + }); + it('should notify feature usage when creating a gold action type', async () => { const testStart = new Date(); const response = await supertest diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/delete.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/delete.ts index 5ba5083bd9245..66ae047e5151b 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/delete.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/delete.ts @@ -20,11 +20,11 @@ export default function deleteActionTests({ getService }: FtrProviderContext) { it('should handle delete action request appropriately', async () => { const { body: createdAction } = await supertest - .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action`) + .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'My action', - actionTypeId: 'test.index-record', + connector_type_id: 'test.index-record', config: { unencrypted: `This value shouldn't get encrypted`, }, @@ -35,18 +35,18 @@ export default function deleteActionTests({ getService }: FtrProviderContext) { .expect(200); await supertest - .delete(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action/${createdAction.id}`) + .delete(`${getUrlPrefix(Spaces.space1.id)}/api/actions/connector/${createdAction.id}`) .set('kbn-xsrf', 'foo') .expect(204, ''); }); it(`shouldn't delete action from another space`, async () => { const { body: createdAction } = await supertest - .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action`) + .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'My action', - actionTypeId: 'test.index-record', + connector_type_id: 'test.index-record', config: { unencrypted: `This value shouldn't get encrypted`, }, @@ -58,7 +58,7 @@ export default function deleteActionTests({ getService }: FtrProviderContext) { objectRemover.add(Spaces.space1.id, createdAction.id, 'action', 'actions'); await supertest - .delete(`${getUrlPrefix(Spaces.other.id)}/api/actions/action/${createdAction.id}`) + .delete(`${getUrlPrefix(Spaces.other.id)}/api/actions/connector/${createdAction.id}`) .set('kbn-xsrf', 'foo') .expect(404, { statusCode: 404, @@ -69,7 +69,7 @@ export default function deleteActionTests({ getService }: FtrProviderContext) { it(`should handle delete request appropriately when action doesn't exist`, async () => { await supertest - .delete(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action/2`) + .delete(`${getUrlPrefix(Spaces.space1.id)}/api/actions/connector/2`) .set('kbn-xsrf', 'foo') .expect(404, { statusCode: 404, @@ -80,7 +80,7 @@ export default function deleteActionTests({ getService }: FtrProviderContext) { it(`shouldn't delete action from preconfigured list`, async () => { await supertest - .delete(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action/my-slack1`) + .delete(`${getUrlPrefix(Spaces.space1.id)}/api/actions/connector/my-slack1`) .set('kbn-xsrf', 'foo') .expect(400, { statusCode: 400, @@ -88,5 +88,78 @@ export default function deleteActionTests({ getService }: FtrProviderContext) { message: `Preconfigured action my-slack1 is not allowed to delete.`, }); }); + + describe('legacy', () => { + it('should handle delete action request appropriately', async () => { + const { body: createdAction } = await supertest + .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action`) + .set('kbn-xsrf', 'foo') + .send({ + name: 'My action', + actionTypeId: 'test.index-record', + config: { + unencrypted: `This value shouldn't get encrypted`, + }, + secrets: { + encrypted: 'This value should be encrypted', + }, + }) + .expect(200); + + await supertest + .delete(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action/${createdAction.id}`) + .set('kbn-xsrf', 'foo') + .expect(204, ''); + }); + + it(`shouldn't delete action from another space`, async () => { + const { body: createdAction } = await supertest + .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action`) + .set('kbn-xsrf', 'foo') + .send({ + name: 'My action', + actionTypeId: 'test.index-record', + config: { + unencrypted: `This value shouldn't get encrypted`, + }, + secrets: { + encrypted: 'This value should be encrypted', + }, + }) + .expect(200); + objectRemover.add(Spaces.space1.id, createdAction.id, 'action', 'actions'); + + await supertest + .delete(`${getUrlPrefix(Spaces.other.id)}/api/actions/action/${createdAction.id}`) + .set('kbn-xsrf', 'foo') + .expect(404, { + statusCode: 404, + error: 'Not Found', + message: `Saved object [action/${createdAction.id}] not found`, + }); + }); + + it(`should handle delete request appropriately when action doesn't exist`, async () => { + await supertest + .delete(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action/2`) + .set('kbn-xsrf', 'foo') + .expect(404, { + statusCode: 404, + error: 'Not Found', + message: 'Saved object [action/2] not found', + }); + }); + + it(`shouldn't delete action from preconfigured list`, async () => { + await supertest + .delete(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action/my-slack1`) + .set('kbn-xsrf', 'foo') + .expect(400, { + statusCode: 400, + error: 'Bad Request', + message: `Preconfigured action my-slack1 is not allowed to delete.`, + }); + }); + }); }); } diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/execute.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/execute.ts index 0e3e25ad9c99a..fbdde2104dd61 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/execute.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/execute.ts @@ -44,11 +44,11 @@ export default function ({ getService }: FtrProviderContext) { it('should handle execute request appropriately', async () => { const { body: createdAction } = await supertest - .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action`) + .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'My action', - actionTypeId: 'test.index-record', + connector_type_id: 'test.index-record', config: { unencrypted: `This value shouldn't get encrypted`, }, @@ -59,9 +59,11 @@ export default function ({ getService }: FtrProviderContext) { .expect(200); objectRemover.add(Spaces.space1.id, createdAction.id, 'action', 'actions'); - const reference = `actions-execute-1:${Spaces.space1.id}`; + const reference = `actions-execute-1:${Spaces.space1.id}:${createdAction.id}`; const response = await supertest - .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action/${createdAction.id}/_execute`) + .post( + `${getUrlPrefix(Spaces.space1.id)}/api/actions/connector/${createdAction.id}/_execute` + ) .set('kbn-xsrf', 'foo') .send({ params: { @@ -102,18 +104,20 @@ export default function ({ getService }: FtrProviderContext) { it('should handle failed executions', async () => { const { body: createdAction } = await supertest - .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action`) + .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'failing action', - actionTypeId: 'test.failing', + connector_type_id: 'test.failing', }) .expect(200); objectRemover.add(Spaces.space1.id, createdAction.id, 'action', 'actions'); const reference = `actions-failure-1:${Spaces.space1.id}`; const response = await supertest - .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action/${createdAction.id}/_execute`) + .post( + `${getUrlPrefix(Spaces.space1.id)}/api/actions/connector/${createdAction.id}/_execute` + ) .set('kbn-xsrf', 'foo') .send({ params: { @@ -124,10 +128,10 @@ export default function ({ getService }: FtrProviderContext) { expect(response.status).to.eql(200); expect(response.body).to.eql({ - actionId: createdAction.id, + connector_id: createdAction.id, status: 'error', message: 'an error occurred while running the action executor', - serviceMessage: `expected failure for ${ES_TEST_INDEX_NAME} ${reference}`, + service_message: `expected failure for ${ES_TEST_INDEX_NAME} ${reference}`, retry: false, }); @@ -142,11 +146,11 @@ export default function ({ getService }: FtrProviderContext) { it(`shouldn't execute an action from another space`, async () => { const { body: createdAction } = await supertest - .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action`) + .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'My action', - actionTypeId: 'test.index-record', + connector_type_id: 'test.index-record', config: { unencrypted: `This value shouldn't get encrypted`, }, @@ -178,17 +182,19 @@ export default function ({ getService }: FtrProviderContext) { it('should handle execute request appropriately and have proper callCluster and savedObjectsClient authorization', async () => { const reference = `actions-execute-3:${Spaces.space1.id}`; const { body: createdAction } = await supertest - .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action`) + .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'My action', - actionTypeId: 'test.authorization', + connector_type_id: 'test.authorization', }) .expect(200); objectRemover.add(Spaces.space1.id, createdAction.id, 'action', 'actions'); const response = await supertest - .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action/${createdAction.id}/_execute`) + .post( + `${getUrlPrefix(Spaces.space1.id)}/api/actions/connector/${createdAction.id}/_execute` + ) .set('kbn-xsrf', 'foo') .send({ params: { @@ -220,11 +226,11 @@ export default function ({ getService }: FtrProviderContext) { it('should notify feature usage when executing a gold action type', async () => { const { body: createdAction } = await supertest - .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action`) + .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'Noop action type', - actionTypeId: 'test.noop', + connector_type_id: 'test.noop', secrets: {}, config: {}, }) @@ -233,7 +239,9 @@ export default function ({ getService }: FtrProviderContext) { const executionStart = new Date(); await supertest - .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action/${createdAction.id}/_execute`) + .post( + `${getUrlPrefix(Spaces.space1.id)}/api/actions/connector/${createdAction.id}/_execute` + ) .set('kbn-xsrf', 'foo') .send({ params: {}, @@ -251,6 +259,72 @@ export default function ({ getService }: FtrProviderContext) { expect(noopFeature.last_used).to.be.a('string'); expect(new Date(noopFeature.last_used).getTime()).to.be.greaterThan(executionStart.getTime()); }); + + describe('legacy', () => { + it('should handle execute request appropriately', async () => { + const { body: createdAction } = await supertest + .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action`) + .set('kbn-xsrf', 'foo') + .send({ + name: 'My action', + actionTypeId: 'test.index-record', + config: { + unencrypted: `This value shouldn't get encrypted`, + }, + secrets: { + encrypted: 'This value should be encrypted', + }, + }) + .expect(200); + objectRemover.add(Spaces.space1.id, createdAction.id, 'action', 'actions'); + + const reference = `actions-execute-1:${Spaces.space1.id}:${createdAction.id}`; + const response = await supertest + .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action/${createdAction.id}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { + reference, + index: ES_TEST_INDEX_NAME, + message: 'Testing 123', + }, + }); + + expect(response.status).to.eql(200); + }); + + it('should handle failed executions', async () => { + const { body: createdAction } = await supertest + .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action`) + .set('kbn-xsrf', 'foo') + .send({ + name: 'failing action', + actionTypeId: 'test.failing', + }) + .expect(200); + objectRemover.add(Spaces.space1.id, createdAction.id, 'action', 'actions'); + + const reference = `actions-failure-1:${Spaces.space1.id}:${createdAction.id}`; + const response = await supertest + .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action/${createdAction.id}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { + reference, + index: ES_TEST_INDEX_NAME, + }, + }); + + expect(response.status).to.eql(200); + expect(response.body).to.eql({ + actionId: createdAction.id, + status: 'error', + message: 'an error occurred while running the action executor', + serviceMessage: `expected failure for ${ES_TEST_INDEX_NAME} ${reference}`, + retry: false, + }); + }); + }); }); interface ValidateEventLogParams { diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/get.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/get.ts index f10755ae31d26..2219e9dda17d6 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/get.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/get.ts @@ -20,11 +20,11 @@ export default function getActionTests({ getService }: FtrProviderContext) { it('should handle get action request appropriately', async () => { const { body: createdAction } = await supertest - .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action`) + .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'My action', - actionTypeId: 'test.index-record', + connector_type_id: 'test.index-record', config: { unencrypted: `This value shouldn't get encrypted`, }, @@ -36,11 +36,11 @@ export default function getActionTests({ getService }: FtrProviderContext) { objectRemover.add(Spaces.space1.id, createdAction.id, 'action', 'actions'); await supertest - .get(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action/${createdAction.id}`) + .get(`${getUrlPrefix(Spaces.space1.id)}/api/actions/connector/${createdAction.id}`) .expect(200, { id: createdAction.id, - isPreconfigured: false, - actionTypeId: 'test.index-record', + is_preconfigured: false, + connector_type_id: 'test.index-record', name: 'My action', config: { unencrypted: `This value shouldn't get encrypted`, @@ -50,11 +50,11 @@ export default function getActionTests({ getService }: FtrProviderContext) { it(`action should't be acessible from another space`, async () => { const { body: createdAction } = await supertest - .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action`) + .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'My action', - actionTypeId: 'test.index-record', + connector_type_id: 'test.index-record', config: { unencrypted: `This value shouldn't get encrypted`, }, @@ -66,7 +66,7 @@ export default function getActionTests({ getService }: FtrProviderContext) { objectRemover.add(Spaces.space1.id, createdAction.id, 'action', 'actions'); await supertest - .get(`${getUrlPrefix(Spaces.other.id)}/api/actions/action/${createdAction.id}`) + .get(`${getUrlPrefix(Spaces.other.id)}/api/actions/connector/${createdAction.id}`) .expect(404, { statusCode: 404, error: 'Not Found', @@ -76,13 +76,82 @@ export default function getActionTests({ getService }: FtrProviderContext) { it('should handle get action request from preconfigured list', async () => { await supertest - .get(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action/my-slack1`) + .get(`${getUrlPrefix(Spaces.space1.id)}/api/actions/connector/my-slack1`) .expect(200, { id: 'my-slack1', - isPreconfigured: true, - actionTypeId: '.slack', + is_preconfigured: true, + connector_type_id: '.slack', name: 'Slack#xyz', }); }); + + describe('legacy', () => { + it('should handle get action request appropriately', async () => { + const { body: createdAction } = await supertest + .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action`) + .set('kbn-xsrf', 'foo') + .send({ + name: 'My action', + actionTypeId: 'test.index-record', + config: { + unencrypted: `This value shouldn't get encrypted`, + }, + secrets: { + encrypted: 'This value should be encrypted', + }, + }) + .expect(200); + objectRemover.add(Spaces.space1.id, createdAction.id, 'action', 'actions'); + + await supertest + .get(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action/${createdAction.id}`) + .expect(200, { + id: createdAction.id, + isPreconfigured: false, + actionTypeId: 'test.index-record', + name: 'My action', + config: { + unencrypted: `This value shouldn't get encrypted`, + }, + }); + }); + + it(`action should't be acessible from another space`, async () => { + const { body: createdAction } = await supertest + .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action`) + .set('kbn-xsrf', 'foo') + .send({ + name: 'My action', + actionTypeId: 'test.index-record', + config: { + unencrypted: `This value shouldn't get encrypted`, + }, + secrets: { + encrypted: 'This value should be encrypted', + }, + }) + .expect(200); + objectRemover.add(Spaces.space1.id, createdAction.id, 'action', 'actions'); + + await supertest + .get(`${getUrlPrefix(Spaces.other.id)}/api/actions/action/${createdAction.id}`) + .expect(404, { + statusCode: 404, + error: 'Not Found', + message: `Saved object [action/${createdAction.id}] not found`, + }); + }); + + it('should handle get action request from preconfigured list', async () => { + await supertest + .get(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action/my-slack1`) + .expect(200, { + id: 'my-slack1', + isPreconfigured: true, + actionTypeId: '.slack', + name: 'Slack#xyz', + }); + }); + }); }); } diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/get_all.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/get_all.ts index 49befae793445..531df9d4ed19f 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/get_all.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/get_all.ts @@ -35,44 +35,44 @@ export default function getAllActionTests({ getService }: FtrProviderContext) { .expect(200); objectRemover.add(Spaces.space1.id, createdAction.id, 'action', 'actions'); - await supertest.get(`${getUrlPrefix(Spaces.space1.id)}/api/actions`).expect(200, [ + await supertest.get(`${getUrlPrefix(Spaces.space1.id)}/api/actions/connectors`).expect(200, [ { id: createdAction.id, - isPreconfigured: false, + is_preconfigured: false, name: 'My action', - actionTypeId: 'test.index-record', + connector_type_id: 'test.index-record', config: { unencrypted: `This value shouldn't get encrypted`, }, - referencedByCount: 0, + referenced_by_count: 0, }, { id: 'preconfigured-es-index-action', - isPreconfigured: true, - actionTypeId: '.index', + is_preconfigured: true, + connector_type_id: '.index', name: 'preconfigured_es_index_action', - referencedByCount: 0, + referenced_by_count: 0, }, { id: 'my-slack1', - isPreconfigured: true, - actionTypeId: '.slack', + is_preconfigured: true, + connector_type_id: '.slack', name: 'Slack#xyz', - referencedByCount: 0, + referenced_by_count: 0, }, { id: 'custom-system-abc-connector', - isPreconfigured: true, - actionTypeId: 'system-abc-action-type', + is_preconfigured: true, + connector_type_id: 'system-abc-action-type', name: 'SystemABC', - referencedByCount: 0, + referenced_by_count: 0, }, { id: 'preconfigured.test.index-record', - isPreconfigured: true, - actionTypeId: 'test.index-record', + is_preconfigured: true, + connector_type_id: 'test.index-record', name: 'Test:_Preconfigured_Index_Record', - referencedByCount: 0, + referenced_by_count: 0, }, ]); }); @@ -94,36 +94,97 @@ export default function getAllActionTests({ getService }: FtrProviderContext) { .expect(200); objectRemover.add(Spaces.space1.id, createdAction.id, 'action', 'actions'); - await supertest.get(`${getUrlPrefix(Spaces.other.id)}/api/actions`).expect(200, [ + await supertest.get(`${getUrlPrefix(Spaces.other.id)}/api/actions/connectors`).expect(200, [ { id: 'preconfigured-es-index-action', - isPreconfigured: true, - actionTypeId: '.index', + is_preconfigured: true, + connector_type_id: '.index', name: 'preconfigured_es_index_action', - referencedByCount: 0, + referenced_by_count: 0, }, { id: 'my-slack1', - isPreconfigured: true, - actionTypeId: '.slack', + is_preconfigured: true, + connector_type_id: '.slack', name: 'Slack#xyz', - referencedByCount: 0, + referenced_by_count: 0, }, { id: 'custom-system-abc-connector', - isPreconfigured: true, - actionTypeId: 'system-abc-action-type', + is_preconfigured: true, + connector_type_id: 'system-abc-action-type', name: 'SystemABC', - referencedByCount: 0, + referenced_by_count: 0, }, { id: 'preconfigured.test.index-record', - isPreconfigured: true, - actionTypeId: 'test.index-record', + is_preconfigured: true, + connector_type_id: 'test.index-record', name: 'Test:_Preconfigured_Index_Record', - referencedByCount: 0, + referenced_by_count: 0, }, ]); }); + + describe('legacy', () => { + it('should handle get all action request appropriately', async () => { + const { body: createdAction } = await supertest + .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action`) + .set('kbn-xsrf', 'foo') + .send({ + name: 'My action', + actionTypeId: 'test.index-record', + config: { + unencrypted: `This value shouldn't get encrypted`, + }, + secrets: { + encrypted: 'This value should be encrypted', + }, + }) + .expect(200); + objectRemover.add(Spaces.space1.id, createdAction.id, 'action', 'actions'); + + await supertest.get(`${getUrlPrefix(Spaces.space1.id)}/api/actions`).expect(200, [ + { + id: createdAction.id, + isPreconfigured: false, + name: 'My action', + actionTypeId: 'test.index-record', + config: { + unencrypted: `This value shouldn't get encrypted`, + }, + referencedByCount: 0, + }, + { + id: 'preconfigured-es-index-action', + isPreconfigured: true, + actionTypeId: '.index', + name: 'preconfigured_es_index_action', + referencedByCount: 0, + }, + { + id: 'my-slack1', + isPreconfigured: true, + actionTypeId: '.slack', + name: 'Slack#xyz', + referencedByCount: 0, + }, + { + id: 'custom-system-abc-connector', + isPreconfigured: true, + actionTypeId: 'system-abc-action-type', + name: 'SystemABC', + referencedByCount: 0, + }, + { + id: 'preconfigured.test.index-record', + isPreconfigured: true, + actionTypeId: 'test.index-record', + name: 'Test:_Preconfigured_Index_Record', + referencedByCount: 0, + }, + ]); + }); + }); }); } diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/index.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/index.ts index 74e4cbb75f01c..d5056508e5de9 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/index.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/index.ts @@ -18,7 +18,7 @@ export default function actionsTests({ loadTestFile, getService }: FtrProviderCo loadTestFile(require.resolve('./delete')); loadTestFile(require.resolve('./get_all')); loadTestFile(require.resolve('./get')); - loadTestFile(require.resolve('./list_action_types')); + loadTestFile(require.resolve('./connector_types')); loadTestFile(require.resolve('./update')); loadTestFile(require.resolve('./execute')); loadTestFile(require.resolve('./builtin_action_types/es_index')); diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/update.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/update.ts index 80bdba539689d..4e0b4eac8da32 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/update.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/update.ts @@ -21,11 +21,11 @@ export default function updateActionTests({ getService }: FtrProviderContext) { it('should handle update action request appropriately', async () => { const { body: createdAction } = await supertest - .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action`) + .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'My action', - actionTypeId: 'test.index-record', + connector_type_id: 'test.index-record', config: { unencrypted: `This value shouldn't get encrypted`, }, @@ -37,7 +37,7 @@ export default function updateActionTests({ getService }: FtrProviderContext) { objectRemover.add(Spaces.space1.id, createdAction.id, 'action', 'actions'); await supertest - .put(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action/${createdAction.id}`) + .put(`${getUrlPrefix(Spaces.space1.id)}/api/actions/connector/${createdAction.id}`) .set('kbn-xsrf', 'foo') .send({ name: 'My action updated', @@ -50,8 +50,8 @@ export default function updateActionTests({ getService }: FtrProviderContext) { }) .expect(200, { id: createdAction.id, - isPreconfigured: false, - actionTypeId: 'test.index-record', + is_preconfigured: false, + connector_type_id: 'test.index-record', name: 'My action updated', config: { unencrypted: `This value shouldn't get encrypted`, @@ -69,11 +69,11 @@ export default function updateActionTests({ getService }: FtrProviderContext) { it(`shouldn't update action from another space`, async () => { const { body: createdAction } = await supertest - .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action`) + .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'My action', - actionTypeId: 'test.index-record', + connector_type_id: 'test.index-record', config: { unencrypted: `This value shouldn't get encrypted`, }, @@ -105,7 +105,7 @@ export default function updateActionTests({ getService }: FtrProviderContext) { it(`shouldn't update action from preconfigured list`, async () => { await supertest - .put(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action/custom-system-abc-connector`) + .put(`${getUrlPrefix(Spaces.space1.id)}/api/actions/connector/custom-system-abc-connector`) .set('kbn-xsrf', 'foo') .send({ name: 'My action updated', @@ -125,11 +125,11 @@ export default function updateActionTests({ getService }: FtrProviderContext) { it('should notify feature usage when editing a gold action type', async () => { const { body: createdAction } = await supertest - .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action`) + .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'Noop action type', - actionTypeId: 'test.noop', + connector_type_id: 'test.noop', secrets: {}, config: {}, }) @@ -138,7 +138,7 @@ export default function updateActionTests({ getService }: FtrProviderContext) { const updateStart = new Date(); await supertest - .put(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action/${createdAction.id}`) + .put(`${getUrlPrefix(Spaces.space1.id)}/api/actions/connector/${createdAction.id}`) .set('kbn-xsrf', 'foo') .send({ name: 'Noop action type updated', @@ -158,5 +158,147 @@ export default function updateActionTests({ getService }: FtrProviderContext) { expect(noopFeature.last_used).to.be.a('string'); expect(new Date(noopFeature.last_used).getTime()).to.be.greaterThan(updateStart.getTime()); }); + + describe('legacy', () => { + it('should handle update action request appropriately', async () => { + const { body: createdAction } = await supertest + .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action`) + .set('kbn-xsrf', 'foo') + .send({ + name: 'My action', + actionTypeId: 'test.index-record', + config: { + unencrypted: `This value shouldn't get encrypted`, + }, + secrets: { + encrypted: 'This value should be encrypted', + }, + }) + .expect(200); + objectRemover.add(Spaces.space1.id, createdAction.id, 'action', 'actions'); + + await supertest + .put(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action/${createdAction.id}`) + .set('kbn-xsrf', 'foo') + .send({ + name: 'My action updated', + config: { + unencrypted: `This value shouldn't get encrypted`, + }, + secrets: { + encrypted: 'This value should be encrypted', + }, + }) + .expect(200, { + id: createdAction.id, + isPreconfigured: false, + actionTypeId: 'test.index-record', + name: 'My action updated', + config: { + unencrypted: `This value shouldn't get encrypted`, + }, + }); + + // Ensure AAD isn't broken + await checkAAD({ + supertest, + spaceId: Spaces.space1.id, + type: 'action', + id: createdAction.id, + }); + }); + + it(`shouldn't update action from another space`, async () => { + const { body: createdAction } = await supertest + .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action`) + .set('kbn-xsrf', 'foo') + .send({ + name: 'My action', + actionTypeId: 'test.index-record', + config: { + unencrypted: `This value shouldn't get encrypted`, + }, + secrets: { + encrypted: 'This value should be encrypted', + }, + }) + .expect(200); + objectRemover.add(Spaces.space1.id, createdAction.id, 'action', 'actions'); + + await supertest + .put(`${getUrlPrefix(Spaces.other.id)}/api/actions/action/${createdAction.id}`) + .set('kbn-xsrf', 'foo') + .send({ + name: 'My action updated', + config: { + unencrypted: `This value shouldn't get encrypted`, + }, + secrets: { + encrypted: 'This value should be encrypted', + }, + }) + .expect(404, { + statusCode: 404, + error: 'Not Found', + message: `Saved object [action/${createdAction.id}] not found`, + }); + }); + + it(`shouldn't update action from preconfigured list`, async () => { + await supertest + .put(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action/custom-system-abc-connector`) + .set('kbn-xsrf', 'foo') + .send({ + name: 'My action updated', + config: { + unencrypted: `This value shouldn't get encrypted`, + }, + secrets: { + encrypted: 'This value should be encrypted', + }, + }) + .expect(400, { + statusCode: 400, + error: 'Bad Request', + message: `Preconfigured action custom-system-abc-connector is not allowed to update.`, + }); + }); + + it('should notify feature usage when editing a gold action type', async () => { + const { body: createdAction } = await supertest + .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action`) + .set('kbn-xsrf', 'foo') + .send({ + name: 'Noop action type', + actionTypeId: 'test.noop', + secrets: {}, + config: {}, + }) + .expect(200); + objectRemover.add(Spaces.space1.id, createdAction.id, 'action', 'actions'); + + const updateStart = new Date(); + await supertest + .put(`${getUrlPrefix(Spaces.space1.id)}/api/actions/action/${createdAction.id}`) + .set('kbn-xsrf', 'foo') + .send({ + name: 'Noop action type updated', + secrets: {}, + config: {}, + }) + .expect(200); + + const { + body: { features }, + } = await supertest.get(`${getUrlPrefix(Spaces.space1.id)}/api/licensing/feature_usage`); + expect(features).to.be.an(Array); + const noopFeature = features.find( + (feature: { name: string }) => feature.name === 'Connector: Test: Noop' + ); + expect(noopFeature).to.be.ok(); + expect(noopFeature.last_used).to.be.a('string'); + expect(new Date(noopFeature.last_used).getTime()).to.be.greaterThan(updateStart.getTime()); + }); + }); }); } diff --git a/x-pack/test/api_integration/apis/ml/data_frame_analytics/index.ts b/x-pack/test/api_integration/apis/ml/data_frame_analytics/index.ts index b15e6d892b9e3..950f36d325c76 100644 --- a/x-pack/test/api_integration/apis/ml/data_frame_analytics/index.ts +++ b/x-pack/test/api_integration/apis/ml/data_frame_analytics/index.ts @@ -13,6 +13,10 @@ export default function ({ loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./delete')); loadTestFile(require.resolve('./update')); loadTestFile(require.resolve('./create_job')); + loadTestFile(require.resolve('./start')); + loadTestFile(require.resolve('./stop')); + loadTestFile(require.resolve('./start_spaces')); + loadTestFile(require.resolve('./stop_spaces')); loadTestFile(require.resolve('./get_spaces')); loadTestFile(require.resolve('./update_spaces')); loadTestFile(require.resolve('./delete_spaces')); diff --git a/x-pack/test/api_integration/apis/ml/data_frame_analytics/start.ts b/x-pack/test/api_integration/apis/ml/data_frame_analytics/start.ts new file mode 100644 index 0000000000000..6960dc37bf0f8 --- /dev/null +++ b/x-pack/test/api_integration/apis/ml/data_frame_analytics/start.ts @@ -0,0 +1,136 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../../../ftr_provider_context'; +import { USER } from '../../../../functional/services/ml/security_common'; +import { DataFrameAnalyticsConfig } from '../../../../../plugins/ml/public/application/data_frame_analytics/common'; +import { DeepPartial } from '../../../../../plugins/ml/common/types/common'; +import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/common_api'; +import { DATA_FRAME_TASK_STATE } from '../../../../../plugins/ml/common/constants/data_frame_analytics'; + +export default ({ getService }: FtrProviderContext) => { + const esArchiver = getService('esArchiver'); + const supertest = getService('supertestWithoutAuth'); + const ml = getService('ml'); + + const jobId = `bm_${Date.now()}`; + const generateDestinationIndex = (analyticsId: string) => `user-${analyticsId}`; + const commonJobConfig = { + source: { + index: ['ft_bank_marketing'], + query: { + match_all: {}, + }, + }, + analysis: { + classification: { + dependent_variable: 'y', + training_percent: 20, + }, + }, + analyzed_fields: { + includes: [], + excludes: [], + }, + model_memory_limit: '60mb', + allow_lazy_start: false, // default value + max_num_threads: 1, // default value + }; + const destinationIndex = generateDestinationIndex(`${jobId}_0`); + + const testJobConfigs: Array> = [ + { + id: `${jobId}_0`, + description: 'Test start for analytics', + dest: { + index: destinationIndex, + results_field: 'ml', + }, + ...commonJobConfig, + }, + ]; + + async function createJobs(mockJobConfigs: Array>) { + for (const jobConfig of mockJobConfigs) { + await ml.api.createDataFrameAnalyticsJob(jobConfig as DataFrameAnalyticsConfig); + } + } + + describe('POST data_frame/analytics/{analyticsId}/_start', () => { + before(async () => { + await esArchiver.loadIfNeeded('ml/bm_classification'); + await ml.testResources.setKibanaTimeZoneToUTC(); + await createJobs(testJobConfigs); + }); + + after(async () => { + await ml.api.deleteDataFrameAnalyticsJobES(`${jobId}_0`); + await ml.api.cleanMlIndices(); + await ml.api.deleteIndices(destinationIndex); + }); + + describe('StartDataFrameAnalyticsJob', () => { + it('should start analytics job for specified id if job exists', async () => { + const analyticsId = `${jobId}_0`; + + const { body } = await supertest + .post(`/api/ml/data_frame/analytics/${analyticsId}/_start`) + .auth(USER.ML_POWERUSER, ml.securityCommon.getPasswordForUser(USER.ML_POWERUSER)) + .set(COMMON_REQUEST_HEADERS) + .expect(200); + + expect(body).not.to.be(undefined); + expect(body.acknowledged).to.be(true); + expect(body.node).not.to.be(''); + + await ml.api.waitForAnalyticsState(analyticsId, DATA_FRAME_TASK_STATE.STARTED); + await ml.api.assertIndicesExist(destinationIndex); + }); + + it('should show 404 error if job does not exist', async () => { + const id = `${jobId}_invalid`; + const message = `No known job with id '${id}'`; + + const { body } = await supertest + .post(`/api/ml/data_frame/analytics/${id}/_start`) + .auth(USER.ML_POWERUSER, ml.securityCommon.getPasswordForUser(USER.ML_POWERUSER)) + .set(COMMON_REQUEST_HEADERS) + .expect(404); + + expect(body.error).to.eql('Not Found'); + expect(body.message).to.eql(message); + }); + + it('should not allow to start analytics job for unauthorized user', async () => { + const analyticsId = `${jobId}_0`; + + const { body } = await supertest + .post(`/api/ml/data_frame/analytics/${analyticsId}/_start`) + .auth(USER.ML_UNAUTHORIZED, ml.securityCommon.getPasswordForUser(USER.ML_UNAUTHORIZED)) + .set(COMMON_REQUEST_HEADERS) + .expect(403); + + expect(body.error).to.eql('Forbidden'); + expect(body.message).to.eql('Forbidden'); + }); + + it('should not allow to start analytics job for user with view only permission', async () => { + const analyticsId = `${jobId}_0`; + + const { body } = await supertest + .post(`/api/ml/data_frame/analytics/${analyticsId}/_start`) + .auth(USER.ML_VIEWER, ml.securityCommon.getPasswordForUser(USER.ML_VIEWER)) + .set(COMMON_REQUEST_HEADERS) + .expect(403); + + expect(body.error).to.eql('Forbidden'); + expect(body.message).to.eql('Forbidden'); + }); + }); + }); +}; diff --git a/x-pack/test/api_integration/apis/ml/data_frame_analytics/start_spaces.ts b/x-pack/test/api_integration/apis/ml/data_frame_analytics/start_spaces.ts new file mode 100644 index 0000000000000..de8cc7ffb1c41 --- /dev/null +++ b/x-pack/test/api_integration/apis/ml/data_frame_analytics/start_spaces.ts @@ -0,0 +1,94 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import expect from '@kbn/expect'; + +import { FtrProviderContext } from '../../../ftr_provider_context'; +import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/common_api'; +import { USER } from '../../../../functional/services/ml/security_common'; +import { DATA_FRAME_TASK_STATE } from '../../../../../plugins/ml/common/constants/data_frame_analytics'; + +export default ({ getService }: FtrProviderContext) => { + const esArchiver = getService('esArchiver'); + const ml = getService('ml'); + const spacesService = getService('spaces'); + const supertest = getService('supertestWithoutAuth'); + + const jobIdSpace1 = 'ihp_od_space1'; + const jobIdSpace2 = 'ihp_od_space2'; + const idSpace1 = 'space1'; + const idSpace2 = 'space2'; + + const initialModelMemoryLimit = '17mb'; + + async function runStartRequest(jobId: string, space: string, expectedStatusCode: number) { + const { body } = await supertest + .post(`/s/${space}/api/ml/data_frame/analytics/${jobId}/_start`) + .auth( + USER.ML_POWERUSER_ALL_SPACES, + ml.securityCommon.getPasswordForUser(USER.ML_POWERUSER_ALL_SPACES) + ) + .set(COMMON_REQUEST_HEADERS) + .expect(expectedStatusCode); + + return body; + } + + let space1JobDestIndex: string; + let space2JobDestIndex: string; + + describe('POST data_frame/analytics/{analyticsId}/_start with spaces', function () { + before(async () => { + await esArchiver.loadIfNeeded('ml/ihp_outlier'); + await spacesService.create({ id: idSpace1, name: 'space_one', disabledFeatures: [] }); + await spacesService.create({ id: idSpace2, name: 'space_two', disabledFeatures: [] }); + + const jobConfigSpace1 = ml.commonConfig.getDFAIhpOutlierDetectionJobConfig(jobIdSpace1); + await ml.api.createDataFrameAnalyticsJob( + { ...jobConfigSpace1, model_memory_limit: initialModelMemoryLimit }, + idSpace1 + ); + + const jobConfigSpace2 = ml.commonConfig.getDFAIhpOutlierDetectionJobConfig(jobIdSpace2); + await ml.api.createDataFrameAnalyticsJob( + { ...jobConfigSpace2, model_memory_limit: initialModelMemoryLimit }, + idSpace2 + ); + + space1JobDestIndex = jobConfigSpace1.dest.index; + space2JobDestIndex = jobConfigSpace2.dest.index; + + await ml.testResources.setKibanaTimeZoneToUTC(); + }); + + after(async () => { + await ml.api.deleteDataFrameAnalyticsJobES(jobIdSpace1); + await ml.api.deleteDataFrameAnalyticsJobES(jobIdSpace2); + await spacesService.delete(idSpace1); + await spacesService.delete(idSpace2); + await ml.api.cleanMlIndices(); + await ml.api.deleteIndices(space1JobDestIndex); + await ml.api.deleteIndices(space2JobDestIndex); + await ml.testResources.cleanMLSavedObjects(); + }); + + it('should start job from same space', async () => { + const body = await runStartRequest(jobIdSpace1, idSpace1, 200); + expect(body).to.have.property('acknowledged', true); + + await ml.api.waitForAnalyticsState(jobIdSpace1, DATA_FRAME_TASK_STATE.STARTED); + await ml.api.assertIndicesExist(space1JobDestIndex); + }); + + it('should fail to start job from different space', async () => { + const body = await runStartRequest(jobIdSpace2, idSpace1, 404); + expect(body.error).to.eql('Not Found'); + + await ml.api.waitForAnalyticsState(jobIdSpace1, DATA_FRAME_TASK_STATE.STOPPED); + }); + }); +}; diff --git a/x-pack/test/api_integration/apis/ml/data_frame_analytics/stop.ts b/x-pack/test/api_integration/apis/ml/data_frame_analytics/stop.ts new file mode 100644 index 0000000000000..e1f479b0d2fc7 --- /dev/null +++ b/x-pack/test/api_integration/apis/ml/data_frame_analytics/stop.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 expect from '@kbn/expect'; +import { FtrProviderContext } from '../../../ftr_provider_context'; +import { USER } from '../../../../functional/services/ml/security_common'; +import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/common_api'; +import { DATA_FRAME_TASK_STATE } from '../../../../../plugins/ml/common/constants/data_frame_analytics'; + +export default ({ getService }: FtrProviderContext) => { + const esArchiver = getService('esArchiver'); + const supertest = getService('supertestWithoutAuth'); + const ml = getService('ml'); + + const jobId = `bm_${Date.now()}`; + const analyticsId = `${jobId}_1`; + let destinationIndex: string; + + describe('POST data_frame/analytics/{analyticsId}/_stop', () => { + before(async () => { + await esArchiver.loadIfNeeded('ml/bm_classification'); + await ml.testResources.setKibanaTimeZoneToUTC(); + // job config with high training percent so it takes longer to run + const slowRunningConfig = ml.commonConfig.getDFABmClassificationJobConfig(analyticsId); + destinationIndex = slowRunningConfig.dest.index; + + await ml.api.createDataFrameAnalyticsJob(slowRunningConfig); + await ml.api.runDFAJob(analyticsId); + }); + + after(async () => { + await ml.api.deleteDataFrameAnalyticsJobES(analyticsId); + await ml.api.cleanMlIndices(); + await ml.api.deleteIndices(destinationIndex); + }); + + describe('StopsDataFrameAnalyticsJob', () => { + it('should stop analytics job for specified id when job exists', async () => { + const { body } = await supertest + .post(`/api/ml/data_frame/analytics/${analyticsId}/_stop`) + .auth(USER.ML_POWERUSER, ml.securityCommon.getPasswordForUser(USER.ML_POWERUSER)) + .set(COMMON_REQUEST_HEADERS) + .expect(200); + + expect(body).not.to.be(undefined); + expect(body.stopped).to.be(true); + await ml.api.waitForAnalyticsState(analyticsId, DATA_FRAME_TASK_STATE.STOPPED, 5000); + }); + + it('should show 404 error if job does not exist', async () => { + const id = `${jobId}_invalid`; + const message = `No known job with id '${id}'`; + + const { body } = await supertest + .post(`/api/ml/data_frame/analytics/${id}/_stop`) + .auth(USER.ML_POWERUSER, ml.securityCommon.getPasswordForUser(USER.ML_POWERUSER)) + .set(COMMON_REQUEST_HEADERS) + .expect(404); + + expect(body.error).to.eql('Not Found'); + expect(body.message).to.eql(message); + }); + + it('should not allow to stop analytics job for unauthorized user', async () => { + const { body } = await supertest + .post(`/api/ml/data_frame/analytics/${analyticsId}/_stop`) + .auth(USER.ML_UNAUTHORIZED, ml.securityCommon.getPasswordForUser(USER.ML_UNAUTHORIZED)) + .set(COMMON_REQUEST_HEADERS) + .expect(403); + + expect(body.error).to.eql('Forbidden'); + expect(body.message).to.eql('Forbidden'); + }); + + it('should not allow to stop analytics job for user with view only permission', async () => { + const { body } = await supertest + .post(`/api/ml/data_frame/analytics/${analyticsId}/_stop`) + .auth(USER.ML_VIEWER, ml.securityCommon.getPasswordForUser(USER.ML_VIEWER)) + .set(COMMON_REQUEST_HEADERS) + .expect(403); + + expect(body.error).to.eql('Forbidden'); + expect(body.message).to.eql('Forbidden'); + }); + }); + }); +}; diff --git a/x-pack/test/api_integration/apis/ml/data_frame_analytics/stop_spaces.ts b/x-pack/test/api_integration/apis/ml/data_frame_analytics/stop_spaces.ts new file mode 100644 index 0000000000000..19ce61d840d93 --- /dev/null +++ b/x-pack/test/api_integration/apis/ml/data_frame_analytics/stop_spaces.ts @@ -0,0 +1,90 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import expect from '@kbn/expect'; + +import { FtrProviderContext } from '../../../ftr_provider_context'; +import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/common_api'; +import { USER } from '../../../../functional/services/ml/security_common'; +import { DATA_FRAME_TASK_STATE } from '../../../../../plugins/ml/common/constants/data_frame_analytics'; + +export default ({ getService }: FtrProviderContext) => { + const esArchiver = getService('esArchiver'); + const ml = getService('ml'); + const spacesService = getService('spaces'); + const supertest = getService('supertestWithoutAuth'); + + const jobIdSpace3 = 'ihp_od_space3'; + const jobIdSpace4 = 'ihp_od_space4'; + const idSpace3 = 'space3'; + const idSpace4 = 'space4'; + + async function runRequest( + jobId: string, + space: string, + action: string, + expectedStatusCode: number + ) { + const resp = await supertest + .post(`/s/${space}/api/ml/data_frame/analytics/${jobId}/${action}`) + .auth( + USER.ML_POWERUSER_ALL_SPACES, + ml.securityCommon.getPasswordForUser(USER.ML_POWERUSER_ALL_SPACES) + ) + .set(COMMON_REQUEST_HEADERS); + const { body, status } = resp; + + expect(status).to.be(expectedStatusCode); + return body; + } + + describe('POST data_frame/analytics/{analyticsId}/_stop with spaces', function () { + before(async () => { + await esArchiver.loadIfNeeded('ml/bm_classification'); + await spacesService.create({ id: idSpace3, name: 'space_three', disabledFeatures: [] }); + await spacesService.create({ id: idSpace4, name: 'space_four', disabledFeatures: [] }); + // job config with high training percent so it takes longer to run + const jobConfigSpace3 = ml.commonConfig.getDFABmClassificationJobConfig(jobIdSpace3); + const jobConfigSpace4 = ml.commonConfig.getDFABmClassificationJobConfig(jobIdSpace4); + // create jobs + await ml.api.createDataFrameAnalyticsJob(jobConfigSpace3, idSpace3); + await ml.api.createDataFrameAnalyticsJob(jobConfigSpace4, idSpace4); + // start jobs + await runRequest(jobIdSpace3, idSpace3, '_start', 200); + await ml.api.waitForAnalyticsState(jobIdSpace3, DATA_FRAME_TASK_STATE.STARTED); + await ml.api.assertIndicesExist(`user-${jobIdSpace3}`); + await runRequest(jobIdSpace4, idSpace4, '_start', 200); + await ml.api.waitForAnalyticsState(jobIdSpace4, DATA_FRAME_TASK_STATE.STARTED); + await ml.api.assertIndicesExist(`user-${jobIdSpace4}`); + + await ml.testResources.setKibanaTimeZoneToUTC(); + }); + + after(async () => { + await ml.api.deleteDataFrameAnalyticsJobES(jobIdSpace3); + await ml.api.deleteDataFrameAnalyticsJobES(jobIdSpace4); + await spacesService.delete(idSpace3); + await spacesService.delete(idSpace4); + await ml.api.deleteIndices(`user-${jobIdSpace3}`); + await ml.api.deleteIndices(`user-${jobIdSpace4}`); + await ml.api.cleanMlIndices(); + await ml.testResources.cleanMLSavedObjects(); + }); + + it('should stop job from same space', async () => { + const body = await runRequest(jobIdSpace3, idSpace3, '_stop', 200); + expect(body).to.have.property('stopped', true); + await ml.api.waitForAnalyticsState(jobIdSpace3, DATA_FRAME_TASK_STATE.STOPPED, 5000); + }); + + it('should fail to stop job from different space', async () => { + const body = await runRequest(jobIdSpace4, idSpace3, '_stop', 404); + expect(body.error).to.eql('Not Found'); + await ml.api.waitForAnalyticsState(jobIdSpace4, DATA_FRAME_TASK_STATE.STARTED, 5000); + }); + }); +}; 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 f452514cb5172..a48811ad70249 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 @@ -6,6 +6,7 @@ */ import querystring from 'querystring'; +import url from 'url'; import expect from '@kbn/expect'; import { isEmpty, uniq } from 'lodash'; import archives_metadata from '../../common/fixtures/es_archiver/archives_metadata'; @@ -131,110 +132,127 @@ export default function serviceMapsApiTests({ getService }: FtrProviderContext) expect(environments.has(ENVIRONMENT_NOT_DEFINED)).to.eql(true); expectSnapshot(body).toMatch(); }); - }); - - describe('/api/apm/service-map with ML data', () => { - describe('with the default apm user', () => { - let response: PromiseReturnType; - before(async () => { - response = await supertest.get(`/api/apm/service-map?start=${start}&end=${end}`); - }); + describe('with ML data', () => { + describe('with the default apm user', () => { + before(async () => { + response = await supertest.get(`/api/apm/service-map?start=${start}&end=${end}`); + }); - it('returns service map elements with anomaly stats', () => { - expect(response.status).to.be(200); - const dataWithAnomalies = response.body.elements.filter( - (el: { data: { serviceAnomalyStats?: {} } }) => !isEmpty(el.data.serviceAnomalyStats) - ); + it('returns service map elements with anomaly stats', () => { + expect(response.status).to.be(200); + const dataWithAnomalies = response.body.elements.filter( + (el: { data: { serviceAnomalyStats?: {} } }) => !isEmpty(el.data.serviceAnomalyStats) + ); - expect(dataWithAnomalies).to.not.empty(); + expect(dataWithAnomalies).to.not.empty(); - dataWithAnomalies.forEach(({ data }: any) => { - expect( - Object.values(data.serviceAnomalyStats).filter((value) => isEmpty(value)) - ).to.not.empty(); + dataWithAnomalies.forEach(({ data }: any) => { + expect( + Object.values(data.serviceAnomalyStats).filter((value) => isEmpty(value)) + ).to.not.empty(); + }); }); - }); - it('returns the correct anomaly stats', () => { - const dataWithAnomalies = response.body.elements.filter( - (el: { data: { serviceAnomalyStats?: {} } }) => !isEmpty(el.data.serviceAnomalyStats) - ); - - expectSnapshot(dataWithAnomalies.length).toMatchInline(`8`); - expectSnapshot(dataWithAnomalies.slice(0, 3)).toMatchInline(` - Array [ - Object { - "data": Object { - "agent.name": "python", - "id": "opbeans-python", - "service.name": "opbeans-python", - "serviceAnomalyStats": Object { - "actualValue": 24282.2352941176, - "anomalyScore": 0, - "healthStatus": "healthy", - "jobId": "apm-environment_not_defined-5626-high_mean_transaction_duration", - "serviceName": "opbeans-python", - "transactionType": "request", + it('returns the correct anomaly stats', () => { + const dataWithAnomalies = response.body.elements.filter( + (el: { data: { serviceAnomalyStats?: {} } }) => !isEmpty(el.data.serviceAnomalyStats) + ); + + expectSnapshot(dataWithAnomalies.length).toMatchInline(`8`); + expectSnapshot(dataWithAnomalies.slice(0, 3)).toMatchInline(` + Array [ + Object { + "data": Object { + "agent.name": "python", + "id": "opbeans-python", + "service.name": "opbeans-python", + "serviceAnomalyStats": Object { + "actualValue": 24282.2352941176, + "anomalyScore": 0, + "healthStatus": "healthy", + "jobId": "apm-environment_not_defined-5626-high_mean_transaction_duration", + "serviceName": "opbeans-python", + "transactionType": "request", + }, }, }, - }, - Object { - "data": Object { - "agent.name": "nodejs", - "id": "opbeans-node", - "service.environment": "testing", - "service.name": "opbeans-node", - "serviceAnomalyStats": Object { - "actualValue": 29300.5555555556, - "anomalyScore": 0, - "healthStatus": "healthy", - "jobId": "apm-testing-384f-high_mean_transaction_duration", - "serviceName": "opbeans-node", - "transactionType": "request", + Object { + "data": Object { + "agent.name": "nodejs", + "id": "opbeans-node", + "service.environment": "testing", + "service.name": "opbeans-node", + "serviceAnomalyStats": Object { + "actualValue": 29300.5555555556, + "anomalyScore": 0, + "healthStatus": "healthy", + "jobId": "apm-testing-384f-high_mean_transaction_duration", + "serviceName": "opbeans-node", + "transactionType": "request", + }, }, }, - }, - Object { - "data": Object { - "agent.name": "rum-js", - "id": "opbeans-rum", - "service.environment": "testing", - "service.name": "opbeans-rum", - "serviceAnomalyStats": Object { - "actualValue": 2386500, - "anomalyScore": 0, - "healthStatus": "healthy", - "jobId": "apm-testing-384f-high_mean_transaction_duration", - "serviceName": "opbeans-rum", - "transactionType": "page-load", + Object { + "data": Object { + "agent.name": "rum-js", + "id": "opbeans-rum", + "service.environment": "testing", + "service.name": "opbeans-rum", + "serviceAnomalyStats": Object { + "actualValue": 2386500, + "anomalyScore": 0, + "healthStatus": "healthy", + "jobId": "apm-testing-384f-high_mean_transaction_duration", + "serviceName": "opbeans-rum", + "transactionType": "page-load", + }, }, }, - }, - ] - `); + ] + `); - expectSnapshot(response.body).toMatch(); + expectSnapshot(response.body).toMatch(); + }); }); - }); - describe('with a user that does not have access to ML', () => { - let response: PromiseReturnType; + describe('with a user that does not have access to ML', () => { + before(async () => { + response = await supertestAsApmReadUserWithoutMlAccess.get( + `/api/apm/service-map?start=${start}&end=${end}` + ); + }); - before(async () => { - response = await supertestAsApmReadUserWithoutMlAccess.get( - `/api/apm/service-map?start=${start}&end=${end}` - ); - }); + it('returns service map elements without anomaly stats', () => { + expect(response.status).to.be(200); - it('returns service map elements without anomaly stats', () => { - expect(response.status).to.be(200); + const dataWithAnomalies = response.body.elements.filter( + (el: { data: { serviceAnomalyStats?: {} } }) => !isEmpty(el.data.serviceAnomalyStats) + ); - const dataWithAnomalies = response.body.elements.filter( - (el: { data: { serviceAnomalyStats?: {} } }) => !isEmpty(el.data.serviceAnomalyStats) - ); + expect(dataWithAnomalies).to.be.empty(); + }); + }); + }); + + describe('with a single service', () => { + describe('when ENVIRONMENT_ALL is selected', () => { + it('returns service map elements', async () => { + response = await supertest.get( + url.format({ + pathname: '/api/apm/service-map', + query: { + environment: 'ENVIRONMENT_ALL', + start: metadata.start, + end: metadata.end, + serviceName: 'opbeans-java', + }, + }) + ); - expect(dataWithAnomalies).to.be.empty(); + expect(response.status).to.be(200); + expect(response.body.elements.length).to.be.greaterThan(1); + }); }); }); }); diff --git a/x-pack/test/case_api_integration/basic/tests/cases/patch_cases.ts b/x-pack/test/case_api_integration/basic/tests/cases/patch_cases.ts index b51b728df7155..b41f77fc42e05 100644 --- a/x-pack/test/case_api_integration/basic/tests/cases/patch_cases.ts +++ b/x-pack/test/case_api_integration/basic/tests/cases/patch_cases.ts @@ -438,8 +438,12 @@ export default ({ getService }: FtrProviderContext): void => { }); // There should be no change in their status since syncing is disabled - expect(signals.get(signalID)?._source.signal.status).to.be(CaseStatuses.open); - expect(signals.get(signalID2)?._source.signal.status).to.be(CaseStatuses.open); + expect(signals.get(defaultSignalsIndex)?.get(signalID)?._source.signal.status).to.be( + CaseStatuses.open + ); + expect(signals.get(defaultSignalsIndex)?.get(signalID2)?._source.signal.status).to.be( + CaseStatuses.open + ); const updatedIndWithStatus: CasesResponse = (await setStatus({ supertest, @@ -467,8 +471,12 @@ export default ({ getService }: FtrProviderContext): void => { }); // There should still be no change in their status since syncing is disabled - expect(signals.get(signalID)?._source.signal.status).to.be(CaseStatuses.open); - expect(signals.get(signalID2)?._source.signal.status).to.be(CaseStatuses.open); + expect(signals.get(defaultSignalsIndex)?.get(signalID)?._source.signal.status).to.be( + CaseStatuses.open + ); + expect(signals.get(defaultSignalsIndex)?.get(signalID2)?._source.signal.status).to.be( + CaseStatuses.open + ); // turn on the sync settings await supertest @@ -492,8 +500,139 @@ export default ({ getService }: FtrProviderContext): void => { }); // alerts should be updated now that the - expect(signals.get(signalID)?._source.signal.status).to.be(CaseStatuses.closed); - expect(signals.get(signalID2)?._source.signal.status).to.be(CaseStatuses['in-progress']); + expect(signals.get(defaultSignalsIndex)?.get(signalID)?._source.signal.status).to.be( + CaseStatuses.closed + ); + expect(signals.get(defaultSignalsIndex)?.get(signalID2)?._source.signal.status).to.be( + CaseStatuses['in-progress'] + ); + }); + }); + + describe('esArchiver', () => { + const defaultSignalsIndex = '.siem-signals-default-000001'; + + beforeEach(async () => { + await esArchiver.load('cases/signals/duplicate_ids'); + }); + afterEach(async () => { + await esArchiver.unload('cases/signals/duplicate_ids'); + await deleteAllCaseItems(es); + }); + + it('should not update the status of duplicate alert ids in separate indices', async () => { + const getSignals = async () => { + return getSignalsWithES({ + es, + indices: [defaultSignalsIndex, signalsIndex2], + ids: [signalIDInFirstIndex, signalIDInSecondIndex], + }); + }; + + // this id exists only in .siem-signals-default-000001 + const signalIDInFirstIndex = + 'cae78067e65582a3b277c1ad46ba3cb29044242fe0d24bbf3fcde757fdd31d1c'; + // This id exists in both .siem-signals-default-000001 and .siem-signals-default-000002 + const signalIDInSecondIndex = 'duplicate-signal-id'; + const signalsIndex2 = '.siem-signals-default-000002'; + + const { body: individualCase } = await supertest + .post(CASES_URL) + .set('kbn-xsrf', 'true') + .send({ + ...postCaseReq, + settings: { + syncAlerts: false, + }, + }); + + const { body: updatedIndWithComment } = await supertest + .post(`${CASES_URL}/${individualCase.id}/comments`) + .set('kbn-xsrf', 'true') + .send({ + alertId: signalIDInFirstIndex, + index: defaultSignalsIndex, + rule: { id: 'test-rule-id', name: 'test-index-id' }, + type: CommentType.alert, + }) + .expect(200); + + const { body: updatedIndWithComment2 } = await supertest + .post(`${CASES_URL}/${updatedIndWithComment.id}/comments`) + .set('kbn-xsrf', 'true') + .send({ + alertId: signalIDInSecondIndex, + index: signalsIndex2, + rule: { id: 'test-rule-id', name: 'test-index-id' }, + type: CommentType.alert, + }) + .expect(200); + + await es.indices.refresh({ index: defaultSignalsIndex }); + + let signals = await getSignals(); + // There should be no change in their status since syncing is disabled + expect( + signals.get(defaultSignalsIndex)?.get(signalIDInFirstIndex)?._source.signal.status + ).to.be(CaseStatuses.open); + expect( + signals.get(signalsIndex2)?.get(signalIDInSecondIndex)?._source.signal.status + ).to.be(CaseStatuses.open); + + const updatedIndWithStatus: CasesResponse = (await setStatus({ + supertest, + cases: [ + { + id: updatedIndWithComment2.id, + version: updatedIndWithComment2.version, + status: CaseStatuses.closed, + }, + ], + type: 'case', + })) as CasesResponse; + + await es.indices.refresh({ index: defaultSignalsIndex }); + + signals = await getSignals(); + + // There should still be no change in their status since syncing is disabled + expect( + signals.get(defaultSignalsIndex)?.get(signalIDInFirstIndex)?._source.signal.status + ).to.be(CaseStatuses.open); + expect( + signals.get(signalsIndex2)?.get(signalIDInSecondIndex)?._source.signal.status + ).to.be(CaseStatuses.open); + + // turn on the sync settings + await supertest + .patch(CASES_URL) + .set('kbn-xsrf', 'true') + .send({ + cases: [ + { + id: updatedIndWithStatus[0].id, + version: updatedIndWithStatus[0].version, + settings: { syncAlerts: true }, + }, + ], + }) + .expect(200); + await es.indices.refresh({ index: defaultSignalsIndex }); + + signals = await getSignals(); + + // alerts should be updated now that the + expect( + signals.get(defaultSignalsIndex)?.get(signalIDInFirstIndex)?._source.signal.status + ).to.be(CaseStatuses.closed); + expect( + signals.get(signalsIndex2)?.get(signalIDInSecondIndex)?._source.signal.status + ).to.be(CaseStatuses.closed); + + // the duplicate signal id in the other index should not be affect (so its status should be open) + expect( + signals.get(defaultSignalsIndex)?.get(signalIDInSecondIndex)?._source.signal.status + ).to.be(CaseStatuses.open); }); }); diff --git a/x-pack/test/case_api_integration/basic/tests/cases/sub_cases/patch_sub_cases.ts b/x-pack/test/case_api_integration/basic/tests/cases/sub_cases/patch_sub_cases.ts index 5a1da194a721f..746d8a601bed6 100644 --- a/x-pack/test/case_api_integration/basic/tests/cases/sub_cases/patch_sub_cases.ts +++ b/x-pack/test/case_api_integration/basic/tests/cases/sub_cases/patch_sub_cases.ts @@ -96,7 +96,9 @@ export default function ({ getService }: FtrProviderContext) { let signals = await getSignalsWithES({ es, indices: defaultSignalsIndex, ids: signalID }); - expect(signals.get(signalID)?._source.signal.status).to.be(CaseStatuses.open); + expect(signals.get(defaultSignalsIndex)?.get(signalID)?._source.signal.status).to.be( + CaseStatuses.open + ); await setStatus({ supertest, @@ -114,7 +116,9 @@ export default function ({ getService }: FtrProviderContext) { signals = await getSignalsWithES({ es, indices: defaultSignalsIndex, ids: signalID }); - expect(signals.get(signalID)?._source.signal.status).to.be(CaseStatuses['in-progress']); + expect(signals.get(defaultSignalsIndex)?.get(signalID)?._source.signal.status).to.be( + CaseStatuses['in-progress'] + ); }); it('should update the status of multiple alerts attached to a sub case', async () => { @@ -152,8 +156,12 @@ export default function ({ getService }: FtrProviderContext) { ids: [signalID, signalID2], }); - expect(signals.get(signalID)?._source.signal.status).to.be(CaseStatuses.open); - expect(signals.get(signalID2)?._source.signal.status).to.be(CaseStatuses.open); + expect(signals.get(defaultSignalsIndex)?.get(signalID)?._source.signal.status).to.be( + CaseStatuses.open + ); + expect(signals.get(defaultSignalsIndex)?.get(signalID2)?._source.signal.status).to.be( + CaseStatuses.open + ); await setStatus({ supertest, @@ -175,8 +183,12 @@ export default function ({ getService }: FtrProviderContext) { ids: [signalID, signalID2], }); - expect(signals.get(signalID)?._source.signal.status).to.be(CaseStatuses['in-progress']); - expect(signals.get(signalID2)?._source.signal.status).to.be(CaseStatuses['in-progress']); + expect(signals.get(defaultSignalsIndex)?.get(signalID)?._source.signal.status).to.be( + CaseStatuses['in-progress'] + ); + expect(signals.get(defaultSignalsIndex)?.get(signalID2)?._source.signal.status).to.be( + CaseStatuses['in-progress'] + ); }); it('should update the status of multiple alerts attached to multiple sub cases in one collection', async () => { @@ -232,8 +244,12 @@ export default function ({ getService }: FtrProviderContext) { }); // There should be no change in their status since syncing is disabled - expect(signals.get(signalID)?._source.signal.status).to.be(CaseStatuses.open); - expect(signals.get(signalID2)?._source.signal.status).to.be(CaseStatuses.open); + expect(signals.get(defaultSignalsIndex)?.get(signalID)?._source.signal.status).to.be( + CaseStatuses.open + ); + expect(signals.get(defaultSignalsIndex)?.get(signalID2)?._source.signal.status).to.be( + CaseStatuses.open + ); await setStatus({ supertest, @@ -256,8 +272,12 @@ export default function ({ getService }: FtrProviderContext) { }); // There still should be no change in their status since syncing is disabled - expect(signals.get(signalID)?._source.signal.status).to.be(CaseStatuses.open); - expect(signals.get(signalID2)?._source.signal.status).to.be(CaseStatuses.open); + expect(signals.get(defaultSignalsIndex)?.get(signalID)?._source.signal.status).to.be( + CaseStatuses.open + ); + expect(signals.get(defaultSignalsIndex)?.get(signalID2)?._source.signal.status).to.be( + CaseStatuses.open + ); // Turn sync alerts on await supertest @@ -282,8 +302,12 @@ export default function ({ getService }: FtrProviderContext) { ids: [signalID, signalID2], }); - expect(signals.get(signalID)?._source.signal.status).to.be(CaseStatuses.closed); - expect(signals.get(signalID2)?._source.signal.status).to.be(CaseStatuses['in-progress']); + expect(signals.get(defaultSignalsIndex)?.get(signalID)?._source.signal.status).to.be( + CaseStatuses.closed + ); + expect(signals.get(defaultSignalsIndex)?.get(signalID2)?._source.signal.status).to.be( + CaseStatuses['in-progress'] + ); }); it('should update the status of alerts attached to a case and sub case when sync settings is turned on', async () => { @@ -342,8 +366,12 @@ export default function ({ getService }: FtrProviderContext) { }); // There should be no change in their status since syncing is disabled - expect(signals.get(signalID)?._source.signal.status).to.be(CaseStatuses.open); - expect(signals.get(signalID2)?._source.signal.status).to.be(CaseStatuses.open); + expect(signals.get(defaultSignalsIndex)?.get(signalID)?._source.signal.status).to.be( + CaseStatuses.open + ); + expect(signals.get(defaultSignalsIndex)?.get(signalID2)?._source.signal.status).to.be( + CaseStatuses.open + ); await setStatus({ supertest, @@ -380,8 +408,12 @@ export default function ({ getService }: FtrProviderContext) { }); // There should still be no change in their status since syncing is disabled - expect(signals.get(signalID)?._source.signal.status).to.be(CaseStatuses.open); - expect(signals.get(signalID2)?._source.signal.status).to.be(CaseStatuses.open); + expect(signals.get(defaultSignalsIndex)?.get(signalID)?._source.signal.status).to.be( + CaseStatuses.open + ); + expect(signals.get(defaultSignalsIndex)?.get(signalID2)?._source.signal.status).to.be( + CaseStatuses.open + ); // Turn sync alerts on await supertest @@ -421,8 +453,12 @@ export default function ({ getService }: FtrProviderContext) { }); // alerts should be updated now that the - expect(signals.get(signalID)?._source.signal.status).to.be(CaseStatuses['in-progress']); - expect(signals.get(signalID2)?._source.signal.status).to.be(CaseStatuses.closed); + expect(signals.get(defaultSignalsIndex)?.get(signalID)?._source.signal.status).to.be( + CaseStatuses['in-progress'] + ); + expect(signals.get(defaultSignalsIndex)?.get(signalID2)?._source.signal.status).to.be( + CaseStatuses.closed + ); }); it('404s when sub case id is invalid', async () => { diff --git a/x-pack/test/case_api_integration/common/lib/utils.ts b/x-pack/test/case_api_integration/common/lib/utils.ts index 3ade7ef96f9dd..169f85080f4eb 100644 --- a/x-pack/test/case_api_integration/common/lib/utils.ts +++ b/x-pack/test/case_api_integration/common/lib/utils.ts @@ -54,11 +54,11 @@ export const getSignalsWithES = async ({ es: Client; indices: string | string[]; ids: string | string[]; -}): Promise>> => { +}): Promise>>> => { const signals = await es.search>({ index: indices, body: { - size: ids.length, + size: 10000, query: { bool: { filter: [ @@ -72,10 +72,17 @@ export const getSignalsWithES = async ({ }, }, }); + return signals.body.hits.hits.reduce((acc, hit) => { - acc.set(hit._id, hit); + let indexMap = acc.get(hit._index); + if (indexMap === undefined) { + indexMap = new Map>([[hit._id, hit]]); + } else { + indexMap.set(hit._id, hit); + } + acc.set(hit._index, indexMap); return acc; - }, new Map>()); + }, new Map>>()); }; interface SetStatusCasesParams { diff --git a/x-pack/test/fleet_api_integration/apis/epm/template.ts b/x-pack/test/fleet_api_integration/apis/epm/template.ts index d79452ca0eb6f..517d2c77d430d 100644 --- a/x-pack/test/fleet_api_integration/apis/epm/template.ts +++ b/x-pack/test/fleet_api_integration/apis/epm/template.ts @@ -7,6 +7,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; +import { appContextService } from '../../../../plugins/fleet/server/services'; import { getTemplate } from '../../../../plugins/fleet/server/services/epm/elasticsearch/template/template'; export default function ({ getService }: FtrProviderContext) { @@ -20,12 +21,31 @@ export default function ({ getService }: FtrProviderContext) { }, }, }; + const fields = [ + { + name: 'foo', + type: 'keyword', + }, + ]; + // This test was inspired by https://github.com/elastic/kibana/blob/master/x-pack/test/api_integration/apis/monitoring/common/mappings_exist.js describe('EPM - template', async () => { + beforeEach(async () => { + appContextService.start({ + // @ts-ignore + elasticsearch: { client: {} }, + // @ts-ignore + logger: { + warn: () => {}, + }, + }); + }); + it('can be loaded', async () => { const template = getTemplate({ type: 'logs', templateIndexPattern, + fields, mappings, packageName: 'system', composedOfTemplates: [], diff --git a/x-pack/test/functional/apps/index_lifecycle_management/home_page.ts b/x-pack/test/functional/apps/index_lifecycle_management/home_page.ts index 5c1ec2f39d663..44cd2cda7e1af 100644 --- a/x-pack/test/functional/apps/index_lifecycle_management/home_page.ts +++ b/x-pack/test/functional/apps/index_lifecycle_management/home_page.ts @@ -11,6 +11,8 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default ({ getPageObjects, getService }: FtrProviderContext) => { const pageObjects = getPageObjects(['common', 'indexLifecycleManagement']); const log = getService('log'); + const retry = getService('retry'); + const testSubjects = getService('testSubjects'); describe('Home page', function () { before(async () => { @@ -25,5 +27,26 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const createPolicyButton = await pageObjects.indexLifecycleManagement.createPolicyButton(); expect(await createPolicyButton.isDisplayed()).to.be(true); }); + + it('Create new policy with Warm and Cold Phases', async () => { + const policyName = 'testPolicy1'; + await pageObjects.indexLifecycleManagement.createNewPolicyAndSave( + policyName, + true, + true, + false + ); + + await retry.waitFor('navigation back to home page.', async () => { + return (await testSubjects.getVisibleText('sectionHeading')) === 'Index Lifecycle Policies'; + }); + + const allPolicies = await pageObjects.indexLifecycleManagement.getPolicyList(); + const filteredPolicies = allPolicies.filter(function (policy) { + return policy.name === policyName; + }); + + expect(filteredPolicies.length).to.be(1); + }); }); }; diff --git a/x-pack/test/functional/apps/lens/add_to_dashboard.ts b/x-pack/test/functional/apps/lens/add_to_dashboard.ts index ad393e620746f..83450351d2068 100644 --- a/x-pack/test/functional/apps/lens/add_to_dashboard.ts +++ b/x-pack/test/functional/apps/lens/add_to_dashboard.ts @@ -37,7 +37,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.lens.switchToVisualization('lnsMetric'); - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization(); await PageObjects.lens.assertMetric('Average of bytes', '5,727.322'); await PageObjects.lens.save('New Lens from Modal', false, false, 'new'); @@ -96,7 +96,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.lens.switchToVisualization('lnsMetric'); - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization(); await PageObjects.lens.assertMetric('Average of bytes', '5,727.322'); await PageObjects.lens.save( @@ -183,10 +183,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.lens.switchToVisualization('lnsMetric'); - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization(); await PageObjects.lens.assertMetric('Average of bytes', '5,727.322'); - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization(); await testSubjects.click('lnsApp_saveButton'); const hasOptions = await testSubjects.exists('add-to-dashboard-options'); @@ -228,10 +228,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.lens.switchToVisualization('lnsMetric'); - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization(); await PageObjects.lens.assertMetric('Average of bytes', '5,727.322'); - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization(); await testSubjects.click('lnsApp_saveButton'); const hasOptions = await testSubjects.exists('add-to-dashboard-options'); diff --git a/x-pack/test/functional/apps/lens/chart_data.ts b/x-pack/test/functional/apps/lens/chart_data.ts index 6a67583d9ba8d..0fc849153343e 100644 --- a/x-pack/test/functional/apps/lens/chart_data.ts +++ b/x-pack/test/functional/apps/lens/chart_data.ts @@ -33,7 +33,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { field: 'bytes', }); - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization(); }); const expectedData = [ @@ -63,28 +63,28 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { // https://github.com/elastic/elastic-charts/issues/917 gets fixed it.skip('should render pie chart', async () => { await PageObjects.lens.switchToVisualization('pie'); - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization(); const data = await PageObjects.lens.getCurrentChartDebugState(); assertMatchesExpectedData(data!); }); it.skip('should render donut chart', async () => { await PageObjects.lens.switchToVisualization('donut'); - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization(); const data = await PageObjects.lens.getCurrentChartDebugState(); assertMatchesExpectedData(data!); }); it.skip('should render treemap chart', async () => { await PageObjects.lens.switchToVisualization('treemap'); - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization(); const data = await PageObjects.lens.getCurrentChartDebugState(); assertMatchesExpectedData(data!); }); it('should render datatable', async () => { await PageObjects.lens.switchToVisualization('lnsDatatable'); - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization(); const terms = await Promise.all( range(0, 6).map((index) => PageObjects.lens.getDatatableCellText(index, 0)) ); @@ -101,7 +101,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should render metric', async () => { await PageObjects.lens.switchToVisualization('lnsMetric'); - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization(); await PageObjects.lens.assertMetric('Average of bytes', '5,727.322'); }); }); diff --git a/x-pack/test/functional/apps/lens/drag_and_drop.ts b/x-pack/test/functional/apps/lens/drag_and_drop.ts index 0e4d428c26029..5e4557057212f 100644 --- a/x-pack/test/functional/apps/lens/drag_and_drop.ts +++ b/x-pack/test/functional/apps/lens/drag_and_drop.ts @@ -54,7 +54,7 @@ export default function ({ getPageObjects }: FtrProviderContext) { it('should reorder the elements for the table', async () => { await PageObjects.lens.reorderDimensions('lnsDatatable_column', 3, 1); - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization(); expect(await PageObjects.lens.getDimensionTriggersTexts('lnsDatatable_column')).to.eql([ 'Top values of @message.raw', 'Top values of clientip', @@ -224,9 +224,9 @@ export default function ({ getPageObjects }: FtrProviderContext) { await PageObjects.lens.goToTimeRange(); await PageObjects.header.waitUntilLoadingHasFinished(); await PageObjects.lens.dragFieldToWorkspace('@timestamp'); - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization(); await PageObjects.lens.dragFieldToWorkspace('clientip'); - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization(); expect( await PageObjects.lens.getDimensionTriggersTexts('lnsXY_splitDimensionPanel') ).to.eql(['Top values of clientip']); @@ -239,9 +239,9 @@ export default function ({ getPageObjects }: FtrProviderContext) { it('overwrite existing time dimension if one exists already', async () => { await PageObjects.lens.dragFieldToWorkspace('utc_time'); - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization(); await PageObjects.lens.dragFieldToWorkspace('clientip'); - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization(); expect(await PageObjects.lens.getDimensionTriggersTexts('lnsXY_xDimensionPanel')).to.eql([ 'utc_time', ]); diff --git a/x-pack/test/functional/apps/lens/rollup.ts b/x-pack/test/functional/apps/lens/rollup.ts index cd32c7de06f6b..86b34e893e7b1 100644 --- a/x-pack/test/functional/apps/lens/rollup.ts +++ b/x-pack/test/functional/apps/lens/rollup.ts @@ -84,12 +84,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { operation: 'sum', field: 'bytes', }); - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization(); await PageObjects.lens.assertMetric('Sum of bytes', '16,788'); await PageObjects.lens.switchFirstLayerIndexPattern('lens_rolled_up_data'); - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization(); await PageObjects.lens.assertMetric('Sum of bytes', '16,788'); }); diff --git a/x-pack/test/functional/apps/lens/smokescreen.ts b/x-pack/test/functional/apps/lens/smokescreen.ts index 3e9ffa18c5949..946f3a1dcba95 100644 --- a/x-pack/test/functional/apps/lens/smokescreen.ts +++ b/x-pack/test/functional/apps/lens/smokescreen.ts @@ -12,7 +12,6 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const PageObjects = getPageObjects(['visualize', 'lens', 'common', 'header']); const find = getService('find'); - const retry = getService('retry'); const listingTable = getService('listingTable'); const testSubjects = getService('testSubjects'); const elasticChart = getService('elasticChart'); @@ -181,7 +180,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const longLabel = 'Veryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryvery long label wrapping multiple lines'; await PageObjects.lens.editDimensionLabel(longLabel); - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization(); await PageObjects.lens.closeDimensionEditor(); expect(await PageObjects.lens.getDimensionTriggerText('lnsXY_yDimensionPanel')).to.eql( @@ -224,7 +223,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.lens.closeDimensionEditor(); - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization(); const data = await PageObjects.lens.getCurrentChartDebugState(); expect(data?.axes?.y.length).to.eql(2); @@ -236,7 +235,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.lens.toggleToolbarPopover('lnsValuesButton'); await testSubjects.click('lnsXY_valueLabels_inside'); - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization(); // check for value labels let data = await PageObjects.lens.getCurrentChartDebugState(); @@ -244,7 +243,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { // switch to stacked bar chart await PageObjects.lens.switchToVisualization('bar_stacked'); - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization(); // check for value labels data = await PageObjects.lens.getCurrentChartDebugState(); @@ -257,14 +256,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await testSubjects.setValue('lnsyLeftAxisTitle', axisTitle, { clearWithKeyboard: true, }); - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization(); let data = await PageObjects.lens.getCurrentChartDebugState(); expect(data?.axes?.y?.[0].title).to.eql(axisTitle); // hide the gridlines await testSubjects.click('lnsshowyLeftAxisGridlines'); - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization(); data = await PageObjects.lens.getCurrentChartDebugState(); expect(data?.axes?.y?.[0].gridlines.length).to.eql(0); @@ -600,42 +599,5 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); expect(await testSubjects.isEnabled('lnsApp_downloadCSVButton')).to.eql(true); }); - - it('should able to sort a table by a column', async () => { - await PageObjects.visualize.gotoVisualizationLandingPage(); - await listingTable.searchForItemWithName('lnsXYvis'); - await PageObjects.lens.clickVisualizeListItemTitle('lnsXYvis'); - await PageObjects.lens.goToTimeRange(); - await PageObjects.lens.switchToVisualization('lnsDatatable'); - // Sort by number - await PageObjects.lens.changeTableSortingBy(2, 'ascending'); - await PageObjects.header.waitUntilLoadingHasFinished(); - expect(await PageObjects.lens.getDatatableCellText(0, 2)).to.eql('17,246'); - // Now sort by IP - await PageObjects.lens.changeTableSortingBy(0, 'ascending'); - await PageObjects.header.waitUntilLoadingHasFinished(); - expect(await PageObjects.lens.getDatatableCellText(0, 0)).to.eql('78.83.247.30'); - // Change the sorting - await PageObjects.lens.changeTableSortingBy(0, 'descending'); - await PageObjects.header.waitUntilLoadingHasFinished(); - expect(await PageObjects.lens.getDatatableCellText(0, 0)).to.eql('169.228.188.120'); - // Remove the sorting - await PageObjects.lens.changeTableSortingBy(0, 'none'); - await PageObjects.header.waitUntilLoadingHasFinished(); - expect(await PageObjects.lens.isDatatableHeaderSorted(0)).to.eql(false); - }); - - it('should able to use filters cell actions in table', async () => { - const firstCellContent = await PageObjects.lens.getDatatableCellText(0, 0); - await retry.try(async () => { - await PageObjects.lens.clickTableCellAction(0, 0, 'lensDatatableFilterOut'); - await PageObjects.header.waitUntilLoadingHasFinished(); - expect( - await find.existsByCssSelector( - `[data-test-subj*="filter-value-${firstCellContent}"][data-test-subj*="filter-negated"]` - ) - ).to.eql(true); - }); - }); }); } diff --git a/x-pack/test/functional/apps/lens/table.ts b/x-pack/test/functional/apps/lens/table.ts index 211669e75dc3f..2d96458523cb6 100644 --- a/x-pack/test/functional/apps/lens/table.ts +++ b/x-pack/test/functional/apps/lens/table.ts @@ -23,27 +23,29 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.lens.switchToVisualization('lnsDatatable'); // Sort by number await PageObjects.lens.changeTableSortingBy(2, 'ascending'); - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization(); expect(await PageObjects.lens.getDatatableCellText(0, 2)).to.eql('17,246'); // Now sort by IP await PageObjects.lens.changeTableSortingBy(0, 'ascending'); - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization(); expect(await PageObjects.lens.getDatatableCellText(0, 0)).to.eql('78.83.247.30'); // Change the sorting await PageObjects.lens.changeTableSortingBy(0, 'descending'); - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization(); expect(await PageObjects.lens.getDatatableCellText(0, 0)).to.eql('169.228.188.120'); // Remove the sorting - await PageObjects.lens.changeTableSortingBy(0, 'none'); - await PageObjects.header.waitUntilLoadingHasFinished(); - expect(await PageObjects.lens.isDatatableHeaderSorted(0)).to.eql(false); + await retry.try(async () => { + await PageObjects.lens.changeTableSortingBy(0, 'none'); + await PageObjects.lens.waitForVisualization(); + expect(await PageObjects.lens.isDatatableHeaderSorted(0)).to.eql(false); + }); }); it('should able to use filters cell actions in table', async () => { const firstCellContent = await PageObjects.lens.getDatatableCellText(0, 0); await retry.try(async () => { await PageObjects.lens.clickTableCellAction(0, 0, 'lensDatatableFilterOut'); - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization(); expect( await find.existsByCssSelector( `[data-test-subj*="filter-value-${firstCellContent}"][data-test-subj*="filter-negated"]` diff --git a/x-pack/test/functional/apps/maps/documents_source/search_hits.js b/x-pack/test/functional/apps/maps/documents_source/search_hits.js index 4da36a44cff08..2663242406a75 100644 --- a/x-pack/test/functional/apps/maps/documents_source/search_hits.js +++ b/x-pack/test/functional/apps/maps/documents_source/search_hits.js @@ -84,7 +84,8 @@ export default function ({ getPageObjects, getService }) { expect(beforeQueryRefreshTimestamp).not.to.equal(afterQueryRefreshTimestamp); }); - it('should apply query to fit to bounds', async () => { + // https://github.com/elastic/kibana/issues/93718 + it.skip('should apply query to fit to bounds', async () => { // Set view to other side of world so no matching results await PageObjects.maps.setView(-15, -100, 6); await PageObjects.maps.clickFitToBounds('logstash'); diff --git a/x-pack/test/functional/apps/security/doc_level_security_roles.js b/x-pack/test/functional/apps/security/doc_level_security_roles.js index 9b289bc8c75bb..341a0a97073dc 100644 --- a/x-pack/test/functional/apps/security/doc_level_security_roles.js +++ b/x-pack/test/functional/apps/security/doc_level_security_roles.js @@ -76,7 +76,7 @@ export default function ({ getService, getPageObjects }) { }); const rowData = await PageObjects.discover.getDocTableIndex(1); expect(rowData).to.be( - '_id:doc1 _type: - _index:dlstest _score:0 region.keyword:EAST name:ABC Company name.keyword:ABC Company region:EAST' + 'name:ABC Company name.keyword:ABC Company region:EAST region.keyword:EAST _id:doc1 _index:dlstest _score:0 _type: -' ); }); after('logout', async () => { diff --git a/x-pack/test/functional/apps/security/field_level_security.js b/x-pack/test/functional/apps/security/field_level_security.js index 06441518cfb62..5466e8d58e8e9 100644 --- a/x-pack/test/functional/apps/security/field_level_security.js +++ b/x-pack/test/functional/apps/security/field_level_security.js @@ -109,7 +109,7 @@ export default function ({ getService, getPageObjects }) { }); const rowData = await PageObjects.discover.getDocTableIndex(1); expect(rowData).to.be( - '_id:2 _type: - _index:flstest _score:0 customer_name.keyword:ABC Company customer_ssn:444.555.6666 customer_region.keyword:WEST runtime_customer_ssn:444.555.6666 calculated at runtime customer_region:WEST customer_name:ABC Company customer_ssn.keyword:444.555.6666' + 'customer_name:ABC Company customer_name.keyword:ABC Company customer_region:WEST customer_region.keyword:WEST customer_ssn:444.555.6666 customer_ssn.keyword:444.555.6666 runtime_customer_ssn:444.555.6666 calculated at runtime _id:2 _index:flstest _score:0 _type: -' ); }); @@ -123,7 +123,7 @@ export default function ({ getService, getPageObjects }) { }); const rowData = await PageObjects.discover.getDocTableIndex(1); expect(rowData).to.be( - '_id:2 _type: - _index:flstest _score:0 customer_name.keyword:ABC Company customer_region.keyword:WEST customer_region:WEST customer_name:ABC Company' + 'customer_name:ABC Company customer_name.keyword:ABC Company customer_region:WEST customer_region.keyword:WEST _id:2 _index:flstest _score:0 _type: -' ); }); diff --git a/x-pack/test/functional/apps/visualize/precalculated_histogram.ts b/x-pack/test/functional/apps/visualize/precalculated_histogram.ts index 151c9e981250f..459a497355e0d 100644 --- a/x-pack/test/functional/apps/visualize/precalculated_histogram.ts +++ b/x-pack/test/functional/apps/visualize/precalculated_histogram.ts @@ -28,7 +28,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('appears correctly in discover', async function () { await PageObjects.common.navigateToApp('discover'); const rowData = await PageObjects.discover.getDocTableIndex(1); - expect(rowData.includes('"values": [ 0.3, 1, 3, 4.2, 4.8 ]')).to.be.ok(); + expect(rowData.includes('"values":[0.3,1,3,4.2,4.8]')).to.be.ok(); }); describe('works in visualizations', () => { @@ -64,7 +64,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('with average aggregation', async () => { const data = await renderTableForAggregation('Average'); - expect(data).to.eql([['2.8653795982259327']]); + expect(data).to.eql([['2.865']]); }); it('with median aggregation', async () => { @@ -79,7 +79,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('with sum aggregation', async () => { const data = await renderTableForAggregation('Sum'); - expect(data).to.eql([['10983']]); + expect(data).to.eql([['10,983']]); }); }); }); diff --git a/x-pack/test/functional/es_archives/cases/signals/duplicate_ids/data.json.gz b/x-pack/test/functional/es_archives/cases/signals/duplicate_ids/data.json.gz new file mode 100644 index 0000000000000..46843482c9781 Binary files /dev/null and b/x-pack/test/functional/es_archives/cases/signals/duplicate_ids/data.json.gz differ diff --git a/x-pack/test/functional/es_archives/cases/signals/duplicate_ids/mappings.json b/x-pack/test/functional/es_archives/cases/signals/duplicate_ids/mappings.json new file mode 100644 index 0000000000000..97b2897150212 --- /dev/null +++ b/x-pack/test/functional/es_archives/cases/signals/duplicate_ids/mappings.json @@ -0,0 +1,6624 @@ +{ + "type": "index", + "value": { + "aliases": { + ".siem-signals-default": { + "is_write_index": true + } + }, + "index": ".siem-signals-default-000001", + "mappings": { + "_meta": { + "version": 14 + }, + "dynamic": "false", + "properties": { + "@timestamp": { + "type": "date" + }, + "agent": { + "properties": { + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "as": { + "properties": { + "number": { + "type": "long" + }, + "organization": { + "properties": { + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "client": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "as": { + "properties": { + "number": { + "type": "long" + }, + "organization": { + "properties": { + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "bytes": { + "type": "long" + }, + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "geo": { + "properties": { + "city_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "continent_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "country_iso_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "country_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "location": { + "type": "geo_point" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "region_iso_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "region_name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "ip": { + "type": "ip" + }, + "mac": { + "ignore_above": 1024, + "type": "keyword" + }, + "nat": { + "properties": { + "ip": { + "type": "ip" + }, + "port": { + "type": "long" + } + } + }, + "packets": { + "type": "long" + }, + "port": { + "type": "long" + }, + "registered_domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "top_level_domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "user": { + "properties": { + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "email": { + "ignore_above": 1024, + "type": "keyword" + }, + "full_name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "group": { + "properties": { + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "cloud": { + "properties": { + "account": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "availability_zone": { + "ignore_above": 1024, + "type": "keyword" + }, + "instance": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "machine": { + "properties": { + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "provider": { + "ignore_above": 1024, + "type": "keyword" + }, + "region": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "code_signature": { + "properties": { + "exists": { + "type": "boolean" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "subject_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "trusted": { + "type": "boolean" + }, + "valid": { + "type": "boolean" + } + } + }, + "container": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "image": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "tag": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "labels": { + "type": "object" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "runtime": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "destination": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "as": { + "properties": { + "number": { + "type": "long" + }, + "organization": { + "properties": { + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "bytes": { + "type": "long" + }, + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "geo": { + "properties": { + "city_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "continent_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "country_iso_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "country_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "location": { + "type": "geo_point" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "region_iso_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "region_name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "ip": { + "type": "ip" + }, + "mac": { + "ignore_above": 1024, + "type": "keyword" + }, + "nat": { + "properties": { + "ip": { + "type": "ip" + }, + "port": { + "type": "long" + } + } + }, + "packets": { + "type": "long" + }, + "port": { + "type": "long" + }, + "registered_domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "top_level_domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "user": { + "properties": { + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "email": { + "ignore_above": 1024, + "type": "keyword" + }, + "full_name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "group": { + "properties": { + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "dll": { + "properties": { + "code_signature": { + "properties": { + "exists": { + "type": "boolean" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "subject_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "trusted": { + "type": "boolean" + }, + "valid": { + "type": "boolean" + } + } + }, + "hash": { + "properties": { + "md5": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha1": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha256": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha512": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "path": { + "ignore_above": 1024, + "type": "keyword" + }, + "pe": { + "properties": { + "company": { + "ignore_above": 1024, + "type": "keyword" + }, + "description": { + "ignore_above": 1024, + "type": "keyword" + }, + "file_version": { + "ignore_above": 1024, + "type": "keyword" + }, + "original_file_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "product": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "dns": { + "properties": { + "answers": { + "properties": { + "class": { + "ignore_above": 1024, + "type": "keyword" + }, + "data": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "ttl": { + "type": "long" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "header_flags": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "op_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "question": { + "properties": { + "class": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "registered_domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "subdomain": { + "ignore_above": 1024, + "type": "keyword" + }, + "top_level_domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "resolved_ip": { + "type": "ip" + }, + "response_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "code": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "message": { + "norms": false, + "type": "text" + }, + "stack_trace": { + "doc_values": false, + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "index": false, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "event": { + "properties": { + "action": { + "ignore_above": 1024, + "type": "keyword" + }, + "category": { + "ignore_above": 1024, + "type": "keyword" + }, + "code": { + "ignore_above": 1024, + "type": "keyword" + }, + "created": { + "type": "date" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "end": { + "type": "date" + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "ingested": { + "type": "date" + }, + "kind": { + "ignore_above": 1024, + "type": "keyword" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + }, + "original": { + "doc_values": false, + "ignore_above": 1024, + "index": false, + "type": "keyword" + }, + "outcome": { + "ignore_above": 1024, + "type": "keyword" + }, + "provider": { + "ignore_above": 1024, + "type": "keyword" + }, + "reference": { + "ignore_above": 1024, + "type": "keyword" + }, + "risk_score": { + "type": "float" + }, + "risk_score_norm": { + "type": "float" + }, + "sequence": { + "type": "long" + }, + "severity": { + "type": "long" + }, + "start": { + "type": "date" + }, + "timezone": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "url": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "file": { + "properties": { + "accessed": { + "type": "date" + }, + "attributes": { + "ignore_above": 1024, + "type": "keyword" + }, + "code_signature": { + "properties": { + "exists": { + "type": "boolean" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "subject_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "trusted": { + "type": "boolean" + }, + "valid": { + "type": "boolean" + } + } + }, + "created": { + "type": "date" + }, + "ctime": { + "type": "date" + }, + "device": { + "ignore_above": 1024, + "type": "keyword" + }, + "directory": { + "ignore_above": 1024, + "type": "keyword" + }, + "drive_letter": { + "ignore_above": 1, + "type": "keyword" + }, + "extension": { + "ignore_above": 1024, + "type": "keyword" + }, + "gid": { + "ignore_above": 1024, + "type": "keyword" + }, + "group": { + "ignore_above": 1024, + "type": "keyword" + }, + "hash": { + "properties": { + "md5": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha1": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha256": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha512": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "inode": { + "ignore_above": 1024, + "type": "keyword" + }, + "mime_type": { + "ignore_above": 1024, + "type": "keyword" + }, + "mode": { + "ignore_above": 1024, + "type": "keyword" + }, + "mtime": { + "type": "date" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "owner": { + "ignore_above": 1024, + "type": "keyword" + }, + "path": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "pe": { + "properties": { + "company": { + "ignore_above": 1024, + "type": "keyword" + }, + "description": { + "ignore_above": 1024, + "type": "keyword" + }, + "file_version": { + "ignore_above": 1024, + "type": "keyword" + }, + "original_file_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "product": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "size": { + "type": "long" + }, + "target_path": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "uid": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "geo": { + "properties": { + "city_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "continent_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "country_iso_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "country_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "location": { + "type": "geo_point" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "region_iso_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "region_name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "group": { + "properties": { + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "hash": { + "properties": { + "md5": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha1": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha256": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha512": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "architecture": { + "ignore_above": 1024, + "type": "keyword" + }, + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "geo": { + "properties": { + "city_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "continent_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "country_iso_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "country_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "location": { + "type": "geo_point" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "region_iso_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "region_name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "ip": { + "type": "ip" + }, + "mac": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "os": { + "properties": { + "family": { + "ignore_above": 1024, + "type": "keyword" + }, + "full": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "kernel": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "platform": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "uptime": { + "type": "long" + }, + "user": { + "properties": { + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "email": { + "ignore_above": 1024, + "type": "keyword" + }, + "full_name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "group": { + "properties": { + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "http": { + "properties": { + "request": { + "properties": { + "body": { + "properties": { + "bytes": { + "type": "long" + }, + "content": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "bytes": { + "type": "long" + }, + "method": { + "ignore_above": 1024, + "type": "keyword" + }, + "referrer": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "response": { + "properties": { + "body": { + "properties": { + "bytes": { + "type": "long" + }, + "content": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "bytes": { + "type": "long" + }, + "status_code": { + "type": "long" + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "interface": { + "properties": { + "alias": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "labels": { + "type": "object" + }, + "log": { + "properties": { + "level": { + "ignore_above": 1024, + "type": "keyword" + }, + "logger": { + "ignore_above": 1024, + "type": "keyword" + }, + "origin": { + "properties": { + "file": { + "properties": { + "line": { + "type": "integer" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "function": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "original": { + "doc_values": false, + "ignore_above": 1024, + "index": false, + "type": "keyword" + }, + "syslog": { + "properties": { + "facility": { + "properties": { + "code": { + "type": "long" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "priority": { + "type": "long" + }, + "severity": { + "properties": { + "code": { + "type": "long" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "message": { + "norms": false, + "type": "text" + }, + "network": { + "properties": { + "application": { + "ignore_above": 1024, + "type": "keyword" + }, + "bytes": { + "type": "long" + }, + "community_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "direction": { + "ignore_above": 1024, + "type": "keyword" + }, + "forwarded_ip": { + "type": "ip" + }, + "iana_number": { + "ignore_above": 1024, + "type": "keyword" + }, + "inner": { + "properties": { + "vlan": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "packets": { + "type": "long" + }, + "protocol": { + "ignore_above": 1024, + "type": "keyword" + }, + "transport": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "vlan": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "observer": { + "properties": { + "egress": { + "properties": { + "interface": { + "properties": { + "alias": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "vlan": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "zone": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "geo": { + "properties": { + "city_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "continent_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "country_iso_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "country_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "location": { + "type": "geo_point" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "region_iso_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "region_name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, + "ingress": { + "properties": { + "interface": { + "properties": { + "alias": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "vlan": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "zone": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "ip": { + "type": "ip" + }, + "mac": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "os": { + "properties": { + "family": { + "ignore_above": 1024, + "type": "keyword" + }, + "full": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "kernel": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "platform": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "product": { + "ignore_above": 1024, + "type": "keyword" + }, + "serial_number": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "vendor": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "organization": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "os": { + "properties": { + "family": { + "ignore_above": 1024, + "type": "keyword" + }, + "full": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "kernel": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "platform": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "package": { + "properties": { + "architecture": { + "ignore_above": 1024, + "type": "keyword" + }, + "build_version": { + "ignore_above": 1024, + "type": "keyword" + }, + "checksum": { + "ignore_above": 1024, + "type": "keyword" + }, + "description": { + "ignore_above": 1024, + "type": "keyword" + }, + "install_scope": { + "ignore_above": 1024, + "type": "keyword" + }, + "installed": { + "type": "date" + }, + "license": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "path": { + "ignore_above": 1024, + "type": "keyword" + }, + "reference": { + "ignore_above": 1024, + "type": "keyword" + }, + "size": { + "type": "long" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "pe": { + "properties": { + "company": { + "ignore_above": 1024, + "type": "keyword" + }, + "description": { + "ignore_above": 1024, + "type": "keyword" + }, + "file_version": { + "ignore_above": 1024, + "type": "keyword" + }, + "original_file_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "product": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "process": { + "properties": { + "args": { + "ignore_above": 1024, + "type": "keyword" + }, + "args_count": { + "type": "long" + }, + "code_signature": { + "properties": { + "exists": { + "type": "boolean" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "subject_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "trusted": { + "type": "boolean" + }, + "valid": { + "type": "boolean" + } + } + }, + "command_line": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "entity_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "executable": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "exit_code": { + "type": "long" + }, + "hash": { + "properties": { + "md5": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha1": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha256": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha512": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "parent": { + "properties": { + "args": { + "ignore_above": 1024, + "type": "keyword" + }, + "args_count": { + "type": "long" + }, + "code_signature": { + "properties": { + "exists": { + "type": "boolean" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "subject_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "trusted": { + "type": "boolean" + }, + "valid": { + "type": "boolean" + } + } + }, + "command_line": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "entity_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "executable": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "exit_code": { + "type": "long" + }, + "hash": { + "properties": { + "md5": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha1": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha256": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha512": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "pgid": { + "type": "long" + }, + "pid": { + "type": "long" + }, + "ppid": { + "type": "long" + }, + "start": { + "type": "date" + }, + "thread": { + "properties": { + "id": { + "type": "long" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "title": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "uptime": { + "type": "long" + }, + "working_directory": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "pe": { + "properties": { + "company": { + "ignore_above": 1024, + "type": "keyword" + }, + "description": { + "ignore_above": 1024, + "type": "keyword" + }, + "file_version": { + "ignore_above": 1024, + "type": "keyword" + }, + "original_file_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "product": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "pgid": { + "type": "long" + }, + "pid": { + "type": "long" + }, + "ppid": { + "type": "long" + }, + "start": { + "type": "date" + }, + "thread": { + "properties": { + "id": { + "type": "long" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "title": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "uptime": { + "type": "long" + }, + "working_directory": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "registry": { + "properties": { + "data": { + "properties": { + "bytes": { + "ignore_above": 1024, + "type": "keyword" + }, + "strings": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "hive": { + "ignore_above": 1024, + "type": "keyword" + }, + "key": { + "ignore_above": 1024, + "type": "keyword" + }, + "path": { + "ignore_above": 1024, + "type": "keyword" + }, + "value": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "related": { + "properties": { + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "ip": { + "type": "ip" + }, + "user": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "rule": { + "properties": { + "author": { + "ignore_above": 1024, + "type": "keyword" + }, + "category": { + "ignore_above": 1024, + "type": "keyword" + }, + "description": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "license": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "reference": { + "ignore_above": 1024, + "type": "keyword" + }, + "ruleset": { + "ignore_above": 1024, + "type": "keyword" + }, + "uuid": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "server": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "as": { + "properties": { + "number": { + "type": "long" + }, + "organization": { + "properties": { + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "bytes": { + "type": "long" + }, + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "geo": { + "properties": { + "city_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "continent_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "country_iso_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "country_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "location": { + "type": "geo_point" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "region_iso_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "region_name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "ip": { + "type": "ip" + }, + "mac": { + "ignore_above": 1024, + "type": "keyword" + }, + "nat": { + "properties": { + "ip": { + "type": "ip" + }, + "port": { + "type": "long" + } + } + }, + "packets": { + "type": "long" + }, + "port": { + "type": "long" + }, + "registered_domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "top_level_domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "user": { + "properties": { + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "email": { + "ignore_above": 1024, + "type": "keyword" + }, + "full_name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "group": { + "properties": { + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "service": { + "properties": { + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "node": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "state": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "signal": { + "properties": { + "_meta": { + "properties": { + "version": { + "type": "long" + } + } + }, + "ancestors": { + "properties": { + "depth": { + "type": "long" + }, + "id": { + "type": "keyword" + }, + "index": { + "type": "keyword" + }, + "rule": { + "type": "keyword" + }, + "type": { + "type": "keyword" + } + } + }, + "depth": { + "type": "integer" + }, + "group": { + "properties": { + "id": { + "type": "keyword" + }, + "index": { + "type": "integer" + } + } + }, + "original_event": { + "properties": { + "action": { + "type": "keyword" + }, + "category": { + "type": "keyword" + }, + "code": { + "type": "keyword" + }, + "created": { + "type": "date" + }, + "dataset": { + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "end": { + "type": "date" + }, + "hash": { + "type": "keyword" + }, + "id": { + "type": "keyword" + }, + "kind": { + "type": "keyword" + }, + "module": { + "type": "keyword" + }, + "original": { + "doc_values": false, + "index": false, + "type": "keyword" + }, + "outcome": { + "type": "keyword" + }, + "provider": { + "type": "keyword" + }, + "risk_score": { + "type": "float" + }, + "risk_score_norm": { + "type": "float" + }, + "sequence": { + "type": "long" + }, + "severity": { + "type": "long" + }, + "start": { + "type": "date" + }, + "timezone": { + "type": "keyword" + }, + "type": { + "type": "keyword" + } + } + }, + "original_signal": { + "dynamic": "false", + "enabled": false, + "type": "object" + }, + "original_time": { + "type": "date" + }, + "parent": { + "properties": { + "depth": { + "type": "long" + }, + "id": { + "type": "keyword" + }, + "index": { + "type": "keyword" + }, + "rule": { + "type": "keyword" + }, + "type": { + "type": "keyword" + } + } + }, + "parents": { + "properties": { + "depth": { + "type": "long" + }, + "id": { + "type": "keyword" + }, + "index": { + "type": "keyword" + }, + "rule": { + "type": "keyword" + }, + "type": { + "type": "keyword" + } + } + }, + "rule": { + "properties": { + "author": { + "type": "keyword" + }, + "building_block_type": { + "type": "keyword" + }, + "created_at": { + "type": "date" + }, + "created_by": { + "type": "keyword" + }, + "description": { + "type": "keyword" + }, + "enabled": { + "type": "keyword" + }, + "false_positives": { + "type": "keyword" + }, + "filters": { + "type": "object" + }, + "from": { + "type": "keyword" + }, + "id": { + "type": "keyword" + }, + "immutable": { + "type": "keyword" + }, + "index": { + "type": "keyword" + }, + "interval": { + "type": "keyword" + }, + "language": { + "type": "keyword" + }, + "license": { + "type": "keyword" + }, + "max_signals": { + "type": "keyword" + }, + "name": { + "type": "keyword" + }, + "note": { + "type": "text" + }, + "output_index": { + "type": "keyword" + }, + "query": { + "type": "keyword" + }, + "references": { + "type": "keyword" + }, + "risk_score": { + "type": "float" + }, + "risk_score_mapping": { + "properties": { + "field": { + "type": "keyword" + }, + "operator": { + "type": "keyword" + }, + "value": { + "type": "keyword" + } + } + }, + "rule_id": { + "type": "keyword" + }, + "rule_name_override": { + "type": "keyword" + }, + "saved_id": { + "type": "keyword" + }, + "severity": { + "type": "keyword" + }, + "severity_mapping": { + "properties": { + "field": { + "type": "keyword" + }, + "operator": { + "type": "keyword" + }, + "severity": { + "type": "keyword" + }, + "value": { + "type": "keyword" + } + } + }, + "size": { + "type": "keyword" + }, + "tags": { + "type": "keyword" + }, + "threat": { + "properties": { + "framework": { + "type": "keyword" + }, + "tactic": { + "properties": { + "id": { + "type": "keyword" + }, + "name": { + "type": "keyword" + }, + "reference": { + "type": "keyword" + } + } + }, + "technique": { + "properties": { + "id": { + "type": "keyword" + }, + "name": { + "type": "keyword" + }, + "reference": { + "type": "keyword" + }, + "subtechnique": { + "properties": { + "id": { + "type": "keyword" + }, + "name": { + "type": "keyword" + }, + "reference": { + "type": "keyword" + } + } + } + } + } + } + }, + "threshold": { + "properties": { + "field": { + "type": "keyword" + }, + "value": { + "type": "float" + } + } + }, + "timeline_id": { + "type": "keyword" + }, + "timeline_title": { + "type": "keyword" + }, + "timestamp_override": { + "type": "keyword" + }, + "to": { + "type": "keyword" + }, + "type": { + "type": "keyword" + }, + "updated_at": { + "type": "date" + }, + "updated_by": { + "type": "keyword" + }, + "version": { + "type": "keyword" + } + } + }, + "status": { + "type": "keyword" + }, + "threshold_count": { + "type": "float" + }, + "threshold_result": { + "properties": { + "count": { + "type": "long" + }, + "value": { + "type": "keyword" + } + } + } + } + }, + "source": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "as": { + "properties": { + "number": { + "type": "long" + }, + "organization": { + "properties": { + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "bytes": { + "type": "long" + }, + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "geo": { + "properties": { + "city_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "continent_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "country_iso_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "country_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "location": { + "type": "geo_point" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "region_iso_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "region_name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "ip": { + "type": "ip" + }, + "mac": { + "ignore_above": 1024, + "type": "keyword" + }, + "nat": { + "properties": { + "ip": { + "type": "ip" + }, + "port": { + "type": "long" + } + } + }, + "packets": { + "type": "long" + }, + "port": { + "type": "long" + }, + "registered_domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "top_level_domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "user": { + "properties": { + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "email": { + "ignore_above": 1024, + "type": "keyword" + }, + "full_name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "group": { + "properties": { + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "tags": { + "ignore_above": 1024, + "type": "keyword" + }, + "threat": { + "properties": { + "framework": { + "ignore_above": 1024, + "type": "keyword" + }, + "tactic": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "reference": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "technique": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "reference": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "tls": { + "properties": { + "cipher": { + "ignore_above": 1024, + "type": "keyword" + }, + "client": { + "properties": { + "certificate": { + "ignore_above": 1024, + "type": "keyword" + }, + "certificate_chain": { + "ignore_above": 1024, + "type": "keyword" + }, + "hash": { + "properties": { + "md5": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha1": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha256": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "issuer": { + "ignore_above": 1024, + "type": "keyword" + }, + "ja3": { + "ignore_above": 1024, + "type": "keyword" + }, + "not_after": { + "type": "date" + }, + "not_before": { + "type": "date" + }, + "server_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "subject": { + "ignore_above": 1024, + "type": "keyword" + }, + "supported_ciphers": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "curve": { + "ignore_above": 1024, + "type": "keyword" + }, + "established": { + "type": "boolean" + }, + "next_protocol": { + "ignore_above": 1024, + "type": "keyword" + }, + "resumed": { + "type": "boolean" + }, + "server": { + "properties": { + "certificate": { + "ignore_above": 1024, + "type": "keyword" + }, + "certificate_chain": { + "ignore_above": 1024, + "type": "keyword" + }, + "hash": { + "properties": { + "md5": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha1": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha256": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "issuer": { + "ignore_above": 1024, + "type": "keyword" + }, + "ja3s": { + "ignore_above": 1024, + "type": "keyword" + }, + "not_after": { + "type": "date" + }, + "not_before": { + "type": "date" + }, + "subject": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + }, + "version_protocol": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "trace": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "transaction": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "url": { + "properties": { + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "extension": { + "ignore_above": 1024, + "type": "keyword" + }, + "fragment": { + "ignore_above": 1024, + "type": "keyword" + }, + "full": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "original": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "password": { + "ignore_above": 1024, + "type": "keyword" + }, + "path": { + "ignore_above": 1024, + "type": "keyword" + }, + "port": { + "type": "long" + }, + "query": { + "ignore_above": 1024, + "type": "keyword" + }, + "registered_domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "scheme": { + "ignore_above": 1024, + "type": "keyword" + }, + "top_level_domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "username": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "user": { + "properties": { + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "email": { + "ignore_above": 1024, + "type": "keyword" + }, + "full_name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "group": { + "properties": { + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "user_agent": { + "properties": { + "device": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "original": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "os": { + "properties": { + "family": { + "ignore_above": 1024, + "type": "keyword" + }, + "full": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "kernel": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "platform": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "vlan": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "vulnerability": { + "properties": { + "category": { + "ignore_above": 1024, + "type": "keyword" + }, + "classification": { + "ignore_above": 1024, + "type": "keyword" + }, + "description": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "enumeration": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "reference": { + "ignore_above": 1024, + "type": "keyword" + }, + "report_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "scanner": { + "properties": { + "vendor": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "score": { + "properties": { + "base": { + "type": "float" + }, + "environmental": { + "type": "float" + }, + "temporal": { + "type": "float" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "severity": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "settings": { + "index": { + "lifecycle": { + "name": ".siem-signals-default", + "rollover_alias": ".siem-signals-default" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "number_of_replicas": "1", + "number_of_shards": "1" + } + } + } +} + +{ + "type": "index", + "value": { + "aliases": { + }, + "index": ".siem-signals-default-000002", + "mappings": { + "_meta": { + "version": 14 + }, + "dynamic": "false", + "properties": { + "@timestamp": { + "type": "date" + }, + "agent": { + "properties": { + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "as": { + "properties": { + "number": { + "type": "long" + }, + "organization": { + "properties": { + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "client": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "as": { + "properties": { + "number": { + "type": "long" + }, + "organization": { + "properties": { + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "bytes": { + "type": "long" + }, + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "geo": { + "properties": { + "city_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "continent_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "country_iso_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "country_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "location": { + "type": "geo_point" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "region_iso_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "region_name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "ip": { + "type": "ip" + }, + "mac": { + "ignore_above": 1024, + "type": "keyword" + }, + "nat": { + "properties": { + "ip": { + "type": "ip" + }, + "port": { + "type": "long" + } + } + }, + "packets": { + "type": "long" + }, + "port": { + "type": "long" + }, + "registered_domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "top_level_domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "user": { + "properties": { + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "email": { + "ignore_above": 1024, + "type": "keyword" + }, + "full_name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "group": { + "properties": { + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "cloud": { + "properties": { + "account": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "availability_zone": { + "ignore_above": 1024, + "type": "keyword" + }, + "instance": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "machine": { + "properties": { + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "provider": { + "ignore_above": 1024, + "type": "keyword" + }, + "region": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "code_signature": { + "properties": { + "exists": { + "type": "boolean" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "subject_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "trusted": { + "type": "boolean" + }, + "valid": { + "type": "boolean" + } + } + }, + "container": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "image": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "tag": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "labels": { + "type": "object" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "runtime": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "destination": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "as": { + "properties": { + "number": { + "type": "long" + }, + "organization": { + "properties": { + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "bytes": { + "type": "long" + }, + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "geo": { + "properties": { + "city_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "continent_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "country_iso_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "country_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "location": { + "type": "geo_point" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "region_iso_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "region_name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "ip": { + "type": "ip" + }, + "mac": { + "ignore_above": 1024, + "type": "keyword" + }, + "nat": { + "properties": { + "ip": { + "type": "ip" + }, + "port": { + "type": "long" + } + } + }, + "packets": { + "type": "long" + }, + "port": { + "type": "long" + }, + "registered_domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "top_level_domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "user": { + "properties": { + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "email": { + "ignore_above": 1024, + "type": "keyword" + }, + "full_name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "group": { + "properties": { + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "dll": { + "properties": { + "code_signature": { + "properties": { + "exists": { + "type": "boolean" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "subject_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "trusted": { + "type": "boolean" + }, + "valid": { + "type": "boolean" + } + } + }, + "hash": { + "properties": { + "md5": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha1": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha256": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha512": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "path": { + "ignore_above": 1024, + "type": "keyword" + }, + "pe": { + "properties": { + "company": { + "ignore_above": 1024, + "type": "keyword" + }, + "description": { + "ignore_above": 1024, + "type": "keyword" + }, + "file_version": { + "ignore_above": 1024, + "type": "keyword" + }, + "original_file_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "product": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "dns": { + "properties": { + "answers": { + "properties": { + "class": { + "ignore_above": 1024, + "type": "keyword" + }, + "data": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "ttl": { + "type": "long" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "header_flags": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "op_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "question": { + "properties": { + "class": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "registered_domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "subdomain": { + "ignore_above": 1024, + "type": "keyword" + }, + "top_level_domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "resolved_ip": { + "type": "ip" + }, + "response_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "ecs": { + "properties": { + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "error": { + "properties": { + "code": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "message": { + "norms": false, + "type": "text" + }, + "stack_trace": { + "doc_values": false, + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "index": false, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "event": { + "properties": { + "action": { + "ignore_above": 1024, + "type": "keyword" + }, + "category": { + "ignore_above": 1024, + "type": "keyword" + }, + "code": { + "ignore_above": 1024, + "type": "keyword" + }, + "created": { + "type": "date" + }, + "dataset": { + "ignore_above": 1024, + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "end": { + "type": "date" + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "ingested": { + "type": "date" + }, + "kind": { + "ignore_above": 1024, + "type": "keyword" + }, + "module": { + "ignore_above": 1024, + "type": "keyword" + }, + "original": { + "doc_values": false, + "ignore_above": 1024, + "index": false, + "type": "keyword" + }, + "outcome": { + "ignore_above": 1024, + "type": "keyword" + }, + "provider": { + "ignore_above": 1024, + "type": "keyword" + }, + "reference": { + "ignore_above": 1024, + "type": "keyword" + }, + "risk_score": { + "type": "float" + }, + "risk_score_norm": { + "type": "float" + }, + "sequence": { + "type": "long" + }, + "severity": { + "type": "long" + }, + "start": { + "type": "date" + }, + "timezone": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "url": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "file": { + "properties": { + "accessed": { + "type": "date" + }, + "attributes": { + "ignore_above": 1024, + "type": "keyword" + }, + "code_signature": { + "properties": { + "exists": { + "type": "boolean" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "subject_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "trusted": { + "type": "boolean" + }, + "valid": { + "type": "boolean" + } + } + }, + "created": { + "type": "date" + }, + "ctime": { + "type": "date" + }, + "device": { + "ignore_above": 1024, + "type": "keyword" + }, + "directory": { + "ignore_above": 1024, + "type": "keyword" + }, + "drive_letter": { + "ignore_above": 1, + "type": "keyword" + }, + "extension": { + "ignore_above": 1024, + "type": "keyword" + }, + "gid": { + "ignore_above": 1024, + "type": "keyword" + }, + "group": { + "ignore_above": 1024, + "type": "keyword" + }, + "hash": { + "properties": { + "md5": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha1": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha256": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha512": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "inode": { + "ignore_above": 1024, + "type": "keyword" + }, + "mime_type": { + "ignore_above": 1024, + "type": "keyword" + }, + "mode": { + "ignore_above": 1024, + "type": "keyword" + }, + "mtime": { + "type": "date" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "owner": { + "ignore_above": 1024, + "type": "keyword" + }, + "path": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "pe": { + "properties": { + "company": { + "ignore_above": 1024, + "type": "keyword" + }, + "description": { + "ignore_above": 1024, + "type": "keyword" + }, + "file_version": { + "ignore_above": 1024, + "type": "keyword" + }, + "original_file_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "product": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "size": { + "type": "long" + }, + "target_path": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "uid": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "geo": { + "properties": { + "city_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "continent_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "country_iso_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "country_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "location": { + "type": "geo_point" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "region_iso_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "region_name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "group": { + "properties": { + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "hash": { + "properties": { + "md5": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha1": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha256": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha512": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "host": { + "properties": { + "architecture": { + "ignore_above": 1024, + "type": "keyword" + }, + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "geo": { + "properties": { + "city_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "continent_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "country_iso_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "country_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "location": { + "type": "geo_point" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "region_iso_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "region_name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "ip": { + "type": "ip" + }, + "mac": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "os": { + "properties": { + "family": { + "ignore_above": 1024, + "type": "keyword" + }, + "full": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "kernel": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "platform": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "uptime": { + "type": "long" + }, + "user": { + "properties": { + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "email": { + "ignore_above": 1024, + "type": "keyword" + }, + "full_name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "group": { + "properties": { + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "http": { + "properties": { + "request": { + "properties": { + "body": { + "properties": { + "bytes": { + "type": "long" + }, + "content": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "bytes": { + "type": "long" + }, + "method": { + "ignore_above": 1024, + "type": "keyword" + }, + "referrer": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "response": { + "properties": { + "body": { + "properties": { + "bytes": { + "type": "long" + }, + "content": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "bytes": { + "type": "long" + }, + "status_code": { + "type": "long" + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "interface": { + "properties": { + "alias": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "labels": { + "type": "object" + }, + "log": { + "properties": { + "level": { + "ignore_above": 1024, + "type": "keyword" + }, + "logger": { + "ignore_above": 1024, + "type": "keyword" + }, + "origin": { + "properties": { + "file": { + "properties": { + "line": { + "type": "integer" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "function": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "original": { + "doc_values": false, + "ignore_above": 1024, + "index": false, + "type": "keyword" + }, + "syslog": { + "properties": { + "facility": { + "properties": { + "code": { + "type": "long" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "priority": { + "type": "long" + }, + "severity": { + "properties": { + "code": { + "type": "long" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + } + } + }, + "message": { + "norms": false, + "type": "text" + }, + "network": { + "properties": { + "application": { + "ignore_above": 1024, + "type": "keyword" + }, + "bytes": { + "type": "long" + }, + "community_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "direction": { + "ignore_above": 1024, + "type": "keyword" + }, + "forwarded_ip": { + "type": "ip" + }, + "iana_number": { + "ignore_above": 1024, + "type": "keyword" + }, + "inner": { + "properties": { + "vlan": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "packets": { + "type": "long" + }, + "protocol": { + "ignore_above": 1024, + "type": "keyword" + }, + "transport": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "vlan": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "observer": { + "properties": { + "egress": { + "properties": { + "interface": { + "properties": { + "alias": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "vlan": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "zone": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "geo": { + "properties": { + "city_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "continent_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "country_iso_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "country_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "location": { + "type": "geo_point" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "region_iso_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "region_name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, + "ingress": { + "properties": { + "interface": { + "properties": { + "alias": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "vlan": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "zone": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "ip": { + "type": "ip" + }, + "mac": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "os": { + "properties": { + "family": { + "ignore_above": 1024, + "type": "keyword" + }, + "full": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "kernel": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "platform": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "product": { + "ignore_above": 1024, + "type": "keyword" + }, + "serial_number": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "vendor": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "organization": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "os": { + "properties": { + "family": { + "ignore_above": 1024, + "type": "keyword" + }, + "full": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "kernel": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "platform": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "package": { + "properties": { + "architecture": { + "ignore_above": 1024, + "type": "keyword" + }, + "build_version": { + "ignore_above": 1024, + "type": "keyword" + }, + "checksum": { + "ignore_above": 1024, + "type": "keyword" + }, + "description": { + "ignore_above": 1024, + "type": "keyword" + }, + "install_scope": { + "ignore_above": 1024, + "type": "keyword" + }, + "installed": { + "type": "date" + }, + "license": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "path": { + "ignore_above": 1024, + "type": "keyword" + }, + "reference": { + "ignore_above": 1024, + "type": "keyword" + }, + "size": { + "type": "long" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "pe": { + "properties": { + "company": { + "ignore_above": 1024, + "type": "keyword" + }, + "description": { + "ignore_above": 1024, + "type": "keyword" + }, + "file_version": { + "ignore_above": 1024, + "type": "keyword" + }, + "original_file_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "product": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "process": { + "properties": { + "args": { + "ignore_above": 1024, + "type": "keyword" + }, + "args_count": { + "type": "long" + }, + "code_signature": { + "properties": { + "exists": { + "type": "boolean" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "subject_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "trusted": { + "type": "boolean" + }, + "valid": { + "type": "boolean" + } + } + }, + "command_line": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "entity_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "executable": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "exit_code": { + "type": "long" + }, + "hash": { + "properties": { + "md5": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha1": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha256": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha512": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "parent": { + "properties": { + "args": { + "ignore_above": 1024, + "type": "keyword" + }, + "args_count": { + "type": "long" + }, + "code_signature": { + "properties": { + "exists": { + "type": "boolean" + }, + "status": { + "ignore_above": 1024, + "type": "keyword" + }, + "subject_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "trusted": { + "type": "boolean" + }, + "valid": { + "type": "boolean" + } + } + }, + "command_line": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "entity_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "executable": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "exit_code": { + "type": "long" + }, + "hash": { + "properties": { + "md5": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha1": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha256": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha512": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "pgid": { + "type": "long" + }, + "pid": { + "type": "long" + }, + "ppid": { + "type": "long" + }, + "start": { + "type": "date" + }, + "thread": { + "properties": { + "id": { + "type": "long" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "title": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "uptime": { + "type": "long" + }, + "working_directory": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "pe": { + "properties": { + "company": { + "ignore_above": 1024, + "type": "keyword" + }, + "description": { + "ignore_above": 1024, + "type": "keyword" + }, + "file_version": { + "ignore_above": 1024, + "type": "keyword" + }, + "original_file_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "product": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "pgid": { + "type": "long" + }, + "pid": { + "type": "long" + }, + "ppid": { + "type": "long" + }, + "start": { + "type": "date" + }, + "thread": { + "properties": { + "id": { + "type": "long" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "title": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "uptime": { + "type": "long" + }, + "working_directory": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "registry": { + "properties": { + "data": { + "properties": { + "bytes": { + "ignore_above": 1024, + "type": "keyword" + }, + "strings": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "hive": { + "ignore_above": 1024, + "type": "keyword" + }, + "key": { + "ignore_above": 1024, + "type": "keyword" + }, + "path": { + "ignore_above": 1024, + "type": "keyword" + }, + "value": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "related": { + "properties": { + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "ip": { + "type": "ip" + }, + "user": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "rule": { + "properties": { + "author": { + "ignore_above": 1024, + "type": "keyword" + }, + "category": { + "ignore_above": 1024, + "type": "keyword" + }, + "description": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "license": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "reference": { + "ignore_above": 1024, + "type": "keyword" + }, + "ruleset": { + "ignore_above": 1024, + "type": "keyword" + }, + "uuid": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "server": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "as": { + "properties": { + "number": { + "type": "long" + }, + "organization": { + "properties": { + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "bytes": { + "type": "long" + }, + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "geo": { + "properties": { + "city_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "continent_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "country_iso_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "country_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "location": { + "type": "geo_point" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "region_iso_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "region_name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "ip": { + "type": "ip" + }, + "mac": { + "ignore_above": 1024, + "type": "keyword" + }, + "nat": { + "properties": { + "ip": { + "type": "ip" + }, + "port": { + "type": "long" + } + } + }, + "packets": { + "type": "long" + }, + "port": { + "type": "long" + }, + "registered_domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "top_level_domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "user": { + "properties": { + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "email": { + "ignore_above": 1024, + "type": "keyword" + }, + "full_name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "group": { + "properties": { + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "service": { + "properties": { + "ephemeral_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "node": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "state": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "signal": { + "properties": { + "_meta": { + "properties": { + "version": { + "type": "long" + } + } + }, + "ancestors": { + "properties": { + "depth": { + "type": "long" + }, + "id": { + "type": "keyword" + }, + "index": { + "type": "keyword" + }, + "rule": { + "type": "keyword" + }, + "type": { + "type": "keyword" + } + } + }, + "depth": { + "type": "integer" + }, + "group": { + "properties": { + "id": { + "type": "keyword" + }, + "index": { + "type": "integer" + } + } + }, + "original_event": { + "properties": { + "action": { + "type": "keyword" + }, + "category": { + "type": "keyword" + }, + "code": { + "type": "keyword" + }, + "created": { + "type": "date" + }, + "dataset": { + "type": "keyword" + }, + "duration": { + "type": "long" + }, + "end": { + "type": "date" + }, + "hash": { + "type": "keyword" + }, + "id": { + "type": "keyword" + }, + "kind": { + "type": "keyword" + }, + "module": { + "type": "keyword" + }, + "original": { + "doc_values": false, + "index": false, + "type": "keyword" + }, + "outcome": { + "type": "keyword" + }, + "provider": { + "type": "keyword" + }, + "risk_score": { + "type": "float" + }, + "risk_score_norm": { + "type": "float" + }, + "sequence": { + "type": "long" + }, + "severity": { + "type": "long" + }, + "start": { + "type": "date" + }, + "timezone": { + "type": "keyword" + }, + "type": { + "type": "keyword" + } + } + }, + "original_signal": { + "dynamic": "false", + "enabled": false, + "type": "object" + }, + "original_time": { + "type": "date" + }, + "parent": { + "properties": { + "depth": { + "type": "long" + }, + "id": { + "type": "keyword" + }, + "index": { + "type": "keyword" + }, + "rule": { + "type": "keyword" + }, + "type": { + "type": "keyword" + } + } + }, + "parents": { + "properties": { + "depth": { + "type": "long" + }, + "id": { + "type": "keyword" + }, + "index": { + "type": "keyword" + }, + "rule": { + "type": "keyword" + }, + "type": { + "type": "keyword" + } + } + }, + "rule": { + "properties": { + "author": { + "type": "keyword" + }, + "building_block_type": { + "type": "keyword" + }, + "created_at": { + "type": "date" + }, + "created_by": { + "type": "keyword" + }, + "description": { + "type": "keyword" + }, + "enabled": { + "type": "keyword" + }, + "false_positives": { + "type": "keyword" + }, + "filters": { + "type": "object" + }, + "from": { + "type": "keyword" + }, + "id": { + "type": "keyword" + }, + "immutable": { + "type": "keyword" + }, + "index": { + "type": "keyword" + }, + "interval": { + "type": "keyword" + }, + "language": { + "type": "keyword" + }, + "license": { + "type": "keyword" + }, + "max_signals": { + "type": "keyword" + }, + "name": { + "type": "keyword" + }, + "note": { + "type": "text" + }, + "output_index": { + "type": "keyword" + }, + "query": { + "type": "keyword" + }, + "references": { + "type": "keyword" + }, + "risk_score": { + "type": "float" + }, + "risk_score_mapping": { + "properties": { + "field": { + "type": "keyword" + }, + "operator": { + "type": "keyword" + }, + "value": { + "type": "keyword" + } + } + }, + "rule_id": { + "type": "keyword" + }, + "rule_name_override": { + "type": "keyword" + }, + "saved_id": { + "type": "keyword" + }, + "severity": { + "type": "keyword" + }, + "severity_mapping": { + "properties": { + "field": { + "type": "keyword" + }, + "operator": { + "type": "keyword" + }, + "severity": { + "type": "keyword" + }, + "value": { + "type": "keyword" + } + } + }, + "size": { + "type": "keyword" + }, + "tags": { + "type": "keyword" + }, + "threat": { + "properties": { + "framework": { + "type": "keyword" + }, + "tactic": { + "properties": { + "id": { + "type": "keyword" + }, + "name": { + "type": "keyword" + }, + "reference": { + "type": "keyword" + } + } + }, + "technique": { + "properties": { + "id": { + "type": "keyword" + }, + "name": { + "type": "keyword" + }, + "reference": { + "type": "keyword" + }, + "subtechnique": { + "properties": { + "id": { + "type": "keyword" + }, + "name": { + "type": "keyword" + }, + "reference": { + "type": "keyword" + } + } + } + } + } + } + }, + "threshold": { + "properties": { + "field": { + "type": "keyword" + }, + "value": { + "type": "float" + } + } + }, + "timeline_id": { + "type": "keyword" + }, + "timeline_title": { + "type": "keyword" + }, + "timestamp_override": { + "type": "keyword" + }, + "to": { + "type": "keyword" + }, + "type": { + "type": "keyword" + }, + "updated_at": { + "type": "date" + }, + "updated_by": { + "type": "keyword" + }, + "version": { + "type": "keyword" + } + } + }, + "status": { + "type": "keyword" + }, + "threshold_count": { + "type": "float" + }, + "threshold_result": { + "properties": { + "count": { + "type": "long" + }, + "value": { + "type": "keyword" + } + } + } + } + }, + "source": { + "properties": { + "address": { + "ignore_above": 1024, + "type": "keyword" + }, + "as": { + "properties": { + "number": { + "type": "long" + }, + "organization": { + "properties": { + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "bytes": { + "type": "long" + }, + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "geo": { + "properties": { + "city_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "continent_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "country_iso_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "country_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "location": { + "type": "geo_point" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "region_iso_code": { + "ignore_above": 1024, + "type": "keyword" + }, + "region_name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "ip": { + "type": "ip" + }, + "mac": { + "ignore_above": 1024, + "type": "keyword" + }, + "nat": { + "properties": { + "ip": { + "type": "ip" + }, + "port": { + "type": "long" + } + } + }, + "packets": { + "type": "long" + }, + "port": { + "type": "long" + }, + "registered_domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "top_level_domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "user": { + "properties": { + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "email": { + "ignore_above": 1024, + "type": "keyword" + }, + "full_name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "group": { + "properties": { + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "tags": { + "ignore_above": 1024, + "type": "keyword" + }, + "threat": { + "properties": { + "framework": { + "ignore_above": 1024, + "type": "keyword" + }, + "tactic": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "reference": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "technique": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "reference": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "tls": { + "properties": { + "cipher": { + "ignore_above": 1024, + "type": "keyword" + }, + "client": { + "properties": { + "certificate": { + "ignore_above": 1024, + "type": "keyword" + }, + "certificate_chain": { + "ignore_above": 1024, + "type": "keyword" + }, + "hash": { + "properties": { + "md5": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha1": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha256": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "issuer": { + "ignore_above": 1024, + "type": "keyword" + }, + "ja3": { + "ignore_above": 1024, + "type": "keyword" + }, + "not_after": { + "type": "date" + }, + "not_before": { + "type": "date" + }, + "server_name": { + "ignore_above": 1024, + "type": "keyword" + }, + "subject": { + "ignore_above": 1024, + "type": "keyword" + }, + "supported_ciphers": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "curve": { + "ignore_above": 1024, + "type": "keyword" + }, + "established": { + "type": "boolean" + }, + "next_protocol": { + "ignore_above": 1024, + "type": "keyword" + }, + "resumed": { + "type": "boolean" + }, + "server": { + "properties": { + "certificate": { + "ignore_above": 1024, + "type": "keyword" + }, + "certificate_chain": { + "ignore_above": 1024, + "type": "keyword" + }, + "hash": { + "properties": { + "md5": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha1": { + "ignore_above": 1024, + "type": "keyword" + }, + "sha256": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "issuer": { + "ignore_above": 1024, + "type": "keyword" + }, + "ja3s": { + "ignore_above": 1024, + "type": "keyword" + }, + "not_after": { + "type": "date" + }, + "not_before": { + "type": "date" + }, + "subject": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + }, + "version_protocol": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "trace": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "transaction": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "url": { + "properties": { + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "extension": { + "ignore_above": 1024, + "type": "keyword" + }, + "fragment": { + "ignore_above": 1024, + "type": "keyword" + }, + "full": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "original": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "password": { + "ignore_above": 1024, + "type": "keyword" + }, + "path": { + "ignore_above": 1024, + "type": "keyword" + }, + "port": { + "type": "long" + }, + "query": { + "ignore_above": 1024, + "type": "keyword" + }, + "registered_domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "scheme": { + "ignore_above": 1024, + "type": "keyword" + }, + "top_level_domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "username": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "user": { + "properties": { + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "email": { + "ignore_above": 1024, + "type": "keyword" + }, + "full_name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "group": { + "properties": { + "domain": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "hash": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "user_agent": { + "properties": { + "device": { + "properties": { + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + }, + "original": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "os": { + "properties": { + "family": { + "ignore_above": 1024, + "type": "keyword" + }, + "full": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "kernel": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "platform": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "vlan": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "name": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "vulnerability": { + "properties": { + "category": { + "ignore_above": 1024, + "type": "keyword" + }, + "classification": { + "ignore_above": 1024, + "type": "keyword" + }, + "description": { + "fields": { + "text": { + "norms": false, + "type": "text" + } + }, + "ignore_above": 1024, + "type": "keyword" + }, + "enumeration": { + "ignore_above": 1024, + "type": "keyword" + }, + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "reference": { + "ignore_above": 1024, + "type": "keyword" + }, + "report_id": { + "ignore_above": 1024, + "type": "keyword" + }, + "scanner": { + "properties": { + "vendor": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "score": { + "properties": { + "base": { + "type": "float" + }, + "environmental": { + "type": "float" + }, + "temporal": { + "type": "float" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "severity": { + "ignore_above": 1024, + "type": "keyword" + } + } + } + } + }, + "settings": { + "index": { + "lifecycle": { + "name": ".siem-signals-default", + "rollover_alias": ".siem-signals-default" + }, + "mapping": { + "total_fields": { + "limit": "10000" + } + }, + "number_of_replicas": "1", + "number_of_shards": "1" + } + } + } +} diff --git a/x-pack/test/functional/page_objects/graph_page.ts b/x-pack/test/functional/page_objects/graph_page.ts index f3b12cceadcb6..28d72ef844615 100644 --- a/x-pack/test/functional/page_objects/graph_page.ts +++ b/x-pack/test/functional/page_objects/graph_page.ts @@ -26,6 +26,7 @@ export function GraphPageProvider({ getService, getPageObjects }: FtrProviderCon const testSubjects = getService('testSubjects'); const PageObjects = getPageObjects(['common', 'header']); const retry = getService('retry'); + const browser = getService('browser'); class GraphPage { async selectIndexPattern(pattern: string) { @@ -124,9 +125,12 @@ export function GraphPageProvider({ getService, getPageObjects }: FtrProviderCon async getGraphObjects() { await this.stopLayout(); - const graphElements = await find.allByCssSelector( - '#graphSvg line, #graphSvg circle, #graphSvg text.gphNode__label' - ); + // read node labels directly from DOM because getVisibleText is not reliable for the way the graph is rendered + const nodeNames: string[] = await browser.execute(` + const elements = document.querySelectorAll('#graphSvg text.gphNode__label'); + return [...elements].map(element => element.innerHTML); + `); + const graphElements = await find.allByCssSelector('#graphSvg line, #graphSvg circle'); const nodes: Node[] = []; const nodePositionMap: Record = {}; const edges: Edge[] = []; @@ -136,15 +140,10 @@ export function GraphPageProvider({ getService, getPageObjects }: FtrProviderCon const tagName: string = await element.getTagName(); // check the position of the circle element if (tagName === 'circle') { - nodes.push({ circle: element, label: '' }); + nodes.push({ circle: element, label: nodeNames[nodes.length] }); const position = await this.getCirclePosition(element); nodePositionMap[position] = nodes.length - 1; } - // get the label for the node from the text element - if (tagName === 'text') { - const text = await element.getVisibleText(); - nodes[nodes.length - 1].label = text; - } } // find all edges diff --git a/x-pack/test/functional/page_objects/index_lifecycle_management_page.ts b/x-pack/test/functional/page_objects/index_lifecycle_management_page.ts index ddf46926f122a..f47e79260e61c 100644 --- a/x-pack/test/functional/page_objects/index_lifecycle_management_page.ts +++ b/x-pack/test/functional/page_objects/index_lifecycle_management_page.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - +import { map as mapAsync } from 'bluebird'; import { FtrProviderContext } from '../ftr_provider_context'; export function IndexLifecycleManagementPageProvider({ getService }: FtrProviderContext) { @@ -50,8 +50,34 @@ export function IndexLifecycleManagementPageProvider({ getService }: FtrProvider coldEnabled: boolean = false, deletePhaseEnabled: boolean = false ) { + await testSubjects.click('createPolicyButton'); await this.fillNewPolicyForm(policyName, warmEnabled, coldEnabled, deletePhaseEnabled); await this.saveNewPolicy(); }, + + async getPolicyList() { + const policies = await testSubjects.findAll('policyTableRow'); + return mapAsync(policies, async (policy) => { + const policyNameElement = await policy.findByTestSubject('policyTableCell-name'); + const policyLinkedIndicesElement = await policy.findByTestSubject( + 'policyTableCell-linkedIndices' + ); + const policyVersionElement = await policy.findByTestSubject('policyTableCell-version'); + const policyModifiedDateElement = await policy.findByTestSubject( + 'policyTableCell-modified_date' + ); + const policyActionsButtonElement = await policy.findByTestSubject( + 'policyActionsContextMenuButton' + ); + + return { + name: await policyNameElement.getVisibleText(), + linkedIndices: await policyLinkedIndicesElement.getVisibleText(), + version: await policyVersionElement.getVisibleText(), + modifiedDate: await policyModifiedDateElement.getVisibleText(), + actionsButton: policyActionsButtonElement, + }; + }); + }, }; } diff --git a/x-pack/test/functional/page_objects/lens_page.ts b/x-pack/test/functional/page_objects/lens_page.ts index 2ecf6f3163d7e..48bede9754c58 100644 --- a/x-pack/test/functional/page_objects/lens_page.ts +++ b/x-pack/test/functional/page_objects/lens_page.ts @@ -19,6 +19,7 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont const browser = getService('browser'); const PageObjects = getPageObjects([ + 'common', 'header', 'timePicker', 'common', @@ -753,5 +754,23 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont const focusedElementText = await fieldAncestor.getVisibleText(); expect(focusedElementText).to.eql(name); }, + + async waitForVisualization() { + async function getRenderingCount() { + const visualizationContainer = await testSubjects.find('lnsVisualizationContainer'); + const renderingCount = await visualizationContainer.getAttribute('data-rendering-count'); + return Number(renderingCount); + } + await PageObjects.header.waitUntilLoadingHasFinished(); + await retry.waitFor('rendering count to stabilize', async () => { + const firstCount = await getRenderingCount(); + + await PageObjects.common.sleep(1000); + + const secondCount = await getRenderingCount(); + + return firstCount === secondCount; + }); + }, }); } diff --git a/x-pack/test/functional/services/ml/api.ts b/x-pack/test/functional/services/ml/api.ts index f7c7ae1b9a7d4..c9cfe1fee4ef9 100644 --- a/x-pack/test/functional/services/ml/api.ts +++ b/x-pack/test/functional/services/ml/api.ts @@ -295,11 +295,12 @@ export function MachineLearningAPIProvider({ getService }: FtrProviderContext) { async waitForAnalyticsState( analyticsId: string, - expectedAnalyticsState: DataFrameTaskStateType + expectedAnalyticsState: DataFrameTaskStateType, + timeoutInMs: number = 2 * 60 * 1000 ) { await retry.waitForWithTimeout( `analytics state to be ${expectedAnalyticsState}`, - 2 * 60 * 1000, + timeoutInMs, async () => { const state = await this.getAnalyticsState(analyticsId); if (state === expectedAnalyticsState) { @@ -720,6 +721,18 @@ export function MachineLearningAPIProvider({ getService }: FtrProviderContext) { log.debug('> DFA job created.'); }, + async deleteDataFrameAnalyticsJobES(analyticsId: string) { + log.debug(`Deleting data frame analytics job with id '${analyticsId}' ...`); + + await esSupertest + .delete(`/_ml/data_frame/analytics/${analyticsId}`) + .query({ force: true }) + .expect(200); + + await this.waitForDataFrameAnalyticsJobNotToExist(analyticsId); + log.debug('> DFA job deleted.'); + }, + async getADJobRecordCount(jobId: string): Promise { const jobStats = await this.getADJobStats(jobId); diff --git a/x-pack/test/functional/services/ml/common_config.ts b/x-pack/test/functional/services/ml/common_config.ts index b194bb25995a1..a16c0b88de900 100644 --- a/x-pack/test/functional/services/ml/common_config.ts +++ b/x-pack/test/functional/services/ml/common_config.ts @@ -57,6 +57,30 @@ const FQ_DATAFEED_CONFIG: Datafeed = { query: { bool: { must: [{ match_all: {} }] } }, }; +const BM_CLASSIFICATION_CONFIG: DeepPartial = { + id: '', + description: 'Classification job based on the bank marketing dataset', + source: { + index: ['ft_bank_marketing'], + query: { + match_all: {}, + }, + }, + analysis: { + classification: { + dependent_variable: 'y', + training_percent: 80, + }, + }, + analyzed_fields: { + includes: [], + excludes: [], + }, + model_memory_limit: '80mb', + allow_lazy_start: false, + max_num_threads: 1, +}; + const IHP_OUTLIER_DETECTION_CONFIG: DeepPartial = { id: '', description: 'Outlier detection job based on the Iowa house prices dataset', @@ -109,5 +133,14 @@ export function MachineLearningCommonConfigsProvider({}: FtrProviderContext) { }; return dfaConfig as DataFrameAnalyticsConfig; }, + + getDFABmClassificationJobConfig(dfaId: string): DataFrameAnalyticsConfig { + const dfaConfig = { + ...BM_CLASSIFICATION_CONFIG, + id: dfaId, + dest: { ...BM_CLASSIFICATION_CONFIG.dest, index: `user-${dfaId}` }, + }; + return dfaConfig as DataFrameAnalyticsConfig; + }, }; } diff --git a/x-pack/test/lists_api_integration/security_and_spaces/tests/delete_lists.ts b/x-pack/test/lists_api_integration/security_and_spaces/tests/delete_lists.ts index adba0a2f626e1..4ce3c7f0e5661 100644 --- a/x-pack/test/lists_api_integration/security_and_spaces/tests/delete_lists.ts +++ b/x-pack/test/lists_api_integration/security_and_spaces/tests/delete_lists.ts @@ -63,6 +63,28 @@ export default ({ getService }: FtrProviderContext) => { expect(bodyToCompare).to.eql(getListResponseMockWithoutAutoGeneratedValues()); }); + it('should delete a single list with a list id containing non-alphanumeric characters', async () => { + // create a list + const id = `some""-list-id"(1)`; + await supertest + .post(LIST_URL) + .set('kbn-xsrf', 'true') + .send({ + ...getCreateMinimalListSchemaMock(), + id, + }) + .expect(200); + + // delete the list by its list id + const { body } = await supertest + .delete(`${LIST_URL}?id=${id}`) + .set('kbn-xsrf', 'true') + .expect(200); + + const bodyToCompare = removeListServerGeneratedProperties(body); + expect(bodyToCompare).to.eql(getListResponseMockWithoutAutoGeneratedValues()); + }); + it('should delete a single list using an auto generated id', async () => { // add a list const { body: bodyWithCreatedList } = await supertest diff --git a/x-pack/test/upgrade/apps/canvas/canvas_smoke_tests.ts b/x-pack/test/upgrade/apps/canvas/canvas_smoke_tests.ts new file mode 100644 index 0000000000000..c7db9127e01bd --- /dev/null +++ b/x-pack/test/upgrade/apps/canvas/canvas_smoke_tests.ts @@ -0,0 +1,62 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../../ftr_provider_context'; + +export default function ({ getPageObjects, getService }: FtrProviderContext) { + const retry = getService('retry'); + const PageObjects = getPageObjects(['common', 'header']); + const testSubjects = getService('testSubjects'); + + describe('canvas smoke tests', function describeIndexTests() { + const spaces = [ + { space: 'default', basePath: '' }, + { space: 'automation', basePath: 's/automation' }, + ]; + + const canvasTests = [ + { + name: 'flights', + id: 'workpad-a474e74b-aedc-47c3-894a-db77e62c41e0/page/1', + numElements: 35, + }, + { name: 'logs', id: 'workpad-5563cc40-5760-4afe-bf33-9da72fac53b7/page/1', numElements: 57 }, + { + name: 'ecommerce', + id: 'workpad-e08b9bdb-ec14-4339-94c4-063bddfd610e/page/1', + numElements: 16, + }, + { + name: 'ecommerce', + id: 'workpad-e08b9bdb-ec14-4339-94c4-063bddfd610e/page/2', + numElements: 9, + }, + ]; + + spaces.forEach(({ space, basePath }) => { + canvasTests.forEach(({ name, id, numElements }) => { + describe('space ' + space + ' name ' + name, () => { + beforeEach(async () => { + await PageObjects.common.navigateToActualUrl('canvas', 'workpad/' + id, { + basePath, + }); + await PageObjects.header.waitUntilLoadingHasFinished(); + }); + it('renders elements on workpad', async () => { + await retry.try(async () => { + const elements = await testSubjects.findAll( + 'canvasWorkpadPage > canvasWorkpadPageElementContent' + ); + expect(elements).to.have.length(numElements); + }); + }); + }); + }); + }); + }); +} diff --git a/x-pack/test/upgrade/apps/canvas/index.js b/x-pack/test/upgrade/apps/canvas/index.js new file mode 100644 index 0000000000000..0ecc2e98ea67a --- /dev/null +++ b/x-pack/test/upgrade/apps/canvas/index.js @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export default ({ loadTestFile }) => { + describe('upgrade', function () { + loadTestFile(require.resolve('./canvas_smoke_tests')); + }); +}; diff --git a/x-pack/test/upgrade/apps/dashboard/dashboard_smoke_tests.ts b/x-pack/test/upgrade/apps/dashboard/dashboard_smoke_tests.ts new file mode 100644 index 0000000000000..9efc9224b2438 --- /dev/null +++ b/x-pack/test/upgrade/apps/dashboard/dashboard_smoke_tests.ts @@ -0,0 +1,81 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import expect from '@kbn/expect'; +import moment from 'moment'; +import { FtrProviderContext } from '../../ftr_provider_context'; + +export default function ({ getPageObjects, getService }: FtrProviderContext) { + const find = getService('find'); + const log = getService('log'); + const pieChart = getService('pieChart'); + const renderable = getService('renderable'); + const dashboardExpect = getService('dashboardExpect'); + const PageObjects = getPageObjects(['common', 'header', 'home', 'dashboard', 'timePicker']); + + describe('dashboard smoke tests', function describeIndexTests() { + const spaces = [ + { space: 'default', basePath: '' }, + { space: 'automation', basePath: 's/automation' }, + ]; + + const dashboardTests = [ + { name: 'flights', numPanels: 19 }, + { name: 'logs', numPanels: 11 }, + { name: 'ecommerce', numPanels: 12 }, + ]; + + spaces.forEach(({ space, basePath }) => { + describe('space ' + space, () => { + beforeEach(async () => { + await PageObjects.common.navigateToActualUrl('home', '/tutorial_directory/sampleData', { + basePath, + }); + await PageObjects.header.waitUntilLoadingHasFinished(); + }); + dashboardTests.forEach(({ name, numPanels }) => { + it('should launch sample ' + name + ' data set dashboard', async () => { + await PageObjects.home.launchSampleDashboard(name); + await PageObjects.header.waitUntilLoadingHasFinished(); + await renderable.waitForRender(); + const todayYearMonthDay = moment().format('MMM D, YYYY'); + const fromTime = `${todayYearMonthDay} @ 00:00:00.000`; + const toTime = `${todayYearMonthDay} @ 23:59:59.999`; + await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime); + const panelCount = await PageObjects.dashboard.getPanelCount(); + expect(panelCount).to.be(numPanels); + }); + }); + it('should render visualizations', async () => { + await PageObjects.home.launchSampleDashboard('flights'); + await PageObjects.header.waitUntilLoadingHasFinished(); + await renderable.waitForRender(); + log.debug('Checking pie charts rendered'); + await pieChart.expectPieSliceCount(4); + // https://github.com/elastic/kibana/issues/92887 + // log.debug('Checking area, bar and heatmap charts rendered'); + // await dashboardExpect.seriesElementCount(15); + log.debug('Checking saved searches rendered'); + await dashboardExpect.savedSearchRowCount(50); + log.debug('Checking input controls rendered'); + await dashboardExpect.inputControlItemCount(3); + log.debug('Checking tag cloud rendered'); + await dashboardExpect.tagCloudWithValuesFound([ + 'Sunny', + 'Rain', + 'Clear', + 'Cloudy', + 'Hail', + ]); + log.debug('Checking vega chart rendered'); + const tsvb = await find.existsByCssSelector('.vgaVis__view'); + expect(tsvb).to.be(true); + }); + }); + }); + }); +} diff --git a/x-pack/test/upgrade/apps/dashboard/index.js b/x-pack/test/upgrade/apps/dashboard/index.js new file mode 100644 index 0000000000000..b12d1270f79f9 --- /dev/null +++ b/x-pack/test/upgrade/apps/dashboard/index.js @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export default ({ loadTestFile }) => { + describe('upgrade', function () { + loadTestFile(require.resolve('./dashboard_smoke_tests')); + }); +}; diff --git a/x-pack/test/upgrade/apps/maps/index.js b/x-pack/test/upgrade/apps/maps/index.js new file mode 100644 index 0000000000000..57d175a62ceb3 --- /dev/null +++ b/x-pack/test/upgrade/apps/maps/index.js @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export default ({ loadTestFile }) => { + describe('upgrade', function () { + loadTestFile(require.resolve('./maps_smoke_tests')); + }); +}; diff --git a/x-pack/test/upgrade/apps/maps/maps_smoke_tests.ts b/x-pack/test/upgrade/apps/maps/maps_smoke_tests.ts new file mode 100644 index 0000000000000..7ec83aad26641 --- /dev/null +++ b/x-pack/test/upgrade/apps/maps/maps_smoke_tests.ts @@ -0,0 +1,174 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import expect from '@kbn/expect'; + +import { FtrProviderContext } from '../../ftr_provider_context'; +import { UI_SETTINGS } from '../../../../../src/plugins/data/common'; + +export default function ({ + getPageObjects, + getService, + updateBaselines, +}: FtrProviderContext & { updateBaselines: boolean }) { + const PageObjects = getPageObjects(['common', 'maps', 'header', 'home', 'timePicker']); + const screenshot = getService('screenshots'); + const testSubjects = getService('testSubjects'); + const kibanaServer = getService('kibanaServer'); + const SAMPLE_DATA_RANGE = `[ + { + "from": "now-30d", + "to": "now+40d", + "display": "sample data range" + }, + { + "from": "now/d", + "to": "now/d", + "display": "Today" + }, + { + "from": "now/w", + "to": "now/w", + "display": "This week" + }, + { + "from": "now-15m", + "to": "now", + "display": "Last 15 minutes" + }, + { + "from": "now-30m", + "to": "now", + "display": "Last 30 minutes" + }, + { + "from": "now-1h", + "to": "now", + "display": "Last 1 hour" + }, + { + "from": "now-24h", + "to": "now", + "display": "Last 24 hours" + }, + { + "from": "now-7d", + "to": "now", + "display": "Last 7 days" + }, + { + "from": "now-30d", + "to": "now", + "display": "Last 30 days" + }, + { + "from": "now-90d", + "to": "now", + "display": "Last 90 days" + }, + { + "from": "now-1y", + "to": "now", + "display": "Last 1 year" + } + ]`; + + // Only update the baseline images from Jenkins session images after comparing them + // These tests might fail locally because of scaling factors and resolution. + + describe('maps smoke tests', function describeIndexTests() { + const spaces = [ + { space: 'default', basePath: '' }, + { space: 'automation', basePath: 's/automation' }, + ]; + + before(async () => { + await kibanaServer.uiSettings.update({ + [UI_SETTINGS.TIMEPICKER_QUICK_RANGES]: SAMPLE_DATA_RANGE, + }); + }); + + spaces.forEach(({ space, basePath }) => { + describe('space ' + space + ' ecommerce', () => { + before(async () => { + await PageObjects.common.navigateToActualUrl('home', '/tutorial_directory/sampleData', { + basePath, + }); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.home.addSampleDataSet('ecommerce'); + await PageObjects.maps.loadSavedMap('[eCommerce] Orders by Country'); + await PageObjects.maps.toggleLayerVisibility('Road map'); + await PageObjects.maps.toggleLayerVisibility('United Kingdom'); + await PageObjects.maps.toggleLayerVisibility('France'); + await PageObjects.maps.toggleLayerVisibility('United States'); + await PageObjects.maps.toggleLayerVisibility('World Countries'); + await PageObjects.timePicker.setCommonlyUsedTime('sample_data range'); + await PageObjects.maps.enterFullScreen(); + await PageObjects.maps.closeLegend(); + const mapContainerElement = await testSubjects.find('mapContainer'); + await mapContainerElement.moveMouseTo({ xOffset: 0, yOffset: 0 }); + }); + it('should load layers', async () => { + const percentDifference = await screenshot.compareAgainstBaseline( + 'ecommerce_map', + updateBaselines + ); + expect(percentDifference).to.be.lessThan(0.02); + }); + }); + + describe('space ' + space + ' flights', () => { + before(async () => { + await PageObjects.common.navigateToActualUrl('home', '/tutorial_directory/sampleData', { + basePath, + }); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.home.addSampleDataSet('flights'); + await PageObjects.maps.loadSavedMap('[Flights] Origin and Destination Flight Time'); + await PageObjects.maps.toggleLayerVisibility('Road map'); + await PageObjects.timePicker.setCommonlyUsedTime('sample_data range'); + await PageObjects.maps.enterFullScreen(); + await PageObjects.maps.closeLegend(); + const mapContainerElement = await testSubjects.find('mapContainer'); + await mapContainerElement.moveMouseTo({ xOffset: 0, yOffset: 0 }); + }); + it('should load saved object and display layers', async () => { + const percentDifference = await screenshot.compareAgainstBaseline( + 'flights_map', + updateBaselines + ); + expect(percentDifference).to.be.lessThan(0.02); + }); + }); + + describe('space ' + space + ' web logs', () => { + before(async () => { + await PageObjects.common.navigateToActualUrl('home', '/tutorial_directory/sampleData', { + basePath, + }); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.home.addSampleDataSet('logs'); + await PageObjects.maps.loadSavedMap('[Logs] Total Requests and Bytes'); + await PageObjects.maps.toggleLayerVisibility('Road map'); + await PageObjects.maps.toggleLayerVisibility('Total Requests by Country'); + await PageObjects.timePicker.setCommonlyUsedTime('sample_data range'); + await PageObjects.maps.enterFullScreen(); + await PageObjects.maps.closeLegend(); + const mapContainerElement = await testSubjects.find('mapContainer'); + await mapContainerElement.moveMouseTo({ xOffset: 0, yOffset: 0 }); + }); + it('should load saved object and display layers', async () => { + const percentDifference = await screenshot.compareAgainstBaseline( + 'web_logs_map', + updateBaselines + ); + expect(percentDifference).to.be.lessThan(0.02); + }); + }); + }); + }); +} diff --git a/x-pack/test/upgrade/apps/reporting/index.js b/x-pack/test/upgrade/apps/reporting/index.js new file mode 100644 index 0000000000000..5bd5081a3568c --- /dev/null +++ b/x-pack/test/upgrade/apps/reporting/index.js @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export default ({ loadTestFile }) => { + describe('upgrade', function () { + loadTestFile(require.resolve('./reporting_smoke_tests')); + }); +}; diff --git a/x-pack/test/upgrade/apps/reporting/reporting_smoke_tests.ts b/x-pack/test/upgrade/apps/reporting/reporting_smoke_tests.ts new file mode 100644 index 0000000000000..41b5aab35c84d --- /dev/null +++ b/x-pack/test/upgrade/apps/reporting/reporting_smoke_tests.ts @@ -0,0 +1,89 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import expect from '@kbn/expect'; +import { parse } from 'url'; +import { FtrProviderContext } from '../../ftr_provider_context'; +import { ReportingUsageStats } from '../../reporting_services'; + +interface UsageStats { + reporting: ReportingUsageStats; +} + +export default function ({ getService, getPageObjects }: FtrProviderContext) { + const reportingAPI = getService('reportingAPI'); + const usageAPI = getService('usageAPI'); + const find = getService('find'); + const browser = getService('browser'); + const PageObjects = getPageObjects(['common', 'header', 'home', 'dashboard', 'share']); + const testSubjects = getService('testSubjects'); + + const spaces = [ + { space: 'default', basePath: '' }, + { space: 'automation', basePath: 's/automation' }, + ]; + + const reportingTests = [ + { name: 'flights', type: 'pdf', link: 'PDF Reports' }, + { name: 'flights', type: 'pdf_optimize', link: 'PDF Reports' }, + { name: 'flights', type: 'png', link: 'PNG Reports' }, + { name: 'logs', type: 'pdf', link: 'PDF Reports' }, + { name: 'logs', type: 'pdf_optimize', link: 'PDF Reports' }, + { name: 'logs', type: 'png', link: 'PNG Reports' }, + { name: 'ecommerce', type: 'pdf', link: 'PDF Reports' }, + { name: 'ecommerce', type: 'pdf_optimize', link: 'PDF Reports' }, + { name: 'ecommerce', type: 'png', link: 'PNG Reports' }, + ]; + + describe('reporting smoke tests', () => { + let completedReportCount: number; + let usage: UsageStats; + describe('initial state', () => { + before(async () => { + usage = (await usageAPI.getUsageStats()) as UsageStats; + }); + + it('shows reporting as available and enabled', async () => { + expect(usage.reporting.available).to.be(true); + expect(usage.reporting.enabled).to.be(true); + }); + }); + spaces.forEach(({ space, basePath }) => { + describe('generate report space ' + space, () => { + before(async () => { + usage = (await usageAPI.getUsageStats()) as UsageStats; + completedReportCount = reportingAPI.getCompletedReportCount(usage); + }); + beforeEach(async () => { + await PageObjects.common.navigateToActualUrl('home', '/tutorial_directory/sampleData', { + basePath, + }); + await PageObjects.header.waitUntilLoadingHasFinished(); + }); + reportingTests.forEach(({ name, type, link }) => { + it('name ' + name + ' type ' + type, async () => { + await PageObjects.home.launchSampleDashboard(name); + await PageObjects.share.openShareMenuItem(link); + if (type === 'pdf_optimize') { + await testSubjects.click('usePrintLayout'); + } + const postUrl = await find.byXPath(`//button[descendant::*[text()='Copy POST URL']]`); + await postUrl.click(); + const url = await browser.getClipboardValue(); + await reportingAPI.expectAllJobsToFinishSuccessfully( + await Promise.all([ + reportingAPI.postJob(parse(url).pathname + '?' + parse(url).query), + ]) + ); + usage = (await usageAPI.getUsageStats()) as UsageStats; + reportingAPI.expectCompletedReportCount(usage, completedReportCount + 1); + }); + }); + }); + }); + }); +} diff --git a/x-pack/test/upgrade/config.ts b/x-pack/test/upgrade/config.ts new file mode 100644 index 0000000000000..86555335ba47b --- /dev/null +++ b/x-pack/test/upgrade/config.ts @@ -0,0 +1,42 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { FtrConfigProviderContext } from '@kbn/test/types/ftr'; +import { pageObjects } from './page_objects'; +import { ReportingAPIProvider } from './reporting_services'; + +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const apiConfig = await readConfigFile(require.resolve('../api_integration/config')); + const functionalConfig = await readConfigFile(require.resolve('../functional/config')); + + return { + ...functionalConfig.getAll(), + + testFiles: [ + require.resolve('./apps/canvas'), + require.resolve('./apps/dashboard'), + require.resolve('./apps/maps'), + require.resolve('./apps/reporting'), + ], + + pageObjects, + + services: { + ...apiConfig.get('services'), + ...functionalConfig.get('services'), + reportingAPI: ReportingAPIProvider, + }, + + junit: { + reportName: 'Upgrade Tests', + }, + + security: { + disableTestUser: true, + }, + }; +} diff --git a/x-pack/test/upgrade/ftr_provider_context.d.ts b/x-pack/test/upgrade/ftr_provider_context.d.ts new file mode 100644 index 0000000000000..ec28c00e72e47 --- /dev/null +++ b/x-pack/test/upgrade/ftr_provider_context.d.ts @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { GenericFtrProviderContext } from '@kbn/test/types/ftr'; + +import { pageObjects } from './page_objects'; +import { services } from './services'; + +export type FtrProviderContext = GenericFtrProviderContext; diff --git a/x-pack/test/upgrade/page_objects.ts b/x-pack/test/upgrade/page_objects.ts new file mode 100644 index 0000000000000..c8b0c9050dbb9 --- /dev/null +++ b/x-pack/test/upgrade/page_objects.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. + */ + +import { pageObjects } from '../functional/page_objects'; + +export { pageObjects }; diff --git a/x-pack/test/upgrade/reporting_services.ts b/x-pack/test/upgrade/reporting_services.ts new file mode 100644 index 0000000000000..13186cb9b2a75 --- /dev/null +++ b/x-pack/test/upgrade/reporting_services.ts @@ -0,0 +1,213 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license 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 { indexTimestamp } from '../../plugins/reporting/server/lib/store/index_timestamp'; +import { services as xpackServices } from '../functional/services'; +import { services as apiIntegrationServices } from '../api_integration/services'; +import { FtrProviderContext } from './ftr_provider_context'; + +interface PDFAppCounts { + app: { + [appName: string]: number; + }; + layout: { + [layoutType: string]: number; + }; +} + +export interface ReportingUsageStats { + available: boolean; + enabled: boolean; + total: number; + last_7_days: { + total: number; + printable_pdf: PDFAppCounts; + [jobType: string]: any; + }; + printable_pdf: PDFAppCounts; + status: any; + [jobType: string]: any; +} + +interface UsageStats { + reporting: ReportingUsageStats; +} + +function removeWhitespace(str: string) { + return str.replace(/\s/g, ''); +} + +export function ReportingAPIProvider({ getService }: FtrProviderContext) { + const log = getService('log'); + const supertest = getService('supertest'); + const esSupertest = getService('esSupertest'); + const retry = getService('retry'); + + return { + async waitForJobToFinish(downloadReportPath: string) { + log.debug(`Waiting for job to finish: ${downloadReportPath}`); + const JOB_IS_PENDING_CODE = 503; + + const statusCode = await new Promise((resolve) => { + const intervalId = setInterval(async () => { + const response = (await supertest + .get(downloadReportPath) + .responseType('blob') + .set('kbn-xsrf', 'xxx')) as any; + if (response.statusCode === 503) { + log.debug(`Report at path ${downloadReportPath} is pending`); + } else if (response.statusCode === 200) { + log.debug(`Report at path ${downloadReportPath} is complete`); + } else { + log.debug(`Report at path ${downloadReportPath} returned code ${response.statusCode}`); + } + if (response.statusCode !== JOB_IS_PENDING_CODE) { + clearInterval(intervalId); + resolve(response.statusCode); + } + }, 1500); + }); + + expect(statusCode).to.be(200); + }, + + async expectAllJobsToFinishSuccessfully(jobPaths: string[]) { + await Promise.all( + jobPaths.map(async (path) => { + await this.waitForJobToFinish(path); + }) + ); + }, + + async postJob(apiPath: string): Promise { + log.debug(`ReportingAPI.postJob(${apiPath})`); + const { body } = await supertest + .post(removeWhitespace(apiPath)) + .set('kbn-xsrf', 'xxx') + .expect(200); + return body.path; + }, + + async postJobJSON(apiPath: string, jobJSON: object = {}): Promise { + log.debug(`ReportingAPI.postJobJSON((${apiPath}): ${JSON.stringify(jobJSON)})`); + const { body } = await supertest.post(apiPath).set('kbn-xsrf', 'xxx').send(jobJSON); + return body.path; + }, + + /** + * + * @return {Promise} A function to call to clean up the index alias that was added. + */ + async coerceReportsIntoExistingIndex(indexName: string) { + log.debug(`ReportingAPI.coerceReportsIntoExistingIndex(${indexName})`); + + // Adding an index alias coerces the report to be generated on an existing index which means any new + // index schema won't be applied. This is important if a point release updated the schema. Reports may still + // be inserted into an existing index before the new schema is applied. + const timestampForIndex = indexTimestamp('week', '.'); + await esSupertest + .post('/_aliases') + .send({ + actions: [ + { + add: { index: indexName, alias: `.reporting-${timestampForIndex}` }, + }, + ], + }) + .expect(200); + + return async () => { + await esSupertest + .post('/_aliases') + .send({ + actions: [ + { + remove: { index: indexName, alias: `.reporting-${timestampForIndex}` }, + }, + ], + }) + .expect(200); + }; + }, + + async deleteAllReports() { + log.debug('ReportingAPI.deleteAllReports'); + + // ignores 409 errs and keeps retrying + await retry.tryForTime(5000, async () => { + await esSupertest + .post('/.reporting*/_delete_by_query') + .send({ query: { match_all: {} } }) + .expect(200); + }); + }, + + expectRecentPdfAppStats(stats: UsageStats, app: string, count: number) { + expect(stats.reporting.last_7_days.printable_pdf.app[app]).to.be(count); + }, + + expectAllTimePdfAppStats(stats: UsageStats, app: string, count: number) { + expect(stats.reporting.printable_pdf.app[app]).to.be(count); + }, + + expectRecentPdfLayoutStats(stats: UsageStats, layout: string, count: number) { + expect(stats.reporting.last_7_days.printable_pdf.layout[layout]).to.be(count); + }, + + expectAllTimePdfLayoutStats(stats: UsageStats, layout: string, count: number) { + expect(stats.reporting.printable_pdf.layout[layout]).to.be(count); + }, + + expectRecentJobTypeTotalStats(stats: UsageStats, jobType: string, count: number) { + expect(stats.reporting.last_7_days[jobType].total).to.be(count); + }, + + expectAllTimeJobTypeTotalStats(stats: UsageStats, jobType: string, count: number) { + expect(stats.reporting[jobType].total).to.be(count); + }, + + getCompletedReportCount(stats: UsageStats) { + return stats.reporting.status.completed; + }, + + expectCompletedReportCount(stats: UsageStats, count: number) { + expect(this.getCompletedReportCount(stats)).to.be(count); + }, + + getRecentPdfAppStats(stats: UsageStats, app: string) { + return stats.reporting.last_7_days.printable_pdf.app[app]; + }, + + getAllTimePdfAppStats(stats: UsageStats, app: string) { + return stats.reporting.printable_pdf.app[app]; + }, + + getRecentPdfLayoutStats(stats: UsageStats, layout: string) { + return stats.reporting.last_7_days.printable_pdf.layout[layout]; + }, + + getAllTimePdfLayoutStats(stats: UsageStats, layout: string) { + return stats.reporting.printable_pdf.layout[layout]; + }, + + getRecentJobTypeTotalStats(stats: UsageStats, jobType: string) { + return stats.reporting.last_7_days[jobType].total; + }, + + getAllTimeJobTypeTotalStats(stats: UsageStats, jobType: string) { + return stats.reporting[jobType].total; + }, + }; +} + +export const services = { + ...xpackServices, + supertestWithoutAuth: apiIntegrationServices.supertestWithoutAuth, + usageAPI: apiIntegrationServices.usageAPI, + reportingAPI: ReportingAPIProvider, +}; diff --git a/x-pack/test/upgrade/services.ts b/x-pack/test/upgrade/services.ts new file mode 100644 index 0000000000000..cb49abe5e2011 --- /dev/null +++ b/x-pack/test/upgrade/services.ts @@ -0,0 +1,14 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { services as functionalServices } from '../functional/services'; +import { services as reportingServices } from './reporting_services'; + +export const services = { + ...functionalServices, + ...reportingServices, +}; diff --git a/yarn.lock b/yarn.lock index bcf5c37f6f912..466853582e230 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7722,13 +7722,6 @@ axobject-query@^2.0.2: dependencies: ast-types-flow "0.0.7" -b64@4.x.x: - version "4.1.2" - resolved "https://registry.yarnpkg.com/b64/-/b64-4.1.2.tgz#7015372ba8101f7fb18da070717a93c28c8580d8" - integrity sha512-+GUspBxlH3CJaxMUGUE1EBoWM6RKgWiYwUDal0qdf8m3ArnXNN1KzKVo5HOnE/FSq4HHyWf3TlHLsZI8PKQgrQ== - dependencies: - hoek "6.x.x" - babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" @@ -8443,10 +8436,10 @@ bmp-js@^0.1.0: resolved "https://registry.yarnpkg.com/bmp-js/-/bmp-js-0.1.0.tgz#e05a63f796a6c1ff25f4771ec7adadc148c07233" integrity sha1-4Fpj95amwf8l9Hcex62twUjAcjM= -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: - version "4.11.8" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" - integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.11.9: + version "4.11.9" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" + integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== body-parser@1.19.0, body-parser@^1.18.1, body-parser@^1.18.3: version "1.19.0" @@ -8493,14 +8486,6 @@ bottleneck@^2.15.3: resolved "https://registry.yarnpkg.com/bottleneck/-/bottleneck-2.18.0.tgz#41fa63ae185b65435d789d1700334bc48222dacf" integrity sha512-U1xiBRaokw4yEguzikOl0VrnZp6uekjpmfrh6rKtr1D+/jFjYCL6J83ZXlGtlBDwVdTmJJ+4Lg5FpB3xmLSiyA== -bounce@1.x.x: - version "1.2.3" - resolved "https://registry.yarnpkg.com/bounce/-/bounce-1.2.3.tgz#2b286d36eb21d5f08fe672dd8cd37a109baad121" - integrity sha512-3G7B8CyBnip5EahCZJjnvQ1HLyArC6P5e+xcolo13BVI9ogFaDOsNMAE7FIWliHtIkYI8/nTRCvCY9tZa3Mu4g== - dependencies: - boom "7.x.x" - hoek "6.x.x" - bowser@^1.7.3: version "1.9.4" resolved "https://registry.yarnpkg.com/bowser/-/bowser-1.9.4.tgz#890c58a2813a9d3243704334fa81b96a5c150c9a" @@ -8586,7 +8571,7 @@ broadcast-channel@^3.0.3: rimraf "3.0.0" unload "2.2.0" -brorand@^1.0.1: +brorand@^1.0.1, brorand@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= @@ -10591,13 +10576,6 @@ crypt@~0.0.1: resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" integrity sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs= -cryptiles@4.x.x: - version "4.1.3" - resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-4.1.3.tgz#2461d3390ea0b82c643a6ba79f0ed491b0934c25" - integrity sha512-gT9nyTMSUC1JnziQpPbxKGBbUg8VL7Zn2NB4E1cJYvuXdElHrwxrV9bmltZGDzet45zSDGyYceueke1TjynGzw== - dependencies: - boom "7.x.x" - crypto-browserify@^3.0.0, crypto-browserify@^3.11.0: version "3.12.0" resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" @@ -12353,17 +12331,17 @@ element-resize-detector@^1.1.15: batch-processor "^1.0.0" elliptic@^6.0.0: - version "6.5.3" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6" - integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw== + version "6.5.4" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" + integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== dependencies: - bn.js "^4.4.0" - brorand "^1.0.1" + bn.js "^4.11.9" + brorand "^1.1.0" hash.js "^1.0.0" - hmac-drbg "^1.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" emittery@^0.7.1: version "0.7.1" @@ -15796,7 +15774,7 @@ hjson@3.2.1: resolved "https://registry.yarnpkg.com/hjson/-/hjson-3.2.1.tgz#20de41dc87fc9a10d1557d0230b0e02afb1b09ac" integrity sha512-OhhrFMeC7dVuA1xvxuXGTv/yTdhTvbe8hz+3LgVNsfi9+vgz0sF/RrkuX8eegpKaMc9cwYwydImBH6iePoJtdQ== -hmac-drbg@^1.0.0: +hmac-drbg@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= @@ -16600,16 +16578,6 @@ ipaddr.js@2.0.0: resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-2.0.0.tgz#77ccccc8063ae71ab65c55f21b090698e763fc6e" integrity sha512-S54H9mIj0rbxRIyrDMEuuER86LdlgUg9FSeZ8duQb6CUG2iRrA36MYVQBSprTF/ZeAwvyQ5mDGuNvIPM0BIl3w== -iron@5.x.x: - version "5.0.6" - resolved "https://registry.yarnpkg.com/iron/-/iron-5.0.6.tgz#7121d4a6e3ac2f65e4d02971646fea1995434744" - integrity sha512-zYUMOSkEXGBdwlV/AXF9zJC0aLuTJUKHkGeYS5I2g225M5i6SrxQyGJGhPgOR8BK1omL6N5i6TcwfsXbP8/Exw== - dependencies: - b64 "4.x.x" - boom "7.x.x" - cryptiles "4.x.x" - hoek "6.x.x" - irregular-plurals@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/irregular-plurals/-/irregular-plurals-3.2.0.tgz#b19c490a0723798db51b235d7e39add44dab0822" @@ -18039,7 +18007,7 @@ jju@~1.4.0: resolved "https://registry.yarnpkg.com/jju/-/jju-1.4.0.tgz#a3abe2718af241a2b2904f84a625970f389ae32a" integrity sha1-o6vicYryQaKykE+EpiWXDzia4yo= -joi@13.x.x, joi@^13.5.2: +joi@^13.5.2: version "13.7.0" resolved "https://registry.yarnpkg.com/joi/-/joi-13.7.0.tgz#cfd85ebfe67e8a1900432400b4d03bbd93fb879f" integrity sha512-xuY5VkHfeOYK3Hdi91ulocfuFopwgbSORmIwzcwHKESQhC7w1kD5jaVSPnqDxS2I8t3RZ9omCKAxNwXN5zG1/Q== @@ -20018,12 +19986,12 @@ mini-css-extract-plugin@0.8.0: schema-utils "^1.0.0" webpack-sources "^1.1.0" -minimalistic-assert@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3" - integrity sha1-cCvi3aazf0g2vLP121ZkG2Sh09M= +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== -minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: +minimalistic-crypto-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= @@ -20811,9 +20779,9 @@ node-modules-regexp@^1.0.0: integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= node-notifier@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-8.0.0.tgz#a7eee2d51da6d0f7ff5094bc7108c911240c1620" - integrity sha512-46z7DUmcjoYdaWyXouuFNNfUo6eFa94t23c53c+lG/9Cvauk4a98rAUp9672X5dxGdQmLpPzTxzu8f/OeEPaFA== + version "8.0.1" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-8.0.1.tgz#f86e89bbc925f2b068784b31f382afdc6ca56be1" + integrity sha512-BvEXF+UmsnAfYfoapKM9nGxnP+Wn7P91YfXmrKnfcYCx6VBeoN5Ez5Ogck6I8Bi5k4RlpqRYaw75pAwzX9OphA== dependencies: growly "^1.3.0" is-wsl "^2.2.0" @@ -22627,10 +22595,10 @@ printj@~1.1.0: resolved "https://registry.yarnpkg.com/printj/-/printj-1.1.2.tgz#d90deb2975a8b9f600fb3a1c94e3f4c53c78a222" integrity sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ== -prismjs@1.22.0, prismjs@^1.22.0, prismjs@~1.22.0: - version "1.22.0" - resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.22.0.tgz#73c3400afc58a823dd7eed023f8e1ce9fd8977fa" - integrity sha512-lLJ/Wt9yy0AiSYBf212kK3mM5L8ycwlyTlSxHBAneXLR0nzFMlZ5y7riFPF3E33zXOF2IH95xdY5jIyZbM9z/w== +prismjs@1.23.0, prismjs@^1.22.0, prismjs@~1.22.0: + version "1.23.0" + resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.23.0.tgz#d3b3967f7d72440690497652a9d40ff046067f33" + integrity sha512-c29LVsqOaLbBHuIbsTxaKENh1N2EQBOHaWv7gkHN4dgRbxSREqDnDbtFJYdpPauS4YCplMSNCABQ6Eeor69bAA== optionalDependencies: clipboard "^2.0.0" @@ -26128,18 +26096,6 @@ state-toggle@^1.0.0: resolved "https://registry.yarnpkg.com/state-toggle/-/state-toggle-1.0.0.tgz#d20f9a616bb4f0c3b98b91922d25b640aa2bc425" integrity sha1-0g+aYWu08MO5i5GSLSW2QKorxCU= -statehood@6.0.6: - version "6.0.6" - resolved "https://registry.yarnpkg.com/statehood/-/statehood-6.0.6.tgz#0dbd7c50774d3f61a24e42b0673093bbc81fa5f0" - integrity sha512-jR45n5ZMAkasw0xoE9j9TuLmJv4Sa3AkXe+6yIFT6a07kXYHgSbuD2OVGECdZGFxTmvNqLwL1iRIgvq6O6rq+A== - dependencies: - boom "7.x.x" - bounce "1.x.x" - cryptiles "4.x.x" - hoek "5.x.x" - iron "5.x.x" - joi "13.x.x" - static-eval@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/static-eval/-/static-eval-2.0.5.tgz#f0782e66999c4b3651cda99d9ce59c507d188f71" @@ -27907,9 +27863,9 @@ typescript@4.1.3, typescript@^3.2.2, typescript@^3.3.3333, typescript@^3.5.3, ty integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg== ua-parser-js@^0.7.18: - version "0.7.23" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.23.tgz#704d67f951e13195fbcd3d78818577f5bc1d547b" - integrity sha512-m4hvMLxgGHXG3O3fQVAyyAQpZzDOvwnhOTjYz5Xmr7r/+LpkNy3vJXdVRWgd1TkAb7NGROZuSy96CrlNVjA7KA== + version "0.7.24" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.24.tgz#8d3ecea46ed4f1f1d63ec25f17d8568105dc027c" + integrity sha512-yo+miGzQx5gakzVK3QFfN0/L9uVhosXBBO7qmnk7c2iw1IhL212wfA3zbnI54B0obGwC/5NWub/iT9sReMx+Fw== uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.5" @@ -28492,9 +28448,9 @@ url-parse-lax@^3.0.0: prepend-http "^2.0.0" url-parse@^1.4.3, url-parse@^1.4.7: - version "1.4.7" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.4.7.tgz#a8a83535e8c00a316e403a5db4ac1b9b853ae278" - integrity sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg== + version "1.5.1" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.1.tgz#d5fa9890af8a5e1f274a2c98376510f6425f6e3b" + integrity sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q== dependencies: querystringify "^2.1.1" requires-port "^1.0.0"